diff --git a/cypress/e2e/facility_spec/facility_creation.cy.ts b/cypress/e2e/facility_spec/facility_creation.cy.ts index a092d23390e..ef309af2c24 100644 --- a/cypress/e2e/facility_spec/facility_creation.cy.ts +++ b/cypress/e2e/facility_spec/facility_creation.cy.ts @@ -37,7 +37,7 @@ describe("Facility Creation", () => { const totalOccupancy = "10"; const doctorCapacity = "5"; const totalDoctor = "10"; - const facilityName = "cypress facility"; + const facilityName = "Cypress Facility"; const facilityName2 = "Dummy Facility 40"; const facilityAddress = "cypress address"; const facilityUpdateAddress = "cypress updated address"; diff --git a/src/Components/Facility/FacilityHome.tsx b/src/Components/Facility/FacilityHome.tsx index 50edef824c8..a0dcf06026f 100644 --- a/src/Components/Facility/FacilityHome.tsx +++ b/src/Components/Facility/FacilityHome.tsx @@ -88,7 +88,7 @@ export const FacilityHome = ({ facilityId }: Props) => { onResponse: ({ res }) => { if (res?.ok) { Notification.Success({ - msg: "Facility deleted successfully", + msg: t("deleted_successfully", { name: facilityData?.name }), }); } navigate("/facility"); @@ -150,11 +150,10 @@ export const FacilityHome = ({ facilityId }: Props) => { backUrl="/facility" > - Are you sure you want to delete{" "} - {facilityData?.name} + {t("are_you_sure_want_to_delete", { name: facilityData?.name })} } action="Delete" @@ -247,7 +246,7 @@ export const FacilityHome = ({ facilityId }: Props) => {

- Address + {t("address")}

{facilityData?.address} @@ -257,7 +256,7 @@ export const FacilityHome = ({ facilityId }: Props) => {

- Local Body + {t("local_body")}

{facilityData?.local_body_object?.name} @@ -266,7 +265,7 @@ export const FacilityHome = ({ facilityId }: Props) => {

- Ward + {t("ward")}

{facilityData?.ward_object?.number + @@ -276,7 +275,7 @@ export const FacilityHome = ({ facilityId }: Props) => {

- District + {t("district")}

{facilityData?.district_object?.name} @@ -286,7 +285,7 @@ export const FacilityHome = ({ facilityId }: Props) => {

- Phone Number + {t("phone_number")}

{ {facilityData?.features?.some((feature) => FACILITY_FEATURE_TYPES.some((f) => f.id === feature), ) && ( -

Available features

+

+ {t("available_features")} +

)}
{ authorizeFor={NonReadOnlyUsers} icon={} > - Update Facility + {t("update_facility")} { authorizeFor={NonReadOnlyUsers} icon={} > - Configure Facility + {t("configure_facility")} navigate(`/facility/${facilityId}/inventory`)} icon={} > - Inventory Management + {t("inventory_management")} { } > - Location Management + {t("location_management")} { authorizeFor={NonReadOnlyUsers} icon={} > - Resource Request + {t("resource_request")} { authorizeFor={NonReadOnlyUsers} icon={} > - Create Asset + {t("create_asset")} navigate(`/assets?facility=${facilityId}`)} icon={} > - View Assets + {t("view_asset")} navigate(`/facility/${facilityId}/users`)} icon={} > - View Users + {t("view_users")} navigate(`/facility/${facilityId}/abdm`)} icon={} > - View ABDM Records + {t("view_abdm_records")} {hasPermissionToDeleteFacility ? ( { className="flex items-center gap-3" icon={} > - Delete Facility + {t("delete_facility")} ) : ( <> @@ -437,7 +438,7 @@ export const FacilityHome = ({ facilityId }: Props) => { onClick={() => navigate(`/facility/${facilityId}/cns`)} > - Central Nursing Station + {t("central_nursing_station")} {CameraFeedPermittedUserTypes.includes(authUser.user_type) && ( @@ -451,7 +452,7 @@ export const FacilityHome = ({ facilityId }: Props) => { authorizeFor={NonReadOnlyUsers} > - Add Details of a Patient + {t("add_details_of_patient")} { onClick={() => navigate(`/patients?facility=${facilityId}`)} > - View Patients + {t("view_patients")}
@@ -472,7 +473,7 @@ export const FacilityHome = ({ facilityId }: Props) => {
-

Oxygen Information

+

{t("oxygen_information")}

{ const facilityId = useSlug("facility"); const [location, setLocation] = useState(); + const { t } = useTranslation(); + return ( @@ -528,7 +531,7 @@ const LiveMonitoringButton = () => { id="facility-detailspage-livemonitoring" > - Live Monitoring + {t("live_monitoring")} @@ -545,7 +548,7 @@ const LiveMonitoringButton = () => {
- Choose a location + {t("choose_location")}
{ className="w-full" href={`/facility/${facilityId}/live-monitoring?location=${location}`} > - Open Live Monitoring + {t("open_live_monitoring")}
diff --git a/src/Locale/en/Common.json b/src/Locale/en/Common.json index c5d6d76564e..348e59ea661 100644 --- a/src/Locale/en/Common.json +++ b/src/Locale/en/Common.json @@ -192,5 +192,9 @@ "live": "Live", "discharged": "Discharged", "archived": "Archived", - "no_changes_made": "No changes made" -} \ No newline at end of file + "no_changes_made": "No changes made", + "are_you_sure_want_to_delete": "Are you sure you want to delete {{name}}?", + "oxygen_information": "Oxygen Information", + "deleted_successfully": "{{name}} deleted successfully", + "delete_item": "Delete {{name}}" +} diff --git a/src/Locale/en/Facility.json b/src/Locale/en/Facility.json index 16bc6610631..9aa0dbad236 100644 --- a/src/Locale/en/Facility.json +++ b/src/Locale/en/Facility.json @@ -60,5 +60,20 @@ "duplicate_patient_record_rejection": "I confirm that the suspect / patient I want to create is not on the list.", "duplicate_patient_record_birth_unknown": "Please contact your district care coordinator, the shifting facility or the patient themselves if you are not sure about the patient's year of birth.", "patient_transfer_birth_match_note": "Note: Year of birth must match the patient to process the transfer request.", - "cover_image_updated_note": "It could take a while to see the updated cover image" -} \ No newline at end of file + "cover_image_updated_note": "It could take a while to see the updated cover image", + "available_features": "Available Features", + "update_facility": "Update Facility", + "configure_facility": "Configure Facility", + "inventory_management": "Inventory Management", + "location_management": "Location Management", + "resource_request": "Resource Request", + "view_asset": "View Assets", + "view_users": "View Users", + "view_abdm_records": "View ABDM Records", + "delete_facility": "Delete Facility", + "central_nursing_station": "Central Nursing Station", + "add_details_of_patient": "Add Details of Patient", + "choose_location": "Choose Location", + "live_monitoring": "Live Monitoring", + "open_live_monitoring": "Open Live Monitoring" +}