Skip to content

Commit

Permalink
Merge branch 'develop' into issues/8162-CNS-filter-modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacobjeevan committed Oct 23, 2024
2 parents 870fae1 + 7e15e3c commit 53bf95f
Show file tree
Hide file tree
Showing 497 changed files with 3,588 additions and 3,305 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 .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 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
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");
}
}
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
153 changes: 152 additions & 1 deletion package-lock.json

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

4 changes: 2 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Suspense } from "react";
import Routers from "./Routers";
import Integrations from "./Integrations";
import Loading from "./Components/Common/Loading";
import Loading from "@/components/Common/Loading";
import HistoryAPIProvider from "./Providers/HistoryAPIProvider";
import AuthUserProvider from "./Providers/AuthUserProvider";
import PluginEngine from "./PluginEngine";
import { FeatureFlagsProvider } from "./Utils/featureFlags";
import { Toaster } from "./Components/ui/toaster";
import { Toaster } from "@/components/ui/toaster";

const App = () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/CAREUI/display/Chip.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import CareIcon, { IconName } from "../icons/CareIcon";
import { ButtonVariant } from "../../Components/Common/components/ButtonV2";
import { ButtonVariant } from "@/components/Common/components/ButtonV2";
import { classNames } from "../../Utils/utils";

interface Props {
Expand Down
6 changes: 3 additions & 3 deletions src/CAREUI/display/PopupModal.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ReactNode, useEffect, useRef, useState } from "react";
import { Cancel, Submit } from "../../Components/Common/components/ButtonV2";
import { Cancel, Submit } from "@/components/Common/components/ButtonV2";
import { classNames } from "../../Utils/utils";
import { useTranslation } from "react-i18next";
import useBreakpoints from "../../Common/hooks/useBreakpoints";
import DialogModal from "../../Components/Common/Dialog";
import useBreakpoints from "@/common/hooks/useBreakpoints";
import DialogModal from "@/components/Common/Dialog";

type Props = {
show: boolean;
Expand Down
Loading

0 comments on commit 53bf95f

Please sign in to comment.