Files
brewman/overlord/src/app/payment/payment-dialog.component.html
T

42 lines
1.5 KiB
HTML

<h1 mat-dialog-title>Edit Payment Entry</h1>
<div mat-dialog-content>
<form [formRoot]="form">
<div class="row-container">
<mat-form-field class="flex-auto basis-2-3">
<mat-label>Account</mat-label>
<input
type="text"
matInput
#accountElement
[matAutocomplete]="auto"
[formField]="form.account"
autocomplete="off"
/>
@if (accBal()) {
<mat-hint>
<div class="balance">
Balance as on Date: <strong>{{ accBal()?.date | currency: 'INR' | accounting }}</strong
><br />
Total Balance: <strong>{{ accBal()?.total | currency: 'INR' | accounting }}</strong>
</div>
</mat-hint>
}
<mat-autocomplete #auto="matAutocomplete" autoActiveFirstOption [displayWith]="displayFn">
@for (account of accounts(); track account.id) {
<mat-option [value]="account">{{ account.name }}</mat-option>
}
</mat-autocomplete>
</mat-form-field>
<mat-form-field class="flex-auto basis-1-3">
<mat-label>Amount</mat-label>
<input type="text" matInput [formField]="form.amount" autocomplete="off" />
<span matTextPrefix>₹&nbsp;</span>
</mat-form-field>
</div>
</form>
</div>
<div mat-dialog-actions>
<button mat-raised-button color="warn" [mat-dialog-close]="false" cdkFocusInitial class="">Cancel</button>
<button mat-raised-button color="primary" (click)="accept()">Ok</button>
</div>