Skip to content

Commit

Permalink
SAN Amendments (#1913)
Browse files Browse the repository at this point in the history
* SAN Amendments

* tests and clean up

* PR Clean Up
  • Loading branch information
cameron-eyds authored Jun 5, 2024
1 parent d13332f commit 6f1756e
Show file tree
Hide file tree
Showing 27 changed files with 818 additions and 301 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.2.7",
"version": "3.2.8",
"private": true,
"appName": "Assets UI",
"sbcName": "SBC Common Components",
Expand Down
6 changes: 6 additions & 0 deletions ppr-ui/src/assets/styles/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,9 @@ aside {
.column-xs {
min-width: 5rem;
}
.col-30 {
width: 30%;
}
.col-22-5 {
width: 22.5%;
}
18 changes: 10 additions & 8 deletions ppr-ui/src/components/parties/party/RegisteringParty.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
>
<v-row noGutters>
<v-col cols="auto">
<div class="icon-div mt-n1 pr-4">
<div class="icon-div mt-n1 pr-2">
<v-icon v-if="isBusiness(item)">
mdi-domain
</v-icon>
Expand All @@ -57,17 +57,19 @@
/>
</td>
<td>{{ item.emailAddress }}</td>
<td>{{ item.code }}</td>
<td class="actions-cell actions-width px-0">
<div
v-if="!isSecurityActNotice"
class="actions"
>
<td>
{{ item.code }}
</td>
<td
v-if="!isSecurityActNotice"
class="ml-8 pr-0"
>
<div class="actions">
<v-btn
v-if="!item.action"
variant="plain"
color="primary"
class="smaller-button edit-btn pr-2 float-right"
class="smaller-button edit-btn pr-2"
@click="changeRegisteringParty()"
>
<v-icon size="small">
Expand Down
361 changes: 182 additions & 179 deletions ppr-ui/src/components/parties/party/SecuredParties.vue

Large diffs are not rendered by default.

11 changes: 5 additions & 6 deletions ppr-ui/src/components/parties/summaries/BasePartySummary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@
:class="{ 'disabled-text-not-first': item?.action === ActionTypes.REMOVED}"
>
<td
class="list-item__title title-text"
class="list-item__title"
>
<v-row noGutters>
<v-col cols="auto">
<div class="icon-div mt-n1 pr-4">
<div class="icon-div mt-n1 pr-2">
<v-icon v-if="isBusiness(item)">
mdi-domain
</v-icon>
Expand All @@ -65,7 +65,7 @@
</v-col>
<v-col cols="9">
<div :class="{ 'disabled-text': item?.action === ActionTypes.REMOVED}">
{{ getName(item) }}
<span class="font-weight-bold">{{ getName(item) }}</span>
</div>
<div v-if="item?.action && registrationFlowType === RegistrationFlowType.AMENDMENT">
<v-chip
Expand Down Expand Up @@ -107,8 +107,8 @@
<tbody v-else-if="options.enableNoDataAction">
<tr>
<td
:colspan="1"
class="error-text text-center"
:colspan="headers.length"
class="error-text text-left"
>
<v-icon color="error ml-2">
mdi-information-outline
Expand Down Expand Up @@ -216,7 +216,6 @@ export default defineComponent({

<style lang="scss" scoped>
@import '@/assets/styles/theme.scss';
.sectionText {
color: $gray9;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
class="court-date-text-input"
nudgeRight="40"
title="Date of Order"
:initialValue="commissionOrderData?.orderDate"
:initialValue="commissionOrderData?.orderDate.split('T')[0]"
:minDate="null"
:maxDate="localTodayDate(new Date(), true)"
:persistentHint="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
class="court-date-text-input"
nudgeRight="40"
title="Date of Order"
:initialValue="courtOrderData?.orderDate"
:initialValue="courtOrderData?.orderDate.split('T')[0]"
:minDate="null"
:maxDate="localTodayDate(new Date(), true)"
:persistentHint="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
class="mt-0 pr-1"
inline
hideDetails="true"
:disabled="isAmendment && isEditing && notice?.action !== ActionTypes.ADDED"
:rules="required('')"
>
<v-radio
Expand All @@ -51,7 +52,7 @@
<InputFieldDatePicker
class="mt-8 mr-3"
:title="'Effective Date (Optional)'"
:initialValue="effectiveDateTime"
:initialValue="effectiveDateTime?.split('T')[0]"
:minDate="null"
:maxDate="localTodayDate(new Date(), true)"
@emitCancel="effectiveDateTime = ''"
Expand Down Expand Up @@ -90,9 +91,10 @@
import { computed, ref } from 'vue'
import { FormCard, InputFieldDatePicker } from '@/components/common'
import { AddEditSaNoticeIF, FormIF } from '@/interfaces'
import { SaNoticeTypes } from '@/enums'
import { ActionTypes, SaNoticeTypes } from '@/enums'
import { useInputRules } from '@/composables'
import { localTodayDate } from '@/utils'
import { isEqual } from 'lodash'
/** Composables **/
const { required } = useInputRules()
Expand All @@ -109,10 +111,12 @@ const emits = defineEmits<{
/** Props **/
const props = withDefaults(defineProps<{
isEditing?: boolean,
notice?: AddEditSaNoticeIF
notice?: AddEditSaNoticeIF,
isAmendment?: boolean
}>(), {
isEditing: false,
notice: null
notice: null,
isAmendment: false
})
/** Local Properties **/
Expand All @@ -121,8 +125,11 @@ const isFormValid = ref(false)
const securitiesActNoticeType = ref(props.notice?.securitiesActNoticeType || null)
const effectiveDateTime = ref(props.notice?.effectiveDateTime || '')
const addEditLabel = computed(() => props.isEditing ? 'Edit' : 'Add')
const isInvalidAddEditNotice = computed( () => {
return validateAddEditNotice.value && !isFormValid.value
const isInvalidAddEditNotice = computed( () => validateAddEditNotice.value && !isFormValid.value)
const isAmendedEffectiveDate = computed( () => {
return effectiveDateTime.value
? !isEqual(props.notice?.effectiveDateTime?.split('T')[0], effectiveDateTime.value.split('T')[0])
: !!props.notice?.effectiveDateTime
})
/** Local Functions **/
Expand All @@ -132,9 +139,19 @@ const submitAddEditNotice = async () => {
if(isFormValid.value) {
emits('done', {
...props.notice,
securitiesActNoticeType: securitiesActNoticeType.value,
effectiveDateTime: effectiveDateTime.value,
securitiesActOrders: props.notice?.securitiesActOrders || []
securitiesActOrders: props.notice?.securitiesActOrders || [],
...props.isAmendment && {
...props.isEditing && isAmendedEffectiveDate.value && props.notice.action !== ActionTypes.ADDED && {
noticeId: props.notice?.noticeId,
action: ActionTypes.EDITED
},
...!props.isEditing && !props.notice?.action && {
action: ActionTypes.ADDED
}
}
})
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,31 @@
<v-row
id="court-commission-order-review"
class="pa-4"
:class="{'removed-item': hasRemovedOrders || order.action === ActionTypes.REMOVED}"
noGuttters
>
<v-col
cols="3"
class="py-0"
cols="6"
class="py-0 dp__flex"
>
<h4>{{ courtCommissionLabel }} Order</h4>
<h4>
{{ courtCommissionLabel }} Order
</h4>
<span>
<InfoChip
v-if="isAmendment"
class="ml-2 py-1"
:action="order.action"
/>
</span>
</v-col>
<v-col
cols="9"
cols="6"
class="py-0 px-0 mx-0 mt-n1"
>
<slot name="actions" />
</v-col>
<template v-if="props.order?.courtOrder">
<template v-if="order?.courtOrder">
<v-col
cols="3"
class="pt-1 pb-0 mb-0"
Expand Down Expand Up @@ -64,7 +74,7 @@
cols="9"
class="pt-1 pb-0 mb-0"
>
<p>{{ yyyyMmDdToPacificDate(order.orderDate, true) }}</p>
<p>{{ yyyyMmDdToPacificDate((order.orderDate.split('T')[0]), true) }}</p>
</v-col>
<v-col
cols="3"
Expand All @@ -87,12 +97,18 @@
import { computed } from 'vue'
import { CourtOrderIF } from '@/interfaces'
import { yyyyMmDdToPacificDate } from '@/utils'
import { InfoChip } from '@/components/common'
import { ActionTypes } from '@/enums'
/** Props **/
const props = withDefaults(defineProps<{
order: CourtOrderIF
order: CourtOrderIF,
isAmendment?: boolean,
hasRemovedOrders?: boolean
}>(), {
order: null
order: null,
isAmendment: false,
hasRemovedOrders: false
})
/** Local Properties **/
Expand All @@ -103,10 +119,18 @@ const courtCommisionNumberLabel = computed(() => props.order?.courtOrder ? 'Cour
</script>
<style lang="scss" scoped>
@import '@/assets/styles/theme';
h4 {
white-space: nowrap;
}
p {
font-size: .875rem;
line-height: 2.25rem;
}
.removed-item {
h4, p {
opacity: .5
}
}
.effect-of-order-text {
line-height: 22px;
}
Expand Down
Loading

0 comments on commit 6f1756e

Please sign in to comment.