From 7416c8e43ec13c50009b7fc21c7e89f01dd20520 Mon Sep 17 00:00:00 2001 From: rf-opssupport <84499879+rf-opssupport@users.noreply.github.com> Date: Wed, 11 Sep 2024 18:53:24 +0530 Subject: [PATCH 01/11] Update prod-ci-cd.yml --- .github/workflows/prod-ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prod-ci-cd.yml b/.github/workflows/prod-ci-cd.yml index 1c7b06a2..8c33db79 100755 --- a/.github/workflows/prod-ci-cd.yml +++ b/.github/workflows/prod-ci-cd.yml @@ -66,7 +66,7 @@ jobs: run: aws s3 cp s3://${{ secrets.ENV_FILE_BUCKET_PATH }}/.env ./.env - name: Copy constant file - run: aws s3 cp s3://${{ secrets.CONSTANT_FILE_BUCKET_PATH }}/constants.ts ./src/lib + run: aws s3 cp s3://${{ secrets.CONSTANT_FILE_BUCKET_PATH }}/constants.ts ./app/src/lib - name: Build and push id: docker_build From 9a5ed69640e98d7bb0f21111db9cab720f201dfe Mon Sep 17 00:00:00 2001 From: rf-opssupport <84499879+rf-opssupport@users.noreply.github.com> Date: Wed, 11 Sep 2024 20:56:27 +0530 Subject: [PATCH 02/11] Update prod-ci-cd.yml --- .github/workflows/prod-ci-cd.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/prod-ci-cd.yml b/.github/workflows/prod-ci-cd.yml index 8c33db79..42d0f132 100755 --- a/.github/workflows/prod-ci-cd.yml +++ b/.github/workflows/prod-ci-cd.yml @@ -68,6 +68,11 @@ jobs: - name: Copy constant file run: aws s3 cp s3://${{ secrets.CONSTANT_FILE_BUCKET_PATH }}/constants.ts ./app/src/lib + - name: Show files + run: | + ls -al + cat ./app/src/lib/constants.ts + - name: Build and push id: docker_build uses: docker/build-push-action@v3 From 24f5736d0635e7b449827eeeab4fcfec50f8b269 Mon Sep 17 00:00:00 2001 From: rf-opssupport <84499879+rf-opssupport@users.noreply.github.com> Date: Wed, 11 Sep 2024 20:58:57 +0530 Subject: [PATCH 03/11] Update prod-ci-cd.yml --- .github/workflows/prod-ci-cd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prod-ci-cd.yml b/.github/workflows/prod-ci-cd.yml index 42d0f132..c71a2e8f 100755 --- a/.github/workflows/prod-ci-cd.yml +++ b/.github/workflows/prod-ci-cd.yml @@ -66,12 +66,12 @@ jobs: run: aws s3 cp s3://${{ secrets.ENV_FILE_BUCKET_PATH }}/.env ./.env - name: Copy constant file - run: aws s3 cp s3://${{ secrets.CONSTANT_FILE_BUCKET_PATH }}/constants.ts ./app/src/lib + run: aws s3 cp s3://${{ secrets.CONSTANT_FILE_BUCKET_PATH }}/constants.ts ./src/lib - name: Show files run: | ls -al - cat ./app/src/lib/constants.ts + cat ./src/lib/constants.ts - name: Build and push id: docker_build From b3867e1e742b82332191deac668f49be07ca98cb Mon Sep 17 00:00:00 2001 From: rf-opssupport <84499879+rf-opssupport@users.noreply.github.com> Date: Mon, 16 Sep 2024 15:57:22 +0530 Subject: [PATCH 04/11] Update aha-uat-ci-cd.yml --- .github/workflows/aha-uat-ci-cd.yml | 125 ++++++++++------------------ 1 file changed, 44 insertions(+), 81 deletions(-) diff --git a/.github/workflows/aha-uat-ci-cd.yml b/.github/workflows/aha-uat-ci-cd.yml index a80436ed..16f4a786 100644 --- a/.github/workflows/aha-uat-ci-cd.yml +++ b/.github/workflows/aha-uat-ci-cd.yml @@ -1,93 +1,40 @@ -# This workflow will trigger pull requests and apply a label based on the -# paths that are modified in the pull request. -# -# To use this workflow, you will need to set up a .github/labeler.yml -# file with configuration. For more information, see: -# https://github.com/actions/labeler - name: AHA-UAT-CI-CD # Controls when the workflow will run on: # Triggers the workflow on push events but only for the develop branch workflow_dispatch: - inputs: - Tag_name: - description: Tag name of your release(please include "v") - required: true + # inputs: + # Tag_name: + # description: Tag name of your release(please include "v") + # required: true jobs: -# CodeScan-ESLint: -# runs-on: ubuntu-latest -# steps: -# - name: Checkout Code -# uses: actions/checkout@v3 -# with: -# fetch-depth: 0 - -# - name: Lint Code Base -# uses: github/super-linter@v4 -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# LINTER_RULES_PATH: / -# TYPESCRIPT_ES_CONFIG_FILE: .eslintrc.json -# VALIDATE_TYPESCRIPT_ES: true - - - Github-ECR-Tag-Check: + Publish-Release: runs-on: ubuntu-latest steps: - - name: check tag - uses: mukunku/tag-exists-action@v1.2.0 - id: checkTag - with: - tag: ${{ github.event.inputs.Tag_name }} - - - name: Get release - if: ${{ steps.checkTag.outputs.exists == 'true' }} - id: result_release - uses: cardinalby/git-get-release-action@v1 - env: - GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }} + - name: New Release Publish + id: new_publish + uses: release-drafter/release-drafter@v5 with: - tag: ${{ github.event.inputs.Tag_name }} - repo: REAN-Foundation/rean-admin-portal - - - name: Configure AWS credentials - if: ${{ steps.checkTag.outputs.exists == 'true' }} - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ secrets.AWS_REGION }} - - - name: Get ECR Image Tag - if: ${{ steps.checkTag.outputs.exists == 'true' }} - id: imageidvar - run: | - image_tag+=${{ steps.result_release.outputs.tag_name }} && image_tag+=_ && image_tag+=${{ steps.result_release.outputs.id }} - echo "imagetag_value=$(aws ecr-public describe-image-tags --repository-name rean-admin-portal --region us-east-1 --query "imageTagDetails[?imageTag=='$image_tag'].imageTag" --output text)" >> $GITHUB_OUTPUT - - - name: ECR Image and Github Tag Check - run: | - if [[ ${{ steps.checkTag.outputs.exists }} == 'false' ]]; then exit 1; fi - if [[ -z "${{ steps.imageidvar.outputs.imagetag_value }}" ]]; then exit 1; fi - + publish : true + env: + GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }} + outputs: - release_name: ${{ steps.result_release.outputs.tag_name }} - release_id: ${{ steps.result_release.outputs.id }} + release_id: ${{ steps.new_publish.outputs.id }} + release_name: ${{ steps.new_publish.outputs.tag_name }} Deploy-ECS: - needs: Github-ECR-Tag-Check - environment: aha-uat + needs: Publish-Release + environment: prod runs-on: ubuntu-latest steps: - - name: Checkout uses: actions/checkout@v3 - + - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 with: @@ -95,9 +42,6 @@ jobs: aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: ${{ secrets.AWS_REGION }} - - name: Copy env file - run: aws s3 cp s3://${{ secrets.ENV_FILE_BUCKET_PATH }}/.env ./.env - - name: Declare some variables id: vars shell: bash @@ -106,13 +50,20 @@ jobs: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT echo "repo_name=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}')" >> $GITHUB_OUTPUT + - name: Another step + run: | + echo "Branch: ${{ steps.vars.outputs.branch }}" + echo "Sha: ${{ steps.vars.outputs.sha_short }}" + echo "Repo: ${{ steps.vars.outputs.repo_name }}" + + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - name: Login to Amazon ECR id: login-ecr uses: aws-actions/amazon-ecr-login@v1 - + - name: Cache Docker layers uses: actions/cache@v3 with: @@ -120,7 +71,13 @@ jobs: key: ${{ runner.os }}-buildx-${{ github.sha }} restore-keys: | ${{ runner.os }}-buildx- - + + - name: Copy env file + run: aws s3 cp s3://${{ secrets.ENV_FILE_BUCKET_PATH }}/.env ./.env + + - name: Copy constant file + run: aws s3 cp s3://${{ secrets.CONSTANT_FILE_BUCKET_PATH }}/constants.ts ./src/lib + - name: Build and push id: docker_build uses: docker/build-push-action@v3 @@ -128,12 +85,17 @@ jobs: context: ./ file: ./Dockerfile builder: ${{ steps.buildx.outputs.name }} - build-args: ORIGIN=${{ env.ORIGIN }} + build-args: | + ORIGIN=${{ env.ORIGIN }} + ENVIRONMENT=aha-uat push: true - tags: ${{ steps.login-ecr.outputs.registry }}/rean-admin-portal:${{ steps.vars.outputs.branch }}_${{ steps.vars.outputs.sha_short }} + tags: ${{ steps.login-ecr.outputs.registry }}/rean-admin-portal-aha-uat:${{ steps.vars.outputs.branch }}_${{ steps.vars.outputs.sha_short }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache + - name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }} + - name: Download task definition run: | aws ecs describe-task-definition --task-definition ${{ secrets.TASK_DEFINTION_NAME }} \ @@ -143,9 +105,9 @@ jobs: id: task-def uses: aws-actions/amazon-ecs-render-task-definition@v1 with: - task-definition: task-definition.json - container-name: default - image: ${{ steps.login-ecr.outputs.registry }}/rean-admin-portal:${{ steps.vars.outputs.branch }}_${{ steps.vars.outputs.sha_short }} + task-definition: task-definition.json + container-name: default + image: ${{ steps.login-ecr.outputs.registry }}/rean-admin-portal-aha-uat:${{ steps.vars.outputs.branch }}_${{ steps.vars.outputs.sha_short }} - name: Deploy Amazon ECS task definition uses: aws-actions/amazon-ecs-deploy-task-definition@v1 @@ -157,7 +119,8 @@ jobs: id: taskdefintionvar shell: bash run: | - echo "task_definition_arn=$(aws ecs describe-task-definition --task-definition ${{ secrets.TASK_DEFINTION_NAME }} | jq '.[] | .taskDefinitionArn')" >> $GITHUB_OUTPUT + # echo "::set-output name=task_definition_arn::$(aws ecs describe-task-definition --task-definition ${{ secrets.TASK_DEFINTION_NAME }} | jq '.[] | .taskDefinitionArn')" + echo "task_definition_arn=$(aws ecs describe-task-definition --task-definition ${{ secrets.TASK_DEFINTION_NAME }} | jq '.[] | .taskDefinitionArn')" >> $GITHUB_OUTPUT - name: Task Defintion ARN run: | From 70eeab8f3e550fcb9cc5d8f0ff9075a29e3b4985 Mon Sep 17 00:00:00 2001 From: rf-opssupport <84499879+rf-opssupport@users.noreply.github.com> Date: Mon, 16 Sep 2024 16:00:39 +0530 Subject: [PATCH 05/11] Update aha-prod-ci-cd.yml --- .github/workflows/aha-prod-ci-cd.yml | 106 ++++++++------------------- 1 file changed, 30 insertions(+), 76 deletions(-) diff --git a/.github/workflows/aha-prod-ci-cd.yml b/.github/workflows/aha-prod-ci-cd.yml index ae988070..e346d303 100755 --- a/.github/workflows/aha-prod-ci-cd.yml +++ b/.github/workflows/aha-prod-ci-cd.yml @@ -1,89 +1,41 @@ -# This workflow will trigger pull requests and apply a label based on the -# paths that are modified in the pull request. -# -# To use this workflow, you will need to set up a .github/labeler.yml -# file with configuration. For more information, see: -# https://github.com/actions/labeler - name: AHA-PROD-CI-CD # Controls when the workflow will run on: # Triggers the workflow on push events but only for the develop branch workflow_dispatch: - inputs: - Tag_name: - description: Tag name of your release(please include "v" if needed) - required: true + # inputs: + # Tag_name: + # description: Tag name of your release(please include "v" if needed) + # required: true jobs: - - Github-ECR-Tag-Check: + Publish-Release: runs-on: ubuntu-latest - steps: - - name: check tag - uses: mukunku/tag-exists-action@v1.2.0 - id: checkTag + - name: New Release Publish + id: new_publish + uses: release-drafter/release-drafter@v5 with: - tag: ${{ github.event.inputs.Tag_name }} - - - name: Get release - if: ${{ steps.checkTag.outputs.exists == 'true' }} - id: result_release - uses: cardinalby/git-get-release-action@v1 + publish : true env: - GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }} - with: - tag: ${{ github.event.inputs.Tag_name }} - repo: REAN-Foundation/rean-admin-portal - - - name: Configure AWS credentials - if: ${{ steps.checkTag.outputs.exists == 'true' }} - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ secrets.AWS_REGION }} - - - name: Get ECR Image Tag - if: ${{ steps.checkTag.outputs.exists == 'true' }} - id: imageidvar - run: | - image_tag+=${{ steps.result_release.outputs.tag_name }} && image_tag+=_ && image_tag+=${{ steps.result_release.outputs.id }} - echo "imagetag_value=$(aws ecr-public describe-image-tags --repository-name rean-admin-portal --region us-east-1 --query "imageTagDetails[?imageTag=='$image_tag'].imageTag" --output text)" >> $GITHUB_OUTPUT - echo $imagetag_value - - name: ECR Image and Github Tag Check - run: | - if [[ ${{ steps.checkTag.outputs.exists }} == 'false' ]]; then exit 1; fi - echo $steps.imageidvar.outputs.imagetag_value - if [[ -z "${{ steps.imageidvar.outputs.imagetag_value }}" ]]; then exit 1; fi + GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }} outputs: - release_name: ${{ steps.result_release.outputs.tag_name }} - release_id: ${{ steps.result_release.outputs.id }} - + release_id: ${{ steps.new_publish.outputs.id }} + release_name: ${{ steps.new_publish.outputs.tag_name }} Deploy-ECS: - needs: Github-ECR-Tag-Check - environment: aha-prod + needs: Publish-Release + environment: prod runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - - name: Get release - id: result_release - uses: cardinalby/git-get-release-action@v1 - env: - GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }} - with: - tag: ${{ github.event.inputs.Tag_name }} - repo: REAN-Foundation/rean-admin-portal - - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 with: @@ -91,14 +43,6 @@ jobs: aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: ${{ secrets.AWS_REGION }} - - name: Copy env file - run: aws s3 cp s3://${{ secrets.ENV_FILE_BUCKET_PATH }}/.env ./.env - - - name: Show files - run: | - ls -l - cat ./.env - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 @@ -114,6 +58,12 @@ jobs: restore-keys: | ${{ runner.os }}-buildx- + - name: Copy env file + run: aws s3 cp s3://${{ secrets.ENV_FILE_BUCKET_PATH }}/.env ./.env + + - name: Copy constant file + run: aws s3 cp s3://${{ secrets.CONSTANT_FILE_BUCKET_PATH }}/constants.ts ./src/lib + - name: Build and push id: docker_build uses: docker/build-push-action@v3 @@ -121,13 +71,17 @@ jobs: context: ./ file: ./Dockerfile builder: ${{ steps.buildx.outputs.name }} - build-args: ORIGIN=${{ env.ORIGIN }} + build-args: | + ORIGIN=${{ env.ORIGIN }} + ENVIRONMENT=aha-prod push: true - # tags: ${{ steps.login-ecr.outputs.registry }}/rean-admin-portal:${{ steps.vars.outputs.branch }}_${{ steps.vars.outputs.sha_short }} - tags: public.ecr.aws/i9y2d4u3/rean-admin-portal:${{ needs.Publish-Release.outputs.release_name }}_${{ needs.Publish-Release.outputs.release_id }} + tags: public.ecr.aws/i9y2d4u3/rean-admin-portal-aha-prod:${{ needs.Publish-Release.outputs.release_name }}_${{ needs.Publish-Release.outputs.release_id }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache - + + - name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }} + - name: Download task definition run: | aws ecs describe-task-definition --task-definition ${{ secrets.TASK_DEFINTION_NAME }} \ @@ -139,7 +93,7 @@ jobs: with: task-definition: task-definition.json container-name: default - image: public.ecr.aws/i9y2d4u3/rean-admin-portal:${{ needs.Github-ECR-Tag-Check.outputs.release_name }}_${{ needs.Github-ECR-Tag-Check.outputs.release_id }} + image: public.ecr.aws/i9y2d4u3/rean-admin-portal-aha-prod:${{ needs.Publish-Release.outputs.release_name }}_${{ needs.Publish-Release.outputs.release_id }} - name: Deploy Amazon ECS task definition uses: aws-actions/amazon-ecs-deploy-task-definition@v1 @@ -162,5 +116,5 @@ jobs: with: url: 'https://reanfoundation.duplocloud.net/subscriptions/${{ secrets.DUPLO_ID }}/UpdateEcsService' method: 'POST' - data: '{"TaskDefinition":${{ steps.taskdefintionvar.outputs.task_definition_arn }},"Name": "${{ secrets.SERVICE_NAME }}","Replicas":1, "HealthCheckGracePeriodSeconds": 1200,"DnsPrfx": ""}' + data: '{"TaskDefinition":${{ steps.taskdefintionvar.outputs.task_definition_arn }},"Name": "${{ secrets.SERVICE_NAME }}","Replicas":1, "HealthCheckGracePeriodSeconds": 1200, "DnsPrfx": ""}' bearerToken: ${{ secrets.DUPLOCLOUD_TOKEN }} From 24a0408d03afc21cffd08e5bc8a119bf2e7e0ebe Mon Sep 17 00:00:00 2001 From: rf-opssupport <84499879+rf-opssupport@users.noreply.github.com> Date: Mon, 16 Sep 2024 16:12:55 +0530 Subject: [PATCH 06/11] Update aha-uat-ci-cd.yml --- .github/workflows/aha-uat-ci-cd.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/aha-uat-ci-cd.yml b/.github/workflows/aha-uat-ci-cd.yml index 16f4a786..40e83e92 100644 --- a/.github/workflows/aha-uat-ci-cd.yml +++ b/.github/workflows/aha-uat-ci-cd.yml @@ -4,10 +4,10 @@ name: AHA-UAT-CI-CD on: # Triggers the workflow on push events but only for the develop branch workflow_dispatch: - # inputs: - # Tag_name: - # description: Tag name of your release(please include "v") - # required: true + inputs: + Tag_name: + description: Tag name of your release(please include "v") + required: true jobs: From 743494679fd735c15ea8124ec1fac93c77588001 Mon Sep 17 00:00:00 2001 From: rf-opssupport <84499879+rf-opssupport@users.noreply.github.com> Date: Mon, 16 Sep 2024 16:13:29 +0530 Subject: [PATCH 07/11] Update aha-prod-ci-cd.yml --- .github/workflows/aha-prod-ci-cd.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/aha-prod-ci-cd.yml b/.github/workflows/aha-prod-ci-cd.yml index e346d303..5b2ac7ec 100755 --- a/.github/workflows/aha-prod-ci-cd.yml +++ b/.github/workflows/aha-prod-ci-cd.yml @@ -4,10 +4,10 @@ name: AHA-PROD-CI-CD on: # Triggers the workflow on push events but only for the develop branch workflow_dispatch: - # inputs: - # Tag_name: - # description: Tag name of your release(please include "v" if needed) - # required: true + inputs: + Tag_name: + description: Tag name of your release(please include "v" if needed) + required: true jobs: From bfb8c46663e0050f5cf915748329ed7e45d60243 Mon Sep 17 00:00:00 2001 From: rf-opssupport <84499879+rf-opssupport@users.noreply.github.com> Date: Tue, 17 Sep 2024 12:47:44 +0530 Subject: [PATCH 08/11] Update aha-uat-ci-cd.yml --- .github/workflows/aha-uat-ci-cd.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/aha-uat-ci-cd.yml b/.github/workflows/aha-uat-ci-cd.yml index 40e83e92..681076da 100644 --- a/.github/workflows/aha-uat-ci-cd.yml +++ b/.github/workflows/aha-uat-ci-cd.yml @@ -4,10 +4,10 @@ name: AHA-UAT-CI-CD on: # Triggers the workflow on push events but only for the develop branch workflow_dispatch: - inputs: - Tag_name: - description: Tag name of your release(please include "v") - required: true + # inputs: + # Tag_name: + # description: Tag name of your release(please include "v") + # required: true jobs: @@ -28,7 +28,7 @@ jobs: Deploy-ECS: needs: Publish-Release - environment: prod + environment: aha-uat runs-on: ubuntu-latest steps: From 74c3564608436b051f6f55604fcdbd1b59304950 Mon Sep 17 00:00:00 2001 From: Dattatraya-Londhe Date: Thu, 19 Sep 2024 17:56:21 +0530 Subject: [PATCH 09/11] Fixed hospital edit view issue. --- src/routes/users/[userId]/hospitals/[id]/edit/+page.server.ts | 4 +++- src/routes/users/[userId]/hospitals/[id]/edit/+page.svelte | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/routes/users/[userId]/hospitals/[id]/edit/+page.server.ts b/src/routes/users/[userId]/hospitals/[id]/edit/+page.server.ts index da2168ae..f66fa9b6 100755 --- a/src/routes/users/[userId]/hospitals/[id]/edit/+page.server.ts +++ b/src/routes/users/[userId]/hospitals/[id]/edit/+page.server.ts @@ -19,7 +19,9 @@ export const load: PageServerLoad = async (event: RequestEvent) => { } const hospital = response.Data.Hospital; const id = response.Data.Hospital.id; - const healthSystems_ = await searchHealthSystems(sessionId); + const healthSystems_ = await searchHealthSystems(sessionId, { + itemsPerPage: 200 + }); const healthSystems = healthSystems_.Data.HealthSystems.Items; return { diff --git a/src/routes/users/[userId]/hospitals/[id]/edit/+page.svelte b/src/routes/users/[userId]/hospitals/[id]/edit/+page.svelte index 66cd0c9b..7dfb597f 100755 --- a/src/routes/users/[userId]/hospitals/[id]/edit/+page.svelte +++ b/src/routes/users/[userId]/hospitals/[id]/edit/+page.svelte @@ -103,9 +103,11 @@ name="healthSystemId" class="select select-primary w-full " > - + {#each healthSystems as healthSystem} + {#if _healthSystemId !== healthSystem.id} + {/if} {/each} From a852fb8fbc9ce226dbc510779a2f46d21cfee533 Mon Sep 17 00:00:00 2001 From: rf-opssupport <84499879+rf-opssupport@users.noreply.github.com> Date: Mon, 23 Sep 2024 14:01:59 +0530 Subject: [PATCH 10/11] Update aha-prod-ci-cd.yml --- .github/workflows/aha-prod-ci-cd.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/aha-prod-ci-cd.yml b/.github/workflows/aha-prod-ci-cd.yml index 5b2ac7ec..b6ec96ea 100755 --- a/.github/workflows/aha-prod-ci-cd.yml +++ b/.github/workflows/aha-prod-ci-cd.yml @@ -4,10 +4,10 @@ name: AHA-PROD-CI-CD on: # Triggers the workflow on push events but only for the develop branch workflow_dispatch: - inputs: - Tag_name: - description: Tag name of your release(please include "v" if needed) - required: true + # inputs: + # Tag_name: + # description: Tag name of your release(please include "v" if needed) + # required: true jobs: @@ -29,7 +29,7 @@ jobs: Deploy-ECS: needs: Publish-Release - environment: prod + environment: aha-prod runs-on: ubuntu-latest steps: @@ -64,6 +64,9 @@ jobs: - name: Copy constant file run: aws s3 cp s3://${{ secrets.CONSTANT_FILE_BUCKET_PATH }}/constants.ts ./src/lib + - name: Copy favicon file + run: aws s3 cp s3://${{ secrets.FAVICON_FILE_BUCKET }}/favicon.png ./static/favicon.png + - name: Build and push id: docker_build uses: docker/build-push-action@v3 From 8242b5eeddae900c8cb143b33e3aba521ea2cda4 Mon Sep 17 00:00:00 2001 From: nisha-inflectionzone Date: Thu, 3 Oct 2024 15:58:38 +0530 Subject: [PATCH 11/11] GGHN Pagination of report and setReminder UI --- .../set-reminders/+page.svelte | 24 +++--- .../summary-uploads/+page.svelte | 78 +++++++++++++++---- 2 files changed, 78 insertions(+), 24 deletions(-) diff --git a/src/routes/users/[userId]/appointment-followup/set-reminders/+page.svelte b/src/routes/users/[userId]/appointment-followup/set-reminders/+page.svelte index 2e6d3ae8..34a92d72 100644 --- a/src/routes/users/[userId]/appointment-followup/set-reminders/+page.svelte +++ b/src/routes/users/[userId]/appointment-followup/set-reminders/+page.svelte @@ -114,17 +114,16 @@ const handleSubmit = (event) => { - - Select dates for follow-up cancellation* + + Select dates for follow-up cancellation - + type="button" + class="button rounded-md border-2 border-secondary-100 w-full bg-surface-50" + placeholder="Click here to select date" + required + /> { bind:value={startdate} required /> - + @@ -254,5 +253,10 @@ const handleSubmit = (event) => { border: 1px solid #ccc; text-align: center; } + + #datePicker:hover { + background-color: #ffffff; /* Background color on hover */ + + } diff --git a/src/routes/users/[userId]/appointment-followup/summary-uploads/+page.svelte b/src/routes/users/[userId]/appointment-followup/summary-uploads/+page.svelte index 889ff3b3..bca2cd1d 100644 --- a/src/routes/users/[userId]/appointment-followup/summary-uploads/+page.svelte +++ b/src/routes/users/[userId]/appointment-followup/summary-uploads/+page.svelte @@ -3,6 +3,10 @@ import { onMount } from 'svelte'; import toast from 'svelte-french-toast'; import type { ActionData } from './$types'; + import { + Paginator, type PaginationSettings, + } from '@skeletonlabs/skeleton'; + export let data let totalPatient =''; let notarrived =''; @@ -13,8 +17,10 @@ console.log(appointmentReport) let summary = appointmentReport['Summary']; let filedata = appointmentReport['File_data']; + let itemsPerPage = 10; + let retriveddata; + let items = 10; - // console.log(filedata[0].Appointment_time) type TableRow = { srNo: number; patientName: string; @@ -25,6 +31,7 @@ appointmentTime: string; replied: string; }; + let numRows = appointmentReport['File_data'].length;; let tableData: TableRow[] = Array.from({ length: numRows }, (_, i) => ({ srNo: i + 1, @@ -37,7 +44,6 @@ replied: '' })); - // function to add patient name function addPatientName(newPatientName: string, rowNumber: number): void { // Update the specified row with the new patient name @@ -84,7 +90,34 @@ } }, 1000); }); + + let paginationSettings = { + page: 0, + limit: 10, + size: numRows, + amounts: [10, 20, 30, 50] + } satisfies PaginationSettings; + $: { + // symptoms = symptoms.map((item, index) => ({ ...item, index: index + 1 })); + paginationSettings.size = numRows; + retriveddata = tableData.slice( + paginationSettings.page * paginationSettings.limit, + paginationSettings.page * paginationSettings.limit + paginationSettings.limit + ); + } + + + function onPageChange(e: CustomEvent): void { + let pageIndex = e.detail; + itemsPerPage = items * (pageIndex + 1); + } + + function onAmountChange(e: CustomEvent): void { + itemsPerPage = e.detail * (paginationSettings.page + 1); + items = itemsPerPage; + } +
@@ -127,8 +160,9 @@
-
- +
+
+ @@ -141,22 +175,38 @@ - {#each tableData as { srNo, patientName, hospitalName, emrId, patientPhoneNo, patientStatus, appointmentTime, replied }} - - - - - - - + + + + {#each retriveddata as row} + + + + + + + - - + + {/each} +
Sr.no Patient NameReplied
{srNo}{patientName}{hospitalName}{emrId}{patientPhoneNo}{patientStatus}
{row.srNo}{row.patientName}{row.hospitalName}{row.emrId}{row.patientPhoneNo}{row.patientStatus} { appointmentTime}{replied}{row.appointmentTime}{row.replied}
+ +
+ +