diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 892fea40ab3..b67b01cc863 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,9 +1,6 @@ -### WHAT -copilot:summary - ## Proposed Changes -- Fixes #issue? +- Fixes #issue_number - Change 1 - Change 2 - More? @@ -18,6 +15,3 @@ copilot:summary - [ ] Prep screenshot or demo video for changelog entry, and attach it to issue. - [ ] Request for Peer Reviews - [ ] Completion of QA - -### HOW -copilot:walkthrough diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 3c9d6aa28cb..b90adb20138 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -35,7 +35,7 @@ jobs: uses: docker/setup-buildx-action@v2 - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ hashFiles('package-lock.json', 'Dockerfile') }} @@ -87,7 +87,7 @@ jobs: uses: docker/setup-buildx-action@v2 - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ hashFiles('package-lock.json', 'Dockerfile') }} @@ -149,7 +149,7 @@ jobs: uses: docker/setup-buildx-action@v2 - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ hashFiles('package-lock.json', 'Dockerfile') }} @@ -188,6 +188,9 @@ jobs: needs: build-staging name: Deploy to staging GCP cluster runs-on: ubuntu-latest + - uses: actions/setup-node@v3 + with: + node-version: '20' environment: name: Staging-GCP url: https://care-staging.ohc.network/ @@ -201,20 +204,20 @@ jobs: ref: main # Setup gcloud CLI - - uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7 + - uses: google-github-actions/setup-gcloud@v2 with: service_account_key: ${{ secrets.GKE_SA_KEY }} project_id: ${{ secrets.GKE_PROJECT }} # Get the GKE credentials so we can deploy to the cluster - - uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e + - uses: google-github-actions/get-gke-credentials@v2 with: cluster_name: ${{ secrets.GKE_CLUSTER }} location: ${{ secrets.GKE_ZONE }} credentials: ${{ secrets.GKE_SA_KEY }} - name: install kubectl - uses: azure/setup-kubectl@v3.0 + uses: azure/setup-kubectl@v3 with: version: "v1.23.6" id: install @@ -230,6 +233,9 @@ jobs: needs: build-production name: Deploy to GKE Manipur runs-on: ubuntu-latest + - uses: actions/setup-node@v3 + with: + node-version: '20' environment: name: Production-Manipur url: https://care.mn.gov.in @@ -243,20 +249,20 @@ jobs: ref: main # Setup gcloud CLI - - uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7 + - uses: google-github-actions/setup-gcloud@v2 with: service_account_key: ${{ secrets.GKE_SA_KEY }} project_id: ${{ secrets.GKE_PROJECT }} # Get the GKE credentials so we can deploy to the cluster - - uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e + - uses: google-github-actions/get-gke-credentials@v2 with: cluster_name: ${{ secrets.GKE_CLUSTER }} location: ${{ secrets.GKE_ZONE }} credentials: ${{ secrets.GKE_SA_KEY }} - name: install kubectl - uses: azure/setup-kubectl@v3.0 + uses: azure/setup-kubectl@v3 with: version: "v1.23.6" id: install @@ -272,6 +278,9 @@ jobs: needs: build-production name: Deploy to GKE Karnataka runs-on: ubuntu-latest + - uses: actions/setup-node@v3 + with: + node-version: '20' environment: name: Production-Karnataka url: https://karnataka.care @@ -285,20 +294,20 @@ jobs: ref: main # Setup gcloud CLI - - uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7 + - uses: google-github-actions/setup-gcloud@v2 with: service_account_key: ${{ secrets.GKE_SA_KEY }} project_id: ${{ secrets.GKE_PROJECT }} # Get the GKE credentials so we can deploy to the cluster - - uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e + - uses: google-github-actions/get-gke-credentials@v2 with: cluster_name: ${{ secrets.GKE_CLUSTER }} location: ${{ secrets.GKE_ZONE }} credentials: ${{ secrets.GKE_SA_KEY }} - name: install kubectl - uses: azure/setup-kubectl@v3.0 + uses: azure/setup-kubectl@v3 with: version: "v1.23.6" id: install @@ -314,6 +323,9 @@ jobs: needs: build-production name: Deploy to GKE Sikkim runs-on: ubuntu-latest + - uses: actions/setup-node@v3 + with: + node-version: '20' environment: name: Production-Sikkim url: https://care.sikkim.gov.in @@ -327,20 +339,20 @@ jobs: ref: main # Setup gcloud CLI - - uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7 + - uses: google-github-actions/setup-gcloud@v2 with: service_account_key: ${{ secrets.GKE_SA_KEY }} project_id: ${{ secrets.GKE_PROJECT }} # Get the GKE credentials so we can deploy to the cluster - - uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e + - uses: google-github-actions/get-gke-credentials@v2 with: cluster_name: ${{ secrets.GKE_CLUSTER }} location: ${{ secrets.GKE_ZONE }} credentials: ${{ secrets.GKE_SA_KEY }} - name: install kubectl - uses: azure/setup-kubectl@v3.0 + uses: azure/setup-kubectl@v3 with: version: "v1.23.6" id: install @@ -356,6 +368,9 @@ jobs: needs: build-production name: Deploy to GKE Assam runs-on: ubuntu-latest + - uses: actions/setup-node@v3 + with: + node-version: '20' environment: name: Production-Assam url: https://care.assam.gov.in @@ -369,20 +384,20 @@ jobs: ref: main # Setup gcloud CLI - - uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7 + - uses: google-github-actions/setup-gcloud@v2 with: service_account_key: ${{ secrets.GKE_SA_KEY }} project_id: ${{ secrets.GKE_PROJECT }} # Get the GKE credentials so we can deploy to the cluster - - uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e + - uses: google-github-actions/get-gke-credentials@v2 with: cluster_name: ${{ secrets.GKE_CLUSTER }} location: ${{ secrets.GKE_ZONE }} credentials: ${{ secrets.GKE_SA_KEY }} - name: install kubectl - uses: azure/setup-kubectl@v3.0 + uses: azure/setup-kubectl@v3 with: version: "v1.23.6" id: install @@ -398,6 +413,9 @@ jobs: needs: build-production name: Deploy to GKE Nagaland runs-on: ubuntu-latest + - uses: actions/setup-node@v3 + with: + node-version: '20' environment: name: Production - Nagaland url: https://care.nagaland.gov.in @@ -411,20 +429,20 @@ jobs: ref: main # Setup gcloud CLI - - uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7 + - uses: google-github-actions/setup-gcloud@v2 with: service_account_key: ${{ secrets.GKE_SA_KEY }} project_id: ${{ secrets.GKE_PROJECT }} # Get the GKE credentials, so we can deploy to the cluster - - uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e + - uses: google-github-actions/get-gke-credentials@v2 with: cluster_name: ${{ secrets.GKE_CLUSTER }} location: ${{ secrets.GKE_ZONE }} credentials: ${{ secrets.GKE_SA_KEY }} - name: install kubectl - uses: azure/setup-kubectl@v3.0 + uses: azure/setup-kubectl@v3 with: version: "v1.23.6" id: install @@ -440,6 +458,9 @@ jobs: needs: build-production name: Deploy to GKE Meghalaya runs-on: ubuntu-latest + - uses: actions/setup-node@v3 + with: + node-version: '20' environment: name: Production-Meghalaya url: https://care.meghealth.gov.in @@ -453,20 +474,20 @@ jobs: ref: main # Setup gcloud CLI - - uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7 + - uses: google-github-actions/setup-gcloud@v2 with: service_account_key: ${{ secrets.GKE_SA_KEY }} project_id: ${{ secrets.GKE_PROJECT }} # Get the GKE credentials, so we can deploy to the cluster - - uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e + - uses: google-github-actions/get-gke-credentials@v2 with: cluster_name: ${{ secrets.GKE_CLUSTER }} location: ${{ secrets.GKE_ZONE }} credentials: ${{ secrets.GKE_SA_KEY }} - name: install kubectl - uses: azure/setup-kubectl@v3.0 + uses: azure/setup-kubectl@v3 with: version: "v1.23.6" id: install diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index ce4bd271cf7..2bf60f375fc 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -17,12 +17,12 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: - node-version: "18" + node-version: '20' - name: Install dependencies run: npm ci diff --git a/.github/workflows/ossar-analysis.yml b/.github/workflows/ossar-analysis.yml index c213148091f..4e806124e77 100644 --- a/.github/workflows/ossar-analysis.yml +++ b/.github/workflows/ossar-analysis.yml @@ -17,7 +17,7 @@ jobs: steps: # Checkout your code repository to scan - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: # We must fetch at least the immediate parents so that if this is # a pull request then we can checkout the head. @@ -30,7 +30,7 @@ jobs: # Run open source static analysis tools - name: Run OSSAR - uses: github/ossar-action@v1 + uses: github/ossar-action@fae13e456b9973657a670eef6bccc3a4c2b5153d id: ossar # Upload results to the Security tab diff --git a/.github/workflows/thank-you.yml b/.github/workflows/thank-you.yml index cd36e64d888..c8104ad73a5 100644 --- a/.github/workflows/thank-you.yml +++ b/.github/workflows/thank-you.yml @@ -1,7 +1,7 @@ name: Say thanks for the contributors on: - pull_request: + pull_request_target: types: - closed diff --git a/src/Common/constants.tsx b/src/Common/constants.tsx index 069a39e1539..23c02e389f3 100644 --- a/src/Common/constants.tsx +++ b/src/Common/constants.tsx @@ -330,7 +330,10 @@ export const CONSULTATION_SUGGESTION = [ { id: "OP", text: "OP Consultation" }, { id: "DC", text: "Domiciliary Care" }, { id: "DD", text: "Declare Death" }, -]; +] as const; + +export type ConsultationSuggestionValue = + (typeof CONSULTATION_SUGGESTION)[number]["id"]; export const ADMITTED_TO = [ { id: "1", text: "Isolation" }, diff --git a/src/Common/hooks/useIsInitialRender.ts b/src/Common/hooks/useIsInitialRender.ts deleted file mode 100644 index cfbfe71734d..00000000000 --- a/src/Common/hooks/useIsInitialRender.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { useEffect, useRef } from "react"; - -export default function useIsInitialRender() { - const isInitialRender = useRef(true); - useEffect(() => { - isInitialRender.current = false; - }, []); - return isInitialRender.current; -} diff --git a/src/Components/Assets/AssetTypes.tsx b/src/Components/Assets/AssetTypes.tsx index 041d3d0a81e..97334f6af49 100644 --- a/src/Components/Assets/AssetTypes.tsx +++ b/src/Components/Assets/AssetTypes.tsx @@ -20,7 +20,6 @@ export interface AssetLocationObject { id: string; name: string; }; - middleware_address?: string; } export enum AssetType { diff --git a/src/Components/Common/NavTabs.tsx b/src/Components/Common/NavTabs.tsx deleted file mode 100644 index 1b913d888ce..00000000000 --- a/src/Components/Common/NavTabs.tsx +++ /dev/null @@ -1,52 +0,0 @@ -interface TabValue { - value: number; - label: string; -} -interface TabChange { - (value: number): void; -} -interface NavTabsProps { - active?: number; - options?: TabValue[]; - onChange: TabChange; -} - -export default function NavTabs(props: NavTabsProps) { - const { active, options, onChange } = props; - return ( -
- {name} -
- {description || "-"} -
- -- {middleware_address} -
+{name}
++ {location_type} +
++ {description || "-"} +
++ Middleware Address: +
++ {middleware_address || "-"} +