Skip to content

Commit

Permalink
Merge pull request #556 from bcgov/ccfri-3632-licence-add-facilityid
Browse files Browse the repository at this point in the history
CCCFRI-3632, CCFRI-3678, CCFRI-3820 - bug fix and add facilityId to Licence Upload and NavBar
  • Loading branch information
vietle-cgi authored Oct 30, 2024
2 parents 5668ca8 + 2b96e49 commit 5ce1b38
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 12 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/LandingPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
</ul>
<v-card v-if="ccofStatus === CCOF_STATUS_NEW" color="#B3E5FF" class="mt-1 pa-1 py-2 mb-4" border="md">
<v-row align="center" no-gutters>
<v-col :cols="12" md="3" lg="2" xl="1" align="center">
<v-col cols="2" sm="1" align="center">
<v-icon color="#003366" aria-hidden="false" size="40"> mdi-information </v-icon>
</v-col>
<v-col :cols="12" md="9" lg="10" xl="11" class="px-2 py-1">
<v-col cols="10" sm="11" class="px-0 px-sm-2 py-1">
<div v-html="item.body" />
</v-col>
</v-row>
Expand Down
17 changes: 14 additions & 3 deletions frontend/src/components/ccofApplication/group/LicenseUpload.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-container align="center">
<v-container class="px-xl-12">
<v-form ref="form" v-model="isValidForm">
<div align="center">
<v-card v-if="isSomeChangeRequestActive() && isLocked && !isChangeRequest" class="my-10">
Expand All @@ -12,7 +12,7 @@
</v-card-text>
</v-card>
</div>
<v-card width="1200" class="cc-top-level-card">
<v-card class="cc-top-level-card">
<v-card-title class="text-center text-wrap pb-0">
<h3>
Licence Upload
Expand All @@ -30,6 +30,8 @@
:items="licenseUploadData"
hide-default-footer
:items-per-page="-1"
:mobile="null"
mobile-breakpoint="md"
class="pa-4"
>
<template #item.document="{ item }">
Expand Down Expand Up @@ -112,17 +114,26 @@ export default {
{
title: 'Facility Name',
value: 'facilityName',
sortable: true,
width: '30%',
},
{
title: 'Facility ID',
value: 'facilityAccountNumber',
sortable: false,
width: '20%',
},
{
title: 'Facility Licence Number',
value: 'licenseNumber',
sortable: false,
width: '20%',
},
{
title: 'Upload Licence',
value: 'document',
sortable: false,
width: '30%',
},
],
fileAccept: [
Expand Down Expand Up @@ -276,7 +287,6 @@ export default {
await this.processLicenseFileDelete();
if (this.fileMap.size > 0) {
await this.processLicenseFilesSave();
this.fileMap.clear(); // clear the map.
}
if (this.isChangeRequest) {
this.setCRIsLicenseComplete({ changeRequestId: this.changeRequestId, isComplete: !this.nextButtonDisabled });
Expand All @@ -293,6 +303,7 @@ export default {
console.error(e);
this.setFailureAlert('An error occurred while saving. Please try again later.');
} finally {
this.fileMap.clear(); // clear the map.
this.isProcessing = false;
}
},
Expand Down
27 changes: 20 additions & 7 deletions frontend/src/components/util/NavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@
<div>
{{ subItem.subTitle }}
</div>
<div v-if="subItem.subTitle2">
{{ subItem.subTitle2 }}
</div>
</v-list-item-title>
</v-list-item>
</v-list-group>
Expand Down Expand Up @@ -191,15 +194,13 @@ export default {
watch: {
navRefresh: {
handler() {
console.log('BuildNavBar called - trigged by navRefresh - computed value');
this.buildNavBar();
},
immediate: true,
deep: true,
},
refreshNavBar: {
handler() {
console.log('BuildNavBar called - trigged by navBarRefresh - forced refresh');
this.buildNavBar();
},
immediate: true,
Expand All @@ -209,7 +210,6 @@ export default {
methods: {
...mapActions(useNavBarStore, ['setNavBarItems', 'setCanSubmit']),
setActive(item) {
this.items[1].expanded = false;
let index = this.items.findIndex((obj) => obj.title === item.title);
if (item.active) {
this.items[index].active = false;
Expand Down Expand Up @@ -421,6 +421,7 @@ export default {
items.push({
title: 'Parent Fees',
subTitle: item.facilityName,
subTitle2: item.facilityAccountNumber,
id: item.facilityId,
link: {
name: 'change-request-ccfri-add-fees-guid',
Expand All @@ -438,6 +439,7 @@ export default {
items.push({
title: 'Parent Fee Increase – RFI',
subTitle: item.facilityName,
subTitle2: item.facilityAccountNumber,
id: item.facilityId,
link: {
name: 'change-request-ccfri-request-info',
Expand All @@ -456,6 +458,7 @@ export default {
items.push({
title: 'Parent Fee - RFI',
subTitle: item.facilityName,
subTitle2: item.facilityAccountNumber,
id: item.facilityId,
link: {
name: 'change-request-new-facilities',
Expand Down Expand Up @@ -503,6 +506,7 @@ export default {
items.push({
title: 'Parent Fees',
subTitle: item.facilityName,
subTitle2: item.facilityAccountNumber,
id: item.facilityId,
link: {
name:
Expand All @@ -523,6 +527,7 @@ export default {
items.push({
title: 'Parent Fees',
subTitle: item.facilityName,
subTitle2: item.facilityAccountNumber,
id: item.facilityId,
link: { name: 'ccfri-add-fees-guid', params: { urlGuid: item.ccfriApplicationId } },
isAccessible: this.applicationStatus === 'SUBMITTED' ? true : this.isCCFRIOptInComplete(),
Expand All @@ -537,6 +542,7 @@ export default {
items.push({
title: 'Parent Fee Increase – RFI',
subTitle: item.facilityName,
subTitle2: item.facilityAccountNumber,
id: item.facilityId,
link: { name: 'ccfri-request-info', params: { urlGuid: item.ccfriApplicationId } },
isAccessible: true,
Expand All @@ -551,6 +557,7 @@ export default {
items.push({
title: 'Parent Fee - RFI',
subTitle: item.facilityName,
subTitle2: item.facilityAccountNumber,
id: item.facilityId,
link: { name: 'new-facilities', params: { urlGuid: item.ccfriApplicationId } },
isAccessible: true,
Expand Down Expand Up @@ -589,7 +596,8 @@ export default {
items.push(
{
title: 'Eligibility',
subTitle: this.navBarList[0].facilityName,
subTitle: this.navBarList[0]?.facilityName,
subTitle2: this.navBarList[0]?.facilityAccountNumber,
id: this.navBarList[0].facilityId,
link: { name: 'Eligibility GUID', params: { urlGuid: this.navBarList[0].facilityId } },
isAccessible: true,
Expand All @@ -601,7 +609,8 @@ export default {
},
{
title: 'Funding',
subTitle: this.navBarList[0].facilityName,
subTitle: this.navBarList[0]?.facilityName,
subTitle2: this.navBarList[0]?.facilityAccountNumber,
link: { name: 'FamilyFunding GUID', params: { urlGuid: this.navBarList[0].ccofBaseFundingId } },
isAccessible: true,
icon: this.getCheckbox(this.navBarList[0].isCCOFComplete),
Expand Down Expand Up @@ -756,6 +765,7 @@ export default {
items.push({
title: 'Parent Fee Verification',
subTitle: item.facilityName,
subTitle2: item.facilityAccountNumber,
id: item.facilityId,
link: {
name: 'CCFRI Fee Verification',
Expand All @@ -776,6 +786,7 @@ export default {
items.push({
title: 'Parent Fee Increase – RFI',
subTitle: item.facilityName,
subTitle2: item.facilityAccountNumber,
id: item.facilityId,
link: {
name: 'mtfi-change-request-ccfri-request-info',
Expand Down Expand Up @@ -804,13 +815,13 @@ export default {
},
getAddNewFacilityCCOFNavigation() {
let items = [];
console.log('changeRecGuid::::::::', this.$route.params.changeRecGuid);
if (this.navBarList?.length > 0) {
this.navBarList?.forEach((item) => {
items.push(
{
title: 'Facility',
subTitle: item.facilityName,
subTitle2: item.facilityAccountNumber,
id: item.facilityId,
link: {
name: 'change-request-facility-information-guid',
Expand All @@ -824,10 +835,10 @@ export default {
position: positionIndex++,
navBarId: navBarId++,
},
//funding doesn't work right, wait until Viet is done integration before trying again
{
title: 'Funding',
subTitle: item.facilityName,
subTitle2: item.facilityAccountNumber,
link: {
name: 'change-request-funding-guid',
params: { changeRecGuid: this.$route.params.changeRecGuid, urlGuid: item.ccofBaseFundingId },
Expand Down Expand Up @@ -876,6 +887,7 @@ export default {
{
title: 'Facility',
subTitle: item.facilityName,
subTitle2: item.facilityAccountNumber,
id: item.facilityId,
link: { name: 'Facility Information Guid', params: { urlGuid: item.facilityId } },
isAccessible: true,
Expand All @@ -888,6 +900,7 @@ export default {
{
title: 'Funding',
subTitle: item.facilityName,
subTitle2: item.facilityAccountNumber,
link: { name: 'Funding Amount Guid', params: { urlGuid: item.ccofBaseFundingId } },
isAccessible: true,
icon: this.getCheckbox(item.isCCOFComplete),
Expand Down

0 comments on commit 5ce1b38

Please sign in to comment.