Files
brewman/overlord/src/app/payment/payment-dialog.component.html
T
2022-12-11 07:50:45 +05:30

48 lines
1.6 KiB
HTML

<h1 mat-dialog-title>Edit Payment Entry</h1>
<div mat-dialog-content>
<form [formGroup]="form">
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
<mat-form-field class="flex-auto basis-2/3 mr-5">
<input
type="text"
matInput
placeholder="Account"
#accountElement
[matAutocomplete]="auto"
formControlName="account"
autocomplete="off"
/>
<mat-hint *ngIf="accBal">
Balance as on Date: <strong>{{ accBal.date | currency: 'INR' | accounting }}</strong> /
Final balance: <strong>{{ accBal.total | currency: 'INR' | accounting }}</strong>
</mat-hint>
</mat-form-field>
<mat-autocomplete
#auto="matAutocomplete"
autoActiveFirstOption
(optionSelected)="accountSelected($event)"
[displayWith]="displayFn"
>
<mat-option *ngFor="let account of accounts | async" [value]="account">{{
account.name
}}</mat-option>
</mat-autocomplete>
<mat-form-field class="flex-auto basis-1/3">
<mat-label>Amount</mat-label>
<span matPrefix>₹ </span>
<input
type="text"
matInput
placeholder="Amount"
formControlName="amount"
autocomplete="off"
/>
</mat-form-field>
</div>
</form>
</div>
<div mat-dialog-actions>
<button mat-button [mat-dialog-close]="false" cdkFocusInitial>Cancel</button>
<button mat-button (click)="accept()" color="primary">Ok</button>
</div>