From 9ddea28f2afd07e530d4ce2f3adf56bb22f1a050 Mon Sep 17 00:00:00 2001 From: CameronEYDS <53542131+cameron-eyds@users.noreply.github.com> Date: Tue, 15 Oct 2024 13:04:15 -0700 Subject: [PATCH] Create New Permit UXA (#2039) * Create Permit UXA and Location Change Options Fix * Update svg path name --- ppr-ui/package-lock.json | 4 ++-- ppr-ui/package.json | 2 +- ppr-ui/src/assets/svgs/IconExtend.svg | 11 --------- ppr-ui/src/assets/svgs/iconExtend.svg | 23 +++++++++++++++++++ ppr-ui/src/assets/svgs/iconNewPermit.svg | 21 +++++++++++++++++ .../mhrTransportPermit/LocationChange.vue | 13 +++++++---- .../mhrInformation/MhrTransportPermit.vue | 10 ++++---- ppr-ui/tests/unit/MhrTransportPermit.spec.ts | 6 ++--- 8 files changed, 63 insertions(+), 27 deletions(-) delete mode 100644 ppr-ui/src/assets/svgs/IconExtend.svg create mode 100644 ppr-ui/src/assets/svgs/iconExtend.svg create mode 100644 ppr-ui/src/assets/svgs/iconNewPermit.svg diff --git a/ppr-ui/package-lock.json b/ppr-ui/package-lock.json index f6decdffd..d90c14595 100644 --- a/ppr-ui/package-lock.json +++ b/ppr-ui/package-lock.json @@ -1,12 +1,12 @@ { "name": "ppr-ui", - "version": "3.2.63", + "version": "3.2.64", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ppr-ui", - "version": "3.2.63", + "version": "3.2.64", "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 a83d3c1c1..3022fb8e5 100644 --- a/ppr-ui/package.json +++ b/ppr-ui/package.json @@ -1,6 +1,6 @@ { "name": "ppr-ui", - "version": "3.2.63", + "version": "3.2.64", "private": true, "appName": "Assets UI", "sbcName": "SBC Common Components", diff --git a/ppr-ui/src/assets/svgs/IconExtend.svg b/ppr-ui/src/assets/svgs/IconExtend.svg deleted file mode 100644 index 6b887e6ac..000000000 --- a/ppr-ui/src/assets/svgs/IconExtend.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/ppr-ui/src/assets/svgs/iconExtend.svg b/ppr-ui/src/assets/svgs/iconExtend.svg new file mode 100644 index 000000000..53b7ef742 --- /dev/null +++ b/ppr-ui/src/assets/svgs/iconExtend.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ppr-ui/src/assets/svgs/iconNewPermit.svg b/ppr-ui/src/assets/svgs/iconNewPermit.svg new file mode 100644 index 000000000..36c8b310c --- /dev/null +++ b/ppr-ui/src/assets/svgs/iconNewPermit.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ppr-ui/src/components/mhrTransportPermit/LocationChange.vue b/ppr-ui/src/components/mhrTransportPermit/LocationChange.vue index 4962e7dda..51e24622f 100644 --- a/ppr-ui/src/components/mhrTransportPermit/LocationChange.vue +++ b/ppr-ui/src/components/mhrTransportPermit/LocationChange.vue @@ -228,11 +228,13 @@ const props = defineProps<{ const emit = defineEmits(['updateLocationType']) -const { isRoleQualifiedSupplier, isRoleStaffSbc, setMhrTransportPermit, setMhrTransportPermitNewLocation, +const { setMhrTransportPermit, setMhrTransportPermitNewLocation, setMhrTransportPermitNewCivicAddress, setUnsavedChanges, setMhrStatusType } = useStore() const { hasUnsavedChanges, + isRoleStaffSbc, + isRoleQualifiedSupplier, getMhrTransportPermit, getMhrTransportPermitHomeLocation, getMhrOriginalTransportPermit, @@ -274,9 +276,9 @@ const state = reactive({ prevLocationChangeType: null, locationChangeFromValid: false, roleBasedLocationChangeTypes: computed(() => - (isRoleQualifiedSupplier || isRoleStaffSbc) - ? locationChangeTypes.slice(0, -2) // remove Registered Location Change and Cancel Permit from the list - : locationChangeTypes.slice(0, -1)), // remove Cancel Permit from the list + (isRoleQualifiedSupplier.value || isRoleStaffSbc.value) + ? locationChangeTypes.slice(0, -3) // remove Registered Location Change and Cancel Permit and Extend from the list + : locationChangeTypes.slice(0, -2)), // remove Cancel Permit and Extend from the list isTransportPermitType: computed(() => getMhrTransportPermit.value.locationChangeType === LocationChangeTypes.TRANSPORT_PERMIT), isNotManufacturersLot: computed(() => getMhrRegistrationLocation.value.locationType !== HomeLocationTypes.LOT), @@ -287,7 +289,8 @@ const state = reactive({ (props.validate && !isValueAmended('newLocation.address') && !hasAmendmentChanges.value)), isLandOwnershipInvalid: computed(() => (props.validate && !getInfoValidation('isHomeLandOwnershipValid')) || (props.validate && !isValueAmended('ownLand') && !hasAmendmentChanges.value)), - isRoleQSorSBCAmend: computed(() => (isRoleQualifiedSupplier || isRoleStaffSbc) && isAmendLocationActive.value), + isRoleQSorSBCAmend: computed(() => (isRoleQualifiedSupplier.value || isRoleStaffSbc.value) && + isAmendLocationActive.value), showChangeTransportPermitLocationTypeDialog: false, amendedBadgeHomeLocationType: { action: 'AMENDED', diff --git a/ppr-ui/src/views/mhrInformation/MhrTransportPermit.vue b/ppr-ui/src/views/mhrInformation/MhrTransportPermit.vue index d75a1b727..73044b5f7 100644 --- a/ppr-ui/src/views/mhrInformation/MhrTransportPermit.vue +++ b/ppr-ui/src/views/mhrInformation/MhrTransportPermit.vue @@ -7,8 +7,8 @@ @proceed="handleConfirmNewPermit" >