forked from ohcnetwork/care_fe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into issues/8645/dosage-heading-misaligned
Updated Branch
- Loading branch information
Showing
604 changed files
with
204,113 additions
and
17,162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Care is a React Typescript Project, built with Vite and styled with TailwindCSS. | ||
|
||
Care uses a Plugin Architecture. Apps are installed in /apps. | ||
|
||
Care uses a custom useQuery hook to fetch data from the API. APIs are defined in the api.tsx file | ||
|
||
Here's an example of how to use the useQuery hook to fetch data from the API: | ||
|
||
``` | ||
useQuery from "@/common/hooks/useQuery"; | ||
const { data, loading, error } = useQuery(routes.getFacilityUsers, { | ||
facility_id: "1", | ||
}); | ||
|
||
request from "@/common/utils/request"; | ||
const { res } = await request(routes.partialUpdateAsset, { | ||
pathParams: { external_id: assetId }, | ||
body: data, | ||
}); | ||
``` | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ build | |
.dockerignore | ||
Dockerfile | ||
.git | ||
apps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Care API URL without the /api prefix | ||
REACT_CARE_API_URL=http://localhost:9000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,3 +58,7 @@ bun.lockb | |
# Cypress | ||
cypress/downloads | ||
cypress/fixtures/token.json | ||
|
||
# Care Apps | ||
/apps/* | ||
src/pluginMap.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { DoctorConnect } from "pageobject/Patient/PatientDoctorConnect"; | ||
import LoginPage from "../../pageobject/Login/LoginPage"; | ||
import { PatientPage } from "../../pageobject/Patient/PatientCreation"; | ||
|
||
describe("Patient Doctor Connect in consultation page", () => { | ||
const loginPage = new LoginPage(); | ||
const patientPage = new PatientPage(); | ||
const doctorconnect = new DoctorConnect(); | ||
const patientName = "Dummy Patient 11"; | ||
const doctorUser = "Dev Doctor"; | ||
const nurseUser = "Dev Staff"; | ||
const teleIcuUser = "Dev Doctor Two"; | ||
|
||
before(() => { | ||
loginPage.loginAsDisctrictAdmin(); | ||
cy.saveLocalStorage(); | ||
}); | ||
|
||
beforeEach(() => { | ||
cy.restoreLocalStorage(); | ||
cy.clearLocalStorage(/filters--.+/); | ||
cy.awaitUrl("/patients"); | ||
}); | ||
|
||
it("Patient Doctor connect phone redirection and sort by filter", () => { | ||
// click on the slideover and verify icon redirection | ||
patientPage.visitPatient(patientName); | ||
doctorconnect.clickDoctorConnectButton(); | ||
// verify all the users are visible under the all section | ||
cy.verifyContentPresence("#doctor-connect-home-doctor", [doctorUser]); | ||
cy.verifyContentPresence("#doctor-connect-home-nurse", [nurseUser]); | ||
cy.verifyContentPresence("#doctor-connect-remote-doctor", [teleIcuUser]); | ||
// verify copy content button functionality | ||
doctorconnect.CopyFunctionTrigger(); | ||
doctorconnect.clickCopyPhoneNumber( | ||
"#doctor-connect-home-doctor", | ||
doctorUser, | ||
); | ||
doctorconnect.verifyCopiedContent(); | ||
// verify the whatsapp and phone number icon presence | ||
doctorconnect.verifyIconVisible("#whatsapp-icon"); | ||
doctorconnect.verifyIconVisible("#phone-icon"); | ||
// sort the each datas based on user type | ||
doctorconnect.clickUsersSortBy("Doctor"); | ||
cy.verifyContentPresence("#doctor-connect-home-doctor", [doctorUser]); | ||
doctorconnect.clickUsersSortBy("Nurse"); | ||
cy.verifyContentPresence("#doctor-connect-home-nurse", [nurseUser]); | ||
doctorconnect.clickUsersSortBy("TeleICU Doctor"); | ||
cy.verifyContentPresence("#doctor-connect-remote-doctor", [teleIcuUser]); | ||
}); | ||
|
||
afterEach(() => { | ||
cy.saveLocalStorage(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.