feat(accounting): add accounting rules component

Add accounting rules component to preconfigure accounting transactions.
This commit is contained in:
Abhay Chawla
2018-08-06 00:57:30 +05:30
parent 6c80e86c0c
commit 7b8b91f10a
9 changed files with 151 additions and 8 deletions
@@ -0,0 +1,58 @@
<div class="container m-b-20" fxLayout="row" fxLayoutAlign="end" fxLayoutGap="20px">
<button mat-raised-button color="primary" [routerLink]="['/accounting/accounting-rules/create']">
<mat-icon>add</mat-icon>&nbsp;&nbsp;Add Rule
</button>
</div>
<div class="container">
<div fxLayout="row" fxLayoutGap="20px">
<mat-form-field fxFlex>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</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> Name </th>
<td mat-cell *matCellDef="let accountingRule"> {{ accountingRule.name }} </td>
</ng-container>
<ng-container matColumnDef="officeName">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Office </th>
<td mat-cell *matCellDef="let accountingRule"> {{ accountingRule.officeName }} </td>
</ng-container>
<ng-container matColumnDef="debitTags">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Debit Tags </th>
<td mat-cell *matCellDef="let accountingRule"> {{ accountingRule.debitTags }} </td>
</ng-container>
<ng-container matColumnDef="debitAccount">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Debit Account </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> Credit Tags </th>
<td mat-cell *matCellDef="let accountingRule"> {{ accountingRule.creditTags }} </td>
</ng-container>
<ng-container matColumnDef="creditAccount">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Credit Account </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]="['/accounting/accounting-rules/view', row.id]"></tr>
</table>
<mat-paginator [pageSizeOptions]="[10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div>
</div>