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
Editing a Logbook
Updating the entries in the Firebase DB
Out-scope
Editing a logbook for a trip that has the status "exported"
ScenariosScenario 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
"Edit Logbook" page creation
The page has an "Edit Logbook entry" heading
There are two buttons in the footer: "Cancel" and "Save & Update"
The existing saved values of a specific Logbook are displayed once the "Edit Logbook" page is loaded
All the fields can be editable
All the edited fields are saved and updated in the Firebase database
The field "Time" can be manually edited
The edited "Time" value is displayed and ordered chronologically in the Logbook section on the Trip Summary Page for a specific Logbook entry
Clicking on the "Cancel" button doesn't modify the information saved in the Firebase
Clicking on the "Cancel" button redirects you to the Trip Summary Page
Clicking on the "Save & Update" button redirects you to the Trip Summary Page
Logbooks that are linked to a trip that has the status "exported" in the Firebase database cannot be edited
Navigating the app via the URL to a logbook that has been already exported cannot be edited
Entries edited in offline mode are saved locally on the user's device
Upon regaining internet connectivity, the locally saved entries are synchronised with the database without data loss or duplication.
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
Wireframes Wireframe 1![image](https://github.com/BMMRO-tech/BMMRO/assets/116743643/57c1dcd6-caa3-4309-b47d-e3fe0063f18f)
Wireframe 2![image](https://github.com/BMMRO-tech/BMMRO/assets/116743643/985a1db8-5455-4b12-b9da-5cfb2a1c0c43)