Skip to content

Commit

Permalink
Merge pull request #8950 from ohcnetwork/staging
Browse files Browse the repository at this point in the history
Production Release 24.44.0
  • Loading branch information
gigincg authored Oct 28, 2024
2 parents 7b01fd2 + eb425c8 commit 6607fba
Show file tree
Hide file tree
Showing 515 changed files with 190,760 additions and 4,259 deletions.
4 changes: 2 additions & 2 deletions .cursorrules
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ Care uses a custom useQuery hook to fetch data from the API. APIs are defined in
Here's an example of how to use the useQuery hook to fetch data from the API:

```
useQuery from "@/Common/hooks/useQuery";
useQuery from "@/common/hooks/useQuery";
const { data, loading, error } = useQuery(routes.getFacilityUsers, {
facility_id: "1",
});

request from "@/Common/utils/request";
request from "@/common/utils/request";
const { res } = await request(routes.partialUpdateAsset, {
pathParams: { external_id: assetId },
body: data,
Expand Down
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ build
.dockerignore
Dockerfile
.git
apps
4 changes: 3 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ REACT_CARE_API_URL=https://careapi.ohc.network
# Dev envs
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_ALLOWED_LOCALES="en,hi,ta,ml,mr,kn"

REACT_ENABLED_APPS="ohcnetwork/care_livekit_fe@main"
2 changes: 1 addition & 1 deletion .example.env
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ REACT_OHCN_URL=
# Plausible site domain (default: care.ohc.network)
REACT_PLAUSIBLE_SITE_DOMAIN=

# Plausible server URL (default: https://plausible.10bedicu.in)
# Plausible server URL (default: https://plausible.ohc.network)
REACT_PLAUSIBLE_SERVER_URL=

# Care Apps. repo@branch seperated by commas
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/generate-sbom.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Generate SBOM using CycloneDX

on:
workflow_dispatch:

jobs:
generate-sbom:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Install dependencies
run: npm ci

- name: Install CycloneDX NPM tool
run: npm install -g @cyclonedx/cyclonedx-npm

- name: Generate SBOM
run: cyclonedx-npm --output-file sbom.json

- name: Upload SBOM
uses: actions/upload-artifact@v3
with:
name: sbom
path: sbom.json
if-no-files-found: error
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@ WORKDIR /app

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

RUN if [ "$(uname -m)" = "aarch64" ] || [ "$(uname -m)" = "arm64" ]; then apt-get update && apt-get install -y python3-dev make g++; fi
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

COPY . .

RUN npm run setup

RUN npm run build


Expand Down
2 changes: 1 addition & 1 deletion care.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const careConfig = {
// Plugins related configs...

plausible: {
server: env.REACT_PLAUSIBLE_SERVER_URL || "https://plausible.10bedicu.in",
server: env.REACT_PLAUSIBLE_SERVER_URL || "https://plausible.ohc.network",
domain: env.REACT_PLAUSIBLE_SITE_DOMAIN || "care.ohc.network",
},

Expand Down
2 changes: 2 additions & 0 deletions cypress/e2e/assets_spec/AssetHomepage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ describe("Asset Tab", () => {

it("Next/Previous Page", () => {
assetPagination.navigateToNextPage();
assetPagination.verifyNextUrl();
assetPagination.navigateToPreviousPage();
assetPagination.verifyPreviousUrl();
});

it("Import new asset", () => {
Expand Down
2 changes: 2 additions & 0 deletions cypress/e2e/facility_spec/FacilityHomepage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ describe("Facility Homepage Function", () => {
it("Search a facility in homepage and pagination", () => {
// pagination of the facility page
assetPagination.navigateToNextPage();
assetPagination.verifyNextUrl();
assetPagination.navigateToPreviousPage();
assetPagination.verifyPreviousUrl();
// search for a facility
manageUserPage.typeFacilitySearch(facilityName);
facilityPage.verifyFacilityBadgeContent(facilityName);
Expand Down
1 change: 1 addition & 0 deletions cypress/e2e/patient_spec/PatientLogUpdate.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
cy.closeNotification();
// Submit the doctors log update
cy.submitButton("Save and Continue");
cy.wait(2000);
cy.verifyNotification("Progress Note created successfully");
cy.closeNotification();
// modify the relevant critical care log update
Expand Down
10 changes: 1 addition & 9 deletions cypress/e2e/patient_spec/PatientRegistration.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,17 +239,9 @@ describe("Patient Creation with consultation", () => {
patientMedicalHistory.verifyNoSymptosPresent("Diabetes");
// verify insurance details and dedicatd page
cy.get("[data-testid=patient-details]")
.contains(patientOneFirstSubscriberId)
.contains("member id")
.scrollIntoView();
cy.wait(2000);
patientInsurance.verifyPatientPolicyDetails(
patientOneFirstSubscriberId,
patientOneFirstPolicyId,
patientOneFirstInsurerId,
patientOneFirstInsurerName,
isHCXEnabled,
);

patientInsurance.clickPatientInsuranceViewDetail();
cy.wait(3000);
patientInsurance.verifyPatientPolicyDetails(
Expand Down
7 changes: 2 additions & 5 deletions cypress/e2e/users_spec/UsersCreation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,10 @@ describe("User Creation", () => {
);
userCreationPage.typeIntoElementByIdPostClear("lastName", "Cypress");
userCreationPage.selectDropdownOption("gender", "Male");
userCreationPage.typeIntoElementByIdPostClear(
"phoneNumber",
"+91" + phone_number,
);
userCreationPage.typeIntoElementByIdPostClear("phoneNumber", phone_number);
userCreationPage.typeIntoElementByIdPostClear(
"altPhoneNumber",
"+91" + emergency_phone_number,
emergency_phone_number,
);
userCreationPage.typeIntoElementByIdPostClear("email", "[email protected]");
userCreationPage.typeIntoElementByIdPostClear("weekly_working_hours", "14");
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/users_spec/UsersProfile.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe("Manage User Profile", () => {
const date_of_birth = "01011999";
const gender = "Male";
const email = "[email protected]";
const phone = "+918899887788";
const phone = "8899887788";
const workinghours = "8";
const qualification = "MBBS";
const doctorYoE = "10";
Expand Down
6 changes: 6 additions & 0 deletions cypress/pageobject/Asset/AssetPagination.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@ export class AssetPagination {
navigateToNextPage() {
// only works for desktop mode
cy.get("button#next-pages").click();
}

verifyNextUrl() {
cy.url().should("include", "page=2");
}

navigateToPreviousPage() {
// only works for desktop mode
cy.get("button#prev-pages").click();
}

verifyPreviousUrl() {
cy.url().should("include", "page=1");
}
}
2 changes: 1 addition & 1 deletion cypress/pageobject/Facility/FacilityCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class FacilityPage {
}

fillAddress(address: string) {
cy.get("#address").click().clear().type(address);
cy.get("#address").click().type(address);
}

fillPhoneNumber(phoneNumber: string) {
Expand Down
2 changes: 1 addition & 1 deletion cypress/pageobject/Facility/FacilityLocation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class FacilityLocation {
}

clickNotification() {
cy.get(".pnotify").click();
cy.get(".pnotify-container").click();
}

enterBedName(name: string) {
Expand Down
12 changes: 6 additions & 6 deletions cypress/pageobject/Facility/FacilityManage.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class FacilityManage {
clickCoverImage() {
cy.get("#facility-coverimage").click({ force: true });
cy.get("#facility-coverimage").click();
}

verifyUploadButtonVisible() {
Expand All @@ -13,6 +13,11 @@ class FacilityManage {
.wait(100); // Adjust the wait time as needed
}

clickSaveCoverImage() {
cy.get("#save-cover-image").scrollIntoView();
cy.get("#save-cover-image").click();
}

verifyTotalDoctorCapacity(expectedCapacity: string) {
cy.get("#facility-doctor-totalcapacity").contains(expectedCapacity);
}
Expand All @@ -37,11 +42,6 @@ class FacilityManage {
cy.get("#delete-facility-bedcapacity").click();
}

clickSaveCoverImage() {
cy.get("#save-cover-image").scrollIntoView();
cy.get("#save-cover-image").click();
}

clickFacilityConfigureButton() {
cy.get("#configure-facility").should("be.visible");
cy.get("#configure-facility").click();
Expand Down
4 changes: 2 additions & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ 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;
script-src 'self' 'nonce-f51b9742' https://plausible.ohc.network;
style-src 'self' 'unsafe-inline';
connect-src 'self' https://plausible.10bedicu.in;
connect-src 'self' https://plausible.ohc.network;
img-src 'self' https://cdn.ohc.network https://egov-s3-facility-10bedicu.s3.amazonaws.com https://egov-s3-patient-data-10bedicu.s3.amazonaws.com;
object-src 'self' https://egov-s3-facility-10bedicu.s3.amazonaws.com https://egov-s3-patient-data-10bedicu.s3.amazonaws.com;
report-uri https://csp-logger.ohc.network/
Expand Down
Loading

0 comments on commit 6607fba

Please sign in to comment.