ability to track expense
This commit is contained in:
parent
627bdcbd80
commit
ca88144629
3 changed files with 75 additions and 19 deletions
|
|
@ -20,10 +20,10 @@
|
|||
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label>Category</mat-label>
|
||||
<input type="text" matInput [matAutocomplete]="categoryAuto" [formField]="expenseForm.category">
|
||||
<mat-autocomplete autoActiveFirstOption #categoryAuto="matAutocomplete">
|
||||
<input type="text" matInput [matAutocomplete]="categoryAuto" [formField]="expenseForm.category" [value]="expenseForm.category()">
|
||||
<mat-autocomplete [displayWith]="display" autoActiveFirstOption #categoryAuto="matAutocomplete">
|
||||
@for (category of categories(); track category.id) {
|
||||
<mat-option [value]="category.name">{{ category.name }}</mat-option>
|
||||
<mat-option [value]="category">{{ category.name }}</mat-option>
|
||||
}
|
||||
</mat-autocomplete>
|
||||
</mat-form-field>
|
||||
|
|
@ -31,9 +31,9 @@
|
|||
<mat-form-field appearance="outline">
|
||||
<mat-label>Merchant</mat-label>
|
||||
<input type="text" matInput [matAutocomplete]="merchantAuto" [formField]="expenseForm.merchant">
|
||||
<mat-autocomplete autoActiveFirstOption #merchantAuto="matAutocomplete">
|
||||
<mat-autocomplete [displayWith]="display" autoActiveFirstOption #merchantAuto="matAutocomplete">
|
||||
@for (merchant of merchants(); track merchant.id) {
|
||||
<mat-option [value]="merchant.name">{{ merchant.name }}</mat-option>
|
||||
<mat-option [value]="merchant">{{ merchant.name }}</mat-option>
|
||||
}
|
||||
</mat-autocomplete>
|
||||
</mat-form-field>
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
<mat-label>Tags</mat-label>
|
||||
<mat-select disableRipple multiple [formField]="expenseForm.tags">
|
||||
@for (tag of tags(); track tag.id) {
|
||||
<mat-option [value]="tag.name">{{ tag.name }}</mat-option>
|
||||
<mat-option [value]="tag">{{ tag.name }}</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
|
@ -60,6 +60,12 @@
|
|||
<mat-card-actions>
|
||||
<button matButton="tonal" [disabled]="!enableSaveButton()" (click)="saveClick()">Save</button>
|
||||
</mat-card-actions>
|
||||
|
||||
@if (errorSaving()) {
|
||||
<mat-error>
|
||||
{{ errorSaving() }}
|
||||
</mat-error>
|
||||
}
|
||||
</mat-card-footer>
|
||||
</mat-card>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue