Project

General

Profile

1
<p-table (onLazyLoad)="onPageChange($event)"
2
         [value]="tableValues"
3
         [paginator]="true"
4
         [rows]="15"
5
         [totalRecords]="tableValues"
6
         styleClass="p-datatable-gridlines"
7
         [rowHover]="true"
8
         [autoLayout]="true">
9
  <ng-template pTemplate="header">
10
    <tr>
11
      <th>Date-Time</th>
12
      <th>iPower Client Name</th>
13
      <th>iPower Client Code</th>
14
      <th>Status</th>
15
      <th>Results</th>
16
      <th class="two-buttons">Actions</th>
17
    </tr>
18
  </ng-template>
19
  <ng-template let-downloadProcessTemp pTemplate="body">
20
    <tr>
21
      <td>{{downloadProcessTemp?.downloadDate|date: "dd/MM/yyyy HH:mm"}}</td>
22
      <td>{{downloadProcessTemp?.iPowerClientName}}</td>
23
      <td>{{downloadProcessTemp?.iPowerClientCode}}</td>
24
      <td>{{downloadProcessTemp?.status}}</td>
25
      <td>{{downloadProcessTemp?.results ?  downloadProcessTemp?.results + ' ' + 'files received' :  '' }}</td>
26
      <td>
27
        <p-button (onClick)="showResultsTable(downloadProcessTemp)" pTooltip="{{'RECEIVED-FILES' | translate}}"
28
                  styleClass="p-button-secondary p-button-rounded p-button-outlined"
29
                  icon="pi pi-desktop">
30
        </p-button>
31
        <p-button *ngIf="downloadProcessTemp?.status.toString()=== 'Completed'"
32
                  (onClick)="reschedule(downloadProcessTemp)"
33
                  pTooltip="{{'RESCHEDULE-IPOWERCLIENT' | translate}}"
34
                  styleClass="p-button-secondary p-button-rounded p-button-outlined p-ml-2"
35
                  [disabled]="!canRescheculeUA()"
36
                  icon="pi pi-replay">
37
        </p-button>
38
        <p-button *ngIf="downloadProcessTemp?.status.toString()=== 'Working'"
39
                  (onClick)="doNothing(downloadProcessTemp)"
40
                  styleClass="p-button-secondary p-button-rounded p-button-outlined p-ml-2"
41
                  icon="pi pi pi-trash"
42
                  >
43
        </p-button>
44
        <p-button *ngIf="downloadProcessTemp?.status.toString()=== 'Pending'"
45
                  (onClick)="highPriority(downloadProcessTemp)"
46
                  styleClass="p-button-secondary p-button-rounded p-button-outlined p-ml-2"
47
                  pTooltip="{{'HIGH-PRIORITY-IPOWERCLIENT' | translate}}"
48
                  icon="pi pi-chevron-up">
49
        </p-button>
50
      </td>
51
    </tr>
52
  </ng-template>
53
</p-table>
(1-1/4)