diff --git a/cypress/e2e/patient_spec/PatientConsultationCreation.cy.ts b/cypress/e2e/patient_spec/PatientConsultationCreation.cy.ts index a27d560e1a0..6f9bf2b03e0 100644 --- a/cypress/e2e/patient_spec/PatientConsultationCreation.cy.ts +++ b/cypress/e2e/patient_spec/PatientConsultationCreation.cy.ts @@ -35,7 +35,7 @@ describe("Patient Consultation in multiple combination", () => { const patientWeight = "70"; const patientHeight = "170"; const medicineOne = "DOLOLUP"; - const patientIpNumber = Math.random().toString(36).substring(7); + const patientIpNumber = `${Math.floor(Math.random() * 90 + 10)}/${Math.floor(Math.random() * 9000 + 1000)}`; before(() => { loginPage.loginAsDisctrictAdmin(); @@ -94,7 +94,7 @@ describe("Patient Consultation in multiple combination", () => { cy.submitButton("Create Consultation"); // the above submit should fail as IP number is missing patientConsultationPage.typePatientNumber(patientIpNumber); - patientConsultationPage.selectBed("Dummy Bed 1"); + patientConsultationPage.selectBed("Dummy Bed 6"); cy.submitButton("Create Consultation"); cy.verifyNotification("Consultation created successfully"); // Below code for the prescription module only present while creating a new consultation diff --git a/cypress/e2e/patient_spec/PatientPrescription.cy.ts b/cypress/e2e/patient_spec/PatientPrescription.cy.ts index de4e121a9db..86ca4122082 100644 --- a/cypress/e2e/patient_spec/PatientPrescription.cy.ts +++ b/cypress/e2e/patient_spec/PatientPrescription.cy.ts @@ -5,7 +5,7 @@ import { PatientPage } from "../../pageobject/Patient/PatientCreation"; const patientPrescription = new PatientPrescription(); const loginPage = new LoginPage(); const patientPage = new PatientPage(); -const medicineNameOne = "DOLO"; +const medicineNameOne = "AGCON"; const medicineNameTwo = "FDEP PLUS"; const medicineBaseDosage = "4"; const medicineTargetDosage = "9"; diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 40a878bcee2..595873a4be2 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -1,17 +1,18 @@ server { - listen 80; + root /usr/share/nginx/html; - location / { - root /usr/share/nginx/html; - index index.html index.htm; - try_files $uri $uri/ /index.html; + include mime.types; + types { + text/javascript js mjs; } - error_page 500 502 503 504 /50x.html; - - location = /50x.html { - root /usr/share/nginx/html; + location = /index.html { + expires 6h; } + location / { + expires 7d; + try_files $uri $uri/ /index.html; + } } diff --git a/src/Common/hooks/useFilters.tsx b/src/Common/hooks/useFilters.tsx index 188dec2229d..a6974a5a43b 100644 --- a/src/Common/hooks/useFilters.tsx +++ b/src/Common/hooks/useFilters.tsx @@ -6,6 +6,7 @@ import PaginationComponent from "../../Components/Common/Pagination"; import { classNames, humanizeStrings } from "../../Utils/utils"; import FiltersCache from "../../Utils/FiltersCache"; import careConfig from "@careConfig"; +import { triggerGoal } from "../../Integrations/Plausible"; export type FilterState = Record; @@ -42,6 +43,17 @@ export default function useFilters({ ) => { query = FiltersCache.utils.clean(query); _setQueryParams(query, options); + + // For each of the newly applied filters (additional filters compared to + // previously applied ones), trigger a plausible goal "Advanced filter + // applied" with the applied filter's query key and current location as tags. + Object.keys(query).forEach((filter) => + triggerGoal("Advanced filter applied", { + filter, + location: location.pathname, + }), + ); + updateCache(query); }; diff --git a/src/Components/Facility/Consultations/BedActivityTimeline.tsx b/src/Components/Facility/Consultations/BedActivityTimeline.tsx index 3b19b12329a..d9db520192a 100644 --- a/src/Components/Facility/Consultations/BedActivityTimeline.tsx +++ b/src/Components/Facility/Consultations/BedActivityTimeline.tsx @@ -1,3 +1,4 @@ +import { useTranslation } from "react-i18next"; import Chip from "../../../CAREUI/display/Chip"; import Timeline, { TimelineEvent, @@ -204,6 +205,7 @@ const BedTitleSuffix = ({ isLastNode?: boolean; prevBed?: CurrentBed; }) => { + const { t } = useTranslation(); return (
@@ -215,7 +217,7 @@ const BedTitleSuffix = ({ {bed.bed_object.id === prevBed?.bed_object.id ? "Asset changed in" + " " : "Transferred to" + " "} - {`${bed.bed_object.name} (${bed.bed_object.bed_type}) in ${bed.bed_object.location_object?.name}`} + {`${bed.bed_object.name} (${t(bed.bed_object.bed_type!)}) in ${bed.bed_object.location_object?.name}`} {bed.end_date === null && ( { "ods", "pdf", ], + allowNameFallback: false, onUpload: refetchAll, }); @@ -259,7 +260,7 @@ export const FileUpload = (props: FileUploadProps) => {