Skip to content

Commit

Permalink
UXA Updates and Draft Verification (#2075)
Browse files Browse the repository at this point in the history
* UXA Updates and Draft Verification

* Disable name edits on OTHER Transfers

* Updated Role Edit Permissions
  • Loading branch information
cameron-eyds authored Nov 28, 2024
1 parent 391fff7 commit ee610a7
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 35 deletions.
4 changes: 2 additions & 2 deletions ppr-ui/package-lock.json

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

2 changes: 1 addition & 1 deletion ppr-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ppr-ui",
"version": "3.3.6",
"version": "3.3.7",
"private": true,
"appName": "Assets UI",
"sbcName": "SBC Common Components",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@
variant="outlined"
color="error"
class="remove-btn"
:disabled="isAddingHomeOwner"
:disabled="isAddingHomeOwner || disableOwnerRemoval"
:ripple="false"
@click="remove()"
>
Expand Down Expand Up @@ -486,6 +486,10 @@ export default defineComponent({
showTableError: {
type: Boolean,
default: false
},
disableOwnerRemoval: {
type: Boolean,
default: false
}
},
emits: ['remove', 'cancel'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,10 @@
</template>

<script lang="ts">
import { defineComponent, PropType, reactive, toRefs, watch } from 'vue'
import { HomeOwnerPartyTypes } from '@/enums'
import { HomeOwnerRoles } from '@/resources'
import { useMhrInformation, useTransferOwners } from '@/composables'
import { useTransferOwners } from '@/composables'
export default defineComponent({
Expand All @@ -65,15 +64,9 @@ export default defineComponent({
},
emits: ['update:partyType'],
setup (props, context) {
const { isFrozenMhrDueToUnitNote } = useMhrInformation()
const {
disableNameFields,
isTransferDueToDeath,
isTransferToAdminNoWill,
isTransferDueToSaleOrGift,
isTransferToExecutorProbateWill,
isTransferToExecutorUnder25Will,
isTransferToSurvivingJointTenant
isTransferWithoutBillOfSale
} = useTransferOwners()
const localState = reactive({
Expand All @@ -84,23 +77,9 @@ export default defineComponent({
/**
* Returns true when specific transfer type conditions are met for each respective party type
* @param partyType The specified party type from which to retrieve the conditions
*/
const isDisabledRadio = (partyType: HomeOwnerPartyTypes): boolean => {
switch (partyType) {
case HomeOwnerPartyTypes.OWNER_IND:
case HomeOwnerPartyTypes.OWNER_BUS:
return isTransferToExecutorProbateWill.value || isTransferToExecutorUnder25Will.value ||
isTransferToAdminNoWill.value || isTransferToSurvivingJointTenant.value
case HomeOwnerPartyTypes.EXECUTOR:
return disableNameFields.value || isTransferToAdminNoWill.value || isTransferDueToSaleOrGift.value ||
isFrozenMhrDueToUnitNote.value
case HomeOwnerPartyTypes.ADMINISTRATOR:
return isTransferToSurvivingJointTenant.value || isTransferToExecutorUnder25Will.value ||
isTransferToExecutorProbateWill.value || isTransferDueToSaleOrGift.value || isFrozenMhrDueToUnitNote.value
case HomeOwnerPartyTypes.TRUSTEE:
return isTransferDueToDeath.value || isTransferDueToSaleOrGift.value || isFrozenMhrDueToUnitNote.value
}
const isDisabledRadio = (): boolean => {
return disableNameFields.value && !isTransferWithoutBillOfSale.value
}
/** Apply local models to store when they change. **/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
:isHomeOwnerPerson="!item.organizationName"
:isMhrTransfer="isMhrTransfer"
:showTableError="validateTransfer && (isAddingMode || isEditingMode)"
:disableOwnerRemoval="isDisabledForSJTChanges(item) || isDisabledForWillChanges(item)"
@cancel="currentlyEditingHomeOwnerId = -1"
@remove="removeOwnerHandler(item)"
/>
Expand All @@ -142,8 +143,13 @@
<div
v-else-if="item.ownerId"
:key="`owner-row-key-${homeOwners.indexOf(item)}`"
class="owner-info"
:class="{ 'border-error-left': isInvalidOwnerGroup(item.groupId) }"
class="owner-row owner-info"
:class="{
'border-error-left': isInvalidOwnerGroup(item.groupId),
'no-bottom-border': (isRemovedHomeOwner(item) &&
(showDeathCertificate() || showSupportingDocuments()) &&
isReadonlyTable)
}"
:data-test-id="`owner-info-${item.ownerId}`"
>
<!-- Start of Name -->
Expand Down Expand Up @@ -1355,8 +1361,8 @@ export default defineComponent({
border-radius: 0 !important;
}
.owner-row:not(:last-child) tr > td,
.bottom-border, .owner-info {
.owner-row,
.bottom-border {
border-bottom: thin solid rgba(0, 0, 0, 0.12);
}
Expand Down
2 changes: 1 addition & 1 deletion ppr-ui/src/composables/mhrInformation/useTransferOwners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export const useTransferOwners = (enableAllActions: boolean = false) => {

/** Returns true when Add/Edit Owner name fields should be disabled **/
const disableNameFields = computed((): boolean => {
return isTransferDueToDeath.value || isTransferBillOfSale.value || isTransferNonGiftBillOfSale.value
return !!getMhrTransferType.value?.transferType
})

/** Returns true when ownership structure is joint tenancy /w min 2 owners but not executors, trustees or admins. **/
Expand Down
1 change: 0 additions & 1 deletion ppr-ui/src/views/mhrInformation/MhrInformation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@
<section
v-if="!isChangeLocationActive && !isCancelChangeLocationActive && !isExtendChangeLocationActive"
>
<v-divider class="mx-7 ma-0" />
<TransferDetailsReview class="py-6 pt-4 px-8" />
</section>

Expand Down

0 comments on commit ee610a7

Please sign in to comment.