Skip to content

Commit

Permalink
frozen/frozen doc bug fix (#1982)
Browse files Browse the repository at this point in the history
  • Loading branch information
cameron-eyds authored Jul 16, 2024
1 parent 6f916ef commit 336cd20
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
8 changes: 6 additions & 2 deletions ppr-ui/src/composables/mhrInformation/useTransferOwners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
ApiTransferTypes,
HomeOwnerPartyTypes,
HomeTenancyTypes,
MhApiFrozenDocumentTypes,
MhApiStatusTypes,
SupportingDocumentsOptions
} from '@/enums'
Expand Down Expand Up @@ -311,7 +312,9 @@ export const useTransferOwners = (enableAllActions: boolean = false) => {
case ApiTransferTypes.SZL:
case ApiTransferTypes.TAXS:
case ApiTransferTypes.VEST:
return getMhrInformation.value.statusType !== MhApiStatusTypes.FROZEN // Enable for all but FROZEN status
// Enable for all but FROZEN status due to Affe
return !(getMhrInformation.value.statusType === MhApiStatusTypes.FROZEN &&
getMhrInformation.value?.frozenDocumentType === MhApiFrozenDocumentTypes.TRANS_AFFIDAVIT)
case ApiTransferTypes.TO_EXECUTOR_PROBATE_WILL:
case ApiTransferTypes.TO_EXECUTOR_UNDER_25K_WILL:
case ApiTransferTypes.SURVIVING_JOINT_TENANT:
Expand Down Expand Up @@ -416,7 +419,8 @@ export const useTransferOwners = (enableAllActions: boolean = false) => {
case ApiTransferTypes.TRANS_RECEIVERSHIP:
case ApiTransferTypes.TRANS_SEVER_GRANT:
case ApiTransferTypes.TRANS_WRIT_SEIZURE:
return getMhrInformation.value.statusType !== MhApiStatusTypes.FROZEN
return !(getMhrInformation.value.statusType === MhApiStatusTypes.FROZEN &&
getMhrInformation.value?.frozenDocumentType === MhApiFrozenDocumentTypes.TRANS_AFFIDAVIT)
default:
return true
}
Expand Down
12 changes: 10 additions & 2 deletions ppr-ui/src/composables/mhrRegistration/useHomeOwners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ import {
MhrRegistrationTotalOwnershipAllocationIF
} from '@/interfaces'
import { useStore } from '@/store/store'
import { ActionTypes, ApiTransferTypes, HomeOwnerPartyTypes, HomeTenancyTypes, MhApiStatusTypes } from '@/enums'
import {
ActionTypes,
ApiTransferTypes,
HomeOwnerPartyTypes,
HomeTenancyTypes,
MhApiFrozenDocumentTypes,
MhApiStatusTypes
} from '@/enums'
import { MhrCompVal, MhrSectVal } from '@/composables/mhrRegistration/enums'
import { useMhrValidations, useTransferOwners } from '@/composables'
import { find, findIndex, remove, set, uniq } from 'lodash'
Expand Down Expand Up @@ -297,7 +304,8 @@ export function useHomeOwners (isMhrTransfer: boolean = false, isMhrCorrection:

// Is true when current flow is Sale or Gift transfer and the mhr is currently frozen
const isFrozenSoGTransfer = getMhrTransferType.value?.transferType === ApiTransferTypes.SALE_OR_GIFT &&
getMhrInformation.value?.statusType === MhApiStatusTypes.FROZEN
getMhrInformation.value?.statusType === MhApiStatusTypes.FROZEN &&
getMhrInformation.value?.frozenDocumentType === MhApiFrozenDocumentTypes.TRANS_AFFIDAVIT

// Try to find a group to add the owner
// If frozen Sale or Gift Transfer: Add Owner to the last ownership group with recently added Executor
Expand Down
2 changes: 1 addition & 1 deletion ppr-ui/tests/unit/SearchHistory.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('Test result table with no results', () => {
it('should have no accessibility violations', async () => {
// Run the axe-core accessibility check on the component's HTML
const results = await axe(wrapper.html())

expect(results).toBeDefined()
expect(results.violations).toBeDefined()
expect(results.violations).toHaveLength(0)
Expand Down

0 comments on commit 336cd20

Please sign in to comment.