-
Notifications
You must be signed in to change notification settings - Fork 0
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
Emergency flow page #45
Conversation
Visit the preview URL for this PR (updated for commit 1e4bd35): https://sideline-sidekick-app--pr45-emergencyflowpage-6ltdvyaw.web.app (expires Tue, 11 Jun 2024 17:13:22 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: c79d7b8d45dd65a5ed497bfab058d62b30d420cc |
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.
also just remembered, make sure to add a subtitle field at the top. This is the part that is displayed on the card for that emergency |
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.
Almost ready to go! Just address the changes I noted, and also make sure to have some sort of error message notifying the user when a required field isn't filled out when they try to submit the form.
admin-portal-frontend/emergencies.ts
Outdated
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.
Move this, as well as the requests.ts file into the src/app folder in a folder called api or something of the sort
package.json
Outdated
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.
remove this
admin-portal-frontend/emergencies.ts
Outdated
emergency: CreateEmergencyRequest, | ||
): Promise<APIResult<Emergency>> { | ||
try { | ||
const response = await post("/api/emergencies", emergency); |
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.
make sure to have these routes depend on a .env file for local development purposes
Issues Addressed/Changelog: -- fixed styling issues with the textinputs overlapping the navbar -- added subtitle field to the form -- added error message notifying the user when a required field (title or subtitle) isn't filled out when they try to submit the form -- moved emergencies.ts and requests.ts into src/app/api -- remove head package.json (separate from other package.json files) -- Created dependency between src/api/emergencies.ts (createEmergency(), getEmergency(), getAllEmergencies(), updateEmergency()) on local.env for the admin-portal-frontend Thanks! Let me know if we missed anything. |
Tracking Info
Resolves #41
Changes
Designed the Emergency flow page and added functionality to enter into text fields and publish to MongoDB database
Testing
To test, try entering into the text fields and click publish to send to MongoDB database.
A screenshot of the page is as follows: