Skip to content

Commit

Permalink
Merge pull request #718 from Christopher-Tihor/support-develop
Browse files Browse the repository at this point in the history
EMCRI-478: Don't display invoice decision until its claim has reached…
  • Loading branch information
GeorgeWalker authored Jan 6, 2025
2 parents f5a4c87 + 6485d01 commit 22a85c7
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 88 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> = new EventEmitter<string>();
public changeDisableFileUpload: EventEmitter<string> = new EventEmitter<string>();
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion dfa-public/src/UI/embc-dfa/src/app/models/decision.enum.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export enum Decision {
Approved = 'Approved',
ApprovedWithExclusions = 'Approved with Exclusions',
ApprovedWithExclusions = 'Approved with exclusions',
Ineligible = 'Ineligible',
Withdrawn = 'Withdrawn',
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,29 +169,32 @@
</td>
</ng-container>


<!-- EMCR Approved Amount -->
<ng-container matColumnDef="emcrApprovedAmount" *ngIf="vieworedit == 'viewOnly' || vieworedit == 'view'">
<th mat-header-cell *matHeaderCellDef style="width:17%">
<b>EMCR Approved Amount</b>
</th>
<td *matCellDef="let element" mat-cell>
$&nbsp;{{ element.emcrApprovedAmount | number : '1.2-2'}}
</td>
</ng-container>
<ng-container matColumnDef="emcrApprovedAmount" *ngIf="(vieworedit == 'viewOnly' || vieworedit == 'view')">
<th mat-header-cell *matHeaderCellDef style="width:17%">
<b>EMCR Approved Amount</b>
</th>
<td *matCellDef="let element" mat-cell>
<div *ngIf="claimDecision == DecisionEnum.Approved || claimDecision == DecisionEnum.ApprovedWithExclusions">
$&nbsp;{{ element.emcrApprovedAmount | number : '1.2-2'}}
</div>
</td>
</ng-container>

<!-- EMCR Comments -->
<ng-container matColumnDef="emcrComments" *ngIf="vieworedit == 'viewOnly' || vieworedit == 'view'">
<th mat-header-cell *matHeaderCellDef style="width:10%">
<b>EMCR Comments</b>
</th>
<td *matCellDef="let element" mat-cell>
<span (click)="viewEMCRComment(element, index)" class="material-symbols-outlined setViewIcon"
>
chat_bubble
</span>
</td>
</ng-container>
<th mat-header-cell *matHeaderCellDef style="width:10%">
<b>EMCR Comments</b>
</th>
<td *matCellDef="let element" mat-cell>
<span (click)="viewEMCRComment(element, index)" class="material-symbols-outlined setViewIcon"
*ngIf="claimDecision == DecisionEnum.Approved || claimDecision == DecisionEnum.ApprovedWithExclusions">
chat_bubble
</span>
</td>
</ng-container>

<!-- View Invoices -->
<ng-container matColumnDef="viewInvoice" *ngIf="vieworedit == 'viewOnly' || vieworedit == 'view'">
<th mat-header-cell *matHeaderCellDef style="width:10%">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
[matTooltip]="message || ''">
<span class="ques">?</span>&nbsp; HELP
</button>

<!--<mat-form-field class="example-user-input">
<mat-label>Tooltip message</mat-label>
<input style="display:none" value="test test test value" matInput [formControl]="message">
Expand All @@ -26,77 +27,75 @@
<div class="row">
<div class="col-md-6">
<div class="row" *ngIf="isReadOnly === true">
<div class="col-md-6">
<p style="font-size: 15px">
EMCR Decision
</p>
<mat-form-field appearance="outline">
<input
#emcrDecision
formControlName="emcrDecision"
matInput />
</mat-form-field>
</div>

<div class="col-md-6">
<p style="font-size: 15px;">
EMCR Approved Amount
</p>
<mat-form-field appearance="outline" class="mat-form-round">

<div class="searchDiv">
<input
#currencyBoxemcrApprovedAmount
id="currencyBoxemcrApprovedAmount"
formControlName="emcrApprovedAmount"
matInput />
<span class="currencyText">CA$</span>
</div>

</mat-form-field>
</div>
</div>
<div *ngIf="claimDecision == DecisionEnum.Approved || claimDecision == DecisionEnum.ApprovedWithExclusions">
<div class="col-md-6">
<p style="font-size: 15px">
EMCR Decision
</p>
<mat-form-field appearance="outline">
<input
#emcrDecision
formControlName="emcrDecision"
matInput />
</mat-form-field>
</div>

<div class="row" *ngIf="isReadOnly === true">
<div class="col-md-6">
<p style="font-size: 15px">
EMCR Decision Date
</p>
<mat-form-field appearance="outline" >
<input matInput
[matDatepicker]="emcrDecisionDatePicker"
[readonly]="isReadOnly === true"
formControlName="emcrDecisionDate"
>
<mat-hint *ngIf="isReadOnly !== true">MM/DD/YYYY</mat-hint>
<mat-datepicker-toggle matSuffix [for]="emcrDecisionDatePicker" [disabled]="isReadOnly === true"
></mat-datepicker-toggle>
<mat-datepicker #emcrDecisionDatePicker [disabled]="isReadOnly === true"
></mat-datepicker>

</mat-form-field>
</div>
</div>
<div class="col-md-6">
<p style="font-size: 15px;">
EMCR Approved Amount
</p>
<mat-form-field appearance="outline" class="mat-form-round">
<div class="searchDiv">
<input
#currencyBoxemcrApprovedAmount
id="currencyBoxemcrApprovedAmount"
formControlName="emcrApprovedAmount"
matInput />
<span class="currencyText">CA$</span>
</div>
</mat-form-field>
</div>

<div class="row" *ngIf="isReadOnly === true">
<p style="font-size: 15px">
EMCR Decision Comments
</p>
<div class="col-md-12">
<mat-form-field appearance="outline">
<textarea [disabled]="isReadOnly" matInput
formControlName="emcrDecisionComments"
style="resize:none"
cdkTextareaAutosize
#autosize="cdkTextareaAutosize"
cdkAutosizeMinRows="2"
cdkAutosizeMaxRows="5"></textarea>

</mat-form-field>

<br/>
<div class="row" *ngIf="isReadOnly === true">
<div class="col-md-6">
<p style="font-size: 15px">
EMCR Decision Date
</p>
<mat-form-field appearance="outline" >
<input matInput
[matDatepicker]="emcrDecisionDatePicker"
[readonly]="isReadOnly === true"
formControlName="emcrDecisionDate"
>
<mat-hint *ngIf="isReadOnly !== true">MM/DD/YYYY</mat-hint>
<mat-datepicker-toggle matSuffix [for]="emcrDecisionDatePicker" [disabled]="isReadOnly === true"
></mat-datepicker-toggle>
<mat-datepicker #emcrDecisionDatePicker [disabled]="isReadOnly === true"
></mat-datepicker>
</mat-form-field>
</div>
</div>

<div class="row" *ngIf="isReadOnly === true">
<p style="font-size: 15px">
EMCR Decision Comments
</p>
<div class="col-md-12">
<mat-form-field appearance="outline">
<textarea [disabled]="isReadOnly" matInput
formControlName="emcrDecisionComments"
style="resize:none"
cdkTextareaAutosize
#autosize="cdkTextareaAutosize"
cdkAutosizeMinRows="2"
cdkAutosizeMaxRows="5"></textarea>
</mat-form-field>
<br/>
</div>
</div>
</div>
</div>

<hr class="hr-align" *ngIf="isReadOnly === true" />
<div class="row">
<div class="col-md-12">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import { MAT_TOOLTIP_DEFAULT_OPTIONS, MatTooltipDefaultOptions } from '@angular/
import { DFAClaimMainDataService } from '../../../../feature-components/dfa-claim-main/dfa-claim-main-data.service';
import { Invoice } from '../../../../core/model/dfa-invoice.model';
import { DFAClaimMainMappingService } from '../../../../feature-components/dfa-claim-main/dfa-claim-main-mapping.service';
import { Decision } from 'src/app/models/decision.enum';

export const myCustomTooltipDefaults: MatTooltipDefaultOptions = {
showDelay: 0,
Expand Down Expand Up @@ -89,6 +90,9 @@ export default class InvoiceComponent implements OnInit, OnDestroy {
/\d/
];

claimDecision: string = "";
DecisionEnum = Decision;

constructor(
//@Inject('formBuilder') formBuilder: UntypedFormBuilder,
//@Inject('formCreationService') formCreationService: FormCreationService,
Expand Down Expand Up @@ -155,6 +159,7 @@ export default class InvoiceComponent implements OnInit, OnDestroy {
ngOnInit(): void {
var passData = this.data;
var objInvData = passData.content;

if (!objInvData) {
this.formCreationService.clearInvoiceData();
}
Expand All @@ -163,6 +168,10 @@ export default class InvoiceComponent implements OnInit, OnDestroy {
this.invoiceId = passData.invoiceId;
}

if (passData.claimDecision){
this.claimDecision = passData.claimDecision;
}

this.invoiceForm$ = this.formCreationService
.getInvoiceForm()
.subscribe((invoice) => {
Expand Down

0 comments on commit 22a85c7

Please sign in to comment.