diff --git a/schema.graphql b/schema.graphql index 61540c8..0b1c17f 100644 --- a/schema.graphql +++ b/schema.graphql @@ -499,7 +499,8 @@ type Query { primussExams: [PrimussExamByProgram] primussExamsForAnCode(ancode: Int!): [PrimussExam!] rooms: [Room!]! - roomsForSlot(day: Int!, time: Int!): SlotWithRooms + roomsForSlot(day: Int!, time: Int!): RoomsForSlot + roomsForSlots: [RoomsForSlot!]! roomsWithConstraints(exahm: Boolean, handicap: Boolean!, lab: Boolean!, placesWithSocket: Boolean!): [Room!]! roomsWithInvigilationsForSlot(day: Int!, time: Int!): InvigilationSlot semester: Semester! @@ -583,6 +584,12 @@ type RoomWithInvigilator { studentCount: Int! } +type RoomsForSlot { + day: Int! + rooms: [Room!]! + slot: Int! +} + type Semester { id: String! } @@ -613,15 +620,6 @@ type SlotWithExamGroups { slotNumber: Int! } -type SlotWithRooms { - dayNumber: Int! - exahmRooms: [Room!]! - labRooms: [Room!]! - normalRooms: [Room!]! - ntaRooms: [Room!]! - slotNumber: Int! -} - type Starttime { number: Int! start: String! diff --git a/src/lib/Nav.svelte b/src/lib/Nav.svelte index f5430d3..e2ce37d 100644 --- a/src/lib/Nav.svelte +++ b/src/lib/Nav.svelte @@ -86,7 +86,7 @@
| Slot | + {#each $RoomsForSlots?.data?.rooms as room} +{room.name} | + {/each} +
|---|---|
| ({slot.day}, {slot.slot}) | + {#each $RoomsForSlots?.data?.rooms as room} +{roomAvailable(room.name, slot)} | + {/each} +