Skip to content

Commit

Permalink
Fix Examiner Dashboard table
Browse files Browse the repository at this point in the history
  • Loading branch information
dimak1 committed Feb 25, 2025
1 parent 4e0031f commit 04b53bf
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
5 changes: 4 additions & 1 deletion strr-examiner-web/app/components/Strata/SubHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ const hasAttorneyAddress = Object.values(attorney.mailingAddress).some(Boolean)
class="app-inner-container"
>
<div class="text-bcGovColor-midGray grid grid-cols-4 gap-x-5 divide-x bg-white py-4 text-sm">
<div class="space-y-2">
<div
data-testid="strata-primary-building"
class="space-y-2"
>
<b>{{ $t('strr.label.primaryBuilding').toUpperCase() }}</b>
<ConnectInfoWithIcon
icon="i-mdi-map-marker-outline"
Expand Down
24 changes: 22 additions & 2 deletions strr-examiner-web/app/pages/dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,27 @@ const getApplicantNameColumn = (app: HousApplicationResponse) => {
}
}
// Strata location has different interface than the ConnectFormAddressDisplay accepts
const mapStrataAddress = (address: ApiAddress): ConnectAddress | string => {
return !isEmpty(address)
? {
street: address.address,
streetAdditional: address.addressLineTwo,
city: address.city,
region: address.province,
postalCode: address.postalCode,
country: address.country,
locationDescription: address.locationDescription
}
: '-'
}
const getPropertyAddressColumn = (app: HousApplicationResponse) => {
switch (app.registration.registrationType) {
case ApplicationType.HOST:
return (app.registration as ApiHostApplication).unitAddress || '-'
case ApplicationType.STRATA_HOTEL:
return (app.registration as ApiBaseStrataApplication).strataHotelDetails.location || '-'
return mapStrataAddress((app.registration as ApiBaseStrataApplication).strataHotelDetails.location)
default: // platform
return (app.registration as ApiBasePlatformApplication).businessDetails.mailingAddress || '-'
}
Expand Down Expand Up @@ -388,7 +403,7 @@ function handleColumnSort (column: string) {
{ label: 'Full Review', value: ApplicationStatus.FULL_REVIEW },
{ label: 'Provisional Review', value: ApplicationStatus.PROVISIONAL_REVIEW },
{ label: 'Payment Due', value: ApplicationStatus.PAYMENT_DUE },
{ label: 'Provsional', value: ApplicationStatus.PROVISIONAL },
{ label: 'Provisional', value: ApplicationStatus.PROVISIONAL },
{ label: 'Paid', value: ApplicationStatus.PAID },
{ label: 'Additional Info Requested', value: ApplicationStatus.ADDITIONAL_INFO_REQUESTED },
{ label: 'Provisionally Approved', value: ApplicationStatus.PROVISIONALLY_APPROVED },
Expand Down Expand Up @@ -461,6 +476,11 @@ function handleColumnSort (column: string) {
</template>

<template #propertyAddress-data="{ row }">
<!-- <div
v-if="row.registrationType === ApplicationType.STRATA_HOTEL"
>
{{ displayFullAddress(row.propertyAddress) }}
</div> -->
<ConnectFormAddressDisplay
:address="row.propertyAddress"
omit-country
Expand Down
2 changes: 1 addition & 1 deletion strr-examiner-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "strr-examiner-web",
"private": true,
"type": "module",
"version": "0.0.23",
"version": "0.0.24",
"scripts": {
"build-check": "nuxt build",
"build": "nuxt generate",
Expand Down

0 comments on commit 04b53bf

Please sign in to comment.