-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: add support for multiple vehicles #425
feat: add support for multiple vehicles #425
Conversation
These fileds indicate whether an user has an agreement of a particular type. This change is done to support the upcoming agreement change which allow for a user to either use bocken, the electric bike *hornet* or both.
A user which has an agreement type which does not match that of bocken cannot create a journal entry, if not checked a person with only a agreement that applies to hornet could add entries which would be incorrect.
made migration to initiliaze data and such but no real work in replacing the logic in journal entries and such
need to test and further fix the front-end so that the automatically filled trips are fixed
Added code for fetching the latest status of all of the vehicles dynamically so that it mimics previous behaviour with only a single vehicle
Show the main group and the vehicle driven for the reports so that it is "easier" to collect statistics.
Updated tests for journalentryform to use vehicle, also added tests which check if the user can or can not drive a particular vehicle etc.
Now fetches the attribute based on the vehicle id which is stored in the DOM, technically has support for unlimited vehicles but might not as fool proof.
If there were no entries the code didn't fetch the meter stats from the vehicle objects, now it does :)
Just curious, does UTN plan on having more vehicles or is this just a feature (a welcomed one)? @sgronlund |
This is implemented since UTN has in fact introduced more vehicles, an electric bike to be exact. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fungerar fint!
@elsareuter Lint error så ska bara göra en snabb commit som fixar de 😸 |
Hello!
The following pull request attempts to add support for multiple vehicles and types of vehicles within the journal system. Tests have been added to check for this feature, and following are images of how the "new" system looks.
This is marked as a draft for the moment, as I'll do some finishing touches before I am completely satisfied.