Skip to content

Commit

Permalink
Merge pull request #8835 from ohcnetwork/develop
Browse files Browse the repository at this point in the history
Staging Release - October Week 3 Release Patch (v24.43.1)
  • Loading branch information
rithviknishad authored Oct 20, 2024
2 parents ffff1a7 + 5c39b2c commit 69364c1
Show file tree
Hide file tree
Showing 74 changed files with 3,448 additions and 3,331 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"cpus": 4
},
"waitFor": "onCreateCommand",
"postCreateCommand": "npm install",
"postCreateCommand": "npm run install-all",
"postAttachCommand": {
"server": "npm run dev"
},
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cypress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ RUN npm install

COPY . .

RUN npm run setup

RUN npm run build


Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/users_spec/UsersManage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ describe("Manage User", () => {

beforeEach(() => {
cy.restoreLocalStorage();
console.log(localStorage);
cy.clearLocalStorage(/filters--.+/);
console.log(localStorage);
cy.awaitUrl("/users");
});

Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/users_spec/UsersProfile.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ describe("Manage User Profile", () => {

beforeEach(() => {
cy.restoreLocalStorage();
console.log(localStorage);
cy.clearLocalStorage(/filters--.+/);
console.log(localStorage);
cy.awaitUrl("/user/profile");
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/pageobject/Asset/AssetCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export class AssetPage {
}

clickConfigureAsset() {
cy.get("#submit").contains("Set Configuration").click();
cy.get("#submit").contains("Update").click();
}

clickConfigureVital() {
Expand Down
2 changes: 1 addition & 1 deletion cypress/pageobject/Facility/FacilityHome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
12 changes: 6 additions & 6 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ to = "/index.html"
status = 200

[[headers]]
for = "/*"
[headers.values]
cache-control = "max-age=0, no-store"
X-Frame-Options = "DENY"
X-Content-Type-Options = "nosniff"
Content-Security-Policy-Report-Only = '''
for = "/*"
[headers.values]
cache-control = "max-age=0, no-store"
X-Frame-Options = "DENY"
X-Content-Type-Options = "nosniff"
Content-Security-Policy-Report-Only = '''
default-src 'self';
script-src 'self' 'nonce-f51b9742' https://plausible.10bedicu.in;
style-src 'self' 'unsafe-inline';
Expand Down
15 changes: 11 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"echarts": "^5.5.1",
"echarts-for-react": "^3.0.2",
"events": "^3.3.0",
"hi-profiles": "^1.0.6",
"hi-profiles": "^1.1.0",
"i18next": "^23.11.4",
"i18next-browser-languagedetector": "^7.2.1",
"lodash-es": "^4.17.21",
Expand Down
29 changes: 9 additions & 20 deletions scripts/sort-locales.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,15 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const fs = require("fs");
// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require("path");

const directory = "src/Locale";

fs.readdir(directory, (err, files) => {
if (err) throw err;
const file = "src/Locale/en.json";

files.forEach((file) => {
if (file.endsWith(".json")) {
const filePath = path.join(directory, file);
const data = JSON.parse(fs.readFileSync(filePath, "utf8"));
const data = JSON.parse(fs.readFileSync(file, "utf8"));

const sortedData = Object.keys(data)
.sort()
.reduce((acc, key) => {
acc[key] = data[key];
return acc;
}, {});
const sortedData = Object.keys(data)
.sort()
.reduce((acc, key) => {
acc[key] = data[key];
return acc;
}, {});

fs.writeFileSync(filePath, JSON.stringify(sortedData, null, 2) + "\n");
}
});
});
fs.writeFileSync(file, JSON.stringify(sortedData, null, 2) + "\n");
10 changes: 4 additions & 6 deletions src/CAREUI/display/Count.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@ interface Props {

export default function CountBlock(props: Props) {
return (
<div
className={classNames("rounded-lg bg-white p-4 shadow", props.className)}
>
<dl>
<div className="flex h-10 w-10 items-center justify-center rounded-lg bg-primary-100 text-xl">
<div className={classNames("rounded-lg", props.className)}>
<dl className="flex gap-3">
<div className="flex aspect-square h-16 items-center justify-center rounded-lg border border-black/10 bg-primary-100 text-2xl">
<CareIcon icon={props.icon} className="text-primary-600" />
</div>
<div>
<dt className="my-2 truncate text-sm font-semibold text-secondary-700">
<dt className="mb-1 truncate text-sm font-semibold text-secondary-700">
{props.text}
</dt>
{props.loading ? (
Expand Down
12 changes: 10 additions & 2 deletions src/CAREUI/interactive/KeyboardShortcut.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ export default function KeyboardShortcut(props: Props) {
)}
{(props.altShortcuts || [props.shortcut]).map((shortcut, idx, arr) => (
<>
<kbd className="hidden items-center px-1.5 font-sans font-medium text-zinc-300 shadow lg:inline-flex">
<kbd
key={`shortcut-${idx}`}
className="hidden items-center px-1.5 font-sans font-medium text-zinc-300 shadow lg:inline-flex"
>
{shortcut.map((key, idx, keys) => (
<>
{SHORTCUT_KEY_MAP[key] || key}
Expand All @@ -42,7 +45,12 @@ export default function KeyboardShortcut(props: Props) {
))}
</kbd>
{idx !== arr.length - 1 && (
<span className="text-zinc-300/60">or</span>
<span
key={`shortcut-separator-${idx}`}
className="text-zinc-300/60"
>
or
</span>
)}
</>
))}
Expand Down
44 changes: 15 additions & 29 deletions src/Common/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -839,20 +839,6 @@ export const LOCATION_BED_TYPES = [
{ id: "REGULAR", name: "Regular" },
] as const;

export const ASSET_META_TYPE = [
{ id: "CAMERA", text: "Camera(ONVIF)" },
{ id: "HL7MONITOR", text: "Vitals Monitor(HL7)" },
];

export const CAMERA_TYPE = [
{ id: "HIKVISION", text: "ONVIF Camera (HIKVISION)" },
];

export const GENDER: { [key: number]: string } = GENDER_TYPES.reduce(
(acc, curr) => ({ ...acc, [curr.id]: curr.text }),
{},
);

export type CameraPTZ = {
icon?: IconName;
label: string;
Expand Down Expand Up @@ -1158,23 +1144,23 @@ export const AssetImportSchema: SchemaType = {

// ABDM
export const ABDM_CONSENT_PURPOSE = [
{ value: "CAREMGT", label: "Care Management" },
{ value: "BTG", label: "Break The Glass" },
{ value: "PUBHLTH", label: "Public Health" },
{ value: "HPAYMT", label: "Healthcare Payment" },
{ value: "DSRCH", label: "Disease Specific Healthcare Research" },
{ value: "PATRQT", label: "Self Requested" },
] as { value: ConsentPurpose; label: string }[];
"CAREMGT",
"BTG",
"PUBHLTH",
"HPAYMT",
"DSRCH",
"PATRQT",
] as ConsentPurpose[];

export const ABDM_HI_TYPE = [
{ value: "Prescription", label: "Prescription" },
{ value: "DiagnosticReport", label: "Diagnostic Report" },
{ value: "OPConsultation", label: "Op Consultation" },
{ value: "DischargeSummary", label: "Discharge Summary" },
{ value: "ImmunizationRecord", label: "Immunization Record" },
{ value: "HealthDocumentRecord", label: "Record Artifact" },
{ value: "WellnessRecord", label: "Wellness Record" },
] as { value: ConsentHIType; label: string }[];
"Prescription",
"DiagnosticReport",
"OPConsultation",
"DischargeSummary",
"ImmunizationRecord",
"HealthDocumentRecord",
"WellnessRecord",
] as ConsentHIType[];

export const USER_TYPES_MAP = {
Pharmacist: "Pharmacist",
Expand Down
Loading

0 comments on commit 69364c1

Please sign in to comment.