diff --git a/.github/actions/build-push-container/action.yaml b/.github/actions/build-push-container/action.yaml index f6f6e00c2..3306d76e3 100644 --- a/.github/actions/build-push-container/action.yaml +++ b/.github/actions/build-push-container/action.yaml @@ -56,17 +56,43 @@ inputs: description: Proxy URL to BC Geo Address API URL for advance search required: true default: "../api/v1/bcgeoaddress/advance/address" + ref: + description: The checkout ref id + required: false + default: '' + pr_number: + description: Pull request number + required: false + type: string runs: using: composite steps: + - name: Checkout repository from pull request + uses: actions/checkout@v3 + with: + ref: ${{ inputs.ref }} + if: ${{ inputs.ref != '' }} - name: Checkout repository uses: actions/checkout@v3 + if: ${{ inputs.ref == '' }} + + - name: Set variables + run: | + echo "SHA=sha-$(git rev-parse --short HEAD)" >> $GITHUB_ENV + echo "IMAGE_REVISION=$(git rev-parse HEAD)" >> $GITHUB_ENV + echo "IMAGE_VERSION=main" >> $GITHUB_ENV + if [[ "${{ inputs.ref }}" != '' ]]; then + git fetch origin ${{ inputs.ref }} + echo "SHA=sha-$(git rev-parse --short HEAD)" >> $GITHUB_ENV + echo "IMAGE_REVISION=$(git rev-parse HEAD)" >> $GITHUB_ENV + echo "IMAGE_VERSION=pr-${{ inputs.pr_number }}" >> $GITHUB_ENV + fi - name: Creates env variables env: VITE_TITLE: ${{ inputs.app_title }} - VITE_CONTACT: ${{ inputs.VITE_CONTACT }} + VITE_CONTACT: ${{ inputs.app_contact }} VITE_HOWTOURL: ${{ inputs.app_howtourl }} VITE_CHEFSTOURURL: ${{ inputs.app_chefstoururl }} VITE_FRONTEND_BASEPATH: ${{ inputs.route_path }} @@ -122,12 +148,12 @@ runs: latest=true # Creates tags based off of branch names and semver tags tags: | - type=ref,event=branch - type=ref,event=pr - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} - type=sha + type=raw,value=ghcr.io/${{ env.GH_USERNAME }}/${{ inputs.image_name }}:${{ env.IMAGE_VERSION }} + type=raw,value=ghcr.io/${{ env.GH_USERNAME }}/${{ inputs.image_name }}:${{ env.SHA }} + type=raw,value=ghcr.io/${{ env.GH_USERNAME }}/${{ inputs.image_name }}:latest + labels: | + org.opencontainers.image.revision=${{ env.IMAGE_REVISION }} + org.opencontainers.image.version=${{ env.IMAGE_VERSION }} - name: Build and Push to Container Registry id: builder diff --git a/.github/actions/deploy-to-environment/action.yaml b/.github/actions/deploy-to-environment/action.yaml index 211d08139..5486e6d6c 100644 --- a/.github/actions/deploy-to-environment/action.yaml +++ b/.github/actions/deploy-to-environment/action.yaml @@ -35,12 +35,22 @@ inputs: description: Route Subpath Mount point required: true default: "/app" + ref: + description: The checkout ref id + required: false + default: '' runs: using: composite steps: + - name: Checkout repository from pull request + uses: actions/checkout@v3 + with: + ref: ${{ inputs.ref }} + if: ${{ inputs.ref != '' }} - name: Checkout repository uses: actions/checkout@v3 + if: ${{ inputs.ref == '' }} - name: Login to OpenShift Cluster uses: jasonchung1871/oc-login@v1.1.2 diff --git a/.github/workflows/on_pr_closed.yaml b/.github/workflows/.close-pr.yaml similarity index 58% rename from .github/workflows/on_pr_closed.yaml rename to .github/workflows/.close-pr.yaml index 42d7b900f..0c5f94f9f 100644 --- a/.github/workflows/on_pr_closed.yaml +++ b/.github/workflows/.close-pr.yaml @@ -1,26 +1,31 @@ -name: Pull Request Closed +name: Close pull request deployment env: ACRONYM: chefs on: - pull_request: - branches: - - main - types: - - closed + workflow_dispatch: + inputs: + pr-number: + description: Pull request number, leave blank for dev/test/prod deployment + required: false + type: string + environment: + description: Environment name; choose dev for PR + required: true + type: choice + options: + - dev + - test + - prod + default: dev -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true jobs: remove-pr-dev: name: Remove PR build from dev namespace - if: "! github.event.pull_request.head.repo.fork" environment: name: pr - url: https://${{ env.ACRONYM }}-dev-pr-${{ github.event.number }}.apps.silver.devops.gov.bc.ca runs-on: ubuntu-latest timeout-minutes: 12 steps: @@ -36,16 +41,11 @@ jobs: - name: Remove PR Deployment shell: bash run: | - oc delete -n ${{ vars.NAMESPACE_PREFIX }}-dev all,secret,networkpolicy,rolebinding --selector app=${{ env.ACRONYM }}-pr-${{ github.event.number }} - oc delete -n ${{ vars.NAMESPACE_PREFIX }}-dev all,svc,cm,sa,role,secret --selector cluster-name=pr-${{ github.event.number }} + oc delete -n ${{ vars.NAMESPACE_PREFIX }}-dev all,secret,networkpolicy,rolebinding --selector app=${{ env.ACRONYM }}-pr-${{ github.event.inputs.pr-number }} + oc delete -n ${{ vars.NAMESPACE_PREFIX }}-dev all,svc,cm,sa,role,secret --selector cluster-name=pr-${{ github.event.inputs.pr-number }} - name: Remove Release Comment on PR uses: marocchino/sticky-pull-request-comment@v2 with: header: release delete: true - - name: Remove Github Deployment Environment - uses: strumwolf/delete-deployment-environment@v2 - with: - environment: pr - onlyRemoveDeployments: true - token: ${{ secrets.GITHUB_TOKEN }} + number: ${{ github.event.inputs.pr-number }} \ No newline at end of file diff --git a/.github/workflows/.deploy.yaml b/.github/workflows/.deploy.yaml new file mode 100644 index 000000000..1fed1c4e1 --- /dev/null +++ b/.github/workflows/.deploy.yaml @@ -0,0 +1,138 @@ +name: Deploy + +env: + ACRONYM: chefs + +on: + workflow_dispatch: + inputs: + pr-number: + description: Pull request number, leave blank for dev/test/prod deployment + required: false + type: string + environment: + description: Environment name; choose dev for PR + required: true + type: choice + options: + - dev + - test + - prod + default: dev + +concurrency: + group: ${{ github.workflow }}-${{ github.event.inputs.pr-number || github.ref }} + cancel-in-progress: true + +jobs: + set-vars: + name: Set variables + runs-on: ubuntu-latest + outputs: + APP_TITLE: ${{ steps.vars.outputs.APP_TITLE }} + ENVIRONMENT: ${{ steps.vars.outputs.ENVIRONMENT }} + JOB_NAME: ${{ steps.vars.outputs.JOB_NAME }} + ROUTE_PATH: ${{ steps.vars.outputs.ROUTE_PATH }} + URL: ${{ steps.vars.outputs.URL }} + ref: ${{ steps.vars.outputs.ref }} + steps: + - name: Setting variables + id: default-vars + env: + PR_NUMBER: ${{ github.event.inputs.pr-number }} + ENVIRONMENT: ${{ github.event.inputs.environment }} + ACRONYM: ${{ env.ACRONYM }} + run: | + echo "APP_TITLE=Common Hosted Forms" >> "$GITHUB_OUTPUT" + echo "ENVIRONMENT=$ENVIRONMENT" >> "$GITHUB_OUTPUT" + echo "JOB_NAME=master" >> "$GITHUB_OUTPUT" + echo "ROUTE_PATH=/app" >> "$GITHUB_OUTPUT" + echo "URL=https://$ACRONYM-$ENVIRONMENT.apps.silver.devops.gov.bc.ca" >> "$GITHUB_OUTPUT" + - name: Final variables + id: vars + env: + PR_NUMBER: ${{ github.event.inputs.pr-number }} + run: | + REF=refs/pull/$PR_NUMBER/head + echo REF:$REF + echo "ref=$REF" >> $GITHUB_OUTPUT + if [[ "$PR_NUMBER" != '' ]]; then + echo "APP_TITLE=${{ steps.default-vars.outputs.APP_TITLE }} - PR-$PR_NUMBER" >> "$GITHUB_OUTPUT" + echo "ENVIRONMENT=pr" >> "$GITHUB_OUTPUT" + echo "JOB_NAME=pr-$PR_NUMBER" >> "$GITHUB_OUTPUT" + echo "ROUTE_PATH=/pr-$PR_NUMBER" >> "$GITHUB_OUTPUT" + echo "URL=${{ steps.default-vars.outputs.URL }}/pr-$PR_NUMBER" >> "$GITHUB_OUTPUT" + else + echo "APP_TITLE=${{ steps.default-vars.outputs.APP_TITLE }}" >> "$GITHUB_OUTPUT" + echo "ENVIRONMENT=${{ steps.default-vars.outputs.ENVIRONMENT }}" >> "$GITHUB_OUTPUT" + echo "JOB_NAME=${{ steps.default-vars.outputs.JOB_NAME }}" >> "$GITHUB_OUTPUT" + echo "ROUTE_PATH=${{ steps.default-vars.outputs.ROUTE_PATH }}" >> "$GITHUB_OUTPUT" + echo "URL=${{ steps.default-vars.outputs.URL }}/app" >> "$GITHUB_OUTPUT" + fi + + build: + name: Build & Push + runs-on: ubuntu-latest + needs: set-vars + timeout-minutes: 10 + steps: + - name: Checkout repository from pull request + uses: actions/checkout@v3 + with: + ref: ${{ needs.set-vars.outputs.ref }} + if: ${{ needs.set-vars.outputs.ref != '' }} + - name: Checkout repository + uses: actions/checkout@v3 + if: ${{ needs.set-vars.outputs.ref == '' }} + - name: Build & Push + uses: ./.github/actions/build-push-container + with: + context: . + image_name: ${{ vars.APP_NAME }} + github_username: ${{ github.repository_owner }} + github_token: ${{ secrets.GITHUB_TOKEN }} + app_title: ${{ needs.set-vars.outputs.APP_TITLE }} + route_path: ${{ needs.set-vars.outputs.ROUTE_PATH }} + app_contact: ${{ vars.CHEFS_CONTACT }} + ref: ${{ needs.set-vars.outputs.ref }} + pr_number: ${{ github.event.inputs.pr-number }} + + deploy: + name: Deploys to selected environment + environment: + name: ${{ needs.set-vars.outputs.ENVIRONMENT }} + url: ${{ needs.set-vars.outputs.URL }} + runs-on: ubuntu-latest + needs: [set-vars, build] + timeout-minutes: 12 + steps: + - name: Checkout repository from pull request + uses: actions/checkout@v3 + with: + ref: ${{ needs.set-vars.outputs.ref }} + if: ${{ needs.set-vars.outputs.ref != '' }} + - name: Checkout repository + uses: actions/checkout@v3 + if: ${{ needs.set-vars.outputs.ref == '' }} + - name: Deploy to environment + uses: ./.github/actions/deploy-to-environment + with: + app_name: ${{ vars.APP_NAME }} + acronym: ${{ env.ACRONYM }} + environment: ${{ needs.set-vars.outputs.ENVIRONMENT }} + job_name: ${{ needs.set-vars.outputs.JOB_NAME }} + namespace_prefix: ${{ vars.NAMESPACE_PREFIX }} + namespace_environment: ${{ github.event.inputs.environment }} + openshift_server: ${{ secrets.OPENSHIFT_SERVER }} + openshift_token: ${{ secrets.OPENSHIFT_TOKEN }} + server_host: ${{ vars.SERVER_HOST }} + route_path: ${{ needs.set-vars.outputs.ROUTE_PATH }} + route_prefix: ${{ vars.ROUTE_PREFIX }} + ref: ${{ needs.set-vars.outputs.ref }} + - name: Release Comment on PR + uses: marocchino/sticky-pull-request-comment@v2 + if: github.event.inputs.pr-number != '' && success() + with: + header: release + message: | + Release ${{ github.sha }} deployed at \ No newline at end of file diff --git a/.github/workflows/on_pr_opened.yaml b/.github/workflows/on_pr_opened.yaml deleted file mode 100644 index 567a9418f..000000000 --- a/.github/workflows/on_pr_opened.yaml +++ /dev/null @@ -1,70 +0,0 @@ -name: Pull Request Opened - -env: - ACRONYM: chefs - -on: - pull_request: - branches: - - main - types: - - opened - - reopened - - synchronize - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - build: - name: Build & Push - if: "! github.event.pull_request.head.repo.fork" - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Build & Push - uses: ./.github/actions/build-push-container - with: - context: . - image_name: ${{ vars.APP_NAME }} - github_username: ${{ github.repository_owner }} - github_token: ${{ secrets.GITHUB_TOKEN }} - app_title: Common Hosted Forms - PR-${{ github.event.number }} - route_path: /pr-${{ github.event.number }} - app_contact: ${{ vars.CHEFS_CONTACT }} - - deploy-pr-dev: - name: Deploy Pull Request to Dev - environment: - name: pr - url: https://${{ env.ACRONYM }}-dev.apps.silver.devops.gov.bc.ca/pr-${{ github.event.number }} - runs-on: ubuntu-latest - needs: build - timeout-minutes: 12 - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Deploy to Dev - uses: ./.github/actions/deploy-to-environment - with: - app_name: ${{ vars.APP_NAME }} - acronym: ${{ env.ACRONYM }} - environment: pr - job_name: pr-${{ github.event.number }} - namespace_prefix: ${{ vars.NAMESPACE_PREFIX }} - namespace_environment: dev - openshift_server: ${{ secrets.OPENSHIFT_SERVER }} - openshift_token: ${{ secrets.OPENSHIFT_TOKEN }} - server_host: ${{ vars.SERVER_HOST }} - route_path: /pr-${{ github.event.number }} - route_prefix: ${{ vars.ROUTE_PREFIX }} - - name: Release Comment on PR - uses: marocchino/sticky-pull-request-comment@v2 - if: success() - with: - header: release - message: | - Release ${{ github.sha }} deployed at \ No newline at end of file diff --git a/.github/workflows/on_push.yaml b/.github/workflows/on_push.yaml deleted file mode 100644 index 9c3004b4e..000000000 --- a/.github/workflows/on_push.yaml +++ /dev/null @@ -1,115 +0,0 @@ -name: Push - -env: - ACRONYM: chefs - -on: - push: - branches: - - main - tags: - - v*.*.* - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - build: - name: Build & Push - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Build & Push - uses: ./.github/actions/build-push-container - with: - context: . - image_name: ${{ vars.APP_NAME }} - github_username: ${{ github.repository_owner }} - github_token: ${{ secrets.GITHUB_TOKEN }} - app_contact: ${{ secrets.VITE_CONTACT }} - - deploy-dev: - name: Deploy to Dev - environment: - name: dev - url: https://${{ env.ACRONYM }}-dev.apps.silver.devops.gov.bc.ca/app - runs-on: ubuntu-latest - needs: build - timeout-minutes: 12 - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Deploy to Dev - uses: ./.github/actions/deploy-to-environment - with: - app_name: ${{ vars.APP_NAME }} - acronym: ${{ env.ACRONYM }} - environment: dev - job_name: master - namespace_prefix: ${{ vars.NAMESPACE_PREFIX }} - namespace_environment: dev - openshift_server: ${{ secrets.OPENSHIFT_SERVER }} - openshift_token: ${{ secrets.OPENSHIFT_TOKEN }} - server_host: ${{ vars.SERVER_HOST }} - route_path: /app - route_prefix: ${{ vars.ROUTE_PREFIX }} - - deploy-test: - name: Deploy to Test - environment: - name: test - url: https://${{ env.ACRONYM }}-test.apps.silver.devops.gov.bc.ca/app - runs-on: ubuntu-latest - needs: - - build - - deploy-dev - timeout-minutes: 12 - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Deploy to Test - uses: ./.github/actions/deploy-to-environment - with: - app_name: ${{ vars.APP_NAME }} - acronym: ${{ env.ACRONYM }} - environment: test - job_name: master - namespace_prefix: ${{ vars.NAMESPACE_PREFIX }} - namespace_environment: test - openshift_server: ${{ secrets.OPENSHIFT_SERVER }} - openshift_token: ${{ secrets.OPENSHIFT_TOKEN }} - server_host: ${{ vars.SERVER_HOST }} - route_path: /app - route_prefix: ${{ vars.ROUTE_PREFIX }} - - deploy-prod: - name: Deploy to Prod - environment: - name: prod - url: https://${{ env.ACRONYM }}.apps.silver.devops.gov.bc.ca/app - runs-on: ubuntu-latest - needs: - - build - - deploy-dev - - deploy-test - timeout-minutes: 12 - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Deploy to Prod - uses: ./.github/actions/deploy-to-environment - with: - app_name: ${{ vars.APP_NAME }} - acronym: ${{ env.ACRONYM }} - environment: prod - job_name: master - namespace_prefix: ${{ vars.NAMESPACE_PREFIX }} - namespace_environment: prod - openshift_server: ${{ secrets.OPENSHIFT_SERVER }} - openshift_token: ${{ secrets.OPENSHIFT_TOKEN }} - server_host: ${{ vars.SERVER_HOST }} - route_path: /app - route_prefix: ${{ vars.ROUTE_PREFIX }} diff --git a/.github/workflows/owasp-zap-scan.yaml b/.github/workflows/owasp-zap-scan.yaml index 7628d07a7..dda4f7015 100644 --- a/.github/workflows/owasp-zap-scan.yaml +++ b/.github/workflows/owasp-zap-scan.yaml @@ -1,56 +1,56 @@ name: owasp-zap-scan -env: - ZAP_SCAN_TYPE: full - # Check dev environment for now - ZAP_TARGET_URL: https://chefs-dev.apps.silver.devops.gov.bc.ca/pr-${{ github.event.number }} - ZAP_DURATION: 2 - ZAP_MAX_DURATION: 10 - # PUBLISH RESULTS TO WEBPAGE - ## Creates a pre-signed URL with the results... - ZAP_GCP_PUBLISH: false + on: - pull_request: - branches: - - main - types: - - opened - - reopened - - synchronize - workflow_call: + workflow_dispatch: inputs: - ZAP_SCAN_TYPE: - required: true + pr-number: + description: "Pull Request Number:" type: string - ZAP_TARGET_URL: required: true - type: string + ZAP_SCAN_TYPE: + description: Zap scan type + type: choice + options: + - base + - full + default: full + required: true ZAP_DURATION: + description: Zap duration required: true type: string + default: 2 ZAP_MAX_DURATION: + description: Zap max duration required: true type: string + default: 10 ZAP_GCP_PUBLISH: + description: Creates a pre-signed URL with the results required: true type: boolean + default: false ZAP_GCP_PROJECT: required: false type: string ZAP_GCP_BUCKET: required: false type: string - secrets: - GCP_SA_KEY: - required: false jobs: owasp-zap-scan: name: OWASP ZAP Scan - if: "! github.event.pull_request.head.repo.fork" runs-on: ubuntu-latest steps: + - name: Get ref + id: vars + run: | + REF=refs/pull/$PR_NUMBER/head + echo REF:$REF + echo "ref=$REF" >> $GITHUB_OUTPUT - name: Checkout repository uses: actions/checkout@v3 - + with: + ref: ${{ steps.vars.outputs.ref }} - name: Set up Cloud SDK if: ${{ env.ZAP_GCP_PUBLISH == 'true' }} uses: google-github-actions/setup-gcloud@v1 @@ -65,7 +65,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} docker_name: "owasp/zap2docker-stable" - target: ${{ env.ZAP_TARGET_URL }} + target: https://chefs-dev.apps.silver.devops.gov.bc.ca/pr-${{ github.event.inputs.pr-number }} cmd_options: "-a -d -T ${{ env.ZAP_MAX_DURATION }} -m ${{ env.ZAP_DURATION }}" issue_title: OWAP Baseline - name: ZAP Full Scan @@ -74,7 +74,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} docker_name: "owasp/zap2docker-stable" - target: ${{ env.ZAP_TARGET_URL }} + target: https://chefs-dev.apps.silver.devops.gov.bc.ca/pr-${{ github.event.inputs.pr-number }} cmd_options: "-a -d -T ${{ env.ZAP_MAX_DURATION }} -m ${{ env.ZAP_DURATION }}" - name: Create Artifact Directory if: ${{ env.ZAP_GCP_PUBLISH == 'true' }} diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index 7781923d6..e1ecef902 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -2,8 +2,8 @@ name: Tests on: - - push - - pull_request + push: + pull_request: jobs: test-app: diff --git a/app/config/default.json b/app/config/default.json index 97491f8ac..3fadfbf56 100644 --- a/app/config/default.json +++ b/app/config/default.json @@ -50,7 +50,7 @@ "rateLimit": { "public": { "windowMs": "60000", - "max": "60" + "max": "120" } } }, diff --git a/app/frontend/src/components/designer/FormDesigner.vue b/app/frontend/src/components/designer/FormDesigner.vue index c36ab5407..b7bc5ec4c 100644 --- a/app/frontend/src/components/designer/FormDesigner.vue +++ b/app/frontend/src/components/designer/FormDesigner.vue @@ -13,7 +13,7 @@ import { formService } from '~/services'; import { useAuthStore } from '~/store/auth'; import { useFormStore } from '~/store/form'; import { useNotificationStore } from '~/store/notification'; -import { IdentityMode, NotificationTypes } from '~/utils/constants'; +import { IdentityMode } from '~/utils/constants'; import { generateIdps } from '~/utils/transformUtils'; import { userService } from '../../services'; @@ -227,7 +227,6 @@ export default { 'setDirtyFlag', 'getFCProactiveHelpImageUrl', ]), - ...mapActions(useNotificationStore, ['addNotification']), async getFormSchema() { try { @@ -431,11 +430,13 @@ export default { this.canSave = true; modified?.components?.map((comp) => { if (comp.key === 'form') { - this.addNotification({ - ...NotificationTypes.ERROR, - message: this.$t('trans.formDesigner.fieldnameError', { - label: comp.label, - }), + const notificationStore = useNotificationStore(); + const msg = i18n.t('trans.formDesigner.fieldnameError', { + label: comp.label, + }); + notificationStore.addNotification({ + text: msg, + consoleError: msg, }); this.canSave = false; } diff --git a/app/frontend/src/components/forms/manage/EmailTemplate.vue b/app/frontend/src/components/forms/manage/EmailTemplate.vue index 8278152d5..01ad2e3ab 100644 --- a/app/frontend/src/components/forms/manage/EmailTemplate.vue +++ b/app/frontend/src/components/forms/manage/EmailTemplate.vue @@ -58,7 +58,7 @@ export default { this.formChanged = false; } catch (error) { this.addNotification({ - message: i18n.t('trans.emailTemplate.saveEmailTemplateErrMsg'), + text: i18n.t('trans.emailTemplate.saveEmailTemplateErrMsg'), consoleError: i18n.t( 'trans.emailTemplate.saveEmailTemplateConsoleErrMsg', { diff --git a/app/frontend/src/components/forms/submission/UserSubmission.vue b/app/frontend/src/components/forms/submission/UserSubmission.vue index 004c5cf56..034cc5475 100644 --- a/app/frontend/src/components/forms/submission/UserSubmission.vue +++ b/app/frontend/src/components/forms/submission/UserSubmission.vue @@ -46,9 +46,10 @@ export default { s: this.formSubmission?.id, }, }); + this.addNotification({ ...NotificationTypes.WARNING, - message: this.$t('trans.formViewer.formDraftAccessErrMsg'), + text: this.$t('trans.formViewer.formDraftAccessErrMsg'), }); } this.loading = false;