BMMRO-tech / BMMRO

MIT License
3 stars 5 forks source link

Create Trips Form page #496

Open Rodrjen opened 4 months ago

Rodrjen commented 4 months ago

Context As a user, I want to create a new trip so that I can later add my logbooks and when applicable my encounters.

In-scope

Out-scope

Scenarios Scenario 1:Adding "New Trip" Button to Trip Overview Page GIVEN that I am logged in and on the "Trip Overview" page, WHEN I look at the screen, THEN I see a button labeled "+ New" for creating a new trip on the top-right of the screen (check Wireframe 1)

Scenario 2: Opening the New Trip Form GIVEN I see the "+ New" button on the "Trip Overview" page, WHEN I click the button, THEN a new trip form opens AND I see a Page title named "NEW TRIP" AND I see a "Save and Start new logbook" button in the footer AND I see a cancel button in the footer.

Scenario 3: Defining Fields for the New Trip Form GIVEN that I am on the new trip form page, WHEN I examine the form fields, THEN I see the fields where I need to insert the following information:

Input field Required Data specification
Trip Number Yes Number
Date Yes Automated
Time Yes Automated
Vessel Yes Dropdown as in encounter details page
GPS file name No YY_MMDDFirst2LettersOfTheVesselName.txt
Area Yes Dropdown as in encounter details page
Project No Dropdown as in encounter details page
Observers No Free text. Separate names by comma
Number of Observers No Automated from the count of the observers field
Engine hours meter reading No Number with decimals. Decimals must be optional
Wind speed No Number. Metric is knots
Wind direction No Dropdown as in the field "same direction of travel" in the habitat details page
Comments No Free text

Scenario 4: Saving the New Trip GIVEN that I have filled out the new trip form with the required information, WHEN I click the "Save & Start Logbook" button, THEN the trip information is saved in the Firebase database AND the the trip information is backup AND the Trip ID containing: Date-FirstTwoLettersofVessel-TripNumber is generated and saved in the Firebase database AND I'm redirected to the logbook entry page

Scenario 5: Navigating to Logbook entry page GIVEN I click on the "Save & Start Logbook" button on the "Trip Form" page WHEN I am redirected to the Logbook entry page THEN I see a header with both "Trips" & "Encounters" toggles AND a blank body page

Scenario 6: Leaving required fields empty GIVEN that I don't filled out the required information on new trip form, WHEN I click the "Save & Start Logbook" button, THEN the required fields are distinguishable enough so that I know which fields need to be fill-out (check wireframe 2)

Scenario 7: Cancelling the New Trip and Returning to Trip Overview GIVEN that I want to cancel the new trip form, WHEN I click the "Cancel" button, THEN I am prompt with a cancellation confirmation pop-up window (check wireframe 3) AND the trip information is NOT saved in the Firebase database AND I am redirected back to the "Trip Overview" page.

Acceptance Criteria

  1. The "+ New" button should be displayed on the top-right of the "Trip Overview" page.
  2. The appearance of the button should be consistent with the design of the application.
  3. Clicking on the "+ New" button opens a new form to create a trip.
  4. The form should include all the fields listed in "Scenario 3".
  5. The required fields should have a red asterisk (check wireframe 2).
  6. The form should have a caption at the bottom with the text " * required fields" (check wireframe 2).
  7. The Trip form page includes a "Save & Start Logbook" button
  8. The Trip form page includes a "Cancel" button to allow the user cancel the trip and not save the trip information.
  9. After saving the trip information the trip form should be editable until the user ends the trip
  10. After saving the trip information, the TripID is generated and containing the Date- FirstLettersOfVessel-Trip Number
  11. After saving the trip information the user is redirected to the Logbook entry page.
  12. The Logbook entry page contains only the a header with both "Trips" & "Encounters" toggles
  13. After cancelling the the Trip form, the user should be redirected back to the "Trip Overview" page.
  14. The saved trip information is backed-up

Wireframes Wireframe 1: image

Wireframe 2: image

Wireframe 3: image