diff --git a/ppr-ui/package-lock.json b/ppr-ui/package-lock.json index cb31abc24..8f2d6a6b9 100644 --- a/ppr-ui/package-lock.json +++ b/ppr-ui/package-lock.json @@ -1,12 +1,12 @@ { "name": "ppr-ui", - "version": "3.1.10", + "version": "3.1.11", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ppr-ui", - "version": "3.1.10", + "version": "3.1.11", "dependencies": { "@bcrs-shared-components/input-field-date-picker": "^1.0.0", "@lemoncode/fonk": "^1.5.1", diff --git a/ppr-ui/package.json b/ppr-ui/package.json index 32150a0f2..26c827b44 100644 --- a/ppr-ui/package.json +++ b/ppr-ui/package.json @@ -1,6 +1,6 @@ { "name": "ppr-ui", - "version": "3.1.10", + "version": "3.1.11", "private": true, "appName": "Assets UI", "sbcName": "SBC Common Components", diff --git a/ppr-ui/src/App.vue b/ppr-ui/src/App.vue index 8ea2109ce..fb12fb187 100644 --- a/ppr-ui/src/App.vue +++ b/ppr-ui/src/App.vue @@ -33,7 +33,10 @@ icon=" " /> - + @@ -45,6 +48,7 @@ @profileReady="profileReady = true" @error="handleError($event)" @haveData="haveData = $event" + @actionInProgress="actionInProgress = $event" /> @@ -156,6 +160,7 @@ export default defineComponent({ haveData: false, loggedOut: false, tokenService: false, + actionInProgress: false, registryUrl: computed((): string => { // if REGISTRY_URL does not exist this will return 'undefined'. Needs to be null or str const configRegistryUrl = sessionStorage.getItem('REGISTRY_URL') diff --git a/ppr-ui/src/components/tombstone/Tombstone.vue b/ppr-ui/src/components/tombstone/Tombstone.vue index 2f74f4c19..a5f9d4da5 100644 --- a/ppr-ui/src/components/tombstone/Tombstone.vue +++ b/ppr-ui/src/components/tombstone/Tombstone.vue @@ -4,6 +4,7 @@ @@ -23,6 +24,12 @@ export default defineComponent({ TombstoneDefault, TombstoneDynamic }, + props: { + actionInProgress: { + type: Boolean, + default: false + } + }, setup () { const route = useRoute() const { isMhrCorrection } = useMhrCorrections() diff --git a/ppr-ui/src/components/tombstone/TombstoneDynamic.vue b/ppr-ui/src/components/tombstone/TombstoneDynamic.vue index 084457ffe..143ebb90e 100755 --- a/ppr-ui/src/components/tombstone/TombstoneDynamic.vue +++ b/ppr-ui/src/components/tombstone/TombstoneDynamic.vue @@ -91,7 +91,7 @@ @@ -102,6 +102,7 @@ color="primary" variant="plain" :ripple="false" + :disabled="actionInProgress" @click="initMhrCorrection(MhrPublicAmendment)" > mdi-menu-up @@ -178,8 +181,8 @@ import { computed, defineComponent, reactive, toRefs } from 'vue' import { useStore } from '@/store/store' import { formatExpiryDate, pacificDate } from '@/utils' import { RegistrationTypeIF } from '@/interfaces' -import { MhApiStatusTypes, MhUIStatusTypes } from '@/enums' -import { useExemptions, useMhrCorrections, useMhrInformation, useTransportPermits } from '@/composables' +import { MhApiStatusTypes, MhUIStatusTypes, RouteNames } from '@/enums' +import { useMhrCorrections, useMhrInformation, useNavigation, useTransportPermits } from '@/composables' import { storeToRefs } from 'pinia' import { MhrCorrectionClient, MhrCorrectionStaff, MhrPublicAmendment } from '@/resources' import MhrStatusCorrection from '@/components/mhrRegistration/MhrStatusCorrection.vue' @@ -192,6 +195,10 @@ export default defineComponent({ isMhrInformation: { type: Boolean, default: false + }, + actionInProgress: { + type: Boolean, + default: false } }, setup () { @@ -203,8 +210,8 @@ export default defineComponent({ getMhrInformation, getMhrOriginalTransportPermitRegStatus } = storeToRefs(useStore()) + const { isRouteName } = useNavigation() const { isFrozenMhr } = useMhrInformation() - const { isNonResExemption } = useExemptions() const { initMhrCorrection, isMhrChangesEnabled, isMhrCorrection } = useMhrCorrections() const { isAmendLocationActive } = useTransportPermits() @@ -255,8 +262,9 @@ export default defineComponent({ }) return { + RouteNames, + isRouteName, isMhrCorrection, - isNonResExemption, initMhrCorrection, isMhrChangesEnabled, MhrCorrectionStaff, diff --git a/ppr-ui/src/views/mhrInformation/MhrInformation.vue b/ppr-ui/src/views/mhrInformation/MhrInformation.vue index 27b07d50e..aa76c916f 100644 --- a/ppr-ui/src/views/mhrInformation/MhrInformation.vue +++ b/ppr-ui/src/views/mhrInformation/MhrInformation.vue @@ -702,7 +702,8 @@ export default defineComponent({ }, emits: [ 'error', - 'emitHaveData' + 'emitHaveData', + 'actionInProgress' ], setup (props, context) { const router = useRouter() @@ -1454,10 +1455,9 @@ export default defineComponent({ onSave() }) - watch(() => getMhrInformation.value.frozenDocumentType, - val => { - localState.hasAlertMsg = QSLockedStateUnitNoteTypes.includes(val) - }) + watch(() => getMhrInformation.value.frozenDocumentType, val => { + localState.hasAlertMsg = QSLockedStateUnitNoteTypes.includes(val) + }) watch(() => localState.transportPermitLocationType, val => { if (val === LocationChangeTypes.TRANSPORT_PERMIT_SAME_PARK) { @@ -1466,6 +1466,11 @@ export default defineComponent({ } }) + /** Inform root level components when there is an MHR action in Progress **/ + watch(() => [localState.showTransferType, isChangeLocationActive.value], (watchedConditions) => { + context.emit('actionInProgress', watchedConditions.includes(true)) + }, { immediate: true }) + return { isRoleStaffSbc, isRoleStaffReg,