From d8063fcff1c8da1aad6847c26f2918472b2db2c9 Mon Sep 17 00:00:00 2001 From: deetz99 Date: Thu, 30 Jan 2025 15:29:23 -0800 Subject: [PATCH 1/2] make pid optional --- .../app/components/form/DefineYourRental/UnitDetails.vue | 4 ++-- strr-host-pm-web/app/locales/en-CA.ts | 2 +- strr-host-pm-web/app/stores/hostProperty.ts | 9 +++------ 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/strr-host-pm-web/app/components/form/DefineYourRental/UnitDetails.vue b/strr-host-pm-web/app/components/form/DefineYourRental/UnitDetails.vue index c168f652..e19a660d 100644 --- a/strr-host-pm-web/app/components/form/DefineYourRental/UnitDetails.vue +++ b/strr-host-pm-web/app/components/form/DefineYourRental/UnitDetails.vue @@ -227,10 +227,10 @@ onMounted(async () => { v-model="propStore.unitDetails.parcelIdentifier" mask="###-###-###" name="parcelIdentifier" - :aria-label="propStore.isPIDRequired + :aria-label="(!propStore.unitDetails.ownershipType || propStore.isOwnerOrCoOwner) ? $t('strr.label.parcelIdentifier') : $t('strr.label.parcelIdentifierOpt')" - :placeholder="propStore.isPIDRequired + :placeholder="(!propStore.unitDetails.ownershipType || propStore.isOwnerOrCoOwner) ? $t('strr.label.parcelIdentifier') : $t('strr.label.parcelIdentifierOpt')" > diff --git a/strr-host-pm-web/app/locales/en-CA.ts b/strr-host-pm-web/app/locales/en-CA.ts index b5521461..7fd9d181 100644 --- a/strr-host-pm-web/app/locales/en-CA.ts +++ b/strr-host-pm-web/app/locales/en-CA.ts @@ -141,7 +141,7 @@ export default { numberOfRooms: 'Number of Bedrooms for Rent', ownershipType: 'Ownership Type', nicknameOpt: 'Nickname (Optional)', - parcelIdentifier: 'Parcel Identifier', + parcelIdentifier: 'Parcel Identifier (Required if one exists)', parcelIdentifierOpt: 'Parcel Identifier (Optional)', propertyType: 'Property Type', role: { diff --git a/strr-host-pm-web/app/stores/hostProperty.ts b/strr-host-pm-web/app/stores/hostProperty.ts index 471055b3..25c384ae 100644 --- a/strr-host-pm-web/app/stores/hostProperty.ts +++ b/strr-host-pm-web/app/stores/hostProperty.ts @@ -113,10 +113,7 @@ export const useHostPropertyStore = defineStore('host/property', () => { // unit details stuff const getUnitDetailsSchema = () => z.object({ - parcelIdentifier: isPIDRequired.value - ? getRequiredPID(t('validation.parcelIdentifier')) - : getOptionalPID(t('validation.parcelIdentifier')), - // parcelIdentifier: getRequiredPID(t('validation.parcelIdentifier')), + parcelIdentifier: getOptionalPID(t('validation.parcelIdentifier')), propertyType: z.enum([ PropertyType.ACCESSORY_DWELLING, PropertyType.BED_AND_BREAKFAST, @@ -187,7 +184,7 @@ export const useHostPropertyStore = defineStore('host/property', () => { PropertyType.STRATA_HOTEL].includes(unitDetails.value.propertyType) ) - const isPIDRequired = computed(() => unitDetails.value.ownershipType && [ + const isOwnerOrCoOwner = computed(() => unitDetails.value.ownershipType && [ OwnershipType.OWN, OwnershipType.CO_OWN ].includes(unitDetails.value.ownershipType)) @@ -244,7 +241,7 @@ export const useHostPropertyStore = defineStore('host/property', () => { unitDetails, validateUnitDetails, isUnitNumberRequired, - isPIDRequired, + isOwnerOrCoOwner, propertyTypeFeeTriggers, useManualAddressInput, resetUnitAddress, From c90ca291202a90eca129a144143f2191b26dda80 Mon Sep 17 00:00:00 2001 From: deetz99 Date: Thu, 30 Jan 2025 16:04:47 -0800 Subject: [PATCH 2/2] bump verison --- strr-host-pm-web/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/strr-host-pm-web/package.json b/strr-host-pm-web/package.json index 2c081e2e..bbddd0eb 100644 --- a/strr-host-pm-web/package.json +++ b/strr-host-pm-web/package.json @@ -2,7 +2,7 @@ "name": "strr-host-pm-web", "private": true, "type": "module", - "version": "1.1.4", + "version": "1.1.5", "scripts": { "build-check": "nuxt build", "build": "nuxt generate",