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

Emergency flow page #45

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Emergency flow page #45

wants to merge 8 commits into from

Conversation

r800360
Copy link
Member

@r800360 r800360 commented May 17, 2024

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:
EmergencyFlowPage

Copy link

github-actions bot commented May 17, 2024

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

Copy link
Collaborator

@Anthonyp0329 Anthonyp0329 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking awesome! Just a few small things: when the user doesn't put anythgin under one of the optional fields, make sure to not include that field in the object that gets published into the database. Also - experiencing some small styling issues with the textinputs overlapping the navbar:
image

@Anthonyp0329
Copy link
Collaborator

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

Copy link
Collaborator

@Anthonyp0329 Anthonyp0329 left a 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.

Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this

emergency: CreateEmergencyRequest,
): Promise<APIResult<Emergency>> {
try {
const response = await post("/api/emergencies", emergency);
Copy link
Collaborator

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

@r800360
Copy link
Member Author

r800360 commented Jun 4, 2024

Issues Addressed/Changelog:
-- when the user doesn't put anything under an optional field (any field not title or subtitle), field is not included in the object that gets published into the database

-- 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.

@r800360 r800360 requested a review from Anthonyp0329 June 4, 2024 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding Emergency Flow
3 participants