Skip to content

Commit

Permalink
fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
shivankacker committed Oct 24, 2024
2 parents ceaf273 + c62b36d commit f47f372
Show file tree
Hide file tree
Showing 490 changed files with 1,505 additions and 1,337 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"
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
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
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
51 changes: 26 additions & 25 deletions package-lock.json

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

14 changes: 7 additions & 7 deletions scripts/setup-care-apps.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { execSync } = require("child_process");
const { execSync, spawnSync } = require("child_process");
// eslint-disable-next-line @typescript-eslint/no-var-requires
const fs = require("fs");
// eslint-disable-next-line @typescript-eslint/no-var-requires
Expand Down Expand Up @@ -33,12 +33,12 @@ const installApp = (app) => {
const appDir = path.join(appsDir, app.package.split("/")[1]);

console.log(`Cloning ${app.package}...`);
execSync(
`npx -y gitget ${app.package}${app.branch ? `#${app.branch}` : ""} apps/${app.package.split("/")[1]} `,
{
stdio: "inherit",
},
);

const cloneUrl = `https://github.com/${app.package.replace("github:", "")}.git`;
const branchOption = app.branch ? ["--branch", app.branch] : [];

spawnSync("git", ["clone", ...branchOption, cloneUrl, appDir]);

// Create a care-package.lock file
fs.writeFileSync(
path.join(appDir, "care-package.lock"),
Expand Down
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
2 changes: 1 addition & 1 deletion src/CAREUI/display/Timeline.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createContext, useContext } from "react";
import { useTranslation } from "react-i18next";
import { PerformedByModel } from "../../Components/HCX/misc";
import { PerformedByModel } from "@/components/HCX/misc";
import { classNames, formatName } from "../../Utils/utils";
import CareIcon, { IconName } from "../icons/CareIcon";
import RecordMeta from "./RecordMeta";
Expand Down
2 changes: 1 addition & 1 deletion src/CAREUI/icons/Index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { useState } from "react";
import CareIcon, { IconName } from "./CareIcon";
import iconPaths from "./UniconPaths.json";
import { t } from "i18next";
import PageTitle from "../../Components/Common/PageTitle";
import PageTitle from "@/components/Common/PageTitle";
import { useToast } from "@/hooks/use-toast";

const IconIndex: React.FC = () => {
Expand Down
4 changes: 2 additions & 2 deletions src/CAREUI/interactive/FiltersSlideover.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useTranslation } from "react-i18next";
import useFilters from "../../Common/hooks/useFilters";
import ButtonV2 from "../../Components/Common/components/ButtonV2";
import useFilters from "@/common/hooks/useFilters";
import ButtonV2 from "@/components/Common/components/ButtonV2";
import CareIcon from "../icons/CareIcon";
import SlideOver from "./SlideOver";
import { ReactNode } from "react";
Expand Down
2 changes: 1 addition & 1 deletion src/CAREUI/interactive/HumanChart.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Fragment } from "react/jsx-runtime";
import { HumanBodyPaths, HumanBodyRegion } from "../../Common/constants";
import { HumanBodyPaths, HumanBodyRegion } from "@/common/constants";

type Props = {
regionColor: (region: HumanBodyRegion) => string;
Expand Down
2 changes: 1 addition & 1 deletion src/CAREUI/interactive/Zoom.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createContext, ReactNode, useContext, useState } from "react";
import ButtonV2 from "../../Components/Common/components/ButtonV2";
import ButtonV2 from "@/components/Common/components/ButtonV2";
import CareIcon from "../icons/CareIcon";

type ProviderValue = {
Expand Down
6 changes: 3 additions & 3 deletions src/CAREUI/misc/AuthorizedChild.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ReactNode } from "react";
import useAuthUser from "../../Common/hooks/useAuthUser";
import { useIsAuthorized } from "../../Common/hooks/useIsAuthorized";
import useSlug from "../../Common/hooks/useSlug";
import useAuthUser from "@/common/hooks/useAuthUser";
import { useIsAuthorized } from "@/common/hooks/useIsAuthorized";
import useSlug from "@/common/hooks/useSlug";
import { AuthorizedForCB } from "../../Utils/AuthorizeFor";

interface Props {
Expand Down
4 changes: 2 additions & 2 deletions src/CAREUI/misc/PaginatedList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { PaginatedResponse, QueryRoute } from "../../Utils/request/types";
import useQuery, { QueryOptions } from "../../Utils/request/useQuery";
import ButtonV2, {
CommonButtonProps,
} from "../../Components/Common/components/ButtonV2";
} from "@/components/Common/components/ButtonV2";
import CareIcon from "../icons/CareIcon";
import { classNames } from "../../Utils/utils";
import Pagination from "../../Components/Common/Pagination";
import Pagination from "@/components/Common/Pagination";

const DEFAULT_PER_PAGE_LIMIT = 14;

Expand Down
Loading

0 comments on commit f47f372

Please sign in to comment.