Skip to content

Commit

Permalink
25406-Add-enable-withdrawal-action-ff (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
meawong authored Jan 22, 2025
1 parent 4315b47 commit 5f23560
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "bcros-business-dashboard",
"private": true,
"type": "module",
"version": "1.0.6",
"version": "1.0.7",
"scripts": {
"build": "nuxt generate",
"build:local": "nuxt build",
Expand Down
9 changes: 7 additions & 2 deletions src/components/bcros/filing/common/HeaderActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ import { z } from 'zod'
import { type ApiResponseFilingI, FilingStatusE, isFilingStatus, isStaffFiling, isFutureEffective } from '#imports'
import { FilingCorrectionTypesE } from '~/enums/filing-correction-types-e'
const { getStoredFlag } = useBcrosLaunchdarkly()
const { getFeatureFlag, getStoredFlag } = useBcrosLaunchdarkly()
const { hasRoleStaff } = storeToRefs(useBcrosKeycloak())
const { isAllowedToFile, isBaseCompany, isDisableNonBenCorps, isEntityCoop, isEntityFirm } = useBcrosBusiness()
const { currentBusiness } = storeToRefs(useBcrosBusiness())
Expand Down Expand Up @@ -324,6 +324,11 @@ const goToNoticeOfWithdrawal = () => {
goToFilingUI(path, params)
}
const disableWithdrawal = (): boolean => {
const ff = getFeatureFlag('enable-withdrawal-action')
return !(hasRoleStaff && isFutureEffectiveFiling.value && ff)
}
const actions: any[][] = [[
{
label: t('button.filing.actions.fileACorrection'),
Expand All @@ -341,7 +346,7 @@ const actions: any[][] = [[
{
label: t('button.filing.actions.fileAWithdrawal'),
click: goToNoticeOfWithdrawal,
disabled: !(hasRoleStaff && isFutureEffectiveFiling.value),
disabled: disableWithdrawal(),
icon: 'i-mdi-undo'
}
]]
Expand Down

0 comments on commit 5f23560

Please sign in to comment.