|
2 | 2 | <table class="table table-sm table-bordered table-striped"> |
3 | 3 | <thead class="thead-blue"> |
4 | 4 | <tr class="d-flex"> |
5 | | - <th class="col-2 text-center">Activity ID</th> |
| 5 | + <th class="col-4 text-center">Activity ID</th> |
6 | 6 | <th class="col-4 text-center">Activity</th> |
7 | | - <th class="{{showOptionInDevelopment ? 'col-2' : 'col-6'}} text-center">Status</th> |
8 | 7 | <th class="col-2 text-center" *ngIf="showOptionInDevelopment">Options</th> |
9 | | - <th scope="col" class="col-2 text-center" *ngIf="showOptionInDevelopment">Status</th> |
| 8 | + <th class="{{ showOptionInDevelopment ? 'col-2' : 'col-4' }} text-center">Status</th> |
10 | 9 | </tr> |
11 | 10 | </thead> |
12 | 11 | <app-loading-bar *ngIf="isLoading$ | async"></app-loading-bar> |
13 | 12 | <tbody *ngIf="(isLoading$ | async) === false"> |
14 | 13 | <tr class="d-flex" *ngFor="let activity of activities"> |
15 | | - <td class="col-2 text-break">{{ activity.id }}</td> |
| 14 | + <td class="col-4 text-break">{{ activity.id }}</td> |
16 | 15 | <td class="col-4">{{ activity.name }}</td> |
17 | | - <td class="{{showOptionInDevelopment ? 'col-2' : 'col-6'}} text-center">{{ activity.status }}</td> |
18 | 16 | <td class="col-2 text-center" *ngIf="showOptionInDevelopment"> |
19 | 17 | <button type="button" class="btn btn-sm btn-primary" (click)="updateActivity(activity.id)"> |
20 | 18 | <i class="fa fa-pencil fa-xs"></i> |
21 | 19 | </button> |
22 | 20 | </td> |
23 | | - <td class="col-2 text-center" *ngIf="showOptionInDevelopment"> |
24 | | - <app-dropdown [info]="activity" (updateInfo)="changeOperation($event)"> </app-dropdown> |
25 | | - </td> |
| 21 | + <div *ngIf="showOptionInDevelopment; then devBlock; else prodBlock"></div> |
| 22 | + <ng-template #devBlock> |
| 23 | + <td class="col-2 text-center"> |
| 24 | + <app-dropdown [info]="activity" (updateInfo)="changeOperation($event)"></app-dropdown> |
| 25 | + </td> |
| 26 | + </ng-template> |
| 27 | + <ng-template #prodBlock> |
| 28 | + <td class="col-4 text-center"> |
| 29 | + <em class="fa mr-2 mt-1" [ngClass]="[activity.btnIcon, activity.iconColor]"></em> |
| 30 | + <span>{{ activity.btnName }}</span> |
| 31 | + </td> |
| 32 | + </ng-template> |
26 | 33 | </tr> |
27 | 34 | </tbody> |
28 | 35 | </table> |
|
0 commit comments