Skip to content

Commit

Permalink
Merge branch 'develop' into issues/8645/dosage-heading-misaligned
Browse files Browse the repository at this point in the history
  • Loading branch information
Sulochan-khadka authored Nov 9, 2024
2 parents 2ee58f4 + 6bd2aa8 commit 5a43440
Show file tree
Hide file tree
Showing 517 changed files with 7,028 additions and 7,795 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node
{
"name": "care_fe",
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-18-bullseye",
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-22-bookworm",
"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
"moby": true,
Expand Down
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ ESLINT_NO_DEV_ERRORS=true
CARE_CDN_URL="https://egov-s3-facility-10bedicu.s3.amazonaws.com https://egov-s3-patient-data-10bedicu.s3.amazonaws.com http://localhost:4566"
REACT_ALLOWED_LOCALES="en,hi,ta,ml,mr,kn"

REACT_ENABLED_APPS="ohcnetwork/care_livekit_fe@main"
REACT_ENABLED_APPS=""
2 changes: 0 additions & 2 deletions .envrc

This file was deleted.

6 changes: 2 additions & 4 deletions .github/workflows/cypress.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Cypress Tests

on:
schedule:
- cron: "30 22 * * *"
pull_request:
branches:
- develop
Expand All @@ -17,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
containers: [1, 2, 3, 4, 5, 6, 7, 8]
containers: [1, 2, 3, 4]
env:
REACT_CARE_API_URL: http://localhost:9000
steps:
Expand Down Expand Up @@ -136,4 +134,4 @@ jobs:
if: steps.pr_origin.outputs.is_forked == 'true'
with:
name: cypress-videos
path: cypress/videos
path: cypress/videos
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ cypress/fixtures/token.json
# Care Apps
/apps/*
src/pluginMap.ts
/apps_backup/*
36 changes: 0 additions & 36 deletions .husky/_/husky.sh

This file was deleted.

3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20
v22
1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

7 changes: 5 additions & 2 deletions .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
"jsxSingleQuote": false,
"arrowParens": "always",
"tailwindFunctions": ["classNames"],
"plugins": ["prettier-plugin-tailwindcss"]
}
"importOrder": ["<THIRD_PARTY_MODULES>", "^@/lib/(.*)$", "^@/CAREUI/(.*)$", "^@/components/ui/(.*)$", "^@/components/(.*)$", "^@/hooks/(.*)$", "^@/common/(.*)$", "^@/(.*)$", "^[./]"],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true,
"plugins": ["prettier-plugin-tailwindcss", "@trivago/prettier-plugin-sort-imports"]
}
5 changes: 1 addition & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
#build-stage
FROM --platform=$BUILDPLATFORM node:20-buster-slim as build-stage
FROM --platform=$BUILDPLATFORM node:22-bookworm-slim as build-stage

WORKDIR /app

ENV NODE_OPTIONS="--max-old-space-size=4096"

RUN apt-get update && apt-get install -y git

RUN if [ "$(uname -m)" = "aarch64" ] || [ "$(uname -m)" = "arm64" ]; then apt-get install -y python3-dev make g++; fi


COPY package.json package-lock.json ./

RUN npm install
Expand Down
3 changes: 1 addition & 2 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineConfig } from "cypress";
import fs from "fs";
import cypressSplit from "cypress-split";
import fs from "fs";

export default defineConfig({
projectId: "wf7d2m",
Expand Down Expand Up @@ -30,7 +30,6 @@ export default defineConfig({
baseUrl: "http://localhost:4000",
retries: 2,
requestTimeout: 15000,
excludeSpecPattern: "**/*roles.cy.ts",
},
env: {
API_URL: process.env.REACT_CARE_API_URL ?? "http://localhost:9000",
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/assets_spec/AssetHomepage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe("Asset Tab", () => {
const serialNumber = Math.floor(Math.random() * 10 ** 10).toString();

before(() => {
loginPage.loginAsDisctrictAdmin();
loginPage.loginAsDistrictAdmin();
cy.saveLocalStorage();
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/assets_spec/AssetsCreation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe("Asset", () => {
const serialNumber = Math.floor(Math.random() * 10 ** 10).toString();

before(() => {
loginPage.loginAsDisctrictAdmin();
loginPage.loginAsDistrictAdmin();
cy.saveLocalStorage();
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/assets_spec/AssetsManage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe("Asset", () => {
const initiallocationName = "Camera Location";

before(() => {
loginPage.loginAsDisctrictAdmin();
loginPage.loginAsDistrictAdmin();
cy.saveLocalStorage();
});

Expand Down
19 changes: 0 additions & 19 deletions cypress/e2e/auth_spec/roles.cy.ts

This file was deleted.

2 changes: 1 addition & 1 deletion cypress/e2e/facility_spec/FacilityCreation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe("Facility Creation", () => {
const triageErrorMessage = ["This field is required"];

before(() => {
loginPage.loginAsDisctrictAdmin();
loginPage.loginAsDistrictAdmin();
cy.saveLocalStorage();
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/facility_spec/FacilityHomepage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe("Facility Homepage Function", () => {
const facilityType = "Private Hospital";

before(() => {
loginPage.loginAsDisctrictAdmin();
loginPage.loginAsDistrictAdmin();
cy.saveLocalStorage();
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/facility_spec/FacilityInventory.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe("Inventory Management Section", () => {
const inventoryName = "PPE";

before(() => {
loginPage.loginAsDisctrictAdmin();
loginPage.loginAsDistrictAdmin();
cy.saveLocalStorage();
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/facility_spec/FacilityManage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe("Facility Manage Functions", () => {
const currentUpdatedOccupied = "100";

before(() => {
loginPage.loginAsDisctrictAdmin();
loginPage.loginAsDistrictAdmin();
cy.saveLocalStorage();
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/patient_spec/PatientBedManagement.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe("Patient swtich bed functionality", () => {
const switchPatientTwo = "Dummy Patient 7";

before(() => {
loginPage.loginAsDisctrictAdmin();
loginPage.loginAsDistrictAdmin();
cy.saveLocalStorage();
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/patient_spec/PatientConsultationCreation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe("Patient Consultation in multiple combination", () => {
const patientIpNumber = `${Math.floor(Math.random() * 90 + 10)}/${Math.floor(Math.random() * 9000 + 1000)}`;

before(() => {
loginPage.loginAsDisctrictAdmin();
loginPage.loginAsDistrictAdmin();
cy.saveLocalStorage();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe("Patient Discharge based on multiple reason", () => {
const doctorName = "Custom Doctor";

before(() => {
loginPage.loginAsDisctrictAdmin();
loginPage.loginAsDistrictAdmin();
cy.saveLocalStorage();
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/patient_spec/PatientDoctorConnect.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe("Patient Doctor Connect in consultation page", () => {
const teleIcuUser = "Dev Doctor Two";

before(() => {
loginPage.loginAsDisctrictAdmin();
loginPage.loginAsDistrictAdmin();
cy.saveLocalStorage();
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/patient_spec/PatientDoctorNotes.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe("Patient Discussion notes in the consultation page", () => {
const discussionNotesSuccessMessage = "Note added successfully";

before(() => {
loginPage.loginAsDisctrictAdmin();
loginPage.loginAsDistrictAdmin();
cy.saveLocalStorage();
});

Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/patient_spec/PatientFileUpload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function runTests(
const patientNameTwo = "Dummy Patient 4";
const patientNameThree = "Dummy Patient 5";
before(() => {
loginPage.loginAsDisctrictAdmin();
loginPage.loginAsDistrictAdmin();
cy.saveLocalStorage();
});

Expand Down Expand Up @@ -90,7 +90,7 @@ function runTests(
patientFileUpload.verifyUploadFilePresence(newFileName);
patientFileUpload.verifyFileRenameOption(false);
// Login as District Admin
loginPage.loginAsDisctrictAdmin();
loginPage.loginAsDistrictAdmin();
cy.reload();
// Verify the file edit option is available
patientFileUpload.verifyUploadFilePresence(newFileName);
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/patient_spec/PatientHomepage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe("Patient Homepage present functionalities", () => {
const patientToDateBadge = "2023-12-07";

before(() => {
loginPage.loginAsDisctrictAdmin();
loginPage.loginAsDistrictAdmin();
cy.saveLocalStorage();
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/patient_spec/PatientLogUpdate.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
const domicilaryPatient = "Dummy Patient 11";

before(() => {
loginPage.loginAsDisctrictAdmin();
loginPage.loginAsDistrictAdmin();
cy.saveLocalStorage();
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/patient_spec/PatientPrescription.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const medicineIndicator = "Test Indicator";

describe("Patient Medicine Administration", () => {
before(() => {
loginPage.loginAsDisctrictAdmin();
loginPage.loginAsDistrictAdmin();
cy.saveLocalStorage();
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/patient_spec/PatientRegistration.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ describe("Patient Creation with consultation", () => {
const patientOccupation = "Student";

before(() => {
loginPage.loginAsDisctrictAdmin();
loginPage.loginAsDistrictAdmin();
cy.saveLocalStorage();
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/resource_spec/ResourcesHomepage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe("Resource Page", () => {
const phone_number = "9999999999";

before(() => {
loginPage.loginAsDisctrictAdmin();
loginPage.loginAsDistrictAdmin();
cy.saveLocalStorage();
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/users_spec/UsersCreation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe("User Creation", () => {
];

before(() => {
loginPage.loginAsDisctrictAdmin();
loginPage.loginAsDistrictAdmin();
cy.saveLocalStorage();
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/users_spec/UsersHomepage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe("User Homepage", () => {
const doctorUserName = "devdoctor1";

before(() => {
loginPage.loginAsDisctrictAdmin();
loginPage.loginAsDistrictAdmin();
cy.saveLocalStorage();
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/users_spec/UsersManage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe("Manage User", () => {
const linkedskill = "General Medicine";

before(() => {
loginPage.loginAsDisctrictAdmin();
loginPage.loginAsDistrictAdmin();
cy.saveLocalStorage();
});

Expand Down
Loading

0 comments on commit 5a43440

Please sign in to comment.