Open Thuyhaile opened 11 months ago
Dette 'issue' kan ikke bestå tjek, da vi i vores kode har tilføjet 'Removed' til enumen ActivityState { Normal, Active, Canceled, Completed, Removed }, som findes i filen activity_state_enum i api-client. Dog kan vi ikke blande os direkte i denne enum, da den tilhører api-client-siden. For at prøve at køre 'issue': • Ctrl + klik på 'ActivityState' i for eksempel filen 'weekplan_bloc.dart'. • Tilføj 'Removed' til enum ActivityState { Normal, Active, Canceled, Completed, Removed }. Hvis 'Removed' tilføjes fra api-client-siden, behøver vi ikke at gøre dette.
Description
Now, only the guardian can delete activities in the 'Edit mode' UI, while the citizen can only mark activities as finished. The citizen wishes to remove finished activities from the day to focus solely on activities that haven't been completed.
Fixes #\<945>
Possible Suggested Solution:
https://github.com/aau-giraf/weekplanner/assets/95319419/47fcdeeb-d5f4-435e-adc6-28c75c46e096
The activities that were removed by the citizen will not be deleted; they will only be hidden from the citizen's screen. The guardian can see them with the red 'complete' mark on his screen. A new button at the bottom of the day serves as a 'a separate box' in the school. When pressed, children have the opportunity to view hidden activities or all activities done during the day.
https://github.com/aau-giraf/weekplanner/assets/95319419/d41b643b-bc42-4b5c-a7c5-fa4017cede84
https://github.com/aau-giraf/weekplanner/assets/95319419/8fce797a-a3bf-4b69-ace7-29430228988d
Other related changes:
When navigating from the 'Aktivitet' UI to the 'Ugeplan' UI, data isn't reloaded. To enable the 'drag and delete' functionality, users need to navigate back to the previous UI and then log into the 'Ugeplan' UI again. This inconvenience for the user can be addressed by implementing the following changes in the 'Aktivitet' UI:
Fix old error: Activities don't show all on the first load.
Note:
To implement this issue, it is necessary to add 'Removed' to the enum ActivityState { Normal, Active, Canceled, Completed, Removed } on the API client side.
Type of change
How Has This Been Tested?
Android Platform: emulation is carried out using Android Studio on Windows computer iOS Platform: emulation is carried out using Xcode on MacBook
Development Configuration Flutter version: 3.16.0 Dart version: 3.2.0
Checklist: