Project

General

Profile

1
<p-fieldset legend="Results"
2
            [toggleable]="_searchResultsPage?.data !== null"
3
            [collapsed]="_searchResultsPage?.data === null">
4
  <p-confirmDialog message="{{'DELETE-MESSAGE-VERIFICATION' | translate}}"
5
                   header="{{'DELETE-CONFIRMATION' | translate}}"
6
                   acceptLabel="{{'ACCEPT_LABEL' | translate}}"
7
                   rejectLabel="{{'REJECT_LABEL' | translate}}"
8
                   acceptButtonStyleClass="p-button-primary"
9
                   rejectButtonStyleClass="p-button-warning"
10
                   acceptIcon="null"
11
                   rejectIcon="null">
12
  </p-confirmDialog>
13
  <p-table [value]="_searchResultsPage?.data"
14
           [lazy]="true"
15
           (onLazyLoad)="onLazyLoad($event)"
16
           [paginator]="true"
17
           [rows]="rows"
18
           [totalRecords]="totalRecords"
19
           styleClass="p-datatable-gridlines"
20
           [rowHover]="true"
21
           [loading]="loading"
22
           [autoLayout]="true">
23
    <ng-template pTemplate="header">
24
      <tr>
25
        <th class="align-center">iPower Client Name</th>
26
        <th>iPower Client Code</th>
27
        <th class="align-center">Category Name</th>
28
        <th class="align-center">Category Code</th>
29
        <th class="align-center">Doc Category</th>
30
        <th class="align-center">Doc Subcategory</th>
31
        <th class="align-center">Capturing Verification</th>
32
        <th class="align-center">Confidence Level</th>
33
        <th class="align-center">Journal Verification</th>
34
        <th class="align-center">Alteryx Routine Name</th>
35
        <th class="align-center">Enabled</th>
36
        <!-- TODO: Fix hacky way of locking the icon-columns in place -->
37
        <th class="two-buttons">Actions</th>
38
      </tr>
39
    </ng-template>
40
    <ng-template pTemplate="body" let-verificationRule>
41
      <tr>
42
        <td class="align-center">{{verificationRule.client?.name}}</td>
43
        <td class="align-center">{{verificationRule.client?.clientCode}}</td>
44
        <td class="align-center">{{verificationRule.template?.category.categoryName}}</td>
45
        <td class="align-center">{{verificationRule.template?.category.categoryCode}}</td>
46
        <td class="align-center">{{verificationRule.docClassificationCategory?.classificationName}}</td>
47
        <td class="align-center">{{verificationRule.template?.subCategoryCode}}</td>
48
        <td class="align-center">{{verificationRule.capturingVerification?.capturingVerificationName}}</td>
49
        <td class="align-center">{{verificationRule.confidenceLevelMinThreshold}}%</td>
50
        <td class="align-center">{{verificationRule.journalVerification?.journalVerificationName}}</td>
51
        <td class="align-center">{{verificationRule.alteryxRoutineId}}</td>
52
        <td class="align-center">
53
          <p-checkbox (onChange)="changeStatus(verificationRule)" [ngModel]="selectedValues"
54
            [value]="verificationRule.verificationRuleStatus" [disabled]="!canEditRuleStatus()">
55
          </p-checkbox>
56
        </td>
57
        <!-- Edit & Delete icons -->
58
        <td class="align-center">
59
          <button pButton [disabled]="!canEditRuleByUA(verificationRule) && !canEditRuleAll()" (click)="edit(verificationRule)"
60
            pTooltip="{{'EDIT-RULE' | translate}}" icon="pi pi-pencil" class="p-button-secondary p-button-rounded p-button-outlined p-mr-2">
61
          </button>
62
          <button pButton
63
                  [disabled]="!canDeleteRule()"
64
                  (click)="delete(verificationRule)"
65
			      pTooltip="{{'DELETE-RULE' | translate}}"
66
                  icon="pi pi pi-trash"
67
                  class="p-button-danger p-button-rounded p-button-outlined">
68
          </button>
69
      </tr>
70
    </ng-template>
71
  </p-table>
72
</p-fieldset>
73

    
74
<app-create-verification-rule-dialog [displayDialog]="displayEditVerificationRuleDialog"
75
                                     [header]="header"
76
                                     (cancelled)="cancelEditVerificationRule()"
77
                                     [verificationRuleToEdit]="verificationRuleToEdit"
78
                                     (valueChange)="passEvent($event)">
79
</app-create-verification-rule-dialog>
(1-1/4)