Files
cbsnexora/src/app/centers/centers-view/center-actions/close-center/close-center.component.html
T

47 lines
1.7 KiB
HTML

<div class="container">
<mat-card>
<form [formGroup]="closeCenterForm" (ngSubmit)="submit()">
<mat-card-content>
<div fxLayout="column">
<mat-form-field (click)="closureDatePicker.open()">
<mat-label>Closed On Date</mat-label>
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="closureDatePicker" required formControlName="closureDate">
<mat-datepicker-toggle matSuffix [for]="closureDatePicker"></mat-datepicker-toggle>
<mat-datepicker #closureDatePicker></mat-datepicker>
<mat-error *ngIf="closeCenterForm.controls.closureDate.hasError('required')">
Closed On Date is <strong>required</strong>
</mat-error>
</mat-form-field>
<mat-form-field fxFlex="48%">
<mat-label>Closure Reason</mat-label>
<mat-select formControlName="closureReasonId">
<mat-option *ngFor="let reason of closureData" [value]="reason.id">
{{ reason.name }}
</mat-option>
</mat-select>
<mat-error *ngIf="closeCenterForm.controls.closureReasonId.hasError('required')">
CLosure Reason is <strong>required</strong>
</mat-error>
</mat-form-field>
</div>
</mat-card-content>
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
<button type="button" mat-raised-button [routerLink]="['../../']">Cancel</button>
<button mat-raised-button color="warn" [disabled]="!closeCenterForm.valid" *mifosxHasPermission="'CLOSE_CENTER'">Confirm</button>
</mat-card-actions>
</form>
</mat-card>
</div>