From 91b9263e8d6757dfab6c3778c5be11b79856ef14 Mon Sep 17 00:00:00 2001 From: CameronEYDS <53542131+cameron-eyds@users.noreply.github.com> Date: Thu, 6 Jun 2024 13:06:33 -0700 Subject: [PATCH] SAN: Discharge (#1919) --- .../parties/party/RegisteringParty.vue | 9 ++++ .../securities-act-notices/NoticePanel.vue | 8 +-- .../SecuritiesActNoticesPanels.vue | 7 ++- .../securities-act-notices/index.ts | 1 + .../views/discharge/DischargeRegistration.vue | 53 +++++++++++++++---- 5 files changed, 63 insertions(+), 15 deletions(-) diff --git a/ppr-ui/src/components/parties/party/RegisteringParty.vue b/ppr-ui/src/components/parties/party/RegisteringParty.vue index 05bc77c6e..103639191 100644 --- a/ppr-ui/src/components/parties/party/RegisteringParty.vue +++ b/ppr-ui/src/components/parties/party/RegisteringParty.vue @@ -190,6 +190,8 @@ import { PartyAddressSchema } from '@/schemas' import { ErrorContact } from '@/components/common' import { storeToRefs } from 'pinia' import { usePprRegistration } from '@/composables' +import { partyCodeAccount } from '@/utils' +import { useSecuredParty } from '@/composables/parties' export default defineComponent({ components: { @@ -203,9 +205,16 @@ export default defineComponent({ const addressSchema = PartyAddressSchema const registrationFlowType = getRegistrationFlowType.value const { isSecurityActNotice } = usePprRegistration() + const { setRegisteringAndSecuredParty } = useSecuredParty() /** First time get read only registering party from the auth api. After that get from the store. */ onMounted(async () => { + if(isSecurityActNotice.value) { + const party = await partyCodeAccount(true) + await setRegisteringAndSecuredParty(party[0] as PartyIF) + return + } + const regParty = getAddSecuredPartiesAndDebtors.value?.registeringParty if (regParty === null) { try { diff --git a/ppr-ui/src/components/registration/securities-act-notices/NoticePanel.vue b/ppr-ui/src/components/registration/securities-act-notices/NoticePanel.vue index cc3d4c8a0..2c8b22340 100644 --- a/ppr-ui/src/components/registration/securities-act-notices/NoticePanel.vue +++ b/ppr-ui/src/components/registration/securities-act-notices/NoticePanel.vue @@ -391,7 +391,8 @@ const props = withDefaults(defineProps<{ disableActions?: boolean, closeOrders?: boolean, isSummary?: boolean, - isAmendment?: boolean + isAmendment?: boolean, + isDischarge?: boolean }>(), { notice: null, noticeIndex: null, @@ -399,7 +400,8 @@ const props = withDefaults(defineProps<{ disableActions: false, closeOrders: false, isSummary: false, - isAmendment: false + isAmendment: false, + isDischarge: false }) /** Local Properties **/ @@ -410,7 +412,7 @@ const editOrderIndex = ref(-1) const addCommissionOrder = ref(false) const isValidOrder = ref(true) const showRemoveNoticeDialog = ref(false) -const showOrders = ref(props.isSummary) +const showOrders = ref(props.isSummary && !props.isDischarge) /** Open and close respective notice and order forms **/ const toggleNoticeForm = async (formRef: string, index: number = -1) => { diff --git a/ppr-ui/src/components/registration/securities-act-notices/SecuritiesActNoticesPanels.vue b/ppr-ui/src/components/registration/securities-act-notices/SecuritiesActNoticesPanels.vue index eea2799dd..7d9fee32e 100644 --- a/ppr-ui/src/components/registration/securities-act-notices/SecuritiesActNoticesPanels.vue +++ b/ppr-ui/src/components/registration/securities-act-notices/SecuritiesActNoticesPanels.vue @@ -24,6 +24,7 @@ :closeOrders="activeOrderPanel !== index" :isSummary="isSummary" :isAmendment="isAmendment" + :isDischarge="isDischarge" :class="{ 'px-2': isSummary }" @togglePanel="togglePanel" @activeOrderIndex="activeOrderPanel = $event" @@ -61,11 +62,13 @@ const emits = defineEmits<{ const props = withDefaults(defineProps<{ isAddingNotice?: boolean, isSummary?: boolean, - isAmendment?: boolean + isAmendment?: boolean, + isDischarge?: boolean }>(), { isAddingNotice: false, isSummary: false, - isAmendment: false + isAmendment: false, + isDischarge: false }) /** Local Properties **/ diff --git a/ppr-ui/src/components/registration/securities-act-notices/index.ts b/ppr-ui/src/components/registration/securities-act-notices/index.ts index d35c963e0..89815affc 100644 --- a/ppr-ui/src/components/registration/securities-act-notices/index.ts +++ b/ppr-ui/src/components/registration/securities-act-notices/index.ts @@ -3,3 +3,4 @@ export { default as AddEditCourtOrder } from './AddEditCourtOrder.vue' export { default as AddEditCommissionOrder } from './AddEditCommissionOrder.vue' export { default as CourtCommissionOrderReview } from './CourtCommissionOrderReview.vue' export { default as SecuritiesActNotices } from './SecuritiesActNotices.vue' +export { default as SecuritiesActNoticesPanels } from './SecuritiesActNoticesPanels.vue' diff --git a/ppr-ui/src/views/discharge/DischargeRegistration.vue b/ppr-ui/src/views/discharge/DischargeRegistration.vue index e39dfbef3..9057bd4a0 100644 --- a/ppr-ui/src/views/discharge/DischargeRegistration.vue +++ b/ppr-ui/src/views/discharge/DischargeRegistration.vue @@ -42,8 +42,39 @@ :setMsg="cautionTxt" :setImportantWord="'Note'" /> - -
+ + + + +
mdi-account-multiple-plus @@ -54,26 +85,26 @@

Original Registering Party

-

Secured Parties

-

Debtors

- - @@ -107,7 +138,7 @@ import { storeToRefs } from 'pinia' import { useRoute, useRouter } from 'vue-router' import { CautionBox, StickyContainer } from '@/components/common' import { BaseDialog } from '@/components/dialogs' -import { RegistrationLengthTrustSummary } from '@/components/registration' +import { RegistrationLengthTrustSummary, SecuritiesActNoticesPanels } from '@/components/registration' import { Collateral } from '@/components/collateral' import { DebtorSummary, RegisteringPartySummary, SecuredPartySummary } from '@/components/parties/summaries' import { notCompleteDialog } from '@/resources/dialogOptions' @@ -132,7 +163,8 @@ export default defineComponent({ DebtorSummary, RegisteringPartySummary, SecuredPartySummary, - StickyContainer + StickyContainer, + SecuritiesActNoticesPanels }, props: { appReady: { @@ -146,7 +178,7 @@ export default defineComponent({ const router = useRouter() const { goToDash } = useNavigation() const { isAuthenticated } = useAuth() - const { initPprUpdateFilling } = usePprRegistration() + const { initPprUpdateFilling, isSecurityActNotice } = usePprRegistration() const { // Getters getRegistrationType, @@ -269,6 +301,7 @@ export default defineComponent({ return { confirmDischarge, handleDialogResp, + isSecurityActNotice, ...toRefs(localState) } }