diff --git a/backend/src/validators/vsr.ts b/backend/src/validators/vsr.ts index db757c3..e332037 100644 --- a/backend/src/validators/vsr.ts +++ b/backend/src/validators/vsr.ts @@ -202,90 +202,6 @@ const updateStatusValidator = () => .isIn(ALLOWED_STATUSES) .withMessage("Status must be one of the allowed options"); -const makeHearFromValidator = () => - body("hearFrom") - .exists({ checkFalsy: true }) - .withMessage("Hear from is required") - .isString() - .withMessage("Hear from must be a string"); - -const makePetCompanionValidator = () => - body("petCompanion") - .exists({ checkFalsy: true }) - .withMessage("Pet companion is required") - .isBoolean() - .withMessage("Pet companion must be a boolean"); - -const makeMilitaryIdValidator = () => - body("militaryId") - .exists({ checkFalsy: true }) - .withMessage("Military Id is required") - .isInt() - .withMessage("Military Id must be an integer"); - -const makeLastRankValidator = () => - body("lastRank") - .exists({ checkFalsy: true }) - .withMessage("Last rank is required") - .isString() - .withMessage("Last rank must be a string"); - -const makeServiceConnectedValidator = () => - body("serviceConnected") - .exists({ checkFalsy: true }) - .withMessage("Service connected is required") - .isBoolean() - .withMessage("Service connected must be a boolean"); - -const makeDischargeStatusValidator = () => - body("dischargeStatus") - .exists({ checkFalsy: true }) - .withMessage("Discharge status is required") - .isString() - .withMessage("Discharge status must be a string"); - -const makeEmailValidator = () => - body("email") - .exists({ checkFalsy: true }) - .withMessage("Email is required") - .isString() - .withMessage("Email must be a string"); - -const makePhoneNumberValidator = () => - body("phoneNumber") - .exists({ checkFalsy: true }) - .withMessage("Phone number is required") - .isString() - .withMessage("Phone number must be a string"); - -const makeZipCodeValidator = () => - body("zipCode") - .exists({ checkFalsy: true }) - .withMessage("Zip code is required") - .isInt({ min: 0 }) - .withMessage("Zip code must be a positive integer"); - -const makeStateValidator = () => - body("state") - .exists({ checkFalsy: true }) - .withMessage("State is required") - .isString() - .withMessage("State must be a string"); - -const makeCityValidator = () => - body("city") - .exists({ checkFalsy: true }) - .withMessage("City is required") - .isString() - .withMessage("City must be a string"); - -const makeStreetAddressValidator = () => - body("streetAddress") - .exists({ checkFalsy: true }) - .withMessage("Street address is required") - .isString() - .withMessage("Street address must be a string"); - export const createVSR = [ makeNameValidator(), makeGenderValidator(), diff --git a/frontend/src/api/VSRs.ts b/frontend/src/api/VSRs.ts index cca7159..035f41b 100644 --- a/frontend/src/api/VSRs.ts +++ b/frontend/src/api/VSRs.ts @@ -105,7 +105,6 @@ export interface CreateVSRRequest { hearFrom: string; selectedFurnitureItems: FurnitureInput[]; additionalItems: string; - status: string; } function parseVSR(vsr: VSRJson) { diff --git a/frontend/src/app/vsr/page.module.css b/frontend/src/app/vsr/page.module.css index 840b2d3..c520a45 100644 --- a/frontend/src/app/vsr/page.module.css +++ b/frontend/src/app/vsr/page.module.css @@ -229,7 +229,6 @@ .submit { width: 306px; height: 64px; - background-color: #102d5f; color: white; cursor: pointer; font-family: "Lora"; diff --git a/frontend/src/app/vsr/page.tsx b/frontend/src/app/vsr/page.tsx index 17d0eed..d8ad639 100644 --- a/frontend/src/app/vsr/page.tsx +++ b/frontend/src/app/vsr/page.tsx @@ -273,7 +273,7 @@ const VeteranServiceRequest: React.FC = () => { employmentStatus: data.employment_status, incomeLevel: data.income_level, sizeOfHome: data.size_of_home, - + streetAddress: data.streetAddress, city: data.city, state: data.state, @@ -288,7 +288,7 @@ const VeteranServiceRequest: React.FC = () => { militaryID: data.militaryID, petCompanion: data.petCompanion, hearFrom: data.hearFrom, - + // Only submit items that the user selected at least 1 of selectedFurnitureItems: Object.values(selectedFurnitureItems).filter( (selectedItem) => selectedItem.quantity > 0, @@ -311,7 +311,6 @@ const VeteranServiceRequest: React.FC = () => { } }; - const incrementPageNumber = () => { setPageNumber(pageNumber + 1); }; @@ -952,7 +951,7 @@ const VeteranServiceRequest: React.FC = () => { className={`${styles.submit} ${isValid ? styles.enabled : styles.disabled}`} type="submit" > - Submit + Next @@ -961,7 +960,7 @@ const VeteranServiceRequest: React.FC = () => { ); } else { - return ( + return (
@@ -1017,7 +1016,7 @@ const VeteranServiceRequest: React.FC = () => { {/* TODO: better error handling */} {errorMessage}
- ); + ); } };