BMMRO-tech / BMMRO

MIT License
3 stars 5 forks source link

Editing an existing Logbook #509

Open Rodrjen opened 4 months ago

Rodrjen commented 4 months ago

Context As a user I want to be able to edit an existing Logbook so that I can update the information, correct any possible mistakes and add any additional information that was not added during the creation of an entry.

In-scope

Out-scope

Scenarios Scenario 1: Landing on the "Edit Logbook" page GIVEN I am on the Trip Summary page of a specific Trip WHEN I click on a specific Logbook entry or the > icon of that entry THEN I am redirected to the "Edit Logbook" page of that specific Logbook

Scenario 2: "Edit Logbook" page layout GIVEN I am on the "Edit Logbook" page of a specific Logbook WHEN the page is loaded THEN the available fields in the Firebase database will be pre-filled with the values of the previous entry AND I see the heading "Edit Logbook entry" at the top of the page AND I see two buttons on the footer: "Cancel" and "Save & Update" (wireframe 1)

Scenario 3: Editing a Logbook entry GIVEN I want to edit the information of a specific Logbook WHEN I am on the "Edit Logbook" page THEN the field "Time" is not updated automatically AND I am able to manually overwrite all pre-filled fields, including the field "Time" AND I can add information to the fields that are empty

Scenario 4: Updating the Logbook entry in the Firebase DB GIVEN I have edited an existing Logbook WHEN I click the "Save & Update" button THEN I am redirected to the Trip Summary page AND all the manually edited fields are updated in the Firebase DB

Scenario 5: Displaying the updated time of a Logbook entry in the Trip Summary Page GIVEN I have manually updated the field "Time" on the "Edit Logbook" page WHEN I am redirected to the Trip Summary page after saving the changes THEN I see the updated time entry on the Logbook entry section AND the entry is ordered chronologically

Scenario 6: Cancel editing a Logbook entry GIVEN I edit some fields in the "Edit Logbook" page WHEN I click on the "Cancel" button THEN the information is not updated in the Firebase database AND I am redirected to the Trip Summary Page AND the information on the Logbook entry section show the values as they previously were

Scenario 7: Editing an exported logbook GIVEN I click on a specific Logbook entry or the > icon of that entry WHEN the trip associated with this logbook has the status "exported" in the Firebase database THEN there is a message at the top of the "Edit Logbook" page that reads "This logbook has been exported and can no longer be edited in the app." AND all the input fields are greyed out AND I cannot edit any of the fields AND the footer is not longer displayed (wireframe 2)

Scenario 8: Navigate to edit page via URL of an exported trip GIVEN I navigate the app using the URL "trips/uuid/logbook-entry/uuid/edit" WHEN this logbook has the status "exported" in the Firebase database THEN there is the message that I cannot edit this logbook anymore AND all the input fields are greyed out

Acceptance Criteria

  1. "Edit Logbook" page creation
  2. The page has an "Edit Logbook entry" heading
  3. There are two buttons in the footer: "Cancel" and "Save & Update"
  4. The existing saved values of a specific Logbook are displayed once the "Edit Logbook" page is loaded
  5. All the fields can be editable
  6. All the edited fields are saved and updated in the Firebase database
  7. The field "Time" can be manually edited
  8. The edited "Time" value is displayed and ordered chronologically in the Logbook section on the Trip Summary Page for a specific Logbook entry
  9. Clicking on the "Cancel" button doesn't modify the information saved in the Firebase
  10. Clicking on the "Cancel" button redirects you to the Trip Summary Page
  11. Clicking on the "Save & Update" button redirects you to the Trip Summary Page
  12. Logbooks that are linked to a trip that has the status "exported" in the Firebase database cannot be edited
  13. Navigating the app via the URL to a logbook that has been already exported cannot be edited
  14. Entries edited in offline mode are saved locally on the user's device
  15. Upon regaining internet connectivity, the locally saved entries are synchronised with the database without data loss or duplication.

Wireframes Wireframe 1 image

Wireframe 2 image