Skip to content

Commit

Permalink
EMBCESSMOD-5596 - Shelter Allowance Support Creation Updates - per-po…
Browse files Browse the repository at this point in the history
…pulated Payee Name
  • Loading branch information
Timaqt authored and Timaqt committed Jul 4, 2024
1 parent dc2e8da commit 2106030
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
<div [formGroup]="detailsForm">
<div class="information-notes">
<div class="row">
<div class="col-md-12">
<p class="primary-paragraph">
<b>Important information about Shelter Allowance referral</b>
<br />
<li>Support is provided by cheque issued to the evacuee</li>
<li>
It can take 6-8 weeks to receive payment/cheque from the date the Referral<br />
form is received by EMCR
</li>
</p>
</div>
</div>
</div>

<div class="row">
<div class="col-md-12">
<p class="question-heading">Payee Details</p>
Expand All @@ -7,23 +23,16 @@

<div class="row">
<div class="col-md-12">
<p class="bold">Full Name (including middle name if applicable)</p>
<p class="requiredField">Enter the name of the individual to whom reimbursement should be issued.</p>
<p class="bold">Full Name</p>
<p>Name of evacuee to whom cheque will be issued.</p>
</div>
</div>

<div class="row">
<div class="col-md-5">
<mat-form-field appearance="outline">
<mat-label>Full Name</mat-label>
<input formControlName="hostName" maxlength="255" matInput placeholder="Enter Name" autocomplete="off" />
@if (
supportDeliveryFormControl?.hostName.invalid &&
supportDeliveryFormControl?.hostName.hasError('whitespaceError')
) {
<mat-error class="custom-mat-error"> Full Name is required</mat-error>
}
</mat-form-field>
<p class="question-heading bold">
<input formControlName="hostName" autocomplete="off" style="border: none" />
</p>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,15 @@
color: #234075;
font-size: 21px;
}
.information-notes {
background-color: rgba(35, 64, 117, 1);
width: 41%;
color: white;
margin-top: 20px;
padding: 20px;
margin-bottom: 40px;
}
.primary-paragraph {
margin-top: 10px;
margin-bottom: 10px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { IMaskDirective } from 'angular-imask';

import { MatInput } from '@angular/material/input';
import { MatFormField, MatLabel, MatError } from '@angular/material/form-field';
import { AppBaseService } from 'src/app/core/services/helper/appBase.service';

@Component({
selector: 'app-shelter-allowance-delivery',
Expand All @@ -20,7 +21,7 @@ export class ShelterAllowanceDeliveryComponent implements OnInit, OnChanges {

readonly phoneMask = globalConst.phoneMask;

constructor() {}
constructor(public appBaseService: AppBaseService) {}

ngOnInit(): void {
this.detailsForm
Expand All @@ -36,6 +37,15 @@ export class ShelterAllowanceDeliveryComponent implements OnInit, OnChanges {
.subscribe((value) => {
this.detailsForm.get('hostPhone').updateValueAndValidity();
});

this.detailsForm
.get('hostName')
.setValue(
this.appBaseService?.appModel?.selectedEssFile?.primaryRegistrantLastName +
' ' +
this.appBaseService?.appModel?.selectedEssFile?.primaryRegistrantFirstName
);
this.detailsForm.get('hostName').disable();
}

ngOnChanges(changes: SimpleChanges): void {
Expand Down

0 comments on commit 2106030

Please sign in to comment.