| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <fims-layout-card-over title="{{'Cheque clearing' | translate}}" [navigateBackTo]="['../']"> |
| <div class="mat-content"> |
| <table td-data-table> |
| <thead> |
| <tr td-data-table-column-row> |
| <th td-data-table-column |
| *ngFor="let column of columns" |
| [name]="column.name"> |
| {{column.label}} |
| </th> |
| <th td-data-table-column *hasPermission="{ id: 'cheque_management', accessLevel: 'CHANGE' }" translate>APPROVE</th> |
| <th td-data-table-column *hasPermission="{ id: 'cheque_management', accessLevel: 'CHANGE' }" translate>CANCEL</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr td-data-table-row *ngFor="let row of cheques$ | async"> |
| <td td-data-table-cell [numeric]="column.numeric" *ngFor="let column of columns"> |
| {{column.format ? column.format(row[column.name]) : row[column.name]}} |
| </td> |
| <td td-data-table-cell *hasPermission="{ id: 'cheque_management', accessLevel: 'CHANGE' }"> |
| <button mat-button mat-raised-button color="primary" [disabled]="row.state !== 'PENDING'" (click)="approveCheque(row)"> |
| {{ 'APPROVE' | translate}} |
| </button> |
| </td> |
| <td td-data-table-cell *hasPermission="{ id: 'cheque_management', accessLevel: 'CHANGE' }"> |
| <button mat-button mat-raised-button color="warn" [disabled]="row.state !== 'PENDING'" (click)="cancelCheque(row)"> |
| {{ 'CANCEL' | translate}} |
| </button> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </fims-layout-card-over> |