diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4fe94183a2f..40e5259b1c6 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -26,7 +26,7 @@ "cpus": 4 }, "waitFor": "onCreateCommand", - "postCreateCommand": "npm install", + "postCreateCommand": "npm run install-all", "postAttachCommand": { "server": "npm run dev" }, diff --git a/.github/workflows/cypress.yaml b/.github/workflows/cypress.yaml index 500dbd92be0..0f588568bbc 100644 --- a/.github/workflows/cypress.yaml +++ b/.github/workflows/cypress.yaml @@ -70,7 +70,7 @@ jobs: node-version: "20" - name: Install dependencies 📦 - run: npm install + run: npm run install-all - name: Build ⚙️ run: npm run build diff --git a/Dockerfile b/Dockerfile index 5061a977585..3a96ab3c28a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,6 +13,8 @@ RUN npm install COPY . . +RUN npm run setup + RUN npm run build diff --git a/cypress/pageobject/Facility/FacilityHome.ts b/cypress/pageobject/Facility/FacilityHome.ts index e021171ff0a..dea7de0e7b6 100644 --- a/cypress/pageobject/Facility/FacilityHome.ts +++ b/cypress/pageobject/Facility/FacilityHome.ts @@ -72,7 +72,7 @@ class FacilityHome { } verifyOccupancyBadgeVisibility() { - cy.get("#occupany-badge").should("be.visible"); + cy.get('[data-test-id="occupancy-badge"]').should("be.visible"); } verifyAndCloseNotifyModal() { diff --git a/package.json b/package.json index 4c57b3e0ee1..57d0c3d3405 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,8 @@ "prepare": "husky install", "lint": "eslint ./src", "lint-fix": "eslint ./src --fix", - "format": "prettier ./src --write" + "format": "prettier ./src --write", + "sort-locales": "node ./scripts/sort-locales.js" }, "dependencies": { "@fontsource/figtree": "^5.1.0", @@ -163,10 +164,13 @@ "prettier --write --ignore-unknown --plugin prettier-plugin-tailwindcss", "eslint --fix", "git update-index --again" + ], + "src/Locale/*.json": [ + "npm run sort-locales" ] }, "engines": { "node": ">=20.12.0" }, "packageManager": "npm@10.5.0" -} +} \ No newline at end of file diff --git a/public/favicon.ico b/public/favicon.ico index d712ea36545..51fe5064a91 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/scripts/sort-locales.js b/scripts/sort-locales.js new file mode 100644 index 00000000000..adff586a93b --- /dev/null +++ b/scripts/sort-locales.js @@ -0,0 +1,15 @@ +// eslint-disable-next-line @typescript-eslint/no-var-requires +const fs = require("fs"); + +const file = "src/Locale/en.json"; + +const data = JSON.parse(fs.readFileSync(file, "utf8")); + +const sortedData = Object.keys(data) + .sort() + .reduce((acc, key) => { + acc[key] = data[key]; + return acc; + }, {}); + +fs.writeFileSync(file, JSON.stringify(sortedData, null, 2) + "\n"); diff --git a/src/CAREUI/display/Count.tsx b/src/CAREUI/display/Count.tsx index 997b58794eb..6b28ca4f962 100644 --- a/src/CAREUI/display/Count.tsx +++ b/src/CAREUI/display/Count.tsx @@ -11,15 +11,13 @@ interface Props { export default function CountBlock(props: Props) { return ( -
+ {data?.investigation_object.name || "---"} +
++ + {t("investigations__range")}:{" "} + {data?.investigation_object.min_value || ""} + {data?.investigation_object.min_value ? " - " : ""} + {data?.investigation_object.max_value || ""} + +
++ {t("investigations__unit")}:{" "} + {data?.investigation_object.unit || "---"} +
- {heading} - | - ), - )} +
---|
{t("no_tests_taken")} |
{t("no_tests_taken")} | -
+ {investigation.investigation_object.name || "---"} +
++ + {t("investigations__range")}:{" "} + {investigation.investigation_object.min_value || ""} + {investigation.investigation_object.min_value ? " - " : ""} + {investigation.investigation_object.max_value || ""} + +
++ {t("investigations__unit")}:{" "} + {investigation.investigation_object.unit || "---"} +
++ {t("investigations__name")} + | +{t("investigations__result")} | +{t("investigations__ideal_value")} | +
---|