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

174 - Driver Summary Routing Logic Implementation #174

Open
2 of 4 tasks
ishaansathaye opened this issue May 4, 2023 · 0 comments
Open
2 of 4 tasks

174 - Driver Summary Routing Logic Implementation #174

ishaansathaye opened this issue May 4, 2023 · 0 comments
Assignees
Labels
driver Issues for the Driver side of the project enhancement New feature or request frontend

Comments

@ishaansathaye
Copy link
Collaborator

ishaansathaye commented May 4, 2023

Is your feature request related to a problem? Please describe.
The driver summary page has been made and placed in App.tsx. However, the routing for the page is not complete and needs to be routed in specific places when the driver is punching out.

Logic:

  • DriverSummary Page needs to be shown when the driver is logging out
  • If the weight is 0 then clicking on "Punch Out" on the Dashboard routes to DriverSummary and clicking on Sign out In Driver Summary logs the driver out
  • If there is still weight -> TransferPage is shown
    • Clicking on Leave It -> routes to DriverSummary and clicking on Sign out in Driver Summary logs the driver out
    • Clicking on Transfer It -> when the driver transfers the weight (clicks Submit) only then does it route to DriverSummary and clicking on Sign Out on the page logs the driver out

Describe the steps you'd like a developer to take or the acceptance criteria

In frontend/src/Components/TransferPage/TransferPage.tsx , frontend/src/Components/Dashboard/Dashboard.tsx, and frontend/src/Components/Transfering/Transfering.tsx:

Implement the above logic:

  • TransferPage houses the Transfer It and Leave It functions -> route to Driver Summary Page appropriately for the Leave It function
  • Transferring Page houses the Transfer It logic and should route the Driver Summary Page (when weight is >= 0) when Submit is clicked
  • Dashboard Page houses the "Punch Out" logic and should route to Driver Summary Page
  • Clicking Sign Out in the Driver Summary Page should log out the driver no matter what

PR Submission and Acceptance Criteria

  • Driver Summary page is routed to in all cases in the logic
  • Clicking on Sign Out in the Driver Summary Page correctly logs out the driver
  • No errors regarding logout in the console

Additional context

  • Most of the logic is in place, so this task is just a matter of refactoring to fit the Driver Summary Page
    • Increment testing will be beneficial in this task
  • Go through the deployed version of the site for the workflow to understand where the page needs to be put in if confused
  • No need to worry about redirecting (going back) in the Driver Summary Page for now

Dependencies

  • None
@ishaansathaye ishaansathaye added enhancement New feature or request frontend driver Issues for the Driver side of the project labels May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
driver Issues for the Driver side of the project enhancement New feature or request frontend
Projects
None yet
Development

No branches or pull requests

2 participants