From c0c023b5aba4d68955a5604c18017a7002d1c56c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9verin=20Beauvais?= Date: Thu, 25 Jul 2024 13:50:31 -0700 Subject: [PATCH] 22446 Allow AR corrections (depending on FF) (#687) - app version = 7.3.18 - allowed Annual Report corrections for specified legal types only (per FF) - added new FF with default value Co-authored-by: Severin Beauvais --- package-lock.json | 4 ++-- package.json | 2 +- .../Dashboard/FilingHistoryList/HeaderActions.vue | 7 ++++++- src/utils/feature-flags.ts | 1 + 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4f5849249..1db0ec201 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "business-filings-ui", - "version": "7.3.17", + "version": "7.3.18", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "business-filings-ui", - "version": "7.3.17", + "version": "7.3.18", "dependencies": { "@babel/compat-data": "^7.21.5", "@bcrs-shared-components/base-address": "2.0.9", diff --git a/package.json b/package.json index 1ef187ddc..e717d2ecc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "business-filings-ui", - "version": "7.3.17", + "version": "7.3.18", "private": true, "appName": "Filings UI", "sbcName": "SBC Common Components", diff --git a/src/components/Dashboard/FilingHistoryList/HeaderActions.vue b/src/components/Dashboard/FilingHistoryList/HeaderActions.vue index 16e945762..a9ae7b533 100644 --- a/src/components/Dashboard/FilingHistoryList/HeaderActions.vue +++ b/src/components/Dashboard/FilingHistoryList/HeaderActions.vue @@ -84,6 +84,7 @@ import { ApiFilingIF } from '@/interfaces' import { AllowableActionsMixin } from '@/mixins' import { EnumUtilities } from '@/services' import { useBusinessStore, useFilingHistoryListStore, useRootStore } from '@/stores' +import { GetFeatureFlag } from '@/utils' @Component({}) export default class HeaderActions extends Mixins(AllowableActionsMixin) { @@ -92,6 +93,7 @@ export default class HeaderActions extends Mixins(AllowableActionsMixin) { @Prop({ required: true }) readonly filing!: ApiFilingIF @Prop({ required: true }) readonly index!: number + // @Getter(useBusinessStore) getLegalType!: CorpTypeCd @Getter(useBusinessStore) isBaseCompany!: boolean @Getter(useRootStore) isBootstrapFiling!: boolean @Getter(useBusinessStore) isDisableNonBenCorps!: boolean @@ -142,7 +144,10 @@ export default class HeaderActions extends Mixins(AllowableActionsMixin) { if (!this.isBaseCompany) return true return false case EnumUtilities.isTypeAmalgamationOut(this.filing): return true // not supported - case EnumUtilities.isTypeAnnualReport(this.filing): return true // not supported + case EnumUtilities.isTypeAnnualReport(this.filing): + // enable AR corrections for specified legal types only + if (GetFeatureFlag('supported-ar-correction-entities').includes(this.getLegalType)) return false + return true case EnumUtilities.isTypeChangeOfAddress(this.filing): return false case EnumUtilities.isTypeChangeOfCompanyInfo(this.filing): return true // not supported case EnumUtilities.isTypeChangeOfDirectors(this.filing): return false diff --git a/src/utils/feature-flags.ts b/src/utils/feature-flags.ts index 3cbe4ebe1..3f5535c92 100644 --- a/src/utils/feature-flags.ts +++ b/src/utils/feature-flags.ts @@ -18,6 +18,7 @@ const defaultFlagSet: LDFlagSet = { 'supported-agm-location-chg-entities': [], 'supported-amalgamation-entities': [], 'supported-amalgamation-out-entities': [], + 'supported-ar-correction-entities': [], 'supported-business-summary-entities': [], 'supported-consent-amalgamation-out-entities': [], 'supported-consent-continuation-out-entities': [],