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

Expose in-progress routes in the admin website UI #64

Open
michaelyfan opened this issue May 21, 2021 · 0 comments
Open

Expose in-progress routes in the admin website UI #64

michaelyfan opened this issue May 21, 2021 · 0 comments
Assignees
Labels
new feature This is a new feature

Comments

@michaelyfan
Copy link
Member

michaelyfan commented May 21, 2021

Currently, crewmembers using the route-recorder app have the option to save routes to resume at a later date. This is useful when, for example, a route takes a really long time to complete so crewmembers will split the work between one or two days. This allows crewmembers to save their work without submitting/finishing a route.

Admins using the admin website should be able to view all routes which are currently saved but unfinished. This could be exposed on the homepage (home.component.html and its related files).

Saved routes are stored in a Firebase Firestore collection called route_records_in_progress, more information about their structure here:
https://github.com/dscgt/route_recorder/tree/master/models
The goal is to take everything in the route_records_in_progress collection and show it in the UI somehow.

Please ask for assistance if any of this is unclear. Happy to clarify.

Also

Note that the website will use an emulated Firestore instance when in development mode (i.e. when started with npm start), and because the emulated Firestore instance is empty by default, route_records_in_progress will be empty too, and you won't have anything to show. To give yourself some data, you can create a route_records_in_progress collection and some documents with the emulated Firestore UI, following the structure in the aforementioned link.

Creating your own documents is annoying and might take a while, but you should only have to do this once; you can then export whatever you've created and import them on your next npm start run (see more here: https://firebase.google.com/docs/emulator-suite/install_and_configure#export_and_import_emulator_data) by changing the emulate script in package.json.

Getting data: https://firebase.google.com/docs/firestore/query-data/get-data and https://github.com/angular/angularfire#developer-guide

@michaelyfan michaelyfan added the new feature This is a new feature label May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature This is a new feature
Projects
None yet
Development

No branches or pull requests

2 participants