-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Kial Jinnah <kialj876@gmail.com>
- Loading branch information
Showing
32 changed files
with
1,861 additions
and
776 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<script setup lang="ts"> | ||
defineProps<{ | ||
icon: string, | ||
iconClass?: string, | ||
content?: string, | ||
contentClass?: string, | ||
wrapperClass?: string | ||
}>() | ||
</script> | ||
<template> | ||
<div :class="wrapperClass || 'flex space-x-2'"> | ||
<UIcon :name="icon" :class="iconClass || 'size-5'" /> | ||
<div :class="contentClass || 'space-y-3'"> | ||
<slot> | ||
<p>{{ content || '' }}</p> | ||
</slot> | ||
</div> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<script setup lang="ts"> | ||
defineProps<{ isComplete: boolean }>() | ||
const contactStore = useHostOwnerStore() | ||
const { hostOwners, hasHost, hasCoHost, hasCompParty, hasPropertyManager } = storeToRefs(contactStore) | ||
const editingIndex = ref<number | undefined>(undefined) | ||
const addingNewType = ref<OwnerType | undefined>(undefined) | ||
</script> | ||
|
||
<template> | ||
<div data-testid="add-owner" class="space-y-10"> | ||
<div> | ||
<p class="font-bold"> | ||
{{ $t('strr.text.applicationMustInclude') }} | ||
</p> | ||
<!-- TODO: move to generic component as 'ConnectList' --> | ||
<ul class="mt-5 list-outside list-disc space-y-3 pl-10"> | ||
<li | ||
:class="hasCompParty || (!hasCompParty && isComplete) | ||
? '-ml-6 flex list-none space-x-1' | ||
: ''" | ||
> | ||
<UIcon v-if="hasCompParty" name="i-mdi-check" class="size-5 text-green-600" /> | ||
<UIcon v-else-if="!hasCompParty && isComplete" name="i-mdi-close" class="mt-[2px] size-5 text-red-600" /> | ||
<span>{{ $t('strr.text.includeCompletingParty') }}</span> | ||
</li> | ||
<li | ||
:class="hasHost || (!hasHost && isComplete) | ||
? '-ml-6 flex list-none space-x-1' | ||
: ''" | ||
> | ||
<UIcon v-if="hasHost" name="i-mdi-check" class="size-5 text-green-600" /> | ||
<UIcon v-else-if="!hasHost && isComplete" name="i-mdi-close" class="mt-[2px] size-5 text-red-600" /> | ||
<span>{{ $t('strr.text.includeHost') }}</span> | ||
</li> | ||
<li | ||
:class="hasPropertyManager || isComplete | ||
? '-ml-6 flex list-none space-x-1' | ||
: ''" | ||
> | ||
<UIcon v-if="hasPropertyManager" name="i-mdi-check" class="size-5 text-green-600" /> | ||
<UIcon | ||
v-else-if="isComplete" | ||
name="i-mdi-information-outline" | ||
class="mt-[2px] size-5 text-blue-500" | ||
/> | ||
<span>{{ $t('strr.text.includePropertyManager') }}</span> | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="flex space-x-5"> | ||
<UButton | ||
:label="$t('strr.label.addIndividual')" | ||
class="px-5 py-3" | ||
color="primary" | ||
icon="i-mdi-account-plus" | ||
variant="outline" | ||
:disabled="editingIndex !== undefined || !!addingNewType || (hasHost && hasCoHost)" | ||
@click="addingNewType = OwnerType.INDIVIDUAL" | ||
/> | ||
<UButton | ||
:label="$t('strr.label.addBusiness')" | ||
class="px-5 py-3" | ||
color="primary" | ||
icon="i-mdi-domain-plus" | ||
variant="outline" | ||
:disabled="editingIndex !== undefined || !!addingNewType || (hasHost && hasPropertyManager)" | ||
@click="addingNewType = OwnerType.BUSINESS" | ||
/> | ||
</div> | ||
<FormOwner | ||
v-if="addingNewType" | ||
:owner-type="addingNewType" | ||
:is-complete="isComplete" | ||
@cancel="addingNewType = undefined" | ||
@done="contactStore.addHostOwner($event); addingNewType = undefined" | ||
/> | ||
<SummaryOwners v-if="hostOwners.length" editable :disable-actions="addingNewType !== undefined" /> | ||
</div> | ||
</template> |
Oops, something went wrong.