-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AddEdit Notices - Notice History Panels - Court/Commission Order Plac…
…eholders (#1872) * Add Edit View Notice - All but drop Actions * placeholder forms and expansion controls * Unit test - Clean up * NoticePanels Unit Testing * type fix
- Loading branch information
1 parent
1fa6099
commit 4d27d4e
Showing
27 changed files
with
843 additions
and
69 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
ppr-ui/src/components/registration/securities-act-notices/AddEditCommissionOrder.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<template> | ||
<FormCard | ||
id="add-edit-commission-order" | ||
:label="`${addEditLabel} Commission Order`" | ||
:class="{ 'border-error-left' : false }" | ||
> | ||
<template #formSlot /> | ||
</FormCard> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { computed } from 'vue' | ||
import { FormCard } from '@/components/common' | ||
/** Props **/ | ||
const props = withDefaults(defineProps<{ | ||
isEditing?: boolean, | ||
commissionOrder?: any | ||
}>(), { | ||
isEditing: false, | ||
commissionOrder: null | ||
}) | ||
/** Local Properties **/ | ||
const addEditLabel = computed(() => props.isEditing ? 'Edit' : 'Add') | ||
</script> | ||
<style lang="scss" scoped> | ||
@import '@/assets/styles/theme'; | ||
</style> |
30 changes: 30 additions & 0 deletions
30
ppr-ui/src/components/registration/securities-act-notices/AddEditCourtOrder.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<template> | ||
<FormCard | ||
id="add-edit-court-order" | ||
:label="`${addEditLabel} Court Order`" | ||
:class="{ 'border-error-left' : false }" | ||
> | ||
<template #formSlot /> | ||
</FormCard> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { computed } from 'vue' | ||
import { FormCard } from '@/components/common' | ||
/** Props **/ | ||
const props = withDefaults(defineProps<{ | ||
isEditing?: boolean, | ||
courtOrder?: any | ||
}>(), { | ||
isEditing: false, | ||
courtOrder: null | ||
}) | ||
/** Local Properties **/ | ||
const addEditLabel = computed(() => props.isEditing ? 'Edit' : 'Add') | ||
</script> | ||
<style lang="scss" scoped> | ||
@import '@/assets/styles/theme'; | ||
</style> |
142 changes: 142 additions & 0 deletions
142
ppr-ui/src/components/registration/securities-act-notices/AddEditNotice.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
<template> | ||
<FormCard | ||
id="add-edit-notice" | ||
:label="`${addEditLabel} Notice`" | ||
:class="{ 'border-error-left' : isInvalidAddEditNotice }" | ||
> | ||
<template #formSlot> | ||
<!-- Validation Error message --> | ||
<p | ||
v-if="isInvalidAddEditNotice" | ||
class="error-text mt-1 mb-3 fs-12" | ||
> | ||
Indicate if the there is a Notice of Lien or Proceedings | ||
</p> | ||
|
||
<v-form | ||
id="notice-form" | ||
ref="noticeFormRef" | ||
v-model="isFormValid" | ||
> | ||
<!-- Notice Type Selector --> | ||
<v-row | ||
noGutters | ||
class="justify-end" | ||
> | ||
<v-col> | ||
<v-radio-group | ||
id="notice-type-options" | ||
v-model="noticeType" | ||
class="mt-0 pr-1" | ||
inline | ||
hideDetails="true" | ||
:rules="required('')" | ||
> | ||
<v-radio | ||
id="lien-option" | ||
class="radio-one" | ||
:class="{'selected-radio': noticeType === SaNoticeTypes.NOTICE_OF_LIEN}" | ||
label="Lien" | ||
:value="SaNoticeTypes.NOTICE_OF_LIEN" | ||
/> | ||
<v-radio | ||
id="proceedings-option" | ||
class="radio-two" | ||
:class="{'selected-radio': noticeType === SaNoticeTypes.NOTICE_OF_PROCEEDINGS}" | ||
label="Proceedings" | ||
:value="SaNoticeTypes.NOTICE_OF_PROCEEDINGS" | ||
/> | ||
</v-radio-group> | ||
|
||
<InputFieldDatePicker | ||
class="mt-8 mr-3" | ||
:title="'Effective Date (Optional)'" | ||
:initialValue="effectiveDate" | ||
@emitCancel="effectiveDate = ''" | ||
@emitDate="effectiveDate = $event" | ||
/> | ||
</v-col> | ||
</v-row> | ||
|
||
<!-- Actions --> | ||
<v-row | ||
noGutters | ||
class="justify-end mt-5 mr-3" | ||
> | ||
<v-btn | ||
id="cancel-add-edit-notice" | ||
class="mr-3 px-5 font-weight-bold" | ||
variant="outlined" | ||
@click="emits('cancel')" | ||
> | ||
Cancel | ||
</v-btn> | ||
<v-btn | ||
id="submit-add-edit-notice" | ||
class="px-5 font-weight-bold" | ||
@click="submitAddEditNotice()" | ||
> | ||
Done | ||
</v-btn> | ||
</v-row> | ||
</v-form> | ||
</template> | ||
</FormCard> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { computed, ref } from 'vue' | ||
import { FormCard, InputFieldDatePicker } from '@/components/common' | ||
import { AddEditSaNoticeIF, FormIF } from '@/interfaces' | ||
import { SaNoticeTypes } from '@/enums' | ||
import { useInputRules } from '@/composables' | ||
/** Composables **/ | ||
const { required } = useInputRules() | ||
/** Refs **/ | ||
const noticeFormRef: FormIF = ref(null) | ||
/** Emits **/ | ||
const emits = defineEmits<{ | ||
cancel: [value: boolean] | ||
done: [value: AddEditSaNoticeIF] | ||
}>() | ||
/** Props **/ | ||
const props = withDefaults(defineProps<{ | ||
isEditing?: boolean, | ||
notice?: AddEditSaNoticeIF | ||
}>(), { | ||
isEditing: false, | ||
notice: null | ||
}) | ||
/** Local Properties **/ | ||
const validateAddEditNotice = ref(false) | ||
const isFormValid = ref(false) | ||
const noticeType = ref(props.notice?.noticeType || null) | ||
const effectiveDate = ref(props.notice?.effectiveDate || '') | ||
const addEditLabel = computed(() => props.isEditing ? 'Edit' : 'Add') | ||
const isInvalidAddEditNotice = computed( () => { | ||
return validateAddEditNotice.value && !isFormValid.value | ||
}) | ||
/** Local Functions **/ | ||
const submitAddEditNotice = async () => { | ||
validateAddEditNotice.value = true | ||
await noticeFormRef.value.validate() | ||
if(isFormValid.value) { | ||
emits('done', { | ||
noticeType: noticeType.value, | ||
effectiveDate: effectiveDate.value | ||
}) | ||
} | ||
} | ||
</script> | ||
<style lang="scss" scoped> | ||
@import '@/assets/styles/theme'; | ||
</style> |
Oops, something went wrong.