+
defineProps<{ isComplete: boolean }>()
-const { isNewRentalUnitSetupEnabled } = useHostFeatureFlags()
-
@@ -11,14 +9,6 @@ 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
])
diff --git a/strr-host-pm-web/app/composables/useHostFeatureFlags.ts b/strr-host-pm-web/app/composables/useHostFeatureFlags.ts
index 3e9d7b477..27469b1cb 100644
--- a/strr-host-pm-web/app/composables/useHostFeatureFlags.ts
+++ b/strr-host-pm-web/app/composables/useHostFeatureFlags.ts
@@ -4,7 +4,6 @@ export const useHostFeatureFlags = () => {
return {
isSaveDraftEnabled: isFeatureEnabled('enable-save-draft'),
isRenewalsEnabled: isFeatureEnabled('enable-registration-renewals'),
- isNewRentalUnitSetupEnabled: isFeatureEnabled('enable-host-new-rental-unit-setup'),
isDashboardTableSortingEnabled: isFeatureEnabled('enable-host-dashboard-table-sorting'),
isNewDashboardEnabled: isFeatureEnabled('enable-new-host-dashboard'),
isBusinessLicenseDocumentUploadEnabled: isFeatureEnabled('enable-business-license-document-upload'),
diff --git a/strr-host-pm-web/app/enums/ownership-type.ts b/strr-host-pm-web/app/enums/ownership-type.ts
deleted file mode 100644
index 6c1e151ec..000000000
--- a/strr-host-pm-web/app/enums/ownership-type.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-export enum OwnershipType {
- RENT = 'RENT',
- OWN = 'OWN',
- CO_OWN = 'CO_OWN',
- OTHER = 'OTHER'
-}
diff --git a/strr-host-pm-web/app/enums/rental-unit-setup-types.ts b/strr-host-pm-web/app/enums/rental-unit-setup-types.ts
index fd85d5182..5811f4239 100644
--- a/strr-host-pm-web/app/enums/rental-unit-setup-types.ts
+++ b/strr-host-pm-web/app/enums/rental-unit-setup-types.ts
@@ -1,9 +1,3 @@
-export enum RentalUnitSetupType {
- WHOLE_PRINCIPAL_RESIDENCE = 'WHOLE_PRINCIPAL_RESIDENCE', // The whole Host Principal Residence
- UNIT_ON_PR_PROPERTY = 'UNIT_ON_PR_PROPERTY', // A whole unit on the same property as the Host Principal Residence (e.g., basement suite)
- UNIT_NOT_ON_PR_PROPERTY = 'UNIT_NOT_ON_PR_PROPERTY' // Not on the same property as the Host Principal Residence
-}
-
export enum RentalUnitSetupOption {
DIFFERENT_PROPERTY = 'DIFFERENT_PROPERTY', // unit on a property you don't live at
SEPARATE_UNIT_SAME_PROPERTY = 'SEPARATE_UNIT_SAME_PROPERTY', // unit on the property where you live
diff --git a/strr-host-pm-web/app/enums/rental-unit-type.ts b/strr-host-pm-web/app/enums/rental-unit-type.ts
deleted file mode 100644
index 6b182c487..000000000
--- a/strr-host-pm-web/app/enums/rental-unit-type.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export enum RentalUnitType {
- ENTIRE_HOME = 'ENTIRE_HOME',
- SHARED_ACCOMMODATION = 'SHARED_ACCOMMODATION'
-}
diff --git a/strr-host-pm-web/app/enums/residence-type.ts b/strr-host-pm-web/app/enums/residence-type.ts
deleted file mode 100644
index 787dbe0c1..000000000
--- a/strr-host-pm-web/app/enums/residence-type.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export enum ResidenceType {
- SAME_UNIT = 'SAME_UNIT',
- ANOTHER_UNIT = 'ANOTHER_UNIT'
-}
diff --git a/strr-host-pm-web/app/interfaces/host-api.ts b/strr-host-pm-web/app/interfaces/host-api.ts
index d8455c50e..a09cfad23 100644
--- a/strr-host-pm-web/app/interfaces/host-api.ts
+++ b/strr-host-pm-web/app/interfaces/host-api.ts
@@ -35,11 +35,6 @@ export interface ApiUnitDetails {
businessLicense?: string
businessLicenseExpiryDate?: string
propertyType: PropertyType | undefined
- ownershipType: OwnershipType | undefined
- rentalUnitSpaceType: RentalUnitType | undefined
- hostResidence: ResidenceType | undefined
- isUnitOnPrincipalResidenceProperty: boolean | undefined
- numberOfRoomsForRent: number | undefined
prExemptReason?: PrExemptionReason
blExemptReason?: string
strataHotelCategory?: StrataHotelCategory
diff --git a/strr-host-pm-web/app/interfaces/host-ui.ts b/strr-host-pm-web/app/interfaces/host-ui.ts
index 32c1ebb9b..b720fb6bc 100644
--- a/strr-host-pm-web/app/interfaces/host-ui.ts
+++ b/strr-host-pm-web/app/interfaces/host-ui.ts
@@ -11,11 +11,6 @@ export interface UiBlInfo {
export interface UiUnitDetails {
parcelIdentifier?: string
propertyType: PropertyType | undefined
- ownershipType: OwnershipType | undefined
- numberOfRoomsForRent: number | undefined
- rentalUnitSetupType: RentalUnitSetupType | undefined
- typeOfSpace: RentalUnitType | undefined
- // fields for new form
hostType?: PropertyHostType
rentalUnitSetupOption?: RentalUnitSetupOption
}
diff --git a/strr-host-pm-web/app/pages/application.vue b/strr-host-pm-web/app/pages/application.vue
index 4fce2c08f..7f1100e17 100644
--- a/strr-host-pm-web/app/pages/application.vue
+++ b/strr-host-pm-web/app/pages/application.vue
@@ -8,7 +8,7 @@ const { setButtonControl, handleButtonLoading } = useButtonControl()
const propertyStore = useHostPropertyStore()
const propertyReqStore = usePropertyReqStore()
-const { unitDetails, propertyTypeFeeTriggers } = storeToRefs(propertyStore)
+const { unitDetails } = storeToRefs(propertyStore)
const { showUnitDetailsForm, prRequirements } = storeToRefs(propertyReqStore)
const { validateOwners } = useHostOwnerStore()
const documentsStore = useDocumentStore()
@@ -22,7 +22,7 @@ const permitStore = useHostPermitStore()
const { renewalRegId, application, isRegistrationRenewal } = storeToRefs(permitStore)
const { applicationId, isRenewal } = useRouterParams()
-const { isSaveDraftEnabled, isNewRentalUnitSetupEnabled, isNewDashboardEnabled } = useHostFeatureFlags()
+const { isSaveDraftEnabled, isNewDashboardEnabled } = useHostFeatureFlags()
const { fetchStrrFees, getApplicationFee } = useHostApplicationFee()
const loading = ref(false)
@@ -114,39 +114,9 @@ const resetFees = () => {
removeFee(StrrFeeCode.STR_HOST_3)
}
-const setFeeBasedOnProperty = () => {
- if (!hostFee1.value || !hostFee2.value || !hostFee3.value || !hostFee4.value) {
- return
- }
- resetFees()
- if (propertyTypeFeeTriggers.value.isEntireHomeAndPrincipalResidence) {
- addReplaceFee(hostFee1.value)
- } else if (propertyTypeFeeTriggers.value.isEntireHomeAndNotPrincipalResidence) {
- addReplaceFee(hostFee2.value)
- } else if (propertyTypeFeeTriggers.value.isSharedAccommodation) {
- if (propertyTypeFeeTriggers.value.isBBorRecProperty) {
- addReplaceFee(hostFee3.value)
- } else {
- hostFee4.value.quantity = unitDetails.value.numberOfRoomsForRent || 1
- addReplaceFee(hostFee4.value)
- }
- } else {
- // set placeholder
- resetFees()
- }
- hostFee4.value.quantityDesc = hostFee4.value.quantity !== undefined && hostFee4.value.quantity > 1
- ? t('strr.word.room', hostFee4.value.quantity)
- : undefined
-}
-
-// manage fees only when typeOfSpace, rentalUnitSetupType or propertyType change
// for new rental unit form - do not calculate the fees, it will be calculated on the last step
-watch(unitDetails, (newVal) => {
- if (newVal.typeOfSpace && newVal.rentalUnitSetupType && newVal.propertyType && !isNewRentalUnitSetupEnabled.value) {
- setFeeBasedOnProperty()
- } else {
- resetFees()
- }
+watch(unitDetails, () => {
+ resetFees()
}, { deep: true })
// stepper stuff
@@ -378,17 +348,16 @@ watch(() => prRequirements.value.prExemptionReason, async (newVal) => {
}
})
-// remove rental docs if ownership type !== rent
-watch(() => unitDetails.value.ownershipType, async (newVal) => {
+// remove rental docs if host type is not tenant
+watch(() => unitDetails.value.hostType, async (newVal) => {
// only execute if unit details form shown - (application has been started)
- if (showUnitDetailsForm.value && newVal !== undefined && newVal !== OwnershipType.RENT) {
+ if (showUnitDetailsForm.value && newVal !== undefined && newVal !== PropertyHostType.LONG_TERM_TENANT) {
await documentsStore.removeDocumentsByType(documentsStore.documentCategories.rental)
}
})
// watch the Stepper to calculate application fees on Review and Confirm step only
watch(activeStepIndex, (val) => {
- if (!isNewRentalUnitSetupEnabled.value) { return } // get fees for new rental unit setup only
const { propertyType, rentalUnitSetupOption } = unitDetails.value
const isReviewStep = val === 3 // get fees when on Review step only
const hasValidSteps = steps.value.slice(0, 3).every(step => step.isValid) // biz requirement: steps 1-3 must be valid
diff --git a/strr-host-pm-web/app/stores/document.ts b/strr-host-pm-web/app/stores/document.ts
index 0dc8ce87e..9f479183d 100644
--- a/strr-host-pm-web/app/stores/document.ts
+++ b/strr-host-pm-web/app/stores/document.ts
@@ -17,7 +17,6 @@ export const useDocumentStore = defineStore('host/document', () => {
// check if Host Type is Renter or long-term Tenant to determine which PR docs are required
const isTenant = computed(() =>
- propStore.unitDetails.ownershipType === OwnershipType.RENT ||
propStore.unitDetails.hostType === PropertyHostType.LONG_TERM_TENANT
)
@@ -421,10 +420,9 @@ export const useDocumentStore = defineStore('host/document', () => {
// create payload
const formData = new FormData()
formData.append('file', uiDoc.file)
- // TODO: update api to accept and return the following form data fields
- // formData.append('documentType', uiDoc.type)
- // uiDoc.uploadStep && formData.append('uploadStep', uiDoc.uploadStep)
- // uiDoc.uploadDate && formData.append('uploadDate', uiDoc.uploadDate)
+ formData.append('documentType', uiDoc.type)
+ uiDoc.uploadStep && formData.append('uploadStep', uiDoc.uploadStep)
+ uiDoc.uploadDate && formData.append('uploadDate', uiDoc.uploadDate)
// submit file
const res = await $strrApi('/documents', {
diff --git a/strr-host-pm-web/app/stores/hostApplication.ts b/strr-host-pm-web/app/stores/hostApplication.ts
index 2cf660a8c..e404e7919 100644
--- a/strr-host-pm-web/app/stores/hostApplication.ts
+++ b/strr-host-pm-web/app/stores/hostApplication.ts
@@ -13,7 +13,6 @@ export const useHostApplicationStore = defineStore('host/application', () => {
})
const permitStore = useHostPermitStore()
const { isRegistrationRenewal, registration, application } = storeToRefs(permitStore)
- const { isNewRentalUnitSetupEnabled } = useHostFeatureFlags()
const getEmptyConfirmation = () => ({
agreedToRentalAct: false,
@@ -88,14 +87,6 @@ export const useHostApplicationStore = defineStore('host/application', () => {
const submitApplication = async (isDraft = false, applicationId?: string) => {
const body = createApplicationBody()
- // clean up unit details to satisfy api schema
- if (isNewRentalUnitSetupEnabled.value) {
- delete body.registration.unitDetails.ownershipType
- delete body.registration.unitDetails.rentalUnitSpaceType
- delete body.registration.unitDetails.numberOfRoomsForRent
- delete body.registration.unitDetails.isUnitOnPrincipalResidenceProperty
- }
-
const res = await postApplication(
body,
isDraft,
diff --git a/strr-host-pm-web/app/stores/hostProperty.ts b/strr-host-pm-web/app/stores/hostProperty.ts
index 80b23e45f..806120268 100644
--- a/strr-host-pm-web/app/stores/hostProperty.ts
+++ b/strr-host-pm-web/app/stores/hostProperty.ts
@@ -2,7 +2,6 @@ import { z } from 'zod'
export const useHostPropertyStore = defineStore('host/property', () => {
const { t } = useNuxtApp().$i18n
- const { isNewRentalUnitSetupEnabled } = useHostFeatureFlags()
const propertyReqStore = usePropertyReqStore()
// rental unit address stuff
@@ -182,48 +181,8 @@ export const useHostPropertyStore = defineStore('host/property', () => {
}
}
- // unit details stuff
const getUnitDetailsSchema = () => z.object({
parcelIdentifier: getOptionalPID(t('validation.parcelIdentifier')),
- propertyType: z.enum([
- PropertyType.ACCESSORY_DWELLING,
- PropertyType.BED_AND_BREAKFAST,
- PropertyType.CONDO_OR_APT,
- PropertyType.FLOAT_HOME,
- PropertyType.MULTI_UNIT_HOUSING,
- PropertyType.RECREATIONAL,
- PropertyType.SECONDARY_SUITE,
- PropertyType.SINGLE_FAMILY_HOME,
- PropertyType.STRATA_HOTEL,
- PropertyType.TOWN_HOME
- ], {
- errorMap: () => ({ message: t('validation.propertyType') })
- }),
- ownershipType: z.enum([OwnershipType.CO_OWN, OwnershipType.OWN, OwnershipType.RENT, OwnershipType.OTHER], {
- errorMap: () => ({ message: t('validation.ownershipType') })
- }),
- typeOfSpace: z.enum([RentalUnitType.ENTIRE_HOME, RentalUnitType.SHARED_ACCOMMODATION], {
- errorMap: () => ({ message: t('validation.typeOfSpace') })
- }),
- rentalUnitSetupType: z.enum([
- RentalUnitSetupType.WHOLE_PRINCIPAL_RESIDENCE,
- RentalUnitSetupType.UNIT_ON_PR_PROPERTY,
- RentalUnitSetupType.UNIT_NOT_ON_PR_PROPERTY
- ], {
- errorMap: () => ({ message: t('validation.rentalUnitSetupType') })
- }),
- numberOfRoomsForRent: z
- .number({
- required_error: t('validation.numberOfRooms.empty'),
- invalid_type_error: t('validation.numberOfRooms.invalidInput')
- })
- .int({ message: t('validation.numberOfRooms.invalidInput') })
- .min(0)
- .max(5000)
- })
-
- // validation schema for new property setup - enabled by feature flag isNewRentalUnitSetupEnabled
- const getUnitDetailsSchema2 = () => z.object({
propertyType: z.enum([
PropertyType.SINGLE_FAMILY_HOME,
PropertyType.SECONDARY_SUITE,
@@ -254,11 +213,6 @@ export const useHostPropertyStore = defineStore('host/property', () => {
const getEmptyUnitDetails = (): UiUnitDetails => ({
parcelIdentifier: '',
propertyType: undefined,
- ownershipType: undefined,
- rentalUnitSetupType: undefined,
- typeOfSpace: undefined,
- numberOfRoomsForRent: 0,
- // fields for new form
hostType: undefined,
rentalUnitSetupOption: undefined
})
@@ -266,7 +220,7 @@ export const useHostPropertyStore = defineStore('host/property', () => {
const unitDetails = ref(getEmptyUnitDetails())
const validateUnitDetails = (returnBool = false): MultiFormValidationResult | boolean => {
- const schemaToValidate = isNewRentalUnitSetupEnabled.value ? getUnitDetailsSchema2() : getUnitDetailsSchema()
+ const schemaToValidate = getUnitDetailsSchema()
const result = validateSchemaAgainstState(
schemaToValidate,
@@ -289,23 +243,6 @@ export const useHostPropertyStore = defineStore('host/property', () => {
PropertyType.STRATA_HOTEL].includes(unitDetails.value.propertyType)
)
- const isOwnerOrCoOwner = computed(() => unitDetails.value.ownershipType && [
- OwnershipType.OWN,
- OwnershipType.CO_OWN
- ].includes(unitDetails.value.ownershipType))
-
- const propertyTypeFeeTriggers = computed(() => ({
- isEntireHomeAndPrincipalResidence:
- unitDetails.value.typeOfSpace === RentalUnitType.ENTIRE_HOME &&
- unitDetails.value.rentalUnitSetupType === RentalUnitSetupType.WHOLE_PRINCIPAL_RESIDENCE,
- isEntireHomeAndNotPrincipalResidence:
- unitDetails.value.typeOfSpace === RentalUnitType.ENTIRE_HOME &&
- unitDetails.value.rentalUnitSetupType !== RentalUnitSetupType.WHOLE_PRINCIPAL_RESIDENCE,
- isSharedAccommodation: unitDetails.value.typeOfSpace === RentalUnitType.SHARED_ACCOMMODATION,
- isBBorRecProperty: unitDetails.value.propertyType &&
- [PropertyType.BED_AND_BREAKFAST, PropertyType.RECREATIONAL].includes(unitDetails.value.propertyType)
- }))
-
const resetUnitAddress = (preserveNickname = false) => {
const nickname = unitAddress.value.address.nickname
unitAddress.value = getEmptyUnitAddress()
@@ -343,13 +280,10 @@ export const useHostPropertyStore = defineStore('host/property', () => {
validateBusinessLicense,
// unitDetailsSchema,
getUnitDetailsSchema,
- getUnitDetailsSchema2,
getEmptyUnitDetails,
unitDetails,
validateUnitDetails,
isUnitNumberRequired,
- isOwnerOrCoOwner,
- propertyTypeFeeTriggers,
useManualAddressInput,
hasNoStreetAddress,
resetUnitAddress,
diff --git a/strr-host-pm-web/app/stores/propertyRequirements.ts b/strr-host-pm-web/app/stores/propertyRequirements.ts
index 170b2bbc0..0017e9666 100644
--- a/strr-host-pm-web/app/stores/propertyRequirements.ts
+++ b/strr-host-pm-web/app/stores/propertyRequirements.ts
@@ -7,7 +7,6 @@ export const usePropertyReqStore = defineStore('property/requirements', () => {
const { $strrApi } = useNuxtApp()
const propStore = useHostPropertyStore()
- const { isNewRentalUnitSetupEnabled } = useHostFeatureFlags()
const loadingReqs = ref(false)
const propertyReqs = ref({} as PropertyRequirements)
@@ -71,11 +70,8 @@ export const usePropertyReqStore = defineStore('property/requirements', () => {
], {
errorMap: () => ({ message: t('validation.strataHotelCategory') })
})
- : z.any().optional()
- }
- // additional validation for new rental unit setup (optional field with format validation)
- if (isNewRentalUnitSetupEnabled.value) {
- schema.strataHotelRegistrationNumber = z
+ : z.any().optional(),
+ strataHotelRegistrationNumber: z
.string()
.optional()
.refine(val => !val || /^ST\d{9}$/.test(val),
diff --git a/strr-host-pm-web/app/utils/host-formatting.ts b/strr-host-pm-web/app/utils/host-formatting.ts
index d4ed3a49b..634a1263d 100644
--- a/strr-host-pm-web/app/utils/host-formatting.ts
+++ b/strr-host-pm-web/app/utils/host-formatting.ts
@@ -74,17 +74,6 @@ export function formatHostUnitDetailsAPI (
): ApiUnitDetails {
return {
propertyType: unitDetails.propertyType,
- ownershipType: unitDetails.ownershipType,
- numberOfRoomsForRent: unitDetails.numberOfRoomsForRent,
- isUnitOnPrincipalResidenceProperty: unitDetails.rentalUnitSetupType === undefined
- ? undefined
- : unitDetails.rentalUnitSetupType !== RentalUnitSetupType.UNIT_NOT_ON_PR_PROPERTY,
- hostResidence: unitDetails.rentalUnitSetupType === undefined
- ? undefined
- : unitDetails.rentalUnitSetupType === RentalUnitSetupType.WHOLE_PRINCIPAL_RESIDENCE
- ? ResidenceType.SAME_UNIT
- : ResidenceType.ANOTHER_UNIT,
- rentalUnitSpaceType: unitDetails.typeOfSpace,
...(unitDetails.parcelIdentifier ? { parcelIdentifier: unitDetails.parcelIdentifier } : {}),
...(blInfo.businessLicense ? { businessLicense: blInfo.businessLicense } : {}),
...(blInfo.businessLicenseExpiryDate ? { businessLicenseExpiryDate: blInfo.businessLicenseExpiryDate } : {}),
@@ -100,19 +89,8 @@ export function formatHostUnitDetailsAPI (
}
export function formatHostUnitDetailsUI (unitDetails: ApiUnitDetails): UiUnitDetails {
- const rentalSetupType = unitDetails.isUnitOnPrincipalResidenceProperty === undefined
- ? undefined
- : unitDetails.isUnitOnPrincipalResidenceProperty
- ? unitDetails.hostResidence === ResidenceType.SAME_UNIT
- ? RentalUnitSetupType.WHOLE_PRINCIPAL_RESIDENCE
- : RentalUnitSetupType.UNIT_ON_PR_PROPERTY
- : RentalUnitSetupType.UNIT_NOT_ON_PR_PROPERTY
return {
propertyType: unitDetails.propertyType,
- ownershipType: unitDetails.ownershipType,
- numberOfRoomsForRent: unitDetails.numberOfRoomsForRent,
- rentalUnitSetupType: rentalSetupType,
- typeOfSpace: unitDetails.rentalUnitSpaceType,
...(unitDetails.parcelIdentifier ? { parcelIdentifier: unitDetails.parcelIdentifier } : {}),
...(unitDetails.hostType ? { hostType: unitDetails.hostType } : {}),
...(unitDetails.rentalUnitSetupOption ? { rentalUnitSetupOption: unitDetails.rentalUnitSetupOption } : {})
diff --git a/strr-host-pm-web/i18n/locales/en-CA.ts b/strr-host-pm-web/i18n/locales/en-CA.ts
index ea830b262..b32bb895d 100644
--- a/strr-host-pm-web/i18n/locales/en-CA.ts
+++ b/strr-host-pm-web/i18n/locales/en-CA.ts
@@ -166,7 +166,6 @@ export default {
individualsBusinesses: 'Individuals and Businesses',
listingLinkOpt: 'Listing Link (Optional)',
numberOfRooms: 'Number of Bedrooms for Rent',
- ownershipType: 'Ownership Type',
nicknameOpt: 'Nickname (Optional)',
parcelIdentifier: 'Parcel Identifier (Required if one exists)',
parcelIdentifierOpt: 'Parcel Identifier (Optional)',
@@ -329,7 +328,6 @@ export default {
strUnitAddress: 'Short-Term Rental Unit Residential Address',
strUnitName: 'Short-Term Rental Unit Nickname',
strUnitNameOpt: 'Short-Term Rental Unit Nickname (Optional)',
- typeOfSpace: 'Type of Space',
chooseDocs: 'Choose type of supporting document to upload',
fileUpload: 'File Upload',
localGovBL: 'Local Government Business Licence',
@@ -444,7 +442,6 @@ export default {
followingDocsRequired: 'The following documentation is required for this registration:',
followingDocsMayBeRequired: 'The following documentation may be required for this registration:',
rentalUnitSetupLegend: 'Required: Select the set-up of the property, host principal residence, and rental unit.',
- typeOfSpaceLegend: 'Required: Select the type of space of the rental unit.',
hostTypeLegend: 'Required',
thisPropIsInLocWithReqs: 'This property is in a location where the following requirements apply:',
thisPropCouldBeInLocWithReqs: 'This property could be in a location where the following requirements apply:',
@@ -566,15 +563,12 @@ export default {
empty: 'Please specify the number of rooms available for rent',
invalidInput: 'Please enter a valid number of rooms (e.g., 5)'
},
- ownershipType: 'Please select the ownership type of this rental unit',
parcelIdentifier: 'The parcel identifier must be a nine-digit number',
propertyType: 'Please select the rental unit type of this rental unit',
strPropertyType: 'Please select a short-term rental property/unit type',
onlineListings: 'Please enter a valid URL (i.e. https://www.bcregistry.gov.bc.ca)',
- rentalUnitSetupType: 'Please select the setup type of the rental unit',
rentalUnitSetupOption: 'Please select a rental unit setup',
hostType: 'Please select a property host type',
- typeOfSpace: 'Please select the type of space of the unit',
ownerRole: 'Please select the role',
missingReqDocs: 'Missing required documents. Please see above for details.',
blExpiryDate: 'The expiry date must be greater than today and in less than 1 year.',
@@ -660,12 +654,6 @@ export default {
LONG_TERM_TENANT: 'The long-term tenant of this unit',
undefined: 'Not Selected'
},
- rentalUnitSetupType: {
- WHOLE_PRINCIPAL_RESIDENCE: "This unit is the host's principal residence or a room within the host's principal residence", // TODO: update enum to not be whole pr ???
- UNIT_ON_PR_PROPERTY: "This unit is not the host's principal residence but it's on the same property",
- UNIT_NOT_ON_PR_PROPERTY: "This unit is not on same property as host's principal residence",
- undefined: 'Not Selected'
- },
rentalUnitSetupOption: {
DIFFERENT_PROPERTY: {
label: "Option 1: You are short-term renting a unit on a property you don't live at",
@@ -690,13 +678,6 @@ export default {
label: 'Not Selected'
}
},
- ownershipType: {
- RENT: 'Renter',
- OWN: 'Owner',
- CO_OWN: 'Co-owner',
- OTHER: 'Other',
- undefined: 'Not Selected'
- },
tooltip: {
pid: 'You can find your Parcel Identifier (PID) on your Property Assessment Notice from BC Assessment. Alternatively, visit the BC Assessment website, search for your civic address, and look for the PID under ‘Legal Description and Parcel ID’.',
noticeOfConsideration: 'You have received a Notice of Consideration',
diff --git a/strr-host-pm-web/tests/mocks/mockedData.ts b/strr-host-pm-web/tests/mocks/mockedData.ts
index 882fbe762..1f6705ca5 100644
--- a/strr-host-pm-web/tests/mocks/mockedData.ts
+++ b/strr-host-pm-web/tests/mocks/mockedData.ts
@@ -92,14 +92,9 @@ export const mockApplication: HostApplicationResp = {
unitNumber: '101'
},
unitDetails: {
- hostResidence: ResidenceType.SAME_UNIT,
hostType: PropertyHostType.OWNER,
- isUnitOnPrincipalResidenceProperty: true,
- numberOfRoomsForRent: 2,
- ownershipType: OwnershipType.OWN,
parcelIdentifier: '123-456-789',
propertyType: PropertyType.CONDO_OR_APT,
- rentalUnitSpaceType: RentalUnitType.ENTIRE_HOME,
businessLicense: '123123123',
strataHotelCategory: StrataHotelCategory.FULL_SERVICE
}
@@ -177,13 +172,8 @@ export const mockHostRegistration: HostRegistrationResp = {
primaryContact: mockPrimaryContactPerson,
unitAddress: mockUnitAddress,
unitDetails: {
- hostResidence: ResidenceType.SAME_UNIT,
- isUnitOnPrincipalResidenceProperty: true,
- numberOfRoomsForRent: 2,
- ownershipType: OwnershipType.OWN,
parcelIdentifier: '123-456-789',
propertyType: PropertyType.CONDO_OR_APT,
- rentalUnitSpaceType: RentalUnitType.ENTIRE_HOME,
businessLicense: '123123123'
},
strRequirements: {
diff --git a/strr-host-pm-web/tests/unit/application.spec.ts b/strr-host-pm-web/tests/unit/application.spec.ts
index 9231b9db5..1c0fbffb0 100644
--- a/strr-host-pm-web/tests/unit/application.spec.ts
+++ b/strr-host-pm-web/tests/unit/application.spec.ts
@@ -10,7 +10,6 @@ import {
FormAddOwners,
FormDefineYourRentalUnitAddress,
FormDefineYourRentalUnitDetails,
- FormDefineYourRentalUnitDetails2,
FormReview,
FormUnitAddressAutoComplete,
FormUnitAddressManual,
@@ -35,9 +34,8 @@ vi.mock('@/stores/hostProperty', () => ({
validateUnitAddress: () => true,
validateUnitDetails: () => true,
validateBusinessLicense: () => true,
- propertyTypeFeeTriggers: ref([]),
getUnitAddressSchema: () => ({ address: mockApplication.registration.unitAddress }),
- getUnitDetailsSchema2: () => vi.fn(),
+ getUnitDetailsSchema: () => vi.fn(),
getUnitAddressSchema2: () => vi.fn(),
resetUnitAddress: vi.fn(),
resetUnitDetails: vi.fn(),
@@ -158,7 +156,6 @@ const isEnhancedDocumentUploadEnabled = ref(false)
vi.mock('@/composables/useHostFeatureFlags', () => ({
useHostFeatureFlags: () => ({
isSaveDraftEnabled: ref(true),
- isNewRentalUnitSetupEnabled: ref(true),
isNewDashboardEnabled: ref(false),
isEnhancedDocumentUploadEnabled
})
@@ -279,8 +276,7 @@ describe('Rental Application - Step 1', () => {
expect(wrapper.findComponent(ConnectStepper).vm.activeStepIndex).toBe(0)
expect(wrapper.findComponent(FormDefineYourRentalUnitAddress).exists()).toBe(true)
- expect(wrapper.findComponent(FormDefineYourRentalUnitDetails).exists()).toBe(false)
- expect(wrapper.findComponent(FormDefineYourRentalUnitDetails2).exists()).toBe(true)
+ expect(wrapper.findComponent(FormDefineYourRentalUnitDetails).exists()).toBe(true)
expect(wrapper.find('[data-testid="rental-unit-address-nickname"]').exists()).toBe(true)
expect(wrapper.find('[data-testid="alert-renewal-address-change"]').exists()).toBe(true)
@@ -288,7 +284,7 @@ describe('Rental Application - Step 1', () => {
expect(wrapper.findComponent(FormUnitAddressAutoComplete).exists()).toBe(true)
expect(wrapper.findComponent(FormUnitAddressManual).exists()).toBe(true)
- const rentalUnitDetails = wrapper.findComponent(FormDefineYourRentalUnitDetails2)
+ const rentalUnitDetails = wrapper.findComponent(FormDefineYourRentalUnitDetails)
expect(rentalUnitDetails.find('[data-testid="property-type-select"]').exists()).toBe(true)
expect(rentalUnitDetails.find('[data-testid="property-host-type"]').exists()).toBe(true)
diff --git a/strr-host-pm-web/tests/unit/summary-property.spec.ts b/strr-host-pm-web/tests/unit/summary-property.spec.ts
index 86547962a..089e9db45 100644
--- a/strr-host-pm-web/tests/unit/summary-property.spec.ts
+++ b/strr-host-pm-web/tests/unit/summary-property.spec.ts
@@ -23,10 +23,6 @@ vi.mock('@/stores/hostProperty', () => ({
}),
unitDetails: ref({
propertyType: mockApplication.registration!.unitDetails!.propertyType,
- typeOfSpace: mockApplication.registration!.unitDetails!.rentalUnitSpaceType,
- rentalUnitSetupType: mockApplication.registration!.unitDetails!.rentalUnitSpaceType,
- numberOfRoomsForRent: mockApplication.registration!.unitDetails!.numberOfRoomsForRent!.toString(),
- ownershipType: mockApplication.registration!.unitDetails!.ownershipType,
parcelIdentifier: mockApplication.registration!.unitDetails!.parcelIdentifier
}),
blInfo: ref({
@@ -52,12 +48,6 @@ vi.mock('@/stores/propertyRequirements', () => ({
})
}))
-vi.mock('@/composables/useHostFeatureFlags', () => ({
- useHostFeatureFlags: () => ({
- isNewRentalUnitSetupEnabled: ref(false)
- })
-}))
-
describe('SummaryProperty Component', () => {
let wrapper: any
@@ -69,7 +59,6 @@ describe('SummaryProperty Component', () => {
it('displays property details correctly', () => {
expect(wrapper.html()).toContain($t('propertyType.CONDO_OR_APT'))
- expect(wrapper.html()).toContain($t('rentalUnitType.ENTIRE_HOME'))
})
it('handles PR exemption correctly', () => {