Consolidated commit message to v22 signals

This commit is contained in:
2026-08-25 14:45:09 +00:00
parent 6403d25d3e
commit df289b20b8
443 changed files with 16058 additions and 17332 deletions
@@ -1,6 +1,6 @@
<h2>Incentives</h2>
<form [formGroup]="form" class="flex-col">
<form class="flex-col" [formRoot]="form">
<div class="row-container">
<mat-form-field class="flex-auto">
<mat-label>Date</mat-label>
@@ -9,7 +9,7 @@
#dateElement
[matDatepicker]="date"
(focus)="dateElement.select()"
formControlName="date"
[formField]="form.date"
autocomplete="off"
/>
<mat-datepicker-toggle matSuffix [for]="date"></mat-datepicker-toggle>
@@ -17,11 +17,11 @@
</mat-form-field>
</div>
<div class="row-container">
Total Incentive: <strong>{{ voucher.incentive | number: '1.2-2' }}</strong> Total Points:
Total Incentive: <strong>{{ voucher().incentive | number: '1.2-2' }}</strong> Total Points:
<strong>{{ totalPoints() | number: '1.2-2' }}</strong> Point Value:
<strong>{{ pointValue() | number: '1.2-2' }}</strong>
</div>
<mat-table #table [dataSource]="dataSource" formArrayName="incentives">
<mat-table #table [dataSource]="incentives()">
<!-- Name Column -->
<ng-container matColumnDef="name">
<mat-header-cell *matHeaderCellDef>Name</mat-header-cell>
@@ -49,23 +49,31 @@
<!-- Points Column -->
<ng-container matColumnDef="points">
<mat-header-cell *matHeaderCellDef class="center">Service Points</mat-header-cell>
<mat-cell *matCellDef="let row; let i = index" class="center" [formGroupName]="i">
<mat-form-field class="flex-auto">
<button mat-icon-button color="warn" matPrefix (click)="less(row, i)">
<mat-icon>remove</mat-icon>
</button>
<input matInput formControlName="points" autocomplete="off" (change)="change(row, i)" class="flex-auto" />
<button mat-icon-button color="primary" matSuffix (click)="more(row, i)">
<mat-icon>add</mat-icon>
</button>
</mat-form-field>
<mat-cell *matCellDef="let row; let i = index" class="center">
@if (form.incentives[i]) {
<mat-form-field class="flex-auto">
<button mat-icon-button color="warn" matPrefix (click)="less(i)">
<mat-icon>remove</mat-icon>
</button>
<input
type="number"
matInput
[formField]="form.incentives[i].points"
autocomplete="off"
class="flex-auto"
/>
<button mat-icon-button color="primary" matSuffix (click)="more(i)">
<mat-icon>add</mat-icon>
</button>
</mat-form-field>
}
</mat-cell>
</ng-container>
<!-- Amount Column -->
<ng-container matColumnDef="amount">
<mat-header-cell *matHeaderCellDef class="right">Amount</mat-header-cell>
<mat-cell *matCellDef="let row" class="right">{{ amount(row) | currency: 'INR' }}</mat-cell>
<mat-cell *matCellDef="let row; let i = index" class="right">{{ amount(row, i) | currency: 'INR' }}</mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
@@ -75,19 +83,19 @@
<div class="row-container">
<button mat-raised-button color="primary" (click)="save()" [disabled]="!canSave()">
{{ voucher.id ? 'Update' : 'Save' }}
{{ voucher().id ? 'Update' : 'Save' }}
</button>
@if (voucher.id) {
<button mat-raised-button (click)="post()" [disabled]="voucher.posted || !auth.allowed('post-vouchers')">
{{ voucher.posted ? 'Posted' : 'Post' }}
@if (voucher().id) {
<button mat-raised-button (click)="post()" [disabled]="voucher().posted || !auth.allowed('post-vouchers')">
{{ voucher().posted ? 'Posted' : 'Post' }}
</button>
<button mat-raised-button color="warn" (click)="confirmDelete()" [disabled]="!canSave()">Delete</button>
}
</div>
@if (voucher.id) {
@if (voucher().id) {
<div class="row-container">
Created on <strong>{{ voucher.creationDate | localTime }}</strong> and Last Edited on
<strong>{{ voucher.lastEditDate | localTime }}</strong> by <strong>{{ voucher.user.name }}</strong
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
Created on <strong>{{ voucher().creationDate | localTime }}</strong> and Last Edited on
<strong>{{ voucher().lastEditDate | localTime }}</strong> by <strong>{{ voucher().user.name }}</strong
>. {{ voucher().poster ? 'Posted by ' + voucher().poster : '' }}
</div>
}