Files
cbsnexora/src/app/accounting/accounting-rules/accounting-rules.component.html
T

72 lines
2.9 KiB
HTML

<!--
Copyright since 2025 Mifos Initiative
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<div class="container m-b-20 layout-row align-end gap-20px">
<button mat-raised-button color="primary" [routerLink]="['create']" *mifosxHasPermission="'CREATE_ACCOUNTINGRULE'">
<fa-icon icon="plus" class="m-r-10"></fa-icon>
{{ 'labels.buttons.Add Rule' | translate }}
</button>
</div>
<div class="container">
<div class="layout-row">
<mat-form-field class="flex-fill">
<mat-label>{{ 'labels.inputs.Filter' | translate }}</mat-label>
<input matInput (keyup)="applyFilter($event.target.value)" />
</mat-form-field>
</div>
<div class="mat-elevation-z8">
<table mat-table [dataSource]="dataSource" matSort>
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.name' | translate }}</th>
<td mat-cell *matCellDef="let accountingRule">{{ accountingRule.name }}</td>
</ng-container>
<ng-container matColumnDef="officeName">
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Office' | translate }}</th>
<td mat-cell *matCellDef="let accountingRule">{{ accountingRule.officeName }}</td>
</ng-container>
<ng-container matColumnDef="debitTags">
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Debit Tags' | translate }}</th>
<td mat-cell *matCellDef="let accountingRule">{{ accountingRule.debitTags }}</td>
</ng-container>
<ng-container matColumnDef="debitAccount">
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Debit Account' | translate }}</th>
<td mat-cell *matCellDef="let accountingRule">
{{ accountingRule.debitAccounts ? accountingRule.debitAccounts[0].name : '' }}
</td>
</ng-container>
<ng-container matColumnDef="creditTags">
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Credit Tags' | translate }}</th>
<td mat-cell *matCellDef="let accountingRule">{{ accountingRule.creditTags }}</td>
</ng-container>
<ng-container matColumnDef="creditAccount">
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Credit Account' | translate }}</th>
<td mat-cell *matCellDef="let accountingRule">
{{ accountingRule.creditAccounts ? accountingRule.creditAccounts[0].name : '' }}
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr
mat-row
*matRowDef="let row; columns: displayedColumns"
[routerLink]="['view', row.id]"
class="select-row"
></tr>
</table>
<mat-paginator [pageSizeOptions]="[10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div>
</div>