Permet d'ajouter une première salle

Nom de salle toujours en majuscules (bd)
This commit is contained in:
C. Fuhrman 2025-02-27 16:07:00 -05:00
parent 70d6d1bc56
commit 4cc6ee79e4
2 changed files with 7 additions and 5 deletions

View file

@ -426,15 +426,17 @@ const Dashboard: React.FC = () => {
<div className="roomSelection">
<label htmlFor="select-room">Sélectionner une salle: </label>
<select value={selectedRoom?._id || ''} onChange={(e) => handleSelectRoom(e)}>
{/* <option value="">Sélectionner une salle</option> */}
<option value="" disabled>
-- Sélectionner une salle --
</option>
{rooms.map((room) => (
<option key={room._id} value={room._id}>
{room.title}
</option>
))}
<option value="add-room">Add Room</option>
<option value="add-room">Ajouter salle</option>
</select>
{/* <button onClick={() => setOpenDialog(true)}>Ajouter une salle</button> */}
</div>
{selectedRoom && (
@ -448,7 +450,7 @@ const Dashboard: React.FC = () => {
<DialogContent>
<TextField
value={newRoomTitle}
onChange={(e) => setNewRoomTitle(e.target.value)}
onChange={(e) => setNewRoomTitle(e.target.value.toUpperCase())}
fullWidth
/>
</DialogContent>

View file

@ -25,7 +25,7 @@ class RoomsController {
throw new AppError(MISSING_REQUIRED_PARAMETER);
}
const normalizedTitle = title.toLowerCase();
const normalizedTitle = title.toUpperCase();
const roomExists = await this.rooms.roomExists(normalizedTitle);