Skip to content

Commit

Permalink
UI - hosts stepper validation update (#363)
Browse files Browse the repository at this point in the history
Signed-off-by: Kial Jinnah <kialj876@gmail.com>
  • Loading branch information
kialj876 authored Dec 9, 2024
1 parent 26a73bd commit 14e40f2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions strr-host-pm-web/app/components/form/ReviewConfirm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ const { hostTacUrl } = useRuntimeConfig().public
// const accountStore = useConnectAccountStore()
const propertyStore = useHostPropertyStore()
const { blInfo, unitAddress, unitDetails } = storeToRefs(propertyStore)
const { prRequirements, requirementsList, showUnitDetailsForm } = storeToRefs(usePropertyReqStore())
const { prRequirements, showUnitDetailsForm } = storeToRefs(usePropertyReqStore())
const ownerStore = useHostOwnerStore()
const { hasCompParty, hostOwners } = storeToRefs(ownerStore)
const documentsStore = useDocumentStore()
const { storedDocuments } = storeToRefs(documentsStore)
const { requiredDocs, storedDocuments } = storeToRefs(documentsStore)
const applicationStore = useHostApplicationStore()
const confirmationFormRef = ref<Form<z.output<typeof applicationStore.confirmationSchema>>>()
Expand Down Expand Up @@ -174,7 +174,7 @@ const getCompPartyName = computed(() => {
</template>
<template #info-documents>
<div class="space-y-1">
<div v-if="!requirementsList.length && showUnitDetailsForm">
<div v-if="!requiredDocs.length && showUnitDetailsForm">
<div class="flex gap-2">
<UIcon name="i-mdi-check" class="mt-[2px] size-4 text-green-600" />
<p>{{ $t('text.noDocsReq') }}</p>
Expand Down
14 changes: 8 additions & 6 deletions strr-host-pm-web/app/pages/application.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,12 @@ watch(unitDetails, (newVal) => {
const steps = ref<Step[]>([
{
i18nPrefix: 'strr.step',
icon: 'i-mdi-domain-plus',
icon: 'i-mdi-map-marker-plus-outline',
complete: false,
isValid: false,
// TODO: replace validation function
validationFn: () => false
validationFn: () => (
propertyStore.validateUnitAddress(true) as boolean &&
propertyStore.validateUnitDetails(true) as boolean)
},
{
i18nPrefix: 'strr.step',
Expand All @@ -101,11 +102,12 @@ const steps = ref<Step[]>([
},
{
i18nPrefix: 'strr.step',
icon: 'i-mdi-map-marker-plus-outline',
icon: 'i-mdi-file-upload-outline',
complete: false,
isValid: false,
// TODO: replace validation function
validationFn: () => false
validationFn: () => (
propertyStore.validateBusinessLicense(true) as boolean &&
documentsStore.validateRequiredDocuments().length === 0)
},
{
i18nPrefix: 'strr.step',
Expand Down

0 comments on commit 14e40f2

Please sign in to comment.