47 lines
1.5 KiB
HTML
47 lines
1.5 KiB
HTML
@if (itemResource.isLoading()) {
|
|
<app-skeleton-loader type="card" [count]="1" />
|
|
} @else if (itemResource.error()) {
|
|
<app-error-state (retryAction)="itemResource.reload()" />
|
|
} @else {
|
|
<h2>Tax</h2>
|
|
<form class="flex-col">
|
|
<div class="row-container">
|
|
<mat-form-field class="flex-auto">
|
|
<mat-label>Name</mat-label>
|
|
<input matInput [formField]="form.name" (keyup.enter)="save()" />
|
|
<mat-hint> Format for GST: ST GST @ x% (1/2) ; CGST @ x% (1/2) </mat-hint>
|
|
</mat-form-field>
|
|
</div>
|
|
<div class="row-container">
|
|
<mat-form-field class="flex-auto">
|
|
<mat-label>Rate</mat-label>
|
|
<input matInput type="number" [formField]="form.rate" class="right-align" />
|
|
<span matTextSuffix>%</span>
|
|
</mat-form-field>
|
|
</div>
|
|
<div class="row-container">
|
|
<mat-form-field class="flex-auto">
|
|
<mat-label>Regime</mat-label>
|
|
<mat-select [formField]="form.regime">
|
|
@for (reg of regimes(); track reg.id) {
|
|
<mat-option [value]="reg.id">
|
|
{{ reg.name }}
|
|
</mat-option>
|
|
}
|
|
</mat-select>
|
|
</mat-form-field>
|
|
</div>
|
|
</form>
|
|
|
|
<div class="row-container">
|
|
<button type="button" mat-raised-button [disabled]="item().isFixture" color="primary" class="" (click)="save()">
|
|
Save
|
|
</button>
|
|
@if (!!item().id) {
|
|
<button type="button" mat-raised-button [disabled]="item().isFixture" color="warn" (click)="confirmDelete()">
|
|
Delete
|
|
</button>
|
|
}
|
|
</div>
|
|
}
|