@pega/angular-sdk-overrides 0.242.6 → 0.242.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/lib/designSystemExtension/material-case-summary/material-case-summary.component.ts +0 -1
  2. package/lib/designSystemExtension/material-details-fields/material-details-fields.component.html +1 -1
  3. package/lib/designSystemExtension/material-details-fields/material-details-fields.component.ts +6 -0
  4. package/lib/designSystemExtension/operator/operator.component.html +1 -1
  5. package/lib/designSystemExtension/operator/operator.component.scss +10 -2
  6. package/lib/designSystemExtension/operator/operator.component.ts +4 -3
  7. package/lib/field/currency/currency.component.ts +19 -13
  8. package/lib/field/date-time/date-time.component.html +0 -1
  9. package/lib/field/date-time/date-time.component.ts +17 -3
  10. package/lib/field/decimal/decimal.component.html +1 -0
  11. package/lib/field/decimal/decimal.component.ts +38 -15
  12. package/lib/field/dropdown/dropdown.component.ts +18 -3
  13. package/lib/field/email/email.component.ts +17 -7
  14. package/lib/field/integer/integer.component.html +1 -1
  15. package/lib/field/integer/integer.component.ts +16 -6
  16. package/lib/field/list-view-action-buttons/list-view-action-buttons.component.html +1 -1
  17. package/lib/field/percentage/percentage.component.html +1 -1
  18. package/lib/field/percentage/percentage.component.ts +27 -17
  19. package/lib/field/phone/phone.component.ts +6 -13
  20. package/lib/field/rich-text/rich-text.component.ts +12 -3
  21. package/lib/field/text/text.component.ts +2 -2
  22. package/lib/field/text-area/text-area.component.html +1 -1
  23. package/lib/field/text-area/text-area.component.ts +16 -6
  24. package/lib/field/text-input/text-input.component.html +1 -1
  25. package/lib/field/text-input/text-input.component.ts +16 -6
  26. package/lib/field/time/time.component.html +1 -1
  27. package/lib/field/time/time.component.ts +21 -6
  28. package/lib/field/url/url.component.html +1 -1
  29. package/lib/field/url/url.component.ts +16 -6
  30. package/lib/field/user-reference/user-reference.component.html +40 -38
  31. package/lib/field/user-reference/user-reference.component.ts +66 -7
  32. package/lib/infra/Containers/flow-container/flow-container.component.ts +2 -5
  33. package/lib/infra/Containers/flow-container/helpers.ts +1 -1
  34. package/lib/infra/Containers/modal-view-container/modal-view-container.component.html +1 -11
  35. package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +0 -1
  36. package/lib/infra/action-buttons/action-buttons.component.html +1 -1
  37. package/lib/infra/assignment/assignment.component.ts +3 -5
  38. package/lib/infra/assignment-card/assignment-card.component.ts +4 -32
  39. package/lib/infra/defer-load/defer-load.component.ts +4 -1
  40. package/lib/infra/reference/reference.component.ts +77 -90
  41. package/lib/infra/root-container/root-container.component.ts +24 -17
  42. package/lib/template/base/form-template-base.ts +2 -2
  43. package/lib/template/default-form/default-form.component.ts +5 -7
  44. package/lib/template/field-group-template/field-group-template.component.html +7 -7
  45. package/lib/template/field-group-template/field-group-template.component.scss +8 -0
  46. package/lib/template/field-group-template/field-group-template.component.ts +64 -41
  47. package/lib/template/field-group-template/utils.ts +9 -0
  48. package/lib/template/field-value-list/field-value-list.component.html +2 -2
  49. package/lib/template/field-value-list/field-value-list.component.scss +4 -0
  50. package/lib/template/list-view/list-view.component.html +3 -1
  51. package/lib/template/list-view/list-view.component.ts +1 -1
  52. package/lib/template/simple-table-manual/helpers.ts +18 -2
  53. package/lib/template/simple-table-manual/simple-table-manual.component.html +25 -6
  54. package/lib/template/simple-table-manual/simple-table-manual.component.scss +7 -3
  55. package/lib/template/simple-table-manual/simple-table-manual.component.ts +62 -23
  56. package/lib/widget/todo/todo.component.html +1 -2
  57. package/lib/widget/todo/todo.component.scss +2 -0
  58. package/lib/widget/todo/todo.component.ts +4 -3
  59. package/package.json +1 -1
@@ -191,7 +191,7 @@ export const createMetaForTable = (fields, renderMode) => {
191
191
  };
192
192
 
193
193
  export const filterDataByDate = (item, filterObj) => {
194
- let bKeep;
194
+ let bKeep = true;
195
195
  let value = item[filterObj.ref] != null || item[filterObj.ref] != '' ? getSeconds(item[filterObj.ref]) : null;
196
196
  let filterValue = filterObj.containsFilterValue != null && filterObj.containsFilterValue != '' ? getSeconds(filterObj.containsFilterValue) : null;
197
197
 
@@ -239,7 +239,7 @@ export const filterDataByDate = (item, filterObj) => {
239
239
  };
240
240
 
241
241
  export const filterDataByCommonFields = (item, filterObj) => {
242
- let bKeep;
242
+ let bKeep = true;
243
243
  const value = item[filterObj.ref].toLowerCase();
244
244
  const filterValue = filterObj.containsFilterValue.toLowerCase();
245
245
 
@@ -294,3 +294,19 @@ export const createPConnect = (contextName, referenceList, pageReference) => {
294
294
 
295
295
  return getPConnect();
296
296
  };
297
+
298
+ /**
299
+ * This method evaluates whether a row action is allowed based on the provided conditions.
300
+ * @param {string|boolean|undefined} allowRowDelete - The condition for allowing row deletion.
301
+ * @param {object} rowData - The data of the row being evaluated.
302
+ * @returns {boolean} - Returns true if the row action is allowed, false otherwise.
303
+ */
304
+ export const evaluateAllowRowAction = (allowRowDelete, rowData) => {
305
+ if (allowRowDelete === undefined || allowRowDelete === true) return true;
306
+ if (allowRowDelete.startsWith?.('@E ')) {
307
+ const expression = allowRowDelete.replace('@E ', '');
308
+ // @ts-ignore - Expected 3 arguments, but got 2
309
+ return PCore.getExpressionEngine().evaluate(expression, rowData);
310
+ }
311
+ return false;
312
+ };
@@ -3,8 +3,8 @@
3
3
  <h3 *ngIf="label" className="label" style="font-weight: bold">
4
4
  {{ label }} <span class="results-count">{{ getResultsText() }}</span>
5
5
  </h3>
6
- <table *ngIf="readOnlyMode || allowEditingInModal" mat-table [dataSource]="rowData" class="mat-elevation-z8" id="readonly-table" matSort>
7
- <ng-container *ngFor="let dCol of processedFields" [matColumnDef]="dCol.config.name">
6
+ <table *ngIf="readOnlyMode || allowEditingInModal" mat-table [dataSource]="elementsData" class="mat-elevation-z8" id="readonly-table" matSort>
7
+ <ng-container *ngFor="let dCol of processedFields; let i = index" [matColumnDef]="dCol.config.name">
8
8
  <th mat-header-cell *matHeaderCellDef mat-sort-header (click)="_headerSortClick($event, dCol)" arrowPosition="before">
9
9
  <div>{{ dCol.config.label }}</div>
10
10
  <div class="psdk-mat-header-filter">
@@ -27,7 +27,16 @@
27
27
  </mat-menu>
28
28
  </div>
29
29
  </th>
30
- <td mat-cell *matCellDef="let element">{{ element[dCol.config.name] || '---' }}</td>
30
+ <td mat-cell *matCellDef="let element">
31
+ <component-mapper
32
+ [name]="element[i].getPConnect().getComponentName()"
33
+ [props]="{
34
+ pConn$: element[i].getPConnect(),
35
+ formGroup$: formGroup$
36
+ }"
37
+ errorMsg="Table wants component not yet available: {{ element[i].getPConnect().getComponentName() }}"
38
+ ></component-mapper>
39
+ </td>
31
40
  </ng-container>
32
41
  <ng-container matColumnDef="DeleteIcon">
33
42
  <div *ngIf="allowEditingInModal">
@@ -47,6 +56,11 @@
47
56
  </ng-container>
48
57
  <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
49
58
  <tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
59
+ <tr class="mat-row psdk-no-records" *matNoDataRow>
60
+ <td id="no-records" class="mat-cell" [attr.colspan]="displayedColumns.length">
61
+ {{ utils.getGenericFieldsLocalizedValue('CosmosFields.fields.lists', 'No records found.') }}
62
+ </td>
63
+ </tr>
50
64
  </table>
51
65
  <table *ngIf="editableMode && !allowEditingInModal" mat-table [dataSource]="elementsData" class="mat-elevation-z8" id="editable-table">
52
66
  <ng-container *ngFor="let dCol of fieldDefs; let i = index">
@@ -74,11 +88,16 @@
74
88
  </ng-container>
75
89
  <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
76
90
  <tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
91
+ <tr class="mat-row psdk-no-records" *matNoDataRow>
92
+ <td id="no-records" class="mat-cell" [attr.colspan]="displayedColumns.length">
93
+ {{ utils.getGenericFieldsLocalizedValue('CosmosFields.fields.lists', 'No records found.') }}
94
+ </td>
95
+ </tr>
77
96
  </table>
78
- <div class="psdk-no-records" id="no-records" *ngIf="editableMode && referenceList?.length === 0">No Records Found.</div>
79
- <div class="psdk-no-records" id="no-records" *ngIf="readOnlyMode && rowData?.data?.length === 0">No Records Found.</div>
80
97
  </div>
81
- <button *ngIf="showAddRowButton" mat-button color="primary" style="font-size: 16px" (click)="addRecord()">+ Add</button>
98
+ <button *ngIf="showAddRowButton" mat-button color="primary" style="font-size: 16px" (click)="addRecord()">
99
+ + {{ localizedVal('Add', localeCategory) }}
100
+ </button>
82
101
  </ng-container>
83
102
 
84
103
  <!-- pop overs for filters-->
@@ -24,6 +24,12 @@ td.mat-mdc-cell,
24
24
  td.mat-mdc-footer-cell {
25
25
  border-right: 1px solid var(--app-neutral-light-color);
26
26
  padding: 8px !important;
27
+ min-width: 10rem;
28
+ }
29
+
30
+ ::ng-deep th.mat-mdc-header-cell:last-child,
31
+ td.mat-mdc-cell:last-child {
32
+ min-width: 2rem;
27
33
  }
28
34
 
29
35
  ::ng-deep .mat-mdc-button {
@@ -160,9 +166,7 @@ tr.mat-mdc-header-row {
160
166
 
161
167
  .psdk-no-records {
162
168
  height: 56px;
163
- justify-content: center;
164
- display: flex;
165
- align-items: center;
169
+ text-align: center;
166
170
  border: 1px solid var(--app-neutral-light-color);
167
171
  border-top: none;
168
172
  background: var(--app-form-color);
@@ -1,4 +1,3 @@
1
- /* eslint-disable max-classes-per-file */
2
1
  import { Component, OnInit, Input, ViewChild, forwardRef, OnDestroy } from '@angular/core';
3
2
  import { CommonModule } from '@angular/common';
4
3
  import { FormGroup } from '@angular/forms';
@@ -17,7 +16,7 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
17
16
  import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
18
17
  import { DatapageService } from '@pega/angular-sdk-components';
19
18
  import { getReferenceList } from '@pega/angular-sdk-components';
20
- import { buildFieldsForTable, filterDataByCommonFields, filterDataByDate, getContext } from './helpers';
19
+ import { buildFieldsForTable, evaluateAllowRowAction, filterDataByCommonFields, filterDataByDate, getContext } from './helpers';
21
20
  import { Utils } from '@pega/angular-sdk-components';
22
21
  import { getSeconds } from '@pega/angular-sdk-components';
23
22
 
@@ -37,7 +36,9 @@ interface SimpleTableManualProps {
37
36
  contextClass?: string;
38
37
  propertyLabel?: string;
39
38
  fieldMetadata?: any;
39
+ allowActions?: any;
40
40
  allowTableEdit?: boolean;
41
+ allowRowDelete?: any;
41
42
  editMode?: string;
42
43
  addAndEditRowsWithin?: any;
43
44
  viewForAddAndEditModal?: any;
@@ -104,6 +105,7 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
104
105
  showAddRowButton: boolean;
105
106
  prevReferenceList: any[] = [];
106
107
  elementsData: MatTableDataSource<any>;
108
+ originalElementsData: MatTableDataSource<any>;
107
109
  rawFields: any;
108
110
  label?: string = '';
109
111
  searchIcon$: string;
@@ -160,14 +162,16 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
160
162
 
161
163
  isInitialized = false;
162
164
  targetClassLabel: string;
163
-
165
+ localizedVal = PCore.getLocaleUtils().getLocaleValue;
166
+ localeCategory = 'SimpleTable';
164
167
  constructor(
165
168
  private angularPConnect: AngularPConnectService,
166
- private utils: Utils,
169
+ public utils: Utils,
167
170
  private dataPageService: DatapageService
168
171
  ) {}
169
172
 
170
173
  ngOnInit(): void {
174
+ this.elementsData = new MatTableDataSource<any>([]);
171
175
  this.isInitialized = true;
172
176
  // First thing in initialization is registering and subscribing to the AngularPConnect service
173
177
  this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
@@ -229,7 +233,9 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
229
233
  renderMode,
230
234
  children, // destructure children into an array var: "resolvedFields"
231
235
  presets,
236
+ allowActions,
232
237
  allowTableEdit,
238
+ allowRowDelete,
233
239
  label: labelProp,
234
240
  propertyLabel,
235
241
  fieldMetadata,
@@ -243,12 +249,22 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
243
249
  targetClassLabel
244
250
  } = this.configProps$;
245
251
 
252
+ const simpleTableManualProps: any = {};
253
+ if (this.checkIfAllowActionsOrRowEditingExist(allowActions) && editMode) {
254
+ simpleTableManualProps.hideAddRow = allowActions?.allowAdd === false;
255
+ simpleTableManualProps.hideDeleteRow = allowActions?.allowDelete === false;
256
+ simpleTableManualProps.hideEditRow = allowActions?.allowEdit === false;
257
+ simpleTableManualProps.disableDragDrop = allowActions?.allowDragDrop === false;
258
+ } else if (allowTableEdit === false) {
259
+ simpleTableManualProps.hideAddRow = true;
260
+ simpleTableManualProps.hideDeleteRow = true;
261
+ simpleTableManualProps.disableDragDrop = true;
262
+ }
263
+
246
264
  this.referenceListStr = getContext(this.pConn$).referenceListStr;
247
265
  this.label = labelProp || propertyLabel;
248
266
  this.parameters = fieldMetadata?.datasource?.parameters;
249
267
  this.targetClassLabel = targetClassLabel;
250
- const hideAddRow = allowTableEdit === false;
251
- const hideDeleteRow = allowTableEdit === false;
252
268
  let { contextClass } = this.configProps$;
253
269
  this.referenceList = referenceList;
254
270
  if (!contextClass) {
@@ -285,10 +301,10 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
285
301
  this.readOnlyMode = renderMode === 'ReadOnly';
286
302
  this.editableMode = renderMode === 'Editable';
287
303
  const isDisplayModeEnabled = displayMode === 'DISPLAY_ONLY';
288
- this.showAddRowButton = !this.readOnlyMode && !hideAddRow;
304
+ this.showAddRowButton = !this.readOnlyMode && !simpleTableManualProps.hideAddRow;
289
305
  this.allowEditingInModal =
290
306
  (editMode ? editMode === 'modal' : addAndEditRowsWithin === 'modal') && !(renderMode === 'ReadOnly' || isDisplayModeEnabled);
291
- const showDeleteButton = this.editableMode && !hideDeleteRow;
307
+ const showDeleteButton = this.editableMode && !simpleTableManualProps.hideDeleteRow && evaluateAllowRowAction(allowRowDelete, this.rowData);
292
308
  this.defaultView = editModeConfig ? editModeConfig.defaultView : viewForAddAndEditModal;
293
309
  this.bUseSeparateViewForEdit = editModeConfig ? editModeConfig.useSeparateViewForEdit : useSeparateViewForEdit;
294
310
  this.editView = editModeConfig ? editModeConfig.editView : viewForEditModal;
@@ -327,7 +343,7 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
327
343
  });
328
344
 
329
345
  // for adding rows to table when editable and not modal view
330
- if (this.prevReferenceList.length !== this.referenceList.length && this.editableMode && !this.allowEditingInModal) {
346
+ if (this.prevReferenceList.length !== this.referenceList.length) {
331
347
  this.buildElementsForTable();
332
348
  }
333
349
 
@@ -354,6 +370,10 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
354
370
  // ties the 3 data structures together.
355
371
  }
356
372
 
373
+ checkIfAllowActionsOrRowEditingExist(newflagobject) {
374
+ return (newflagobject && Object.keys(newflagobject).length > 0) || this.pConn$.getComponentConfig().allowRowEdit;
375
+ }
376
+
357
377
  initializeDefaultPageInstructions() {
358
378
  if (this.isInitialized) {
359
379
  this.isInitialized = false;
@@ -375,8 +395,8 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
375
395
  }
376
396
 
377
397
  sortCompare(a, b): number {
378
- let aValue = a[this.compareRef];
379
- let bValue = b[this.compareRef];
398
+ let aValue = a[0][this.compareRef];
399
+ let bValue = b[0][this.compareRef];
380
400
 
381
401
  if (this.compareType == 'Date' || this.compareType == 'DateTime') {
382
402
  aValue = getSeconds(aValue);
@@ -499,17 +519,20 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
499
519
  // run through list of elements in path, if menu not in th path, then want to
500
520
  // hide (toggle) the menu
501
521
  const eventPath = event.path;
502
- for (let eventIndex = 0; eventIndex < eventPath.length; eventIndex++) {
503
- if (
504
- eventPath[eventIndex].className == 'psdk-modal-file-top' ||
505
- eventPath[eventIndex].tagName == 'BUTTON' ||
506
- eventPath[eventIndex].tagName == 'MAT-OPTION' ||
507
- eventPath[eventIndex].tagName == 'MAT-INPUT'
508
- ) {
509
- bInPopUp = true;
510
- break;
522
+ if (eventPath) {
523
+ for (let eventIndex = 0; eventIndex < eventPath.length; eventIndex++) {
524
+ if (
525
+ eventPath[eventIndex].className == 'psdk-modal-file-top' ||
526
+ eventPath[eventIndex].tagName == 'BUTTON' ||
527
+ eventPath[eventIndex].tagName == 'MAT-OPTION' ||
528
+ eventPath[eventIndex].tagName == 'MAT-INPUT'
529
+ ) {
530
+ bInPopUp = true;
531
+ break;
532
+ }
511
533
  }
512
534
  }
535
+
513
536
  if (!bInPopUp) {
514
537
  // this.bShowFilterPopover$ = false;
515
538
 
@@ -628,7 +651,8 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
628
651
  }
629
652
  }
630
653
 
631
- filterData(item: any) {
654
+ filterData(element: any) {
655
+ const item = element[0];
632
656
  let bKeep = true;
633
657
  for (const filterObj of this.filterByColumns) {
634
658
  if (filterObj.containsFilterValue != '' || filterObj.containsFilter == 'null' || filterObj.containsFilter == 'notnull') {
@@ -642,6 +666,8 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
642
666
  bKeep = filterDataByCommonFields(item, filterObj);
643
667
  break;
644
668
  }
669
+ } else if (filterObj.containsFilterValue === '') {
670
+ bKeep = true;
645
671
  }
646
672
 
647
673
  // if don't keep stop filtering
@@ -654,14 +680,22 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
654
680
  }
655
681
 
656
682
  filterSortGroupBy() {
657
- let theData = this.originalData.slice();
683
+ let theData = this.originalData.slice().map((item, index) => {
684
+ return [item, index];
685
+ });
658
686
 
659
687
  // last filter config data is global
660
688
  theData = theData.filter(this.filterData.bind(this));
661
689
 
662
690
  // last sort config data is global
663
691
  theData.sort(this.sortCompare.bind(this));
664
- this.rowData.data = theData;
692
+ this.rowData.data = theData.map(item => item[0]);
693
+
694
+ const newElements: any = new Array(this.rowData.data.length);
695
+ theData.forEach((item, index) => {
696
+ newElements[index] = this.originalElementsData[item[1]];
697
+ });
698
+ this.elementsData = newElements;
665
699
  }
666
700
 
667
701
  _headerSortClick(event, columnData) {
@@ -960,6 +994,10 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
960
994
  this.referenceList.forEach((element, index) => {
961
995
  const data: any = [];
962
996
  this.rawFields?.forEach(item => {
997
+ item = {
998
+ ...item,
999
+ config: { ...item.config, label: '', displayMode: this.readOnlyMode || this.allowEditingInModal ? 'DISPLAY_ONLY' : undefined }
1000
+ };
963
1001
  const referenceListData = getReferenceList(this.pConn$);
964
1002
  const isDatapage = referenceListData.startsWith('D_');
965
1003
  const pageReferenceValue = isDatapage ? `${referenceListData}[${index}]` : `${this.pConn$.getPageReference()}${referenceListData}[${index}]`;
@@ -977,6 +1015,7 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
977
1015
  });
978
1016
  eleData.push(data);
979
1017
  });
1018
+ this.originalElementsData = eleData;
980
1019
  this.elementsData = eleData;
981
1020
  }
982
1021
  }
@@ -4,7 +4,6 @@
4
4
  <div id="worklist" class="psdk-todo-text">{{ headerText$ }}</div>
5
5
  <div class="psdk-assignment-count">{{ count }}</div>
6
6
  </div>
7
- <br /><br />
8
7
  <div *ngIf="showTodoList$" class="psdk-display-divider"></div>
9
8
 
10
9
  <div class="psdk-todo-assignments">
@@ -27,7 +26,7 @@
27
26
  </div>
28
27
  </div>
29
28
  </div>
30
- <div class="psdk-todo-assignment-action" *ngIf="!isConfirm || canPerform">
29
+ <div *ngIf="!isConfirm || canPerform" class="psdk-todo-assignment-action">
31
30
  <button mat-flat-button color="primary" (click)="clickGo(assignment)">{{ localizedVal('Go', localeCategory) }}</button>
32
31
  </div>
33
32
  </div>
@@ -19,6 +19,7 @@
19
19
 
20
20
  .psdk-todo-header {
21
21
  display: inline-flex;
22
+ margin-bottom: 1rem;
22
23
  }
23
24
 
24
25
  .psdk-todo-text {
@@ -65,6 +66,7 @@
65
66
  display: inline-flex;
66
67
  width: 100%;
67
68
  padding: 0.625rem 0rem;
69
+ align-items: center;
68
70
  }
69
71
 
70
72
  .psdk-todo-assignment-data {
@@ -91,7 +91,6 @@ export class TodoComponent implements OnInit, OnDestroy {
91
91
  localeCategory = 'Todo';
92
92
  showlessLocalizedValue = this.localizedVal('show_less', 'CosmosFields');
93
93
  showMoreLocalizedValue = this.localizedVal('show_more', 'CosmosFields');
94
- canPerform: boolean;
95
94
  count: number;
96
95
 
97
96
  constructor(
@@ -119,6 +118,10 @@ export class TodoComponent implements OnInit, OnDestroy {
119
118
  PCore.getPubSubUtils().unsubscribe(CREATE_STAGE_DELETED, CREATE_STAGE_DELETED);
120
119
  }
121
120
 
121
+ get canPerform() {
122
+ return this.assignmentsSource$?.[0]?.canPerform === 'true' || this.assignmentsSource$?.[0]?.canPerform === true;
123
+ }
124
+
122
125
  updateList() {
123
126
  const {
124
127
  WORK_BASKET: {
@@ -156,8 +159,6 @@ export class TodoComponent implements OnInit, OnDestroy {
156
159
  }
157
160
  }
158
161
 
159
- this.canPerform = this.arAssignments$?.[0]?.canPerform === 'true' || this.arAssignments$?.[0]?.canPerform === true;
160
-
161
162
  this.currentUser$ = PCore.getEnvironmentInfo().getOperatorName();
162
163
  this.currentUserInitials$ = this.utils.getInitials(this.currentUser$ ?? '');
163
164
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/angular-sdk-overrides",
3
- "version": "0.242.6",
3
+ "version": "0.242.8",
4
4
  "description": "Angular SDK - Code for overriding components",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"