From 6485d01af9094ead8575f8413c2bbfe24b97f58f Mon Sep 17 00:00:00 2001 From: Chris Tihor Date: Fri, 3 Jan 2025 16:29:50 -0800 Subject: [PATCH] EMCRI-478: Don't display invoice decision until its claim has reached a decision --- .../dfa-claim-main-data.service.ts | 16 +++ .../embc-dfa/src/app/models/decision.enum.ts | 2 +- .../claim/claim.component.ts | 5 + .../dfa-invoice-dashboard.component.html | 41 +++--- .../dfa-invoice-dashboard.component.ts | 9 +- .../invoice/invoice.component.html | 133 +++++++++--------- .../invoice/invoice.component.ts | 9 ++ 7 files changed, 127 insertions(+), 88 deletions(-) diff --git a/dfa-public/src/UI/embc-dfa/src/app/feature-components/dfa-claim-main/dfa-claim-main-data.service.ts b/dfa-public/src/UI/embc-dfa/src/app/feature-components/dfa-claim-main/dfa-claim-main-data.service.ts index 680fdaf99..b124049cf 100644 --- a/dfa-public/src/UI/embc-dfa/src/app/feature-components/dfa-claim-main/dfa-claim-main-data.service.ts +++ b/dfa-public/src/UI/embc-dfa/src/app/feature-components/dfa-claim-main/dfa-claim-main-data.service.ts @@ -22,6 +22,8 @@ export class DFAClaimMainDataService { private _stepselected: string; private _isdisabled: string; private _editstep: string; + private _stage: string; + private _claimDecision: string; private _requiredDocuments = []; public changeViewOrEdit: EventEmitter = new EventEmitter(); public changeDisableFileUpload: EventEmitter = new EventEmitter(); @@ -196,6 +198,20 @@ export class DFAClaimMainDataService { public getEditStep(): string { return this._editstep; } + + public setStage(stage: string): void { + this._stage = stage; + } + public getStage(): string { + return this._stage; + } + + public setClaimDecision(claimDecision: string): void { + this._claimDecision = claimDecision; + } + public getClaimDecision(): string { + return this._claimDecision; + } public createDFAClaimMainDTO(): DfaClaimMain { return { diff --git a/dfa-public/src/UI/embc-dfa/src/app/models/decision.enum.ts b/dfa-public/src/UI/embc-dfa/src/app/models/decision.enum.ts index f63f6dca4..f41b83e34 100644 --- a/dfa-public/src/UI/embc-dfa/src/app/models/decision.enum.ts +++ b/dfa-public/src/UI/embc-dfa/src/app/models/decision.enum.ts @@ -1,6 +1,6 @@ export enum Decision { Approved = 'Approved', - ApprovedWithExclusions = 'Approved with Exclusions', + ApprovedWithExclusions = 'Approved with exclusions', Ineligible = 'Ineligible', Withdrawn = 'Withdrawn', } diff --git a/dfa-public/src/UI/embc-dfa/src/app/sharedModules/claim-dashboard-components/claim/claim.component.ts b/dfa-public/src/UI/embc-dfa/src/app/sharedModules/claim-dashboard-components/claim/claim.component.ts index 237398480..d3b52ca98 100644 --- a/dfa-public/src/UI/embc-dfa/src/app/sharedModules/claim-dashboard-components/claim/claim.component.ts +++ b/dfa-public/src/UI/embc-dfa/src/app/sharedModules/claim-dashboard-components/claim/claim.component.ts @@ -109,6 +109,11 @@ export class DfaDashClaimComponent implements OnInit { if (objApp.stage) { objStatItem.stage = objApp.stage; + this.dfaClaimMainDataService.setStage(objApp.stage); + } + + if (objApp.claimDecision) { + this.dfaClaimMainDataService.setClaimDecision(objApp.claimDecision); } objApp.statusColor = objStatItem.statusColor; diff --git a/dfa-public/src/UI/embc-dfa/src/app/sharedModules/forms/dfa-claim-main-forms/dfa-invoice-dashboard/dfa-invoice-dashboard.component.html b/dfa-public/src/UI/embc-dfa/src/app/sharedModules/forms/dfa-claim-main-forms/dfa-invoice-dashboard/dfa-invoice-dashboard.component.html index 128e57190..834ba9aa1 100644 --- a/dfa-public/src/UI/embc-dfa/src/app/sharedModules/forms/dfa-claim-main-forms/dfa-invoice-dashboard/dfa-invoice-dashboard.component.html +++ b/dfa-public/src/UI/embc-dfa/src/app/sharedModules/forms/dfa-claim-main-forms/dfa-invoice-dashboard/dfa-invoice-dashboard.component.html @@ -169,29 +169,32 @@ + - - - EMCR Approved Amount - - - $ {{ element.emcrApprovedAmount | number : '1.2-2'}} - - + + + EMCR Approved Amount + + +
+ $ {{ element.emcrApprovedAmount | number : '1.2-2'}} +
+ +
- - EMCR Comments - - - - chat_bubble - - - - + + EMCR Comments + + + + chat_bubble + + + + diff --git a/dfa-public/src/UI/embc-dfa/src/app/sharedModules/forms/dfa-claim-main-forms/dfa-invoice-dashboard/dfa-invoice-dashboard.component.ts b/dfa-public/src/UI/embc-dfa/src/app/sharedModules/forms/dfa-claim-main-forms/dfa-invoice-dashboard/dfa-invoice-dashboard.component.ts index 87d237d9d..a0bb94015 100644 --- a/dfa-public/src/UI/embc-dfa/src/app/sharedModules/forms/dfa-claim-main-forms/dfa-invoice-dashboard/dfa-invoice-dashboard.component.ts +++ b/dfa-public/src/UI/embc-dfa/src/app/sharedModules/forms/dfa-claim-main-forms/dfa-invoice-dashboard/dfa-invoice-dashboard.component.ts @@ -52,6 +52,7 @@ import { InformationDialogComponent } from '../../../../core/components/dialog-c import { DialogComponent } from '../../../../core/components/dialog/dialog.component'; import { DFAGeneralInfoDialogComponent } from '../../../../core/components/dialog-components/dfa-general-info-dialog/dfa-general-info-dialog.component'; import { CoreModule } from '../../../../core/core.module'; +import { Decision } from 'src/app/models/decision.enum'; export const myCustomTooltipDefaults: MatTooltipDefaultOptions = { showDelay: 0, @@ -113,6 +114,9 @@ export default class DFAInvoiceDashboardComponent implements OnInit, OnDestroy { /\d/ ]; + claimDecision: string = ''; + DecisionEnum = Decision; + constructor( @Inject('formBuilder') formBuilder: UntypedFormBuilder, @Inject('formCreationService') formCreationService: FormCreationService, @@ -147,6 +151,7 @@ export default class DFAInvoiceDashboardComponent implements OnInit, OnDestroy { this.apptype = this.route.snapshot.data["apptype"]; this.vieworedit = dfaClaimMainDataService.getViewOrEdit(); + this.claimDecision = dfaClaimMainDataService.getClaimDecision(); } numericOnly(event): boolean { @@ -520,6 +525,7 @@ export default class DFAInvoiceDashboardComponent implements OnInit, OnDestroy { data: { content: objInvoice, invoiceId: this.dfaClaimMainDataService.getInvoiceId(), + claimDecision: this.dfaClaimMainDataService.getClaimDecision(), header: 'View' }, height: '665px', @@ -545,7 +551,8 @@ export default class DFAInvoiceDashboardComponent implements OnInit, OnDestroy { .open(InvoiceComponent, { data: { content: objInvoice, - invoiceId: this.dfaClaimMainDataService.getInvoiceId() + invoiceId: this.dfaClaimMainDataService.getInvoiceId(), + claimDecision: this.dfaClaimMainDataService.getClaimDecision() }, height: '665px', width: '1200px', diff --git a/dfa-public/src/UI/embc-dfa/src/app/sharedModules/forms/dfa-claim-main-forms/invoice/invoice.component.html b/dfa-public/src/UI/embc-dfa/src/app/sharedModules/forms/dfa-claim-main-forms/invoice/invoice.component.html index 54663d34a..c53767876 100644 --- a/dfa-public/src/UI/embc-dfa/src/app/sharedModules/forms/dfa-claim-main-forms/invoice/invoice.component.html +++ b/dfa-public/src/UI/embc-dfa/src/app/sharedModules/forms/dfa-claim-main-forms/invoice/invoice.component.html @@ -12,6 +12,7 @@ [matTooltip]="message || ''"> ?  HELP +