Files
cbsnexora/src/app/organization/adhoc-query/adhoc-query.component.html
T
Adam Saghy 19a14e5b5b Upgrade to Angular 16
Merge `angular-update-16` into `dev` branch
2025-05-23 18:47:20 +02:00

71 lines
3.1 KiB
HTML

<div class="container m-b-20 layout-row align-end gap-20px">
<button mat-raised-button color="primary" [routerLink]="['create']" *mifosxHasPermission="'CREATE_ADHOC'">
<fa-icon icon="plus" class="m-r-10"></fa-icon>
{{ 'labels.buttons.Create AdHoc Query' | translate }}
</button>
</div>
<div class="container">
<div class="layout-row gap-20px">
<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-container">
<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 adhocquery">{{ adhocquery.name }}</td>
</ng-container>
<ng-container matColumnDef="query">
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.SQL Query' | translate }}</th>
<td mat-cell *matCellDef="let adhocquery">{{ adhocquery.query }}</td>
</ng-container>
<ng-container matColumnDef="tableName">
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Table Affected' | translate }}</th>
<td mat-cell *matCellDef="let adhocquery">{{ adhocquery.tableName }}</td>
</ng-container>
<ng-container matColumnDef="email">
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Email' | translate }}</th>
<td mat-cell *matCellDef="let adhocquery">{{ adhocquery.email }}</td>
</ng-container>
<ng-container matColumnDef="reportRunFrequency">
<th mat-header-cell *matHeaderCellDef mat-sort-header>
{{ 'labels.inputs.Report Run Frequency' | translate }}
</th>
<td mat-cell *matCellDef="let adhocquery">{{ adhocquery.reportRunFrequency }}</td>
</ng-container>
<ng-container matColumnDef="isActive">
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Status' | translate }}</th>
<td mat-cell *matCellDef="let adhocquery">
<div [className]="adhocquery.isActive === true ? 'true' : 'false'">
<fa-icon
matTooltip="{{ adhocquery.isActive === true ? 'Active' : 'Inactive' }}"
matTooltipPosition="right"
icon="circle"
size="lg"
></fa-icon>
</div>
</td>
</ng-container>
<ng-container matColumnDef="createdBy">
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Created By' | translate }}</th>
<td mat-cell *matCellDef="let adhocquery">{{ adhocquery.createdBy }}</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns" [routerLink]="[row.id]" class="select-row"></tr>
</table>
<mat-paginator [pageSizeOptions]="[10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div>
</div>