From 55d94a4a094213510fa8caf346cbf2ef32c9e03d Mon Sep 17 00:00:00 2001 From: Dima K Date: Mon, 2 Feb 2026 08:53:16 -0800 Subject: [PATCH 1/4] chore: remove enable-host-new-rental-unit-setup feature flag and related code --- .../form/DefineYourRental/UnitAddress.vue | 10 +- .../form/DefineYourRental/UnitDetails.vue | 252 ------------------ .../form/DefineYourRental/UnitDetails2.vue | 19 -- .../UnitRequirements/PrRequired.vue | 5 +- .../UnitRequirements/StrataHotelCategory.vue | 13 +- .../form/DefineYourRental/index.vue | 12 +- .../app/components/summary/Property.vue | 44 +-- strr-host-pm-web/app/enums/ownership-type.ts | 6 - .../app/enums/rental-unit-setup-types.ts | 6 - .../app/enums/rental-unit-type.ts | 4 - strr-host-pm-web/app/enums/residence-type.ts | 4 - strr-host-pm-web/app/interfaces/host-api.ts | 5 - strr-host-pm-web/app/interfaces/host-ui.ts | 5 - strr-host-pm-web/app/pages/application.vue | 45 +--- strr-host-pm-web/app/stores/document.ts | 8 +- .../app/stores/hostApplication.ts | 9 - strr-host-pm-web/app/stores/hostProperty.ts | 70 +---- .../app/stores/propertyRequirements.ts | 8 +- strr-host-pm-web/app/utils/host-formatting.ts | 22 -- strr-host-pm-web/i18n/locales/en-CA.ts | 19 -- strr-host-pm-web/tests/mocks/mockedData.ts | 10 - .../tests/unit/application.spec.ts | 3 - .../tests/unit/summary-property.spec.ts | 5 - 23 files changed, 39 insertions(+), 545 deletions(-) delete mode 100644 strr-host-pm-web/app/components/form/DefineYourRental/UnitDetails.vue delete mode 100644 strr-host-pm-web/app/enums/ownership-type.ts delete mode 100644 strr-host-pm-web/app/enums/rental-unit-type.ts delete mode 100644 strr-host-pm-web/app/enums/residence-type.ts diff --git a/strr-host-pm-web/app/components/form/DefineYourRental/UnitAddress.vue b/strr-host-pm-web/app/components/form/DefineYourRental/UnitAddress.vue index 2049400e9..16e506e0c 100644 --- a/strr-host-pm-web/app/components/form/DefineYourRental/UnitAddress.vue +++ b/strr-host-pm-web/app/components/form/DefineYourRental/UnitAddress.vue @@ -10,7 +10,6 @@ const props = defineProps<{ isComplete: boolean }>() const unitAddressFormRef = ref>() const unitPidFormRef = ref>() -const { isNewRentalUnitSetupEnabled } = useHostFeatureFlags() // clear form errors and submit when new address selected form autocomplete function handleNewAddress () { @@ -54,6 +53,7 @@ onMounted(async () => { // validate form if step marked as complete if (props.isComplete) { await validateForm(unitAddressFormRef.value, props.isComplete) + await validateForm(unitPidFormRef.value, props.isComplete) } // trigger address requirements check when Registration Renewal is loaded @@ -268,10 +268,10 @@ onMounted(async () => { @@ -286,10 +286,10 @@ onMounted(async () => { class="[&_.max-w-bcGovInput]:max-w-full" mask="###-###-###" name="parcelIdentifier" - :aria-label="(!propStore.unitDetails.ownershipType || propStore.isOwnerOrCoOwner) + :aria-label="propStore.isOwnerOrCoOwner ? $t('strr.label.parcelIdentifier') : $t('strr.label.parcelIdentifierOpt')" - :placeholder="(!propStore.unitDetails.ownershipType || propStore.isOwnerOrCoOwner) + :placeholder="propStore.isOwnerOrCoOwner ? $t('strr.label.parcelIdentifier') : $t('strr.label.parcelIdentifierOpt')" > diff --git a/strr-host-pm-web/app/components/form/DefineYourRental/UnitDetails.vue b/strr-host-pm-web/app/components/form/DefineYourRental/UnitDetails.vue deleted file mode 100644 index 9abd7ae50..000000000 --- a/strr-host-pm-web/app/components/form/DefineYourRental/UnitDetails.vue +++ /dev/null @@ -1,252 +0,0 @@ - - diff --git a/strr-host-pm-web/app/components/form/DefineYourRental/UnitDetails2.vue b/strr-host-pm-web/app/components/form/DefineYourRental/UnitDetails2.vue index 591aef850..206f40863 100644 --- a/strr-host-pm-web/app/components/form/DefineYourRental/UnitDetails2.vue +++ b/strr-host-pm-web/app/components/form/DefineYourRental/UnitDetails2.vue @@ -57,25 +57,6 @@ const rentalUnitSetupOptions = computed(() => [ } ]) -// revalidate parcelIdentifier when user changes ownership types -watch( - () => propStore.unitDetails.ownershipType, - (newVal) => { - if (newVal && - [OwnershipType.OWN, OwnershipType.CO_OWN].includes(newVal) && - propStore.unitDetails.parcelIdentifier !== '' - ) { - unitDetailsFormRef.value?.validate('parcelIdentifier', { silent: true }) - } - if (newVal && - [OwnershipType.RENT, OwnershipType.OTHER].includes(newVal) && - propStore.unitDetails.parcelIdentifier === '' - ) { - unitDetailsFormRef.value?.validate('parcelIdentifier', { silent: true }) - } - } -) - // watch and set Property Host Type as strata if PR Exemption reason is Strata Hotel watch(() => reqStore.prRequirements.prExemptionReason, async (val) => { if (val === PrExemptionReason.STRATA_HOTEL) { diff --git a/strr-host-pm-web/app/components/form/DefineYourRental/UnitRequirements/PrRequired.vue b/strr-host-pm-web/app/components/form/DefineYourRental/UnitRequirements/PrRequired.vue index d8fd177f8..a10e87301 100644 --- a/strr-host-pm-web/app/components/form/DefineYourRental/UnitRequirements/PrRequired.vue +++ b/strr-host-pm-web/app/components/form/DefineYourRental/UnitRequirements/PrRequired.vue @@ -5,7 +5,6 @@ const props = defineProps<{ isComplete: boolean }>() const { t } = useNuxtApp().$i18n const reqStore = usePropertyReqStore() const { unitDetails } = storeToRefs(useHostPropertyStore()) -const { isNewRentalUnitSetupEnabled } = useHostFeatureFlags() const prReqFormRef = ref>() const prExemptionOptions = [ @@ -31,7 +30,7 @@ watch( if (newVal.isPropertyPrExempt === false) { reqStore.prRequirements.prExemptionReason = undefined reqStore.strataHotelCategory.category = undefined - if (isNewRentalUnitSetupEnabled.value && unitDetails.value.propertyType === PropertyType.STRATA_HOTEL) { + if (unitDetails.value.propertyType === PropertyType.STRATA_HOTEL) { reqStore.strataHotelCategory.strataHotelRegistrationNumber = undefined unitDetails.value.propertyType = undefined // clear property type when disabling Strata Hotel PR requirement } @@ -40,7 +39,7 @@ watch( // reset strata hotel category when changing exemption reason if (newVal.prExemptionReason !== PrExemptionReason.STRATA_HOTEL) { reqStore.strataHotelCategory.category = undefined - if (isNewRentalUnitSetupEnabled.value && unitDetails.value.propertyType === PropertyType.STRATA_HOTEL) { + if (unitDetails.value.propertyType === PropertyType.STRATA_HOTEL) { reqStore.strataHotelCategory.strataHotelRegistrationNumber = undefined unitDetails.value.propertyType = undefined // clear property type when disabling Strata Hotel exemption reason } diff --git a/strr-host-pm-web/app/components/form/DefineYourRental/UnitRequirements/StrataHotelCategory.vue b/strr-host-pm-web/app/components/form/DefineYourRental/UnitRequirements/StrataHotelCategory.vue index e9a6699a1..e8c69e79e 100644 --- a/strr-host-pm-web/app/components/form/DefineYourRental/UnitRequirements/StrataHotelCategory.vue +++ b/strr-host-pm-web/app/components/form/DefineYourRental/UnitRequirements/StrataHotelCategory.vue @@ -7,7 +7,6 @@ const config = useRuntimeConfig().public const { t } = useNuxtApp().$i18n const reqStore = usePropertyReqStore() -const { isNewRentalUnitSetupEnabled } = useHostFeatureFlags() const hostPmModal = useHostPmModals() const strataHotelCategoryOptions = [ @@ -35,10 +34,6 @@ onMounted(async () => { } }) -const formErrors = computed((): string[] => - isNewRentalUnitSetupEnabled.value ? ['category', 'strataHotelRegistrationNumber'] : ['category'] -) - -
+
defineProps<{ isComplete: boolean }>() -const { isNewRentalUnitSetupEnabled } = useHostFeatureFlags() - diff --git a/strr-host-pm-web/app/components/summary/Property.vue b/strr-host-pm-web/app/components/summary/Property.vue index 3b76fbd9d..c3294bf73 100644 --- a/strr-host-pm-web/app/components/summary/Property.vue +++ b/strr-host-pm-web/app/components/summary/Property.vue @@ -3,7 +3,6 @@ const { t } = useNuxtApp().$i18n const propertyStore = useHostPropertyStore() const { unitAddress, unitDetails } = storeToRefs(propertyStore) const { prRequirements, blRequirements, strataHotelCategory } = storeToRefs(usePropertyReqStore()) -const { isNewRentalUnitSetupEnabled } = useHostFeatureFlags() // step 1 items const exemptInfo = computed((): ConnectInfoTableItem[] => [ @@ -43,7 +42,7 @@ const parcelId = computed((): ConnectInfoTableItem[] => [ ]) const strataHotelRegistrationNumber = computed((): ConnectInfoTableItem[] => - isNewRentalUnitSetupEnabled.value && isExemptionReasonStrata.value + isExemptionReasonStrata.value ? [ { label: t('strr.label.strataPlatformRegistrationNumber'), @@ -55,32 +54,27 @@ const strataHotelRegistrationNumber = computed((): ConnectInfoTableItem[] => const propertyType = computed((): ConnectInfoTableItem[] => [ { - label: - (isNewRentalUnitSetupEnabled.value - ? t('strr.label.strRentalType') - : t('strr.label.propertyType')), + label: t('strr.label.strRentalType'), info: t(`propertyType.${unitDetails.value.propertyType}`) }]) const newRentalSetupType = computed((): ConnectInfoTableItem[] => - isNewRentalUnitSetupEnabled.value - ? [ - { - label: t('strr.label.hostType'), - info: t(`propertyHostType.${unitDetails.value.hostType}`) - }, - { - label: t('strr.label.rentalUnitSetup'), - info: t(`rentalUnitSetupOption.${unitDetails.value.rentalUnitSetupOption}.label`) - } - ] - : [] + [ + { + label: t('strr.label.hostType'), + info: t(`propertyHostType.${unitDetails.value.hostType}`) + }, + { + label: t('strr.label.rentalUnitSetup'), + info: t(`rentalUnitSetupOption.${unitDetails.value.rentalUnitSetupOption}.label`) + } + ] ) const propertyInfo = computed((): ConnectInfoTableItem[] => [ { label: t('label.strUnitName'), info: unitAddress.value.address.nickname || t('text.notEntered') }, { label: t('label.strUnitAddress'), info: '', slot: 'address' }, - ...(isNewRentalUnitSetupEnabled.value ? parcelId.value : []), + ...parcelId.value, ...(blRequirements.value.isBusinessLicenceExempt ? blExemptInfo.value : [] @@ -93,17 +87,7 @@ const propertyInfo = computed((): ConnectInfoTableItem[] => [ ...strataHotelRegistrationNumber.value, { label: '', info: '', slot: 'border' }, ...propertyType.value, - ...newRentalSetupType.value, - ...(!isNewRentalUnitSetupEnabled.value - ? [ - { label: t('label.typeOfSpace'), info: t(`rentalUnitType.${unitDetails.value.typeOfSpace}`) }, - { label: t('strr.label.rentalUnitSetup'), info: t(`rentalUnitSetupType.${unitDetails.value.rentalUnitSetupType}`) }, // eslint-disable-line max-len - { label: t('strr.label.numberOfRooms'), info: unitDetails.value.numberOfRoomsForRent }, - { label: '', info: '', slot: 'border' }, - { label: t('strr.label.ownershipType'), info: t(`ownershipType.${unitDetails.value.ownershipType}`) }, - ...parcelId.value - ] - : []) + ...newRentalSetupType.value ])