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

Vsr individual #17

Merged
merged 86 commits into from
Feb 29, 2024
Merged

Vsr individual #17

merged 86 commits into from
Feb 29, 2024

Conversation

Syu125
Copy link
Contributor

@Syu125 Syu125 commented Feb 10, 2024

Tracking Info

Resolves #11

Changes

  • Completed frontend of individual vsr and connected database to pull form values for display.

Testing

  • Checked formatting and interacted with page to make sure everything was functional.
  • Created a data entry in MongoDB and modified values to check that it was displayed correctly on the page.

Confirmation of Change

  1. Start MongoDB server
  2. Open up two terminals, one for backend and one for frontend, and make sure all the dependencies are installed
    • Backend: navigate to backend directory > npm run start
    • Frontend: navigate to frontend directory > npm run dev
  3. Open page
    • If values are not showing up, upload frontend\__tests__\sampleData\pap.vsrs.json to MongoDB
  4. You can modify the values in the database to test

Syu125 and others added 30 commits January 17, 2024 16:59
Copy link
Collaborator

@benjaminJohnson2204 benjaminJohnson2204 left a comment

Choose a reason for hiding this comment

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

LGTM! I made some refactoring changes to reduce the amount of re-used code across the different components, but great job!

Copy link
Contributor

@2s2e 2s2e left a comment

Choose a reason for hiding this comment

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

-Got this warning while using mongosh, not sure if relevant: DeprecationWarning: Collection.insert() is deprecated. Use insertOne, insertMany, or bulkWrite.
-Ages display seems to be clumped together
image
This is for ages [2,9,5]

Aside from the minor points above, everything looks good! The website closely follows the figma and there weren't any visual bugs. Changes to the VSR in MongoDB were updated on the website.

@benjaminJohnson2204
Copy link
Collaborator

Thanks for the prompt review @2s2e ! I wouldn't worry about the the mongosh warning. Nice catch with the ages display, I just pushed a fix.

Copy link
Contributor

@HarshGurnani HarshGurnani left a comment

Choose a reason for hiding this comment

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

The date is showing up as invalid, is this something that needs to be changed? It may be because at frontend/src/api/VSRs.ts, the VSRJson type uses string for the two dates rather than a Date type, so a string representation that is unrecognized as a date is stored in the Mongo.

image

@HarshGurnani HarshGurnani self-requested a review February 29, 2024 06:48
Copy link
Contributor

@HarshGurnani HarshGurnani left a comment

Choose a reason for hiding this comment

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

lgtm!

@benjaminJohnson2204 benjaminJohnson2204 merged commit f7d7462 into main Feb 29, 2024
4 checks passed
@benjaminJohnson2204 benjaminJohnson2204 deleted the vsr_individual branch February 29, 2024 06:49
benjaminJohnson2204 added a commit that referenced this pull request Apr 7, 2024
* Added folders for page routing

* lint fixes

* Added route to POST and VSR controller

* Added basic contents for individual view

* Formatted content and added fonts

* Fixed some formatting, specifically for Contact Info

* Added all contents for the sections (working on details and components within)

* Added validation functions for form responses

* Added validation functions for form responses

* Removed numOfBoys, numOfGirls from schema, cleaned up backend, renamed martial to marital

* Added tests for validate spouse name

* Added tests for validate ethnicity

* Basic text field, multiple choice, dropdown, and submit

* Fix linting issues and minor edit to gender field validation

* Added top buttons and remaining detail styles (need to fix fonts and formatting, add lower button)

* app now uses post route

* Attempt at linking front end with back end, onbooarding code for front end api requests imported and adjusted

* Reworked TextField component to do ref-forwarding, successfully pushed a document to the mongo database

* Finished formatting page content (need to add function to buttons)

* created major components, missing details and dropdown

* Fixed couple bugs with date verification

* Removed forwardRef

* Minor commit before merging in branch

* adjusting table styling

* Backend connection works - able to retrieve data

* Retrieved more data and removed the hard-coded values

* Added title and description, required fields, and overall more styling

* updated date to use current date, added more fields for the vsr page

* Prototype of ethnicity selector

* Made options unselectable

* Working version of ethnicity form

* Finished frontend

* Prototype of appearing and disappearing children form

* Finalized frontent with last button and N/A styling

* Removed unused variables

* Modified unused message variable in requests.ts

* Added sample data file

* Added gap between list items

* Removed padding after list items

* Moved components folder out of app director

* Removed package-lock json

* Removed package lock json from backend

* Add package lock back to backend

* Add package lock back to frontend

* Updated packag lock for frontend

* Added cache section to frontent package json

* Add next SWC to frontend package-lock.json

* Updated display to check empty lists, routed toDashboard, removed unused code, included getVSR error handling

* started working on delete vsr; todo: copy over vsr model from pr #17 and finish route

* Created subfolders for components, fixed scrolling for dropdown, added minor changes to styling

* Remove unused code

* Minor styling fixes to status dropdown

* Rename UserTag to VeteranTag, move individual getVSR, change name display condition

* Use semantic HTML for VSR individual buttons

* Accordion accessibility improvements

* Added more styling

* adjusting alignment

* Added backend functionality for ages, changed Child #n name to Child #n age

* Fixed small bug with ethnicity, added numBoys and spouse to createVSR, and continued styling

* copied over vsr model and created backend delete route

* fixed issue with ethnicity selection

* Changed textbox styling to flex 1

* Fixed issue with null values in age array

* Page number component

* added girls form

* changes with validation

* starting frontend for popup

* getting all vsrs backend progress

* Yet even more lint fixes

* Fix CSS styles & clean up code

* Update favicon, title, & description, remove unused boilerplate

* Remove commented-out code & make ethnicity an array

* frontend progress; todo: add user auth on frontend, pass in array of VSR ids on frontend

* added auth check and passing multiple ids; -todo: server call for delete route is not working, test and fix

* Minor fixes to VSR fields & individual view

* remove unused code, clean up CSS & fix accordion spelling

* delete vsr works; todo: integrate with popup feature

* Scaffolding for updateVSR backend

* Refactor/rename code for consistency

* cleaning up for pr

* Clean up CSS & integrate w/ backend

* Add missing MUI dependency

* Minor CSS touch-ups

* Re-organize frontend components

* Remove package.json from root directory

* Fix frontend compile errors

* Added button functionality to swap

* Rereferencing commits

* Resolving Merges

* Pre-dev hour changes

* WIP edit VSR

* Fix bug with text input field

* Implement roles/permissions checking on backend w/ unit tests

* Add context for current user state, with redirection

* Move backend testUtils to fix testing issues

* Add component for error page, with 404 & 500 pages

* Add success & error UIs for VSR form

* Add success & error messages for VSR actions and login/logout

* Implement loading UI

* Integrate delete VSR feature w/ frontend, including loading, success, & error handling

* Remove dummy page and clean up home page redirection

* Fix linter warning

* Add Vercel config file for backend deployment

* Fix backend server file

* Fix TS imports for backend deployment

* Fix backend Vercel deployment w/ dist

* Integrate email notifications into VSR submission

* Add documentation comments

* Add permission verification & testing for update VSR route

* Finish implementing edit VSR feature

* Fix import errors and address code quality check in comments

* Fix MUI CSS issues with deployment (I hope)

* Add new backend build for Vercel deployment

* Fix styling issues with chip component

* Fix minor bugs

* Add Complete status for VSRs

* Fix 404 handling on VSR individual page

* Add PAP logo to veteran confirmation email template

* Make PAP email address underlined link on VSR page

* Fix title font size on VSR page

* Fix dropdown input scrolling on VSR form page

* Fix error messages for VSR inputs

* Fix text field widths for children inputs on VSR form

* Scroll to top of screen when switching pages on VSR form

* Reorder VSR status options

* Fix spacing on furniture item tags

* Order furniture items correctly

* Make VSR table blue background full height

* remove Case ID from VSR table

* Fix bug on VSR form where pressing enter goes back to previous page

* Better email validation on VSR form + add confirm email field

* Fix blue outline around VSR table cell when clicked

* Fix glitchy accordion transitions on VSR individual page

* Fix status shifting on VSR individual page

* Fix border around buttons, refactor to common button component, make edit VSR button outlined

* Add dismiss option to VSR update status notification

* Fix issues with login page

* Add input validation & error messages for editing VSR

* Re-build backend for deployment

* Fix PAP logo image in VSR confirmation emails

* Make blue background full page on VSR individual page

---------

Co-authored-by: Syu125 <[email protected]>
Co-authored-by: 2s2e <[email protected]>
Co-authored-by: Yoto Kim <[email protected]>
Co-authored-by: sydneyzhang18 <[email protected]>
Co-authored-by: benjaminjohnson2204 <[email protected]>
Co-authored-by: Harsh Gurnani <[email protected]>
Co-authored-by: Harsh Gurnani <[email protected]>
Co-authored-by: SB1019 <[email protected]>
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.

VSR Individual View for Staff
5 participants