|
17 | 17 | [filters]="filters" |
18 | 18 | [paginator]="false" |
19 | 19 | [globalFilterFields]="['id', 'title']" |
20 | | - responsiveLayout="scroll"> |
| 20 | + responsiveLayout="scroll" |
| 21 | + [multiSortMeta]="multiSortMeta"> |
21 | 22 | <ng-template #caption> |
22 | 23 | <div class="flex flex-column sm:flex-row gap-2 justify-between"> |
23 | 24 | <div class="flex flex-col justify-items-start"> |
|
48 | 49 | <p-sortIcon field="title" /> |
49 | 50 | </div> |
50 | 51 | </th> |
51 | | - <th style="min-width: 15rem" pSortableColumn="title"> |
| 52 | + <th pSortableColumn="enabled"> |
| 53 | + <div class="flex justify-between items-center"> |
| 54 | + Enabled |
| 55 | + <p-sortIcon field="enabled" /> |
| 56 | + </div> |
| 57 | + </th> |
| 58 | + <th pSortableColumn="isFinalRule"> |
52 | 59 | <div class="flex justify-between items-center"> |
53 | 60 | Is Final Rule |
54 | | - <p-sortIcon field="title" /> |
| 61 | + <p-sortIcon field="isFinalRule" /> |
55 | 62 | </div> |
56 | 63 | </th> |
57 | 64 | <th> |
|
79 | 86 | </th> |
80 | 87 | <th></th> |
81 | 88 | <th></th> |
| 89 | + <th></th> |
82 | 90 | </tr> |
83 | 91 | </ng-template> |
84 | 92 | <ng-template #body let-accountItem> |
|
93 | 101 | {{ accountItem.title }} |
94 | 102 | </a> |
95 | 103 | </td> |
| 104 | + <td> |
| 105 | + <a [style]="{color : accountItem.enabled ? 'green' : ''}" [href]="getRuleUrl(accountItem)" [routerLink]="getRuleUrl(accountItem)"> |
| 106 | + {{ accountItem.enabled }} |
| 107 | + </a> |
| 108 | + </td> |
96 | 109 | <td> |
97 | 110 | <a [href]="getRuleUrl(accountItem)" [routerLink]="getRuleUrl(accountItem)"> |
98 | 111 | {{ accountItem.isFinalRule }} |
99 | 112 | </a> |
100 | 113 | </td> |
101 | | - <td style="max-width: 1rem"> |
102 | | - <p-button icon="pi pi-pencil" |
103 | | - (onClick)="this.router.navigate(['/', 'rules', 'edit', accountItem.id])" |
104 | | - severity="secondary" rounded /> |
| 114 | + <td> |
| 115 | + <div class="flex gap-2"> |
| 116 | + <p-button icon="pi pi-pencil" pTooltip="Edit rule" tooltipPosition="top" |
| 117 | + (onClick)="this.router.navigate(['/', 'rules', 'edit', accountItem.id])" |
| 118 | + severity="secondary" rounded /> |
| 119 | + <p-button icon="pi pi-clone" pTooltip="Clone rule" tooltipPosition="top" |
| 120 | + (onClick)="this.router.navigate(['/rules', 'new'], { queryParams: { clone_from: accountItem.id } })" |
| 121 | + severity="secondary" rounded /> |
| 122 | + </div> |
105 | 123 | </td> |
106 | 124 | </tr> |
107 | 125 | </ng-template> |
|
0 commit comments