Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Home Owners conversion UXA feedback #1408

Merged
merged 2 commits into from
Jun 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,27 @@
<tr v-for="(group, groupIndex) in homeOwnerGroups" :key="`${group}: ${groupIndex}`">
<td class="pa-0" colspan="4">
<!-- Start of Home Owner Group -->

<div v-if="
groupIndex === 0 &&
isMhrTransfer &&
!hasActualOwners(group.owners) &&
group.owners.length > 0 &&
hasRemovedAllHomeOwnerGroups() &&
!isTransferToExecutorProbateWill &&
!isTransferToExecutorUnder25Will &&
!isTransferToAdminNoWill
"
>
<div class="pa-6 fs-14 text-center no-owners-head-row" data-test-id="no-data-msg">
No owners added yet.
</div>
</div>

<div
v-if="showGroups && !(disableGroupHeader(group.groupId) && (hideRemovedOwners || isReadonlyTable))"
:colspan="4"
class="py-3 px-7 pl-0 group-header-slot"
class="py-3 group-header-slot"
:class="{
'spacer-header': disableGroupHeader(group.groupId),
'border-error-left': isInvalidOwnerGroup(group.groupId)
Expand All @@ -45,21 +62,6 @@
<!-- End of Table Group Header -->

<div v-for="(item, index) in group.owners" :key="`${item}: ${index}`" class="owner-row">
<div
v-if="
isMhrTransfer &&
!hasActualOwners(group.owners) &&
group.owners.length > 0 &&
hasRemovedAllHomeOwnerGroups() &&
!isTransferToExecutorProbateWill &&
!isTransferToExecutorUnder25Will &&
!isTransferToAdminNoWill
"
>
<div class="pa-6 fs-14 text-center no-owners-head-row" data-test-id="no-data-msg">
No owners added yet.
</div>
</div>

<!-- Transfer scenario: Display error for groups that 'removed' all owners
but they still exist in the table -->
Expand All @@ -71,7 +73,7 @@
>
<div
class="error-text my-6 text-center"
:data-test-id="`no-owners-msg-group-${group.owners.indexOf(item)}`"
:data-test-id="`no-owners-msg-group-${homeOwners.indexOf(item)}`"
>
<HomeOwnersGroupError :groupId="group.groupId" />
</div>
Expand All @@ -85,7 +87,7 @@
/>
</tr>

<template v-if="isCurrentlyEditing(group.owners.indexOf(item))">
<template v-if="isCurrentlyEditing(homeOwners.indexOf(item))">
<div class="pa-0" :colspan="homeOwnersTableHeaders.length">
<v-expand-transition>
<AddEditHomeOwner
Expand All @@ -101,7 +103,7 @@
</template>

<tr v-else-if="item.ownerId"
:key="`owner-row-key-${group.owners.indexOf(item)}`"
:key="`owner-row-key-${homeOwners.indexOf(item)}`"
class="owner-info"
:data-test-id="`owner-info-${item.ownerId}`"
>
Expand Down Expand Up @@ -186,7 +188,7 @@
class="mr-n4"
:ripple="false"
:disabled="isAddingMode || isEditingMode || isGlobalEditingMode"
@click="openForEditing(group.owners.indexOf(item))"
@click="openForEditing(homeOwners.indexOf(item))"
data-test-id="table-edit-btn"
>
<v-icon small>mdi-pencil</v-icon>
Expand Down Expand Up @@ -283,7 +285,7 @@
<v-list class="actions-dropdown actions__more-actions">
<!-- Menu Edit Option -->
<v-list-item class="my-n2">
<v-list-item-subtitle class="pa-0" @click="openForEditing(group.owners.indexOf(item))">
<v-list-item-subtitle class="pa-0" @click="openForEditing(homeOwners.indexOf(item))">
<v-icon small class="mb-1">mdi-pencil</v-icon>
<span class="ml-1 remove-btn-text">Change Details</span>
</v-list-item-subtitle>
Expand Down Expand Up @@ -416,8 +418,8 @@
</td>
</tr>
</div>
<div v-if="group.owners.length === 0" class="my-6 text-center" data-test-id="no-data-msg">
No owners added yet.
<div v-if="group.owners.length === 0" class="error-text my-6 text-center" data-test-id="no-owners-err-msg">
Group must contain at least one owner.
</div>
</td>
</tr>
Expand Down Expand Up @@ -1024,6 +1026,10 @@ export default defineComponent({
}
}

.home-owners-table:not(.review-mode) .group-header-slot {
padding: 0 28px;
}

.v-menu__content {
cursor: pointer;
}
Expand Down