Skip to content

Commit

Permalink
SAN Copy Updates (#1924)
Browse files Browse the repository at this point in the history
* SAN Copy and UXA

* Correction Section Payload fix
  • Loading branch information
cameron-eyds authored Jun 7, 2024
1 parent b183f9b commit bd6bf1f
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 16 deletions.
9 changes: 8 additions & 1 deletion ppr-ui/src/components/registration/AmendmentDescription.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@
>
<v-row class="pt-6">
<v-col class="pa-4 pl-5 summary-text">
<p>
<p v-if="isSecurityActNotice">
If this registration is related to a partial transfer of collateral to a new debtor, then enter the
prescribed information below, otherwise the Details Description is optional.
</p>
<p v-else>
If this registration is related to a Subordination, Partial secured party transfer, or
Partial transfer of collateral to a new debtor, you MUST enter the prescribed information below,
otherwise the Details Description is optional.
Expand Down Expand Up @@ -87,6 +91,7 @@
import { defineComponent, reactive, toRefs, watch, computed } from 'vue'
import { useStore } from '@/store/store'
import { storeToRefs } from 'pinia'
import { usePprRegistration } from '@/composables'
export default defineComponent({
props: {
Expand All @@ -103,6 +108,7 @@ export default defineComponent({
setup (props, { emit }) {
const { setAmendmentDescription } = useStore()
const { getAmendmentDescription } = storeToRefs(useStore())
const { isSecurityActNotice } = usePprRegistration()
const localState = reactive({
detailDescription: getAmendmentDescription.value || '',
summaryView: computed((): boolean => {
Expand All @@ -125,6 +131,7 @@ export default defineComponent({
})
return {
isSecurityActNotice,
...toRefs(localState)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<template #actions>
<span class="security-notice-header-action mt-n4">
<v-btn
v-if="isAmendment && (notice?.action === ActionTypes.EDITED || notice?.action === ActionTypes.REMOVED)"
v-if="showNoticeUndo"
class="security-notice-undo-btn px-0"
variant="plain"
color="primary"
Expand Down Expand Up @@ -98,7 +98,7 @@
>
<span class="pr-4">
<v-icon size="small">mdi-pencil</v-icon>
{{ (isAmendment && !notice.action) ? 'Amend' : 'Edit' }} Notice
{{ (isAmendment && notice.action !== ActionTypes.ADDED) ? 'Amend' : 'Edit' }} Notice
</span>
<v-divider vertical />
</v-btn>
Expand Down Expand Up @@ -157,7 +157,7 @@
</v-list-item>

<v-list-item
v-if="isAmendment && notice.action === ActionTypes.EDITED"
v-if="isAmendment && showNoticeUndo"
:data-test-id="`security-notice-amend-drop-option`"
@click="toggleNoticeForm('editNotice')"
>
Expand All @@ -179,7 +179,7 @@
color="primary"
size="1.125rem"
>mdi-delete</v-icon>
Remove Notice
{{ isAmendment && notice.action === ActionTypes.ADDED ? 'Remove' : 'Delete' }} Notice
</v-list-item-subtitle>
</v-list-item>

Expand Down Expand Up @@ -339,7 +339,7 @@
color="primary"
size="1.125rem"
>mdi-delete</v-icon>
Remove Order
{{ isAmendment && order.action === ActionTypes.ADDED ? 'Remove' : 'Delete' }} Order
</v-list-item-subtitle>
</v-list-item>

Expand All @@ -356,7 +356,7 @@
</template>

<script setup lang="ts">
import { nextTick, ref, watch } from 'vue'
import { computed, nextTick, ref, watch } from 'vue'
import { AddEditSaNoticeIF, CourtOrderIF } from '@/interfaces'
import { ActionTypes, saNoticeTypeMapping } from '@/enums'
import { yyyyMmDdToPacificDate } from '@/utils/date-helper'
Expand Down Expand Up @@ -413,6 +413,15 @@ const addCommissionOrder = ref(false)
const isValidOrder = ref(true)
const showRemoveNoticeDialog = ref(false)
const showOrders = ref(props.isSummary && !props.isDischarge)
const showNoticeUndo = computed(() => {
return props.isAmendment &&
(
(
props.notice?.action !== ActionTypes.ADDED &&
props.notice?.effectiveDateTime !== getOriginalSecuritiesActNotices.value?.[props.noticeIndex]?.effectiveDateTime
) || props.notice?.action === ActionTypes.REMOVED
)
})
/** Open and close respective notice and order forms **/
const toggleNoticeForm = async (formRef: string, index: number = -1) => {
Expand Down Expand Up @@ -464,7 +473,7 @@ const removeNotice = (proceed: boolean) => {
/** Prompt Removal Dialog or call remove when no orders **/
const removeOrNotify = () => {
if (getSecuritiesActNotices.value[props.noticeIndex].securitiesActOrders?.length > 0) {
if (!props.notice?.noticeId && props.notice.securitiesActOrders?.length > 0) {
showRemoveNoticeDialog.value = true
} else removeNotice(true)
}
Expand All @@ -480,6 +489,8 @@ const removeOrder = (noticeIndex: number, orderIndex: number) => {
action: ActionTypes.REMOVED
}
setSecuritiesActNoticeOrder(noticeIndex, orderIndex, order)
// Set Parent Notice Action
getSecuritiesActNotices.value[noticeIndex].action = ActionTypes.EDITED
} else {
// Remove New/Added Orders
orders.splice(orderIndex, 1)
Expand Down Expand Up @@ -554,7 +565,7 @@ const setAndCloseNotice = (isUndo = false): void => {
const originalNotice = getOriginalSecuritiesActNotices.value[index]
const isAdded = notice.action === ActionTypes.ADDED
const isRemoved = notice.action === ActionTypes.REMOVED
const isEdited = !isAdded && !isEqual(notice.effectiveDateTime, originalNotice.effectiveDateTime)
const isEdited = !isAdded && !isEqual(omit(notice, 'action'), omit(originalNotice, 'action'))
if (isEdited) {
return { ...notice, action: ActionTypes.EDITED }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
cols="auto"
class="sub-header"
>
Securities Act Notices
{{ UIRegistrationTypes.SECURITY_ACT_NOTICE }}
</v-col>
</v-row>
<v-row noGutters>
Expand Down Expand Up @@ -64,6 +64,7 @@ import { storeToRefs } from 'pinia'
import { useStore } from '@/store/store'
import { AddEditSaNoticeIF } from '@/interfaces'
import SecuritiesActNoticesPanels from '@/components/registration/securities-act-notices/SecuritiesActNoticesPanels.vue'
import { UIRegistrationTypes } from '@/enums'
/** Composables **/
const { setSecuritiesActNotices } = useStore()
Expand Down
5 changes: 4 additions & 1 deletion ppr-ui/src/composables/mhrRegistration/useMhrCorrections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,10 @@ export const useMhrCorrections = () => {
baseInformation: {
...mhrState.description.baseInformation,
year: Number(mhrState.description.baseInformation.year) // Cast to number to support legacy strings
}
},
sections: [
...mhrState.description.sections.filter(section => section?.action !== ActionTypes.REMOVED)
]
}
}),
...(correctionsList.includes('ownerGroups') && {
Expand Down
2 changes: 1 addition & 1 deletion ppr-ui/src/enums/registrationTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export enum APIRegistrationTypes {
export enum UIRegistrationTypes {
// standard
SECURITY_AGREEMENT = 'Security Agreement',
SECURITY_ACT_NOTICE = 'Securities Act Notice',
SECURITY_ACT_NOTICE = 'Securities Order or Proceedings Notice',
REPAIRERS_LIEN = 'Repairers Lien',
MARRIAGE_MH = 'Marriage / Separation Agreement affecting Manufactured Home under Family Law Act',
SALE_OF_GOODS = 'Possession under S.30 of the Sale of Goods Act',
Expand Down
3 changes: 2 additions & 1 deletion ppr-ui/src/views/amendment/ConfirmAmendment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
class="pa-4"
>
<h3 class="pt-2">
Securities Act Notices
{{ UIRegistrationTypes.SECURITY_ACT_NOTICE }}
</h3>
<SecuritiesActNoticesPanels
class="mt-n2"
Expand Down Expand Up @@ -659,6 +659,7 @@ export default defineComponent({
submitAmendment,
goToReviewAmendment,
onStaffPaymentChanges,
UIRegistrationTypes,
...toRefs(localState)
}
}
Expand Down
3 changes: 2 additions & 1 deletion ppr-ui/src/views/discharge/DischargeRegistration.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<label
class="pl-3"
>
<strong>Securities Act Notices</strong>
<strong>{{ UIRegistrationTypes.SECURITY_ACT_NOTICE }}</strong>
</label>
</v-col>
</v-row>
Expand Down Expand Up @@ -302,6 +302,7 @@ export default defineComponent({
confirmDischarge,
handleDialogResp,
isSecurityActNotice,
UIRegistrationTypes,
...toRefs(localState)
}
}
Expand Down
5 changes: 3 additions & 2 deletions ppr-ui/src/views/newRegistration/ReviewConfirm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<label
class="pl-3"
>
<strong>Securities Act Notices</strong>
<strong>{{ UIRegistrationTypes.SECURITY_ACT_NOTICE }}</strong>
</label>
</v-col>
</v-row>
Expand Down Expand Up @@ -224,7 +224,7 @@
<script lang="ts">
import { computed, defineComponent, onMounted, reactive, toRefs, watch } from 'vue'
import { useStore } from '@/store/store'
import { APIRegistrationTypes, RegistrationFlowType, RouteNames } from '@/enums'
import { APIRegistrationTypes, RegistrationFlowType, RouteNames, UIRegistrationTypes } from '@/enums'
import { FeeSummaryTypes } from '@/composables/fees/enums'
import { Stepper, StickyContainer, CertifyInformation } from '@/components/common'
import ButtonFooter from '@/components/common/ButtonFooter.vue'
Expand Down Expand Up @@ -385,6 +385,7 @@ export default defineComponent({
isSecurityActNotice,
getSecuritiesActNotices,
RouteNames,
UIRegistrationTypes,
...toRefs(localState)
}
}
Expand Down

0 comments on commit bd6bf1f

Please sign in to comment.