Skip to content

Commit

Permalink
ReIssue Feature Flagging
Browse files Browse the repository at this point in the history
  • Loading branch information
cameron-eyds committed Oct 21, 2024
1 parent c1fc07d commit d97fbad
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions ppr-ui/src/store/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ export const useStore = defineStore('assetsStore', () => {
const hasMhrEnabled = computed<boolean>(() => {
return getUserProductSubscriptionsCodes.value.includes(ProductCode.MHR) && getFeatureFlag('mhr-ui-enabled')
})
const hasMhrReIssuePermitEnabled = computed<boolean>(() => {
return getFeatureFlag('mhr-re-issue-permit-enabled')
})
const hasDrsEnabled = computed<boolean>(() => {
return isRoleStaffReg.value && getFeatureFlag('drs-integration-enabled')
})
Expand Down Expand Up @@ -1554,6 +1557,7 @@ export const useStore = defineStore('assetsStore', () => {
// PPR/MHR Enabled
hasPprEnabled,
hasMhrEnabled,
hasMhrReIssuePermitEnabled,

// Document Record Service
hasDrsEnabled,
Expand Down
1 change: 1 addition & 0 deletions ppr-ui/src/utils/feature-flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const defaultFlagSet: LDFlagSet = {
'mhr-cancel-transport-permit-enabled': false,
'mhr-user-access-enabled': false,
'mhr-history-enabled': false,
'mhr-re-issue-permit-enabled': false, // Enables Create New and Extend Transport Permit: Staff Targeted for now
'drs-integration-enabled': false, // Enables connections to Documents Record Services
'sentry-enable': false, // by default, no sentry logs
'banner-text': '' // by default, there is no banner text
Expand Down
8 changes: 5 additions & 3 deletions ppr-ui/src/views/mhrInformation/MhrTransportPermit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@

<!-- New Transport Permit when QS didn't issue Permit -->
<v-btn
v-if="!isRoleStaffReg && hasActiveTransportPermit && !getTransportPermitChangeAllowed && !isNewPermitActive"
v-if="hasMhrReIssuePermitEnabled && !isRoleStaffReg && hasActiveTransportPermit &&
!getTransportPermitChangeAllowed && !isNewPermitActive"
variant="plain"
color="primary"
:ripple="false"
Expand Down Expand Up @@ -128,7 +129,7 @@
<v-list>
<!-- Extend Permit -->
<v-list-item
v-if="!state.disableTransportPermitExtension"
v-if="hasMhrReIssuePermitEnabled && !state.disableTransportPermitExtension"
data-test-id="extend-transport-permit-btn"
@click="toggleExtendTransportPermit(true)"
>
Expand All @@ -148,7 +149,7 @@

<!-- Create New Permit -->
<v-list-item
v-if="!state.disableNewTransportPermit"
v-if="hasMhrReIssuePermitEnabled && !state.disableNewTransportPermit"
data-test-id="create-new-transport-permit-btn"
@click="state.showConfirmNewPermitDialog = true"
>
Expand Down Expand Up @@ -505,6 +506,7 @@ const {
getMhrInformation,
getMhrInfoValidation,
getMhrTransportPermit,
hasMhrReIssuePermitEnabled,
getTransportPermitChangeAllowed
} = storeToRefs(useStore())
const {
Expand Down

0 comments on commit d97fbad

Please sign in to comment.