This commit is contained in:
2026-08-29 21:09:42 +00:00
parent 10448e8b12
commit 85a063c1a7
132 changed files with 4377 additions and 3348 deletions
@@ -1,40 +1,46 @@
<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 &#64; x% (1/2) ; CGST &#64; 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) {
<mat-option [value]="reg.id">
{{ reg.name }}
</mat-option>
}
</mat-select>
</mat-form-field>
</div>
</form>
@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 &#64; x% (1/2) ; CGST &#64; 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) {
<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
<div class="row-container">
<button type="button" mat-raised-button [disabled]="item().isFixture" color="primary" class="" (click)="save()">
Save
</button>
}
</div>
@if (!!item().id) {
<button type="button" mat-raised-button [disabled]="item().isFixture" color="warn" (click)="confirmDelete()">
Delete
</button>
}
</div>
}