Skip to content

Commit

Permalink
Merge pull request #587 from bcgov/ccfri-4026-facility-panel-issue
Browse files Browse the repository at this point in the history
CCFRI-4026 - MYCCS Portal- Cannot expand second facility info in Summ…
  • Loading branch information
MaelCormier-CGI authored Nov 29, 2024
2 parents 049fe5b + bd8295a commit 93fb7f7
Showing 1 changed file with 141 additions and 95 deletions.
236 changes: 141 additions & 95 deletions frontend/src/components/SummaryDeclaration.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<v-card-title class="rounded-t-lg pt-3 pb-3 card-title" style="color: #003466"> Summary </v-card-title>
</v-col>
</v-row>
<v-expansion-panels v-model="expand" multiple variant="accordion">
<v-expansion-panels v-model="expand['global']" multiple variant="accordion">
<v-row v-if="isMainLoading">
<v-col>
<v-skeleton-loader
Expand Down Expand Up @@ -107,96 +107,134 @@
/>

<div v-else>
<v-expansion-panel v-if="facility?.facilityInfo" variant="accordion" value="facility-information">
<FacilityInformationSummary
:facility-info="facility?.facilityInfo"
:funding="facility?.funding"
:facility-id="facility.facilityId"
:ccfri-status="facility?.ccfri?.ccfriOptInStatus"
:ecewe-status="facility?.ecewe?.optInOrOut"
:license-categories="facility?.licenseCategories"
:provider-type="summaryModel?.application?.organizationProviderType"
:change-rec-guid="facility?.changeRequestId"
:program-year-id="summaryModel?.application?.programYearId"
@is-summary-valid="isFormComplete"
/>
</v-expansion-panel>
<v-expansion-panel variant="accordion" value="ccof-summary">
<div v-if="!facility.funding || isRenewal" />
<div v-else>
<CCOFSummaryFamily
v-if="
summaryModel?.application?.organizationProviderType === ORGANIZATION_PROVIDER_TYPES.FAMILY
"
:funding="facility.funding"
<v-expansion-panels v-model="expand[facility.facilityId]" multiple>
<v-expansion-panel
v-if="facility?.facilityInfo"
:key="`${facility.facilityId}-facility-information`"
:value="`${facility.facilityId}-facility-information`"
variant="accordion"
>
<FacilityInformationSummary
:facility-info="facility?.facilityInfo"
:funding="facility?.funding"
:facility-id="facility.facilityId"
:ccfri-status="facility?.ccfri?.ccfriOptInStatus"
:ecewe-status="facility?.ecewe?.optInOrOut"
:license-categories="facility?.licenseCategories"
:provider-type="summaryModel?.application?.organizationProviderType"
:change-rec-guid="facility?.changeRequestId"
:program-year-id="summaryModel?.application?.programYearId"
@is-summary-valid="isFormComplete"
/>
<CCOFSummary
v-else
:funding="facility.funding"
</v-expansion-panel>
<v-expansion-panel
:key="`${facility.facilityId}-ccof-summary`"
:value="`${facility.facilityId}-ccof-summary`"
variant="accordion"
>
<div v-if="!facility.funding || isRenewal" />
<div v-else>
<CCOFSummaryFamily
v-if="
summaryModel?.application?.organizationProviderType === ORGANIZATION_PROVIDER_TYPES.FAMILY
"
:funding="facility.funding"
:facility-id="facility.facilityId"
:program-year-id="summaryModel?.application?.programYearId"
@is-summary-valid="isFormComplete"
/>
<CCOFSummary
v-else
:funding="facility.funding"
:facility-id="facility.facilityId"
:change-rec-guid="facility.changeRequestId"
:program-year-id="summaryModel?.application?.programYearId"
@is-summary-valid="isFormComplete"
/>
</div>
</v-expansion-panel>
<v-expansion-panel
:key="`${facility.facilityId}-ccfri-summary`"
:value="`${facility.facilityId}-ccfri-summary`"
variant="accordion"
>
<CCFRISummary
:ccfri="facility?.ccfri"
:facility-id="facility.facilityId"
:change-rec-guid="facility?.changeRequestId"
:program-year-id="summaryModel?.application?.programYearId"
@is-summary-valid="isFormComplete"
/>
</v-expansion-panel>
<v-expansion-panel
v-if="facility?.rfiApp"
:key="`${facility.facilityId}-rfi-summary`"
:value="`${facility.facilityId}-rfi-summary`"
variant="accordion"
>
<RFISummary
:rfi-app="facility?.rfiApp"
:ccfri-id="facility?.ccfri?.ccfriId"
:facility-id="facility.facilityId"
:change-rec-guid="facility?.changeRequestId"
:program-year-id="summaryModel?.application?.programYearId"
@is-summary-valid="isFormComplete"
/>
</v-expansion-panel>
<v-expansion-panel
v-if="facility?.nmfApp"
:key="`${facility.facilityId}-nmf-summary`"
:value="`${facility.facilityId}-nmf-summary`"
variant="accordion"
>
<NMFSummary
:nmf-app="facility?.nmfApp"
:ccfri-id="facility?.ccfri?.ccfriId"
:facility-id="facility.facilityId"
:change-rec-guid="facility?.changeRequestId"
:program-year-id="summaryModel?.application?.programYearId"
@is-summary-valid="isFormComplete"
/>
</v-expansion-panel>
<v-expansion-panel
v-if="facility?.ccfri?.enableAfs"
:key="`${facility.facilityId}-afs-summary`"
:value="`${facility.facilityId}-afs-summary`"
variant="accordion"
>
<AFSSummary
:ccfri-id="facility?.ccfri?.ccfriId"
:facility-id="facility?.facilityId"
:program-year-id="summaryModel?.application?.programYearId"
@is-summary-valid="isFormComplete"
/>
</v-expansion-panel>
<v-expansion-panel
:key="`${facility.facilityId}-ecewe-summary-a`"
:value="`${facility.facilityId}-ecewe-summary-a`"
variant="accordion"
>
<ECEWESummary
:ecewe="{}"
:ecewe-facility="facility.ecewe"
:is-processing="isProcessing"
:change-rec-guid="facility.changeRequestId"
:program-year-id="summaryModel?.application?.programYearId"
@is-summary-valid="isFormComplete"
/>
</div>
</v-expansion-panel>
<v-expansion-panel variant="accordion" value="ccfri-summary">
<CCFRISummary
:ccfri="facility?.ccfri"
:facility-id="facility.facilityId"
:change-rec-guid="facility?.changeRequestId"
:program-year-id="summaryModel?.application?.programYearId"
@is-summary-valid="isFormComplete"
/>
</v-expansion-panel>
<v-expansion-panel v-if="facility?.rfiApp" variant="accordion" value="rfi-summary">
<RFISummary
:rfi-app="facility?.rfiApp"
:ccfri-id="facility?.ccfri?.ccfriId"
:facility-id="facility.facilityId"
:change-rec-guid="facility?.changeRequestId"
:program-year-id="summaryModel?.application?.programYearId"
@is-summary-valid="isFormComplete"
/>
</v-expansion-panel>
<v-expansion-panel v-if="facility?.nmfApp" variant="accordion" value="nmf-summary">
<NMFSummary
:nmf-app="facility?.nmfApp"
:ccfri-id="facility?.ccfri?.ccfriId"
:facility-id="facility.facilityId"
:change-rec-guid="facility?.changeRequestId"
:program-year-id="summaryModel?.application?.programYearId"
@is-summary-valid="isFormComplete"
/>
</v-expansion-panel>
<v-expansion-panel v-if="facility?.ccfri?.enableAfs" variant="accordion" value="afs-summary">
<AFSSummary
:ccfri-id="facility?.ccfri?.ccfriId"
:facility-id="facility?.facilityId"
:program-year-id="summaryModel?.application?.programYearId"
@is-summary-valid="isFormComplete"
/>
</v-expansion-panel>
<v-expansion-panel variant="accordion" value="ecewe-summary-a">
<ECEWESummary
:ecewe="{}"
:ecewe-facility="facility.ecewe"
:is-processing="isProcessing"
:change-rec-guid="facility.changeRequestId"
:program-year-id="summaryModel?.application?.programYearId"
@is-summary-valid="isFormComplete"
/>
</v-expansion-panel>
<v-expansion-panel variant="accordion" value="uploaded-documents-summary">
<UploadedDocumentsSummary
:documents="facility.documents"
:program-year-id="summaryModel?.application?.programYearId"
@is-summary-valid="isFormComplete"
/>
</v-expansion-panel>
</v-expansion-panel>
<v-expansion-panel
:key="`${facility.facilityId}-uploaded-documents-summary`"
:value="`${facility.facilityId}-uploaded-documents-summary`"
variant="accordion"
>
<UploadedDocumentsSummary
:documents="facility.documents"
:program-year-id="summaryModel?.application?.programYearId"
@is-summary-valid="isFormComplete"
/>
</v-expansion-panel>
</v-expansion-panels>
</div>
</div>
<div v-if="!isRenewal" class="mt-10">
Expand All @@ -210,7 +248,12 @@
/>
</v-expansion-panel>
</div>
<v-expansion-panel v-if="hasChangeNotificationFormDocuments" variant="accordion" class="mt-10">
<v-expansion-panel
v-if="hasChangeNotificationFormDocuments"
variant="accordion"
value="change-notification-form-summary"
class="mt-10"
>
<ChangeNotificationFormSummary
:change-notification-form-documents="summaryModel?.changeNotificationFormDocuments"
@is-summary-valid="isFormComplete"
Expand Down Expand Up @@ -848,18 +891,21 @@ export default {
this.updateNavBarStatus(formObj, isComplete);
},
expandAllPanels() {
this.expand = [
'organization-summary',
'facility-information',
'ccof-summary',
'ccfri-summary',
'rfi-summary',
'nmf-summary',
'afs-summary',
'ecewe-summary-a',
'ecewe-summary-b',
'uploaded-documents-summary',
];
this.summaryModel.facilities.forEach((facility) => {
const facilityId = facility.facilityId;
this.expand[facilityId] = [
`${facilityId}-facility-information`,
`${facilityId}-ccof-summary`,
`${facilityId}-ccfri-summary`,
`${facilityId}-rfi-summary`,
`${facilityId}-nmf-summary`,
`${facilityId}-afs-summary`,
`${facilityId}-ecewe-summary-a`,
`${facilityId}-uploaded-documents-summary`,
];
});
this.expand['global'] = ['organization-summary', 'ecewe-summary-b', 'change-notification-form-summary'];
},
updateNavBarStatus(formObj, isComplete) {
if (formObj && !this.isReadOnly) {
Expand Down

0 comments on commit 93fb7f7

Please sign in to comment.