Project

General

Profile

1
<p-confirmDialog
2
                 acceptLabel="{{'ACCEPT_LABEL' | translate}}"
3
                 rejectLabel="{{'REJECT_LABEL' | translate}}"
4
                 acceptButtonStyleClass="p-button-primary"
5
                 rejectButtonStyleClass="p-button-warning"
6
                 acceptIcon="null"
7
                 rejectIcon="null">
8
</p-confirmDialog>
9
<p-table [value]="invoices"
10
         [lazy]="true"
11
         (onLazyLoad)="loadProcesses($event)"
12
         [paginator]="true"
13
         [rows]="rows"
14
         styleClass="p-datatable-gridlines"
15
         [rowHover]="true"
16
         [totalRecords]="totalRecords"
17
         [loading]="loading"
18
         [autoLayout]="true"
19
         [lazyLoadOnInit]="false"
20
         #pTable
21
         >
22
  <ng-template pTemplate="header">
23
    <tr>
24
      <th>Received Date</th>
25
      <th>File Code</th>
26
      <th>File Name</th>
27
      <th>File Type</th>
28
      <th>Process ID</th>
29
      <th>iPower Client Code</th>
30
      <th>Personal Data</th>
31
      <th>Status</th>
32
      <th>Assign to</th>
33
      <th class="three-buttons">Actions</th>
34
    </tr>
35
  </ng-template>
36
  <ng-template let-process pTemplate="body">
37
    <tr>
38
      <td>{{process.processCreationDatetime|date: "dd/MM/yyyy HH:mm"}}</td>
39
      <td>{{process.receivedFile.dmsDocumentNumber}}</td>
40
      <td>{{process.receivedFile.dmsFileName}}</td>
41
      <td>{{process.receivedFile.dmsFileType}}</td>
42
      <td>{{process.id}}</td>
43
      <td>{{process.receivedFile.dmsClientCode}}</td>
44
      <td>{{process.receivedFile.dmsPersonalData}}</td>
45
      <td>{{process.processStatus.name}}</td>
46
      <td>{{process.userId}}</td>
47
      <td>
48
        <p-button (onClick)="showOrDownloadFile(process?.receivedFile)"
49
                  icon="pi pi-file-o"
50
                  styleClass="p-button-secondary p-button-rounded p-button-outlined"
51
                  pTooltip="{{'PREVIEW-DOCUMENT' | translate}}">
52
        </p-button>
53
        <p-button (onClick)="processingRedirect(process)"
54
                  icon="pi pi-desktop"
55
                  styleClass="p-button-secondary p-button-rounded p-button-outlined p-ml-2"
56
                  pTooltip="{{'INVOICE-PROCESSING' | translate}}"
57
                  >
58
        </p-button>
59
        <p-button (onClick)="onAssignClick(process)"
60
                  *ngIf="process.userId !== auth.userDetails.name"
61
                  icon="pi pi-user"
62
                  styleClass="p-button-secondary p-button-rounded p-button-outlined p-ml-2"
63
                  pTooltip="{{'ASSIGN-TO-ME' | translate}}">
64
        </p-button>
65
        <p-button (onClick)="onUnassignClick(process)"
66
                  *ngIf="process.userId === auth.userDetails.name"
67
                  icon="pi pi-user-minus"
68
                  styleClass="p-button-secondary p-button-rounded p-button-outlined p-ml-2"
69
                  pTooltip="{{'UNASSIGN-FROM-ME' | translate}}">
70
        </p-button>
71
      </td>
72
    </tr>
73
  </ng-template>
74
</p-table>
(1-1/4)