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

Add 'Start drive' button #506

Open
monikakrawczak opened this issue May 20, 2020 · 1 comment
Open

Add 'Start drive' button #506

monikakrawczak opened this issue May 20, 2020 · 1 comment
Labels
discuss-with-pah frontend Frontend work question Further information from team is requested

Comments

@monikakrawczak
Copy link
Contributor

monikakrawczak commented May 20, 2020

The driver can start the new drive.
It means that the drive is ONGOING.

When the drive is in an ONGOING state, then the menu item changes the title from 'Start new drive' to 'Resume ongoing drive'.

When there is no ONGOING drive, then the 'Start new drive' form contains only 4 fields:

  • Date
  • Start Location
  • Start Mileage
  • Car
    All those fields are required.
    At the bottom is the 'Start Drive' button.

When the driver clicks on that button, then:

  • the 'Drive start time' timestamp is saved in the local storage and sent to the server when online and drive completed
  • 4 listed above field are read-only
  • the rest of form's fields are displayed

Change the 'RESET' button in the ONGOING drive to the 'DELETE' which will delete the ONGOING drive.

THE 'SAVE' button also records 'Drive end time' which is sent to the server eventually.

For backend reference see #505

@monikakrawczak monikakrawczak added the frontend Frontend work label May 20, 2020
@arturtamborski
Copy link
Member

arturtamborski commented May 20, 2020

What should happen when user clicks this button again? Should the timestamp update?
Or maybe we should make it one-click-only: click -> rest of form shows up and the button is turned off.

Also, if we will have that button then maybe it will be better to remove the calendar button? Seems kinda pointless to have it if you have the "start" button.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss-with-pah frontend Frontend work question Further information from team is requested
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants