From 66e5ff4dd6ad97d6432b89966b3dbb94eabf870f Mon Sep 17 00:00:00 2001 From: hrit2773 <128292557+hrit2773@users.noreply.github.com> Date: Wed, 24 Apr 2024 12:48:34 +0530 Subject: [PATCH] Occupation dropdown frontend (#7541) * Occupation dropdown frontend * Update src/Components/Form/FormFields/Autocomplete.tsx Co-authored-by: Rithvik Nishad * Update src/Components/Patient/PatientRegister.tsx Co-authored-by: Rithvik Nishad * constants changed * changed * final fix ocupations * fix cypress * changed dropdown --------- Co-authored-by: Rithvik Nishad Co-authored-by: Mohammed Nihal <57055998+nihal467@users.noreply.github.com> --- cypress/pageobject/Patient/PatientCreation.ts | 2 +- src/Common/constants.tsx | 46 +++++++++++++++++++ src/Components/Patient/PatientRegister.tsx | 3 +- 3 files changed, 49 insertions(+), 2 deletions(-) diff --git a/cypress/pageobject/Patient/PatientCreation.ts b/cypress/pageobject/Patient/PatientCreation.ts index a708f754964..01bdfdb8cbb 100644 --- a/cypress/pageobject/Patient/PatientCreation.ts +++ b/cypress/pageobject/Patient/PatientCreation.ts @@ -95,7 +95,7 @@ export class PatientPage { } selectPatientOccupation(occupation: string) { - cy.clickAndSelectOption("#occupation", occupation); + cy.searchAndSelectOption("#occupation", occupation); } clickCreatePatient() { diff --git a/src/Common/constants.tsx b/src/Common/constants.tsx index 862ba9e79ea..71fac975492 100644 --- a/src/Common/constants.tsx +++ b/src/Common/constants.tsx @@ -1274,4 +1274,50 @@ export const OCCUPATION_TYPES = [ { id: 4, text: "Healthcare Lab Worker", value: "HEALTH_CARE_LAB_WORKER" }, { id: 5, text: "Animal Handler", value: "ANIMAL_HANDLER" }, { id: 6, text: "Others", value: "OTHERS" }, + { id: 7, text: "Healthcare Practitioner", value: "HEALTHCARE_PRACTITIONER" }, + { id: 8, text: "Paramedics", value: "PARADEMICS" }, + { + id: 9, + text: "Business or Finance related Occupations", + value: "BUSINESS_RELATED", + }, + { id: 10, text: "Engineer", value: "ENGINEER" }, + { id: 11, text: "Teacher", value: "TEACHER" }, + { + id: 12, + text: "Other Professional Occupations", + value: "OTHER_PROFESSIONAL_OCCUPATIONS", + }, + { + id: 13, + text: "Office and Administrative Support Occupations", + value: "OFFICE_ADMINISTRATIVE", + }, + { id: 14, text: "Chef or Head Cook", value: "CHEF" }, + { + id: 15, + text: "Protective Service Occupations", + value: "PROTECTIVE_SERVICE", + }, + { id: 16, text: "Hospitality Service Occupations", value: "HOSPITALITY" }, + { id: 17, text: "Custodial Occupations", value: "CUSTODIAL" }, + { id: 18, text: "Customer Service Occupations", value: "CUSTOMER_SERVICE" }, + { id: 19, text: "Sales Supervisor", value: "SALES_SUPERVISOR" }, + { id: 20, text: "Retail Sales Worker", value: "RETAIL_SALES_WORKER" }, + { id: 21, text: "Insurance Sales Agent", value: "INSURANCE_SALES_AGENT" }, + { id: 22, text: "Sales Representative", value: "SALES_REPRESENTATIVE" }, + { id: 23, text: "Real Estate Sales Agent", value: "REAL_ESTATE" }, + { + id: 24, + text: "Construction and Extraction Worker", + value: "CONSTRUCTION_EXTRACTION", + }, + { id: 25, text: "Farming, Fishing and Forestry", value: "AGRI_NATURAL" }, + { id: 26, text: "Production Occupations", value: "PRODUCTION_OCCUPATION" }, + { id: 27, text: "Aircraft Pilot or Flight Engineer", value: "PILOT_FLIGHT" }, + { id: 28, text: "Vehicle Driver", value: "VEHICLE_DRIVER" }, + { id: 29, text: "Military", value: "MILITARY" }, + { id: 30, text: "Homemaker", value: "HOMEMAKER" }, + { id: 31, text: "Don't Know", value: "UNKNOWN" }, + { id: 32, text: "Not Applicable", value: "NOT_APPLICABLE" }, ]; diff --git a/src/Components/Patient/PatientRegister.tsx b/src/Components/Patient/PatientRegister.tsx index dbc5b869e3e..7ec0dc10753 100644 --- a/src/Components/Patient/PatientRegister.tsx +++ b/src/Components/Patient/PatientRegister.tsx @@ -46,6 +46,7 @@ import { PatientModel, Occupation } from "./models"; import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; import RadioFormField from "../Form/FormFields/RadioFormField"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; +import AutocompleteFormField from "../Form/FormFields/Autocomplete.js"; import Spinner from "../Common/Spinner"; import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; import TextFormField from "../Form/FormFields/TextFormField"; @@ -1673,7 +1674,7 @@ export const PatientRegister = (props: PatientRegisterProps) => { /> )} -