-
Notifications
You must be signed in to change notification settings - Fork 4
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
Overall flow of the app #43
Comments
@m4v15 can you please review my issue? Thanks. |
Nice! In general I would say this is good, but would like a bit more detail in places, especially what will happen on the backend at the endpoints you mention (I think you probably know but I want to see it written down clearly in the plan) eg:
I would also say it would probably help if this was displayed in a more consistant manner, to make sure everything is covered - when it is written like this it is hard to spot anything that might be missing e.g: Front EndName of "page"
Back EndEndpoint URL and method
Again I want to stress to all of you that this is about everyone being on the same page about what's happening - maybe you all know all of the extra details already, and that's great, but please get them written down. |
I will go through this and give some specific feedback about some of the points in a little bit. |
|
More specific feedback as promised - you don't have to do all (or any of it) but just my thoughts on the plan
Just to be clear, you should be requesting the data in
I thought this would be in the cars table so would already be on global state?
What happens at addLogs?
Why
To me a simpler way of doing it could be:
Nice to have this extracted out as stretch goals |
FYI, @Samaamro20 I wrote this before I saw your other comment 🙈 |
The flow of the app need to be updated regarding the rerpots/logs page
|
User requests the
GET /
and gets served up build/public files.Render the login component by default.
Send request to
checkAuth
endpoint which will check the cookies and respond accordingly:1. If not; keep the login component rendered (no change). related checkAuth: is the user already logged in? #45
- once the login button is pressed, send a request to the server
/login
to make sure the user have the correct credentials to sign in.2. If so, set the cookies and send the response, and render the cars component.
3. To render the cars' component with data, send a request to the backend to fetch data.
GET /cars
When the user selects a car, update the global state to that car's information.
1. redirect to
/home
componentOn the home screen, there are two components:
Add: once the user clicks on the add button, they'll get redirected to add trip component.
/add
.- Make a request to the server and get the last log of startKM associated with the selected car, auto fill startKm.
GET /lastLog
- Update the global state to what the user fills in as they go (onChange).
- When confirm is pressed, render the confirm component.
/confirm
.- Once the confirm button is pressed, send your data to be saved in the database.
POST /addLogs
.- After it saves, update the the cars table column of lastlog_km to the value of end_km of the last log.
- Redirect to
/reports
. (Table and calendar father element)Show reports: once the user clicks on the show reports button, a request is made to the database to fetch all reports associated with the selected car.
POST /carLogs
- render the reports parent component, and inside it:
1. render the table component along with retrieved data (according to current month).
2. render the calendar component along with the current month.
- once you select a month from the calendar, send a request to the server to fetch that month's data.
GET /monthData
- render the data in the table component.
NOTE
We have two extra features in case everything goes well and we have enough time to implement them:
Notes' AutoComplete feature
Remember last car selected by the user feature
The text was updated successfully, but these errors were encountered: