Skip to content

Commit

Permalink
Merge pull request #145 from shaangill025/fix_22314
Browse files Browse the repository at this point in the history
UI - Platform URLs and PR info on Application Details Page
  • Loading branch information
shaangill025 authored Sep 18, 2024
2 parents fd3ca50 + 750f073 commit 6dc7273
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 1 deletion.
6 changes: 6 additions & 0 deletions strr-web/components/bcros/form-section/property/Form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
</template>

<script setup lang="ts">
import { sanitizeUrl } from '@braintree/sanitize-url'
const { isComplete } = defineProps<{
isComplete: boolean
}>()
Expand Down Expand Up @@ -120,6 +122,10 @@ const validateField = (index: number) => {
} else {
listingURLErrors.value = undefined
}
formState.propertyDetails.listingDetails[index].url = sanitizeUrl(
formState.propertyDetails.listingDetails[index].url
)
}
const validateAllPropertyListingUrls = () => {
Expand Down
6 changes: 6 additions & 0 deletions strr-web/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
"unitInfo": "Rental Unit Information",
"nickname": "Nickname",
"businessLicense": "Business License",
"platformUrl": "Platform URL",
"ownership": "Ownership Type",
"address": "Address",
"propertyType": "Type of Property",
Expand All @@ -97,6 +98,11 @@
"email": "Email Address",
"phone": "Phone Number",
"documents": "Documents",
"principalResidence": "Principal Residence",
"principalResidenceReason": "Reason",
"principalResidenceServiceProvider": "Service Provider",
"principalResidenceNotApplies": "Principal residence does not apply or my property is exempt",
"principalResidenceApplies": "Pincipal residence does apply",
"proof": "Proof of Principal Residence",
"ltsaInfo": "LTSA Information",
"ltsaDetails": "View LTSA Details",
Expand Down
3 changes: 2 additions & 1 deletion strr-web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "strr-web",
"version": "0.1.24",
"version": "0.1.25",
"description": "Short Term Rental Registration UI - Mono repo workspace",
"scripts": {
"preinstall": "npx only-allow pnpm",
Expand Down Expand Up @@ -50,6 +50,7 @@
},
"dependencies": {
"axios": "^1.6.7",
"@braintree/sanitize-url": "^6.0.4",
"http-status-codes": "^2.3.0",
"keycloak-js": "^24.0.3",
"launchdarkly-vue-client-sdk": "^2.0.5",
Expand Down
74 changes: 74 additions & 0 deletions strr-web/pages/application-details/[id]/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,50 @@
}}
</p>
</BcrosFormSectionReviewItem>
<div class="flex-1 max-w-[33.33%]">
<template v-if="applicationDetails?.listingDetails && applicationDetails.listingDetails.length > 0">
<BcrosFormSectionReviewItem
:title="tApplicationDetails('platformUrl')"
>
<a
:href="applicationDetails?.listingDetails[0].url"
target="_blank"
rel="noopener noreferrer"
class="text-ellipsis overflow-hidden break-words"
>
{{ applicationDetails?.listingDetails[0].url }}
</a>
</BcrosFormSectionReviewItem>
</template>
</div>
</div>
<div class="flex flex-row justify-between w-full mobile:flex-col">
<div class="flex-1" />
<div class="flex-1" />
<div class="flex-1 max-w-[33.33%]">
<template v-if="applicationDetails?.listingDetails && applicationDetails.listingDetails.length > 1">
<div class="flex flex-col">
<div
v-for="(listingDetail, index) in applicationDetails.listingDetails.slice(1)"
:key="index"
:class="{ 'desktop:mt-6 mobile:mt-2': index > 1 }"
>
<BcrosFormSectionReviewItem
:title="tApplicationDetails('platformUrl') + (` ${index + 2}`)"
>
<a
:href="listingDetail.url"
target="_blank"
rel="noopener noreferrer"
class="text-ellipsis overflow-hidden break-words"
>
{{ listingDetail.url }}
</a>
</BcrosFormSectionReviewItem>
</div>
</div>
</template>
</div>
</div>
</div>
<div class="mt-10 relative overflow-x-scroll">
Expand Down Expand Up @@ -144,6 +187,37 @@
<UTable :rows="getContactRows(applicationDetails?.secondaryContact)" />
</div>
</div>
<div class="mt-10 relative overflow-x-scroll">
<p class="font-bold mb-6 mobile:mx-2 text-xl">
{{ tApplicationDetails('principalResidence') }}
</p>
<div class="bg-white py-[22px] px-[30px] mobile:px-5">
<BcrosFormSectionReviewItem :title="tApplicationDetails('proof')">
<p>
{{
applicationDetails.principalResidence.isPrincipalResidence
? tApplicationDetails('principalResidenceApplies')
: tApplicationDetails('principalResidenceNotApplies')
}}
</p>
</BcrosFormSectionReviewItem>
<BcrosFormSectionReviewItem
v-if="applicationDetails.principalResidence.nonPrincipalOption"
:title="tApplicationDetails('principalResidenceReason')"
class="mt-4"
>
<p>{{ applicationDetails.principalResidence.nonPrincipalOption }}</p>
</BcrosFormSectionReviewItem>
<BcrosFormSectionReviewItem
v-if="applicationDetails.principalResidence.specifiedServiceProvider &&
applicationDetails.principalResidence.specifiedServiceProvider !== 'n/a'"
:title="tApplicationDetails('principalResidenceServiceProvider')"
class="mt-4"
>
<p>{{ applicationDetails.principalResidence.specifiedServiceProvider }}</p>
</BcrosFormSectionReviewItem>
</div>
</div>
<div v-if="documents.length" class="mt-10">
<p class="font-bold mb-6 mobile:mx-2 text-xl">
{{ tApplicationDetails('documents') }}
Expand Down
8 changes: 8 additions & 0 deletions strr-web/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6dc7273

Please sign in to comment.