Skip to content

Commit

Permalink
Merge branch 'develop' into vysakh/deploy-tag
Browse files Browse the repository at this point in the history
  • Loading branch information
tellmeY18 authored Jan 30, 2025
2 parents e60ce77 + fcd08c8 commit 4461b34
Show file tree
Hide file tree
Showing 173 changed files with 6,395 additions and 8,723 deletions.
84 changes: 0 additions & 84 deletions .eslintrc.json

This file was deleted.

3 changes: 3 additions & 0 deletions .example.env
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,6 @@ REACT_DEFAULT_ENCOUNTER_TYPE=

# Available languages to switch between (2 Digit language code seperated by comas. See src->Locale->config.ts for available codes)
REACT_ALLOWED_LOCALES="en,hi,ta,ml,mr,kn"

# ISO 3166-1 Alpha-2 code for the default country code (default: "IN")
REACT_DEFAULT_COUNTRY=
9 changes: 5 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
version: 2
updates:
- package-ecosystem: "yarn"
- package-ecosystem: npm
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 0
allow:
- dependency-name: "*"
dependency-type: "production"
assignees:
- "tomahawk_pilot"
labels:
- "yarn"
- "dependencies"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
assignees:
open-pull-requests-limit: 0
assignees:
- "tomahawk_pilot"
labels:
- "ci"
- "dependencies"
- "dependencies"
2 changes: 1 addition & 1 deletion .github/workflows/auto-testing-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- name: Check PR Conditions and Add Label
id: check_conditions
uses: actions/github-script@v5
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/combine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- name: Combine dependencies
id: combine-dependencies
uses: github/combine-prs@v5.0.0
uses: github/combine-prs@v5.2.0
with:
pr_title: Combined dependencies # The title of the pull request to create
select_label: dependencies # The label which marks PRs that should be combined.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/comment-p1-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
issues: write
steps:
- name: Add comment
uses: actions/github-script@v6.3.3
uses: actions/github-script@v7
with:
script: |
const body = ':warning: **Refrain from assigning this issue to yourself if you have another `P1` issue assigned that is not yet closed.**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cypress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

steps:
- name: Checkout 📥
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Determine PR Origin
id: pr_origin
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Cache Docker layers
uses: actions/cache@v4
Expand All @@ -45,7 +45,7 @@ jobs:
${{ runner.os }}-buildx-test-
- name: Test build
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
${{ runner.os }}-buildx-build-
- name: Build and push image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/issue-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
if: github.repository == 'ohcnetwork/care_fe' && github.event_name == 'issues' && github.event.action == 'opened' || github.event.action == 'reopened'
steps:
- name: 'Move issue to "Triage"'
uses: leonsteinhaeuser/project-beta-automations@v1.2.1
uses: leonsteinhaeuser/project-beta-automations@v2.2.1
with:
gh_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
organization: ohcnetwork
Expand All @@ -26,7 +26,7 @@ jobs:
if: github.repository == 'ohcnetwork/care_fe' && github.event_name == 'issues' && github.event.action == 'closed'
steps:
- name: 'Moved issue to "Done"'
uses: leonsteinhaeuser/project-beta-automations@v1.2.1
uses: leonsteinhaeuser/project-beta-automations@v2.2.1
with:
gh_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
organization: ohcnetwork
Expand All @@ -39,7 +39,7 @@ jobs:
if: github.repository == 'ohcnetwork/care_fe' && github.event_name == 'issues' && github.event.action == 'assigned'
steps:
- name: 'Move issue to "In Progress"'
uses: leonsteinhaeuser/project-beta-automations@v1.2.1
uses: leonsteinhaeuser/project-beta-automations@v2.2.1
with:
gh_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
organization: ohcnetwork
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/label-deploy-failed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:

- name: Check deploy status
id: check-status

uses: actions/github-script@v7
with:
script: |
Expand All @@ -36,8 +37,10 @@ jobs:
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"


- name: Remove Deploy-Failed label if deploy is successful
if: steps.check-status.outputs.isDeploySuccessful == 'true'

uses: actions/github-script@v7
with:
script: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label-merge-conflict.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
if: github.repository == 'ohcnetwork/care_fe'
runs-on: ubuntu-24.04-arm
steps:
- uses: prince-chrismc/label-merge-conflicts-action@v2
- uses: prince-chrismc/label-merge-conflicts-action@v3
with:
conflict_label_name: "merge conflict"
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label-wip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
if: github.repository == 'ohcnetwork/care_fe' && join(needs.check-linked-issues.outputs.linked_issues) != ''
steps:
- name: Label
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const issues = "${{ needs.check-linked-issues.outputs.linked_issues }}".split(',')
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ permissions:
jobs:
release:
name: Release on Push
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Necessary to fetch all tags

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-24.04-arm
if: github.repository == 'ohcnetwork/care_fe'
steps:
- uses: actions/stale@v6
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-label: "stale"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/thank-you.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
contents: write
steps:
- name: Add thankyou note
uses: actions/github-script@v6.3.3
uses: actions/github-script@v7
with:
script: |
const thankyouNote = 'Your efforts have helped advance digital healthcare and TeleICU systems. :rocket: Thank you for taking the time out to make CARE better. We hope you continue to innovate and contribute; your impact is immense! :raised_hands:';
Expand Down
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"useTabs": false,
"tabWidth": 2,
"semi": true,
"endOfLine": "lf",
"endOfLine": "auto",
"jsxSingleQuote": false,
"arrowParens": "always",
"tailwindFunctions": ["classNames"],
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/ohcnetwork/branding/refs/heads/main/Care/SVG/Logo/Care-Logo_gradient_mark_with_white_wordmark.svg">
<img alt="CARE Logo" src="https://raw.githubusercontent.com/ohcnetwork/branding/refs/heads/main/Care/SVG/Logo/Care-Logo_gradient_mark_with_dark_wordmark.svg" width="400">
</picture>
<br>
<a href="https://digitalpublicgoods.net/r/care"><img src="https://img.shields.io/badge/Verified-DPG%20(Since%20%202021)-3333AB?logo=data:image/svg%2bxml;base64,PHN2ZyB3aWR0aD0iMzEiIGhlaWdodD0iMzMiIHZpZXdCb3g9IjAgMCAzMSAzMyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE0LjIwMDggMjEuMzY3OEwxMC4xNzM2IDE4LjAxMjRMMTEuNTIxOSAxNi40MDAzTDEzLjk5MjggMTguNDU5TDE5LjYyNjkgMTIuMjExMUwyMS4xOTA5IDEzLjYxNkwxNC4yMDA4IDIxLjM2NzhaTTI0LjYyNDEgOS4zNTEyN0wyNC44MDcxIDMuMDcyOTdMMTguODgxIDUuMTg2NjJMMTUuMzMxNCAtMi4zMzA4MmUtMDVMMTEuNzgyMSA1LjE4NjYyTDUuODU2MDEgMy4wNzI5N0w2LjAzOTA2IDkuMzUxMjdMMCAxMS4xMTc3TDMuODQ1MjEgMTYuMDg5NUwwIDIxLjA2MTJMNi4wMzkwNiAyMi44Mjc3TDUuODU2MDEgMjkuMTA2TDExLjc4MjEgMjYuOTkyM0wxNS4zMzE0IDMyLjE3OUwxOC44ODEgMjYuOTkyM0wyNC44MDcxIDI5LjEwNkwyNC42MjQxIDIyLjgyNzdMMzAuNjYzMSAyMS4wNjEyTDI2LjgxNzYgMTYuMDg5NUwzMC42NjMxIDExLjExNzdMMjQuNjI0MSA5LjM1MTI3WiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==" alt="DPG Badge"></a>
</p>
</a>
<p align="center"><b>Our goal is to continuously improve the quality and accessibility of public healthcare services using digital tools.</b></p>
Expand Down Expand Up @@ -151,3 +153,10 @@ Starts a production http-server in local to run the project with Service worker.
The build is minified and the filenames include the hashes.

**🚀 Your app is ready to be deployed!**

<div align="center">

<br />
<a href="https://digitalpublicgoods.net/r/care" target="_blank" rel="noopener noreferrer"><img src="https://github.com/DPGAlliance/dpg-resources/blob/main/docs/assets/dpg-badge.png?raw=true" width="100" alt="Digital Public Goods Badge"></a>

</div>
33 changes: 29 additions & 4 deletions care.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { CountryCode } from "libphonenumber-js/types.cjs";

import { EncounterClass } from "@/types/emr/encounter";

const env = import.meta.env;
Expand Down Expand Up @@ -119,14 +121,37 @@ const careConfig = {
},

careApps: env.REACT_ENABLED_APPS
? env.REACT_ENABLED_APPS.split(",").map((app) => ({
branch: app.split("@")[1],
package: app.split("@")[0],
}))
? env.REACT_ENABLED_APPS.split(",").map((app) => {
const [module, cdn] = app.split("@");
const [org, repo] = module.split("/");

if (!org || !repo) {
throw new Error(
`Invalid plug configuration: ${module}. Expected 'org/repo@url'.`,
);
}

let url = "";
if (!cdn) {
url = `https://${org}.github.io/${repo}`;
}

if (!url.startsWith("http")) {
url = `${cdn.includes("localhost") ? "http" : "https"}://${cdn}`;
}

return {
url: new URL(url).toString(),
name: repo,
package: module,
};
})
: [],

plotsConfigUrl:
env.REACT_OBSERVATION_PLOTS_CONFIG_URL || "/config/plots.json",

defaultCountry: (env.REACT_DEFAULT_COUNTRY || "IN") as CountryCode,
} as const;

export default careConfig;
6 changes: 3 additions & 3 deletions cypress/e2e/facility_spec/facility_creation.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FacilityCreation } from "pageObject/facility/FacilityCreation";
import { generatePhoneNumber } from "utils/commonUtils";
import { generateFacilityData } from "utils/facilityData";
import { FacilityCreation } from "@/pageObject/facility/FacilityCreation";
import { generatePhoneNumber } from "@/utils/commonUtils";
import { generateFacilityData } from "@/utils/facilityData";

const LOCATION_HIERARCHY = {
localBody: "Aluva",
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/login_spec/loginpage.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LoginPage } from "../../pageObject/auth/LoginPage";
import { LoginPage } from "@/pageObject/auth/LoginPage";

describe("Login Page", () => {
const loginPage = new LoginPage();
Expand Down
Loading

0 comments on commit 4461b34

Please sign in to comment.