Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add teachers to the timetable #1629

Merged
merged 11 commits into from
May 16, 2024
Merged

Add teachers to the timetable #1629

merged 11 commits into from
May 16, 2024

Conversation

nilsreichardt
Copy link
Member

Description

This pull request adds the Sharezone Plus feature to add teachers to the timetable.

Demo

Screen.Recording.2024-05-09.at.11.57.50.mov

Changed the lesson sheet to a dialog:

image

Reason: In the sheet you need to scroll to see the substitutions tiles and it's not easy to adjust the size of the sheet (depending on the screen size). A dialog is here the better option.

Users can also add the teacher when adding a lesson:

image

Sharezone Plus page:

image

Related Tickets

Closes #1608
Opens #1628

@github-actions github-actions bot added feature: timetable / calendar Includes anything regarding lessons (timetable) and events (calendar). ui / ux testing ui: light-mode user: teacher ui: dark-mode feature: sharezone plus Includes everything that is related to the Sharezone Plus subscription w: dashboard-page Page that shows a summary of all important things (homeworks, events, etc.). labels May 9, 2024
Copy link

github-actions bot commented May 9, 2024

Visit the preview URL for this PR (updated for commit 4f1e734):

https://sharezone-website-dev--pr1629-add-teacher-3rraqs9a.web.app

(expires Sun, 19 May 2024 07:46:37 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 372b0431a96247f908d9a97d5d865de1c8b3b04e

Copy link

github-actions bot commented May 9, 2024

Visit the preview URL for this PR (updated for commit 4f1e734):

https://sharezone-console-dev--pr1629-add-teacher-63yxgzkn.web.app

(expires Sun, 19 May 2024 07:46:24 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 471536afe3f6ec4895d9ea75513730b515d17eb6

Copy link

github-actions bot commented May 9, 2024

Visit the preview URL for this PR (updated for commit 4f1e734):

https://sharezone-test--pr1629-add-teacher-d319lxmr.web.app

(expires Sun, 19 May 2024 07:47:30 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 4cb3ae61e1e018abfd9841fd3239f5b49ccc034b

Copy link
Collaborator

@Jonas-Sander Jonas-Sander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should first change Lesson.teacher to be a Set/List of teacher (names) or a Map of objects where we could add more fields later. I mean its definitely possible that a lesson has several teachers. We could use String? get teacher => teachers.first in the DTO at first so we can merge the feature with the current behavior and add support for several teachers in the future if we want. WDYT?

Comment on lines 220 to 221
final teachers =
lessons.where((l) => l.teacher != null).map((l) => l.teacher!);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Maybe a bit cleaner:

Suggested change
final teachers =
lessons.where((l) => l.teacher != null).map((l) => l.teacher!);
final teachers = lessons.map((l) => l.teacher).nonNulls;

app/lib/timetable/src/models/lesson.dart Show resolved Hide resolved
@nilsreichardt
Copy link
Member Author

Idea: Split teachers at ","

Copy link
Collaborator

@Jonas-Sander Jonas-Sander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We settled on using just the teacher field for now.

@nilsreichardt nilsreichardt added this pull request to the merge queue May 16, 2024
Merged via the queue into main with commit f1ae76d May 16, 2024
37 checks passed
@nilsreichardt nilsreichardt deleted the add-teacher branch May 16, 2024 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: sharezone plus Includes everything that is related to the Sharezone Plus subscription feature: timetable / calendar Includes anything regarding lessons (timetable) and events (calendar). testing ui: dark-mode ui: light-mode ui / ux user: teacher w: dashboard-page Page that shows a summary of all important things (homeworks, events, etc.).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a teacher to a lesson
2 participants