mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
Permet d'ajouter une première salle
Nom de salle toujours en majuscules (bd)
This commit is contained in:
parent
70d6d1bc56
commit
4cc6ee79e4
2 changed files with 7 additions and 5 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue