Skip to content

Commit

Permalink
SAN: Discharge (#1919)
Browse files Browse the repository at this point in the history
  • Loading branch information
cameron-eyds authored Jun 6, 2024
1 parent 17f7713 commit 91b9263
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 15 deletions.
9 changes: 9 additions & 0 deletions ppr-ui/src/components/parties/party/RegisteringParty.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,15 +391,17 @@ const props = withDefaults(defineProps<{
disableActions?: boolean,
closeOrders?: boolean,
isSummary?: boolean,
isAmendment?: boolean
isAmendment?: boolean,
isDischarge?: boolean
}>(), {
notice: null,
noticeIndex: null,
isActivePanel: false,
disableActions: false,
closeOrders: false,
isSummary: false,
isAmendment: false
isAmendment: false,
isDischarge: false
})
/** Local Properties **/
Expand All @@ -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) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
:closeOrders="activeOrderPanel !== index"
:isSummary="isSummary"
:isAmendment="isAmendment"
:isDischarge="isDischarge"
:class="{ 'px-2': isSummary }"
@togglePanel="togglePanel"
@activeOrderIndex="activeOrderPanel = $event"
Expand Down Expand Up @@ -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 **/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
53 changes: 43 additions & 10 deletions ppr-ui/src/views/discharge/DischargeRegistration.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,39 @@
:setMsg="cautionTxt"
:setImportantWord="'Note'"
/>
<registration-length-trust-summary class="mt-15" />
<div class="summary-header mt-15 py-4 px-6 rounded-top">
<RegistrationLengthTrustSummary class="mt-11" />

<template v-if="isSecurityActNotice">
<v-row
noGutters
class="summary-header mt-11 py-2"
>
<v-col
cols="12"
class="py-2"
>
<v-icon color="darkBlue">
mdi-shield-plus
</v-icon>
<label
class="pl-3"
>
<strong>Securities Act Notices</strong>
</label>
</v-col>
</v-row>

<v-row noGutters>
<v-col>
<SecuritiesActNoticesPanels
isSummary
isDischarge
/>
</v-col>
</v-row>
</template>

<div class="summary-header mt-11 py-4 px-6 rounded-top">
<v-icon color="darkBlue">
mdi-account-multiple-plus
</v-icon>
Expand All @@ -54,26 +85,26 @@
<h3 class="pt-6">
Original Registering Party
</h3>
<registering-party-summary
<RegisteringPartySummary
class="pt-4"
:set-enable-no-data-action="false"
/>
<h3 class="pt-6">
Secured Parties
</h3>
<secured-party-summary
<SecuredPartySummary
class="pt-4"
:set-enable-no-data-action="false"
/>
<h3 class="pt-6">
Debtors
</h3>
<debtor-summary
<DebtorSummary
class="pt-4"
:set-enable-no-data-action="false"
/>
<collateral
class="mt-15"
<Collateral
class="mt-11"
:isSummary="true"
/>
</v-col>
Expand Down Expand Up @@ -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'
Expand All @@ -132,7 +163,8 @@ export default defineComponent({
DebtorSummary,
RegisteringPartySummary,
SecuredPartySummary,
StickyContainer
StickyContainer,
SecuritiesActNoticesPanels
},
props: {
appReady: {
Expand All @@ -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,
Expand Down Expand Up @@ -269,6 +301,7 @@ export default defineComponent({
return {
confirmDischarge,
handleDialogResp,
isSecurityActNotice,
...toRefs(localState)
}
}
Expand Down

0 comments on commit 91b9263

Please sign in to comment.