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

New update for Issue#945 #990

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

New update for Issue#945 #990

wants to merge 2 commits into from

Conversation

Thuyhaile
Copy link
Contributor

@Thuyhaile Thuyhaile commented Dec 5, 2023

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:

  1. Add a function for removing activities for the citizen:
  • Only activities that have been marked as 'complete' or have finished running a timer can be removed.
  • After marking an activity as finished, drag and remove it from the day.
drag_remove_citizen.mp4

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.

see_finish_citizen.mp4
  1. Add "drag and delete" functionality for activities for the guardian:
  • Activities can be dragged from their current position in the 'ugeplan' UI, dropped, and then deleted from the day. Only one activity can be deleted at a time.
  • The guardian can drag and delete all activities without any conditions.
drag_delete_guardian.mp4

Other related changes:

  1. 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:
  • Add a 'reload data' function for the back arrow at the top-left of the screen.
  • Add 'reload data' and 'navigation to Ugeplan UI' for the 'Gem til borger' button.
    image
  1. 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

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

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:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas, if necessary
  • I have made corresponding changes to the documentation, if necessary
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works, if necessary
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have Acceptance Tested this on an iOS device
  • I have Acceptance Tested this on an Android device

@Thuyhaile
Copy link
Contributor Author

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.

@Thuyhaile Thuyhaile linked an issue Dec 5, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make a drag and drop box for activities
1 participant