Skip to content

Commit

Permalink
- app version = 4.2.11
Browse files Browse the repository at this point in the history
- deleted old FF
- added new FF
- deleted old FF check
- added new FF check
  • Loading branch information
severinbeauvais committed Apr 19, 2023
1 parent 32f2977 commit c9361d3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "business-edit-ui",
"version": "4.2.10",
"version": "4.2.11",
"private": true,
"appName": "Edit UI",
"sbcName": "SBC Common Components",
Expand Down
4 changes: 2 additions & 2 deletions src/utils/feature-flag-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ declare const window: any
*/
const defaultFlagSet: LDFlagSet = {
'alteration-ui-enabled': false,
'banner-text': '', // by default, there is no banner text
'change-ui-enabled': false,
'conversion-ui-enabled': false,
'correction-ui-enabled': false,
'restoration-ui-enabled': false,
'sentry-enable': false, // by default, no sentry logs
'banner-text': '' // by default, there is no banner text
'supported-correction-entities': []
}

/**
Expand Down
22 changes: 12 additions & 10 deletions src/views/Correction.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { LegalServices } from '@/services/'
import { ActionBindingIF, CorrectionFilingIF } from '@/interfaces/'
import { FilingStatus, FilingTypes } from '@/enums/'
import { SessionStorageKeys } from 'sbc-common-components/src/util/constants'
import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module/'
import CorpCorrection from '@/views/Correction/CorpCorrection.vue'
import FirmCorrection from '@/views/Correction/FirmCorrection.vue'
import ViewWrapper from '@/components/ViewWrapper.vue'
Expand All @@ -39,6 +40,7 @@ export default class Correction extends Vue {
// Global getters
@Getter(useStore) getBusinessId!: string
@Getter(useStore) getEntityType!: CorpTypeCd
@Getter(useStore) isRoleStaff!: boolean
@Getter(useStore) isBenBcCccUlc!: boolean
@Getter(useStore) isFirm!: boolean
Expand Down Expand Up @@ -74,14 +76,6 @@ export default class Correction extends Vue {
// do not proceed if we are not authenticated (safety check - should never happen)
if (!this.isAuthenticated) return
// do not proceed if FF is disabled
// bypass this when Jest is running as FF are not fetched
if (!this.isJestRunning && !GetFeatureFlag('correction-ui-enabled')) {
window.alert('Corrections are not available at the moment. Please check again later.')
this.$root.$emit('go-to-dashboard', true)
return
}
// do not proceed if user is not staff
const isStaffOnly = this.$route.matched.some(r => r.meta?.isStaffOnly)
if (isStaffOnly && !this.isRoleStaff) {
Expand Down Expand Up @@ -127,6 +121,14 @@ export default class Correction extends Vue {
throw new Error('Invalid correction type')
}
// NB: specific entities are targeted via LaunchDarkly
if (!GetFeatureFlag('supported-correction-entities')?.includes(this.getEntityType)) {
window.alert('Corrections for this entity type are not available at the moment.\n' +
'Please check again later.')
this.$root.$emit('go-to-dashboard', true)
return
}
// do not proceed if this isn't a DRAFT filing
if (filing.header?.status !== FilingStatus.DRAFT) {
throw new Error('Invalid correction status')
Expand All @@ -143,11 +145,11 @@ export default class Correction extends Vue {
/** Emits Fetch Error event. */
@Emit('fetchError')
// eslint-disable-next-line @typescript-eslint/no-unused-vars
private emitFetchError (err: unknown = null): void {}
emitFetchError (err: unknown = null): void {}
/** Emits Have Data event. */
@Emit('haveData')
// eslint-disable-next-line @typescript-eslint/no-unused-vars
private emitHaveData (haveData = true): void {}
emitHaveData (haveData = true): void {}
}
</script>

0 comments on commit c9361d3

Please sign in to comment.