Skip to content

Commit

Permalink
Merge branch 'develop' into issues/8593-ABG-fields-decimal
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacobjeevan committed Oct 23, 2024
2 parents e316a0a + 7e15e3c commit dd65b08
Show file tree
Hide file tree
Showing 531 changed files with 198,468 additions and 11,634 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
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 .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
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
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
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: 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
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 @@ -239,7 +239,7 @@ 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(
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
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/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 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
16 changes: 8 additions & 8 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ 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;
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 dd65b08

Please sign in to comment.