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">
|
<div className="roomSelection">
|
||||||
<label htmlFor="select-room">Sélectionner une salle: </label>
|
<label htmlFor="select-room">Sélectionner une salle: </label>
|
||||||
<select value={selectedRoom?._id || ''} onChange={(e) => handleSelectRoom(e)}>
|
<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) => (
|
{rooms.map((room) => (
|
||||||
<option key={room._id} value={room._id}>
|
<option key={room._id} value={room._id}>
|
||||||
{room.title}
|
{room.title}
|
||||||
</option>
|
</option>
|
||||||
))}
|
))}
|
||||||
<option value="add-room">Add Room</option>
|
<option value="add-room">Ajouter salle</option>
|
||||||
</select>
|
</select>
|
||||||
{/* <button onClick={() => setOpenDialog(true)}>Ajouter une salle</button> */}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{selectedRoom && (
|
{selectedRoom && (
|
||||||
|
|
@ -448,7 +450,7 @@ const Dashboard: React.FC = () => {
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<TextField
|
<TextField
|
||||||
value={newRoomTitle}
|
value={newRoomTitle}
|
||||||
onChange={(e) => setNewRoomTitle(e.target.value)}
|
onChange={(e) => setNewRoomTitle(e.target.value.toUpperCase())}
|
||||||
fullWidth
|
fullWidth
|
||||||
/>
|
/>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ class RoomsController {
|
||||||
throw new AppError(MISSING_REQUIRED_PARAMETER);
|
throw new AppError(MISSING_REQUIRED_PARAMETER);
|
||||||
}
|
}
|
||||||
|
|
||||||
const normalizedTitle = title.toLowerCase();
|
const normalizedTitle = title.toUpperCase();
|
||||||
|
|
||||||
const roomExists = await this.rooms.roomExists(normalizedTitle);
|
const roomExists = await this.rooms.roomExists(normalizedTitle);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue