-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description. This PR adds the feature of a substitution schedule. Users can: * Mark a lesson as canceled * Change the room Users can inform their group members that a substitution has been changed. The name of the user who made the change will be displayed in the class sheet. For the timetable, the substitution will be displayed. For the dashboard: Canceled lessons are not shown, room changes are shown (without showing the old room) - we don't have enough space there. Only users who have permission to change lessons are allowed to make changes in the substitution plan (in this case "Aktive Kursmitglied" and "Administrator"). ## How can I access this feature? For now, anyone who is on the Alpha or Beta track. However, once this feature is on the stable track, only Sharezone Plus users will have access to this feature. ## Where are substitutions stored? We store substitutions in the lesson document. This makes it easy to access the substitutions. The complete layout looks like this: ``` substitutions: { [substitutionId]: { type: "cancelled" | "placeChanged" | "unknown", date: "YYYY-MM-DD", created: { on: FieldValue.serverTimestamp(), by: "userId" notifyGroupMembers: true | false }, // Only for type "placeChanged" updated: { on: FieldValue.serverTimestamp(), by: "userId", notifyGroupMembers: true | false, (newPlace: "string") }, // We don't delete substitutions, we mark them as deleted. This is to // notify the group members that the substitution was removed but still // support offline mode. deleted: { on: FieldValue.serverTimestamp(), by: "userId", notifyGroupMembers: true | false }, } } ``` ## Demo _The demo is missing the "Beta" tag on the right side._ Screenshot: ![image](https://github.com/SharezoneApp/sharezone-app/assets/24459435/a97c2785-baea-41e4-ad99-f63fc8ab8caf) Video: https://github.com/SharezoneApp/sharezone-app/assets/24459435/9f6ba728-e174-4385-89b7-1f7fe65012c0 The sheet is also scrollable but still draggable: https://github.com/SharezoneApp/sharezone-app/assets/24459435/ce75704e-f207-47a5-bb57-bc977fea0953 New timetable FAB sheet (screenshot): ![image](https://github.com/SharezoneApp/sharezone-app/assets/24459435/488b21a6-2036-47f1-a8f6-c2c3fc02b092) Option "Vertretungsplan" in timetable FAB sheet: https://github.com/SharezoneApp/sharezone-app/assets/24459435/155894f9-3011-4bc5-b60e-4fd0884bae44 This option is only there to make the feature more visible. The user can't add substitutions with this button. **Notification:** ![Screenshot_20240505-171102](https://github.com/SharezoneApp/sharezone-app/assets/24459435/116d0960-0ea0-4245-85f7-2572fbc2002d) ## Related Tickets Closes #279
- Loading branch information
1 parent
66851a3
commit 0030a7c
Showing
39 changed files
with
1,599 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.