@pega/angular-sdk-overrides 0.24.1 → 0.24.3
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.
- package/lib/designSystemExtension/material-vertical-tabs/material-vertical-tabs.component.html +1 -1
- package/lib/field/cancel-alert/cancel-alert.component.ts +0 -2
- package/lib/field/currency/currency.component.html +4 -4
- package/lib/field/currency/currency.component.ts +31 -19
- package/lib/field/date-time/date-time.component.html +5 -5
- package/lib/field/date-time/date-time.component.ts +8 -39
- package/lib/field/decimal/decimal.component.html +13 -4
- package/lib/field/decimal/decimal.component.ts +41 -5
- package/lib/field/dropdown/dropdown.component.ts +0 -3
- package/lib/field/multiselect/utils.ts +1 -1
- package/lib/field/percentage/percentage.component.html +4 -3
- package/lib/field/percentage/percentage.component.ts +24 -5
- package/lib/field/radio-buttons/radio-buttons.component.ts +0 -3
- package/lib/field/scalar-list/scalar-list.component.ts +2 -1
- package/lib/field/text-area/text-area.component.ts +0 -2
- package/lib/field/user-reference/user-reference.component.html +50 -45
- package/lib/field/user-reference/user-reference.component.ts +33 -15
- package/lib/infra/Containers/flow-container/flow-container.component.ts +15 -21
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +0 -1
- package/lib/infra/Containers/view-container/view-container.component.ts +5 -7
- package/lib/infra/assignment/assignment.component.ts +31 -7
- package/lib/infra/dashboard-filter/dashboard-filter.component.ts +0 -1
- package/lib/infra/defer-load/defer-load.component.ts +5 -8
- package/lib/infra/multi-step/multi-step.component.html +1 -1
- package/lib/infra/navbar/navbar.component.html +1 -1
- package/lib/infra/navbar/navbar.component.ts +3 -2
- package/lib/template/case-view/case-view.component.html +3 -3
- package/lib/template/case-view/case-view.component.scss +2 -0
- package/lib/template/case-view/case-view.component.ts +0 -6
- package/lib/template/data-reference/data-reference.component.ts +1 -3
- package/lib/template/dynamic-tabs/dynamic-tabs.component.ts +0 -1
- package/lib/template/field-group-template/field-group-template.component.ts +4 -12
- package/lib/template/list-view/list-view.component.html +2 -2
- package/lib/template/list-view/list-view.component.ts +16 -5
- package/lib/template/list-view/listViewHelpers.ts +0 -1
- package/lib/template/repeating-structures/repeating-structures.component.ts +1 -2
- package/lib/template/simple-table/simple-table.component.ts +0 -2
- package/lib/template/simple-table-manual/simple-table-manual.component.ts +5 -10
- package/lib/template/simple-table-select/simple-table-select.component.ts +2 -4
- package/lib/widget/attachment/attachment.component.html +50 -34
- package/lib/widget/attachment/attachment.component.scss +118 -0
- package/lib/widget/attachment/attachment.component.ts +252 -500
- package/lib/widget/case-history/case-history.component.ts +1 -2
- package/lib/widget/feed-container/feed-container.component.ts +0 -4
- package/lib/widget/file-utility/file-utility.component.html +2 -2
- package/lib/widget/file-utility/file-utility.component.ts +13 -17
- package/lib/widget/list-utility/list-utility.component.html +1 -1
- package/lib/widget/quick-create/quick-create.component.ts +1 -1
- package/lib/widget/todo/todo.component.html +3 -3
- package/lib/widget/todo/todo.component.ts +3 -5
- package/package.json +1 -1
|
@@ -1,48 +1,53 @@
|
|
|
1
1
|
<div class="psdk-user-reference">
|
|
2
|
-
<div *ngIf="
|
|
3
|
-
<component-mapper name="
|
|
4
|
-
</div>
|
|
5
|
-
<div [formGroup]="formGroup$" *ngIf="type === 'dropdown'">
|
|
6
|
-
<mat-form-field class="psdk-full-width" subscriptSizing="dynamic" [hintLabel]="helperText">
|
|
7
|
-
<mat-select
|
|
8
|
-
[value]="value$"
|
|
9
|
-
[required]="bRequired$"
|
|
10
|
-
[formControl]="fieldControl"
|
|
11
|
-
[attr.data-test-id]="testId"
|
|
12
|
-
(selectionChange)="fieldOnChange($event)"
|
|
13
|
-
>
|
|
14
|
-
<mat-option *ngFor="let opt of options$" [value]="opt.key">
|
|
15
|
-
{{ opt.value }}
|
|
16
|
-
</mat-option>
|
|
17
|
-
</mat-select>
|
|
18
|
-
<mat-label>{{ label$ }}</mat-label>
|
|
19
|
-
<mat-error *ngIf="fieldControl.invalid">
|
|
20
|
-
{{ getErrorMessage() }}
|
|
21
|
-
</mat-error>
|
|
22
|
-
</mat-form-field>
|
|
23
|
-
</div>
|
|
24
|
-
<div [formGroup]="formGroup$" *ngIf="type === 'searchbox'">
|
|
25
|
-
<mat-form-field class="psdk-full-width" subscriptSizing="dynamic" [hintLabel]="helperText">
|
|
26
|
-
<mat-label>{{ label$ }}</mat-label>
|
|
27
|
-
<input
|
|
28
|
-
matInput
|
|
29
|
-
[placeholder]="placeholder"
|
|
30
|
-
[formControl]="fieldControl"
|
|
31
|
-
[value]="value$"
|
|
32
|
-
[required]="bRequired$"
|
|
33
|
-
[matAutocomplete]="auto"
|
|
34
|
-
[attr.data-test-id]="testId"
|
|
35
|
-
(change)="fieldOnChange($event)"
|
|
36
|
-
(blur)="fieldOnBlur($event)"
|
|
37
|
-
/>
|
|
38
|
-
<mat-autocomplete #auto="matAutocomplete">
|
|
39
|
-
<mat-option *ngFor="let opt of options$" [value]="opt.value">
|
|
40
|
-
<span>{{ opt.value }}</span>
|
|
41
|
-
</mat-option>
|
|
42
|
-
</mat-autocomplete>
|
|
43
|
-
<mat-error *ngIf="fieldControl.invalid">
|
|
44
|
-
{{ getErrorMessage() }}
|
|
45
|
-
</mat-error>
|
|
46
|
-
</mat-form-field>
|
|
2
|
+
<div *ngIf="displayMode$; else noDisplayMode">
|
|
3
|
+
<component-mapper name="FieldValueList" [props]="{ label$, value$, displayMode$ }"></component-mapper>
|
|
47
4
|
</div>
|
|
5
|
+
<ng-template #noDisplayMode>
|
|
6
|
+
<div *ngIf="type === 'operator'">
|
|
7
|
+
<component-mapper name="Operator" [props]="{ pConn$ }"></component-mapper>
|
|
8
|
+
</div>
|
|
9
|
+
<div [formGroup]="formGroup$" *ngIf="type === 'dropdown'">
|
|
10
|
+
<mat-form-field class="psdk-full-width" subscriptSizing="dynamic" [hintLabel]="helperText">
|
|
11
|
+
<mat-select
|
|
12
|
+
[value]="value$"
|
|
13
|
+
[required]="bRequired$"
|
|
14
|
+
[formControl]="fieldControl"
|
|
15
|
+
[attr.data-test-id]="testId"
|
|
16
|
+
(selectionChange)="fieldOnChange($event)"
|
|
17
|
+
>
|
|
18
|
+
<mat-option *ngFor="let opt of options$" [value]="opt.key">
|
|
19
|
+
{{ opt.value }}
|
|
20
|
+
</mat-option>
|
|
21
|
+
</mat-select>
|
|
22
|
+
<mat-label>{{ label$ }}</mat-label>
|
|
23
|
+
<mat-error *ngIf="fieldControl.invalid">
|
|
24
|
+
{{ getErrorMessage() }}
|
|
25
|
+
</mat-error>
|
|
26
|
+
</mat-form-field>
|
|
27
|
+
</div>
|
|
28
|
+
<div [formGroup]="formGroup$" *ngIf="type === 'searchbox'">
|
|
29
|
+
<mat-form-field class="psdk-full-width" subscriptSizing="dynamic" [hintLabel]="helperText">
|
|
30
|
+
<mat-label>{{ label$ }}</mat-label>
|
|
31
|
+
<input
|
|
32
|
+
matInput
|
|
33
|
+
[placeholder]="placeholder"
|
|
34
|
+
[formControl]="fieldControl"
|
|
35
|
+
[value]="value$"
|
|
36
|
+
[required]="bRequired$"
|
|
37
|
+
[matAutocomplete]="auto"
|
|
38
|
+
[attr.data-test-id]="testId"
|
|
39
|
+
(change)="fieldOnChange($event)"
|
|
40
|
+
(blur)="fieldOnBlur($event)"
|
|
41
|
+
/>
|
|
42
|
+
<mat-autocomplete #auto="matAutocomplete">
|
|
43
|
+
<mat-option *ngFor="let opt of filteredOptions | async" [value]="opt.value">
|
|
44
|
+
<span>{{ opt.value }}</span>
|
|
45
|
+
</mat-option>
|
|
46
|
+
</mat-autocomplete>
|
|
47
|
+
<mat-error *ngIf="fieldControl.invalid">
|
|
48
|
+
{{ getErrorMessage() }}
|
|
49
|
+
</mat-error>
|
|
50
|
+
</mat-form-field>
|
|
51
|
+
</div>
|
|
52
|
+
</ng-template>
|
|
48
53
|
</div>
|
|
@@ -10,6 +10,7 @@ import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-c
|
|
|
10
10
|
import { Utils } from '@pega/angular-sdk-components';
|
|
11
11
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
12
12
|
import { PConnFieldProps } from '@pega/angular-sdk-components';
|
|
13
|
+
import { map, Observable, startWith } from 'rxjs';
|
|
13
14
|
|
|
14
15
|
const OPERATORS_DP = 'D_pyGetOperatorsForCurrentApplication';
|
|
15
16
|
const DROPDOWN_LIST = 'Drop-down list';
|
|
@@ -57,6 +58,9 @@ export class UserReferenceComponent implements OnInit, OnDestroy {
|
|
|
57
58
|
testId: string;
|
|
58
59
|
helperText: string;
|
|
59
60
|
placeholder: string;
|
|
61
|
+
displayMode$?: string;
|
|
62
|
+
filteredOptions: Observable<any[]>;
|
|
63
|
+
filterValue = '';
|
|
60
64
|
|
|
61
65
|
fieldControl = new FormControl('', null);
|
|
62
66
|
|
|
@@ -65,19 +69,24 @@ export class UserReferenceComponent implements OnInit, OnDestroy {
|
|
|
65
69
|
private utils: Utils
|
|
66
70
|
) {}
|
|
67
71
|
|
|
68
|
-
ngOnInit(): void {
|
|
72
|
+
async ngOnInit(): Promise<void> {
|
|
69
73
|
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
70
74
|
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
71
75
|
|
|
72
76
|
this.controlName$ = this.angularPConnect.getComponentID(this);
|
|
73
77
|
|
|
74
|
-
this.checkAndUpdate();
|
|
78
|
+
await this.checkAndUpdate();
|
|
75
79
|
|
|
76
80
|
if (this.formGroup$) {
|
|
77
81
|
// add control to formGroup
|
|
78
82
|
this.formGroup$.addControl(this.controlName$, this.fieldControl);
|
|
79
83
|
this.fieldControl.setValue(this.value$);
|
|
80
84
|
}
|
|
85
|
+
|
|
86
|
+
this.filteredOptions = this.fieldControl.valueChanges.pipe(
|
|
87
|
+
startWith(''),
|
|
88
|
+
map(value => this._filter(value || ''))
|
|
89
|
+
);
|
|
81
90
|
}
|
|
82
91
|
|
|
83
92
|
ngOnDestroy() {
|
|
@@ -105,32 +114,38 @@ export class UserReferenceComponent implements OnInit, OnDestroy {
|
|
|
105
114
|
}
|
|
106
115
|
|
|
107
116
|
// Callback passed when subscribing to store change
|
|
108
|
-
onStateChange() {
|
|
109
|
-
this.checkAndUpdate();
|
|
117
|
+
async onStateChange() {
|
|
118
|
+
await this.checkAndUpdate();
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
private _filter(value: string): string[] {
|
|
122
|
+
const filterVal = (value || this.filterValue).toLowerCase();
|
|
123
|
+
return this.options$?.filter(option => option.value?.toLowerCase().includes(filterVal));
|
|
110
124
|
}
|
|
111
125
|
|
|
112
|
-
checkAndUpdate() {
|
|
126
|
+
async checkAndUpdate() {
|
|
113
127
|
// Should always check the bridge to see if the component should
|
|
114
128
|
// update itself (re-render)
|
|
115
129
|
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
116
130
|
|
|
117
131
|
// ONLY call updateSelf when the component should update
|
|
118
132
|
if (bUpdateSelf) {
|
|
119
|
-
this.updateSelf();
|
|
133
|
+
await this.updateSelf();
|
|
120
134
|
}
|
|
121
135
|
}
|
|
122
136
|
|
|
123
|
-
updateSelf() {
|
|
137
|
+
async updateSelf() {
|
|
124
138
|
const props = this.pConn$.getConfigProps() as UserReferenceProps;
|
|
125
139
|
this.testId = props.testId;
|
|
126
140
|
|
|
127
|
-
const { label, displayAs, value, showAsFormattedText, helperText, placeholder } = props;
|
|
141
|
+
const { label, displayAs, value, showAsFormattedText, helperText, placeholder, displayMode } = props;
|
|
128
142
|
|
|
129
143
|
this.label$ = label;
|
|
130
144
|
this.showAsFormattedText$ = showAsFormattedText;
|
|
131
145
|
this.displayAs$ = displayAs;
|
|
132
146
|
this.helperText = helperText;
|
|
133
147
|
this.placeholder = placeholder || '';
|
|
148
|
+
this.displayMode$ = displayMode;
|
|
134
149
|
|
|
135
150
|
const { readOnly, required } = props;
|
|
136
151
|
[this.bReadonly$, this.bRequired$] = [readOnly, required].map(prop => prop === true || (typeof prop === 'string' && prop === 'true'));
|
|
@@ -158,18 +173,18 @@ export class UserReferenceComponent implements OnInit, OnDestroy {
|
|
|
158
173
|
const queryPayload = {
|
|
159
174
|
dataViewName: OPERATORS_DP
|
|
160
175
|
};
|
|
161
|
-
|
|
162
|
-
.invokeRestApi('getListData', { queryPayload } as any, '') // 3rd arg empty string until typedef marked correctly
|
|
163
|
-
|
|
176
|
+
try {
|
|
177
|
+
const resp: any = await PCore.getRestClient().invokeRestApi('getListData', { queryPayload } as any, ''); // 3rd arg empty string until typedef marked correctly
|
|
178
|
+
if (resp?.data) {
|
|
164
179
|
const ddDataSource = resp.data.data.map(listItem => ({
|
|
165
180
|
key: listItem.pyUserIdentifier,
|
|
166
181
|
value: listItem.pyUserName
|
|
167
182
|
}));
|
|
168
183
|
this.options$ = ddDataSource;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
184
|
+
}
|
|
185
|
+
} catch (error) {
|
|
186
|
+
console.log(error);
|
|
187
|
+
}
|
|
173
188
|
}
|
|
174
189
|
}
|
|
175
190
|
|
|
@@ -177,6 +192,9 @@ export class UserReferenceComponent implements OnInit, OnDestroy {
|
|
|
177
192
|
if (event?.value === 'Select') {
|
|
178
193
|
event.value = '';
|
|
179
194
|
}
|
|
195
|
+
if (event?.target) {
|
|
196
|
+
this.filterValue = (event.target as HTMLInputElement).value;
|
|
197
|
+
}
|
|
180
198
|
this.angularPConnectData.actions?.onChange(this, event);
|
|
181
199
|
}
|
|
182
200
|
|
|
@@ -179,7 +179,6 @@ export class FlowContainerComponent implements OnInit, OnDestroy {
|
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
getTodoVisibilty() {
|
|
182
|
-
// @ts-ignore - second parameter pageReference for getValue method should be optional
|
|
183
182
|
const caseViewMode = this.pConn$.getValue('context_data.caseViewMode');
|
|
184
183
|
if (caseViewMode && caseViewMode === 'review') {
|
|
185
184
|
const kid = this.pConn$.getChildren()[0];
|
|
@@ -273,25 +272,30 @@ export class FlowContainerComponent implements OnInit, OnDestroy {
|
|
|
273
272
|
|
|
274
273
|
hasAssignments() {
|
|
275
274
|
let hasAssignments = false;
|
|
276
|
-
|
|
277
|
-
const
|
|
278
|
-
const thisOperator = PCore.getEnvironmentInfo().getOperatorIdentifier();
|
|
275
|
+
const assignmentsList: any[] = this.pConn$.getValue(this.pCoreConstants.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS);
|
|
276
|
+
// const thisOperator = PCore.getEnvironmentInfo().getOperatorIdentifier();
|
|
279
277
|
// 8.7 includes assignments in Assignments List that may be assigned to
|
|
280
278
|
// a different operator. So, see if there are any assignments for
|
|
281
279
|
// the current operator
|
|
280
|
+
const isEmbedded = window.location.href.includes('embedded');
|
|
282
281
|
let bAssignmentsForThisOperator = false;
|
|
283
282
|
|
|
283
|
+
if (isEmbedded) {
|
|
284
|
+
const thisOperator = PCore.getEnvironmentInfo().getOperatorIdentifier();
|
|
285
|
+
for (const assignment of assignmentsList) {
|
|
286
|
+
if (assignment.assigneeInfo.ID === thisOperator) {
|
|
287
|
+
bAssignmentsForThisOperator = true;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
} else {
|
|
291
|
+
bAssignmentsForThisOperator = true;
|
|
292
|
+
}
|
|
293
|
+
|
|
284
294
|
// Bail if there is no assignmentsList
|
|
285
295
|
if (!assignmentsList) {
|
|
286
296
|
return hasAssignments;
|
|
287
297
|
}
|
|
288
298
|
|
|
289
|
-
for (const assignment of assignmentsList) {
|
|
290
|
-
if ((assignment as any).assigneeInfo.ID === thisOperator) {
|
|
291
|
-
bAssignmentsForThisOperator = true;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
|
|
295
299
|
const hasChildCaseAssignments = this.hasChildCaseAssignments();
|
|
296
300
|
|
|
297
301
|
if (bAssignmentsForThisOperator || hasChildCaseAssignments || this.isCaseWideLocalAction()) {
|
|
@@ -302,9 +306,7 @@ export class FlowContainerComponent implements OnInit, OnDestroy {
|
|
|
302
306
|
}
|
|
303
307
|
|
|
304
308
|
isCaseWideLocalAction() {
|
|
305
|
-
// @ts-ignore - second parameter pageReference for getValue method should be optional
|
|
306
309
|
const actionID = this.pConn$.getValue(this.pCoreConstants.CASE_INFO.ACTIVE_ACTION_ID);
|
|
307
|
-
// @ts-ignore - second parameter pageReference for getValue method should be optional
|
|
308
310
|
const caseActions = this.pConn$.getValue(this.pCoreConstants.CASE_INFO.AVAILABLEACTIONS) as any[];
|
|
309
311
|
let bCaseWideAction = false;
|
|
310
312
|
if (caseActions && actionID) {
|
|
@@ -317,7 +319,6 @@ export class FlowContainerComponent implements OnInit, OnDestroy {
|
|
|
317
319
|
}
|
|
318
320
|
|
|
319
321
|
hasChildCaseAssignments() {
|
|
320
|
-
// @ts-ignore - second parameter pageReference for getValue method should be optional
|
|
321
322
|
const childCases = this.pConn$.getValue(this.pCoreConstants.CASE_INFO.CHILD_ASSIGNMENTS);
|
|
322
323
|
|
|
323
324
|
return childCases && childCases.length > 0;
|
|
@@ -328,9 +329,7 @@ export class FlowContainerComponent implements OnInit, OnDestroy {
|
|
|
328
329
|
|
|
329
330
|
const { CASE_INFO: CASE_CONSTS } = PCore.getConstants();
|
|
330
331
|
|
|
331
|
-
// @ts-ignore - second parameter pageReference for getValue method should be optional
|
|
332
332
|
const caseActions = this.pConn$.getValue(CASE_CONSTS.CASE_INFO_ACTIONS) as any[];
|
|
333
|
-
// @ts-ignore - second parameter pageReference for getValue method should be optional
|
|
334
333
|
const activeActionID = this.pConn$.getValue(CASE_CONSTS.ACTIVE_ACTION_ID);
|
|
335
334
|
const activeAction = caseActions?.find(action => action.ID === activeActionID);
|
|
336
335
|
if (activeAction) {
|
|
@@ -370,7 +369,6 @@ export class FlowContainerComponent implements OnInit, OnDestroy {
|
|
|
370
369
|
// const { getPConnect } = this.arChildren$[0].getPConnect();
|
|
371
370
|
const localPConn = this.arChildren$[0].getPConnect();
|
|
372
371
|
|
|
373
|
-
// @ts-ignore - second parameter pageReference for getValue method should be optional
|
|
374
372
|
const caseViewMode = this.pConn$.getValue('context_data.caseViewMode');
|
|
375
373
|
this.bShowBanner = showBanner(this.pConn$);
|
|
376
374
|
|
|
@@ -424,7 +422,6 @@ export class FlowContainerComponent implements OnInit, OnDestroy {
|
|
|
424
422
|
const todoAssignments = getToDoAssignments(this.pConn$);
|
|
425
423
|
|
|
426
424
|
if (todoAssignments && todoAssignments.length > 0) {
|
|
427
|
-
// @ts-ignore - second parameter pageReference for getValue method should be optional
|
|
428
425
|
this.todo_caseInfoID$ = this.pConn$.getValue(CASE_CONSTS.CASE_INFO_ID);
|
|
429
426
|
this.todo_datasource$ = { source: todoAssignments };
|
|
430
427
|
}
|
|
@@ -452,7 +449,6 @@ export class FlowContainerComponent implements OnInit, OnDestroy {
|
|
|
452
449
|
}
|
|
453
450
|
|
|
454
451
|
showCaseMessages() {
|
|
455
|
-
// @ts-ignore - second parameter pageReference for getValue method should be optional
|
|
456
452
|
this.caseMessages$ = this.localizedVal(this.pConn$.getValue('caseMessages'), this.localeCategory);
|
|
457
453
|
if (this.caseMessages$ || !this.hasAssignments()) {
|
|
458
454
|
this.bHasCaseMessages$ = true;
|
|
@@ -465,11 +461,10 @@ export class FlowContainerComponent implements OnInit, OnDestroy {
|
|
|
465
461
|
}
|
|
466
462
|
|
|
467
463
|
// publish this "assignmentFinished" for mashup, need to get approved as a standard
|
|
468
|
-
// @ts-ignore - second parameter “payload” for publish method should be optional
|
|
469
464
|
PCore.getPubSubUtils().publish('assignmentFinished');
|
|
470
465
|
|
|
471
466
|
this.psService.sendMessage(false);
|
|
472
|
-
} else
|
|
467
|
+
} else {
|
|
473
468
|
this.bHasCaseMessages$ = false;
|
|
474
469
|
this.bShowConfirm = false;
|
|
475
470
|
}
|
|
@@ -565,7 +560,6 @@ export class FlowContainerComponent implements OnInit, OnDestroy {
|
|
|
565
560
|
this.psService.sendMessage(false);
|
|
566
561
|
|
|
567
562
|
const oWorkItem = configObject.getPConnect();
|
|
568
|
-
// @ts-ignore - parameter “contextName” for getDataObject method should be optional
|
|
569
563
|
const oWorkData: any = oWorkItem.getDataObject();
|
|
570
564
|
|
|
571
565
|
this.containerName$ = this.localizedVal(this.getActiveViewLabel() || oWorkData.caseInfo.assignments?.[0].name, undefined, this.localeReference);
|
|
@@ -203,7 +203,6 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy {
|
|
|
203
203
|
const configObject = this.getConfigObject(currentItem, this.pConn$);
|
|
204
204
|
const newComp = configObject?.getPConnect();
|
|
205
205
|
// const newCompName = newComp.getComponentName();
|
|
206
|
-
// @ts-ignore - parameter “contextName” for getDataObject method should be optional
|
|
207
206
|
const caseInfo = newComp && newComp.getDataObject() && newComp.getDataObject().caseInfo ? newComp.getDataObject().caseInfo : null;
|
|
208
207
|
// The metadata for pyDetails changed such that the "template": "CaseView"
|
|
209
208
|
// is no longer a child of the created View but is in the created View's
|
|
@@ -118,17 +118,15 @@ export class ViewContainerComponent implements OnInit, OnDestroy {
|
|
|
118
118
|
/* NOTE: setContainerLimit use is temporary. It is a non-public, unsupported API. */
|
|
119
119
|
PCore.getContainerUtils().setContainerLimit(`${APP.APP}/${name}`, limit);
|
|
120
120
|
}
|
|
121
|
+
}
|
|
121
122
|
|
|
122
|
-
|
|
123
|
+
if (sessionStorage.getItem('hasViewContainer') == 'false') {
|
|
124
|
+
if (this.pConn$.getMetadata().children) {
|
|
123
125
|
containerMgr.addContainerItem(this.dispatchObject);
|
|
124
126
|
}
|
|
125
|
-
}
|
|
126
127
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
// sessionStorage.setItem('hasViewContainer', 'true');
|
|
131
|
-
// }
|
|
128
|
+
sessionStorage.setItem('hasViewContainer', 'true');
|
|
129
|
+
}
|
|
132
130
|
|
|
133
131
|
// cannot call checkAndUpdate becasue first time through, will call updateSelf and that is incorrect (causes issues).
|
|
134
132
|
// however, need angularPConnect to be initialized with currentProps for future updates, so calling shouldComponentUpdate directly
|
|
@@ -60,6 +60,8 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
60
60
|
cancelAssignment: any;
|
|
61
61
|
cancelCreateStageAssignment: any;
|
|
62
62
|
showPage: any;
|
|
63
|
+
approveCase: any;
|
|
64
|
+
rejectCase: any;
|
|
63
65
|
|
|
64
66
|
// itemKey: string = ""; // JA - this is what Nebula/Constellation uses to pass to finishAssignment, navigateToStep
|
|
65
67
|
|
|
@@ -205,6 +207,8 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
205
207
|
this.showPage = actionsAPI.showPage.bind(actionsAPI);
|
|
206
208
|
|
|
207
209
|
this.cancelCreateStageAssignment = actionsAPI.cancelCreateStageAssignment.bind(actionsAPI);
|
|
210
|
+
this.approveCase = actionsAPI.approveCase?.bind(actionsAPI);
|
|
211
|
+
this.rejectCase = actionsAPI.rejectCase?.bind(actionsAPI);
|
|
208
212
|
|
|
209
213
|
this.createButtons();
|
|
210
214
|
}
|
|
@@ -353,8 +357,8 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
353
357
|
|
|
354
358
|
savePromise
|
|
355
359
|
.then(() => {
|
|
360
|
+
// @ts-ignore - Property 'c11nEnv' is private and only accessible within class 'CaseInfo'.
|
|
356
361
|
const caseType = this.pConn$.getCaseInfo().c11nEnv.getValue(PCore.getConstants().CASE_INFO.CASE_TYPE_ID);
|
|
357
|
-
// @ts-ignore - second parameter “payload” for publish method should be optional
|
|
358
362
|
PCore.getPubSubUtils().publish('cancelPressed');
|
|
359
363
|
this.onSaveActionSuccess({ caseType, caseID, assignmentID });
|
|
360
364
|
})
|
|
@@ -369,12 +373,9 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
369
373
|
case 'cancelAssignment':
|
|
370
374
|
this.bReInit = true;
|
|
371
375
|
this.erService.sendMessage('dismiss', '');
|
|
372
|
-
// @ts-ignore - Property 'isAssignmentInCreateStage' is private and only accessible within class 'CaseInfo'
|
|
373
376
|
const isAssignmentInCreateStage = this.pConn$.getCaseInfo().isAssignmentInCreateStage();
|
|
374
377
|
const isLocalAction =
|
|
375
|
-
// @ts-ignore - Property 'isLocalAction' is private and only accessible within class 'CaseInfo'.
|
|
376
378
|
this.pConn$.getCaseInfo().isLocalAction() ||
|
|
377
|
-
// @ts-ignore - second parameter pageReference for getValue method should be optional
|
|
378
379
|
(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION && this.pConn$.getValue(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION));
|
|
379
380
|
// check if create stage (modal)
|
|
380
381
|
if (isAssignmentInCreateStage && this.isInModal$ && !isLocalAction) {
|
|
@@ -394,14 +395,12 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
394
395
|
|
|
395
396
|
// publish before cancel pressed, because
|
|
396
397
|
// cancel assignment happens "after" cancel assignment happens
|
|
397
|
-
// @ts-ignore - second parameter “payload” for publish method should be optional
|
|
398
398
|
PCore.getPubSubUtils().publish('cancelPressed');
|
|
399
399
|
|
|
400
400
|
const cancelPromise = this.cancelAssignment(this.itemKey$);
|
|
401
401
|
cancelPromise
|
|
402
402
|
.then(() => {
|
|
403
403
|
this.psService.sendMessage(false);
|
|
404
|
-
// @ts-ignore - second parameter “payload” for publish method should be optional
|
|
405
404
|
PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.EVENT_CANCEL);
|
|
406
405
|
})
|
|
407
406
|
.catch(() => {
|
|
@@ -411,11 +410,23 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
411
410
|
}
|
|
412
411
|
break;
|
|
413
412
|
|
|
413
|
+
case 'rejectCase': {
|
|
414
|
+
const rejectPromise = this.rejectCase(this.itemKey$);
|
|
415
|
+
|
|
416
|
+
rejectPromise
|
|
417
|
+
.then(() => {})
|
|
418
|
+
.catch(() => {
|
|
419
|
+
this.psService.sendMessage(false);
|
|
420
|
+
this.snackBar.open(`${this.localizedVal('Rejection failed!', this.localeCategory)}`, 'Ok');
|
|
421
|
+
});
|
|
422
|
+
|
|
423
|
+
break;
|
|
424
|
+
}
|
|
425
|
+
|
|
414
426
|
default:
|
|
415
427
|
break;
|
|
416
428
|
}
|
|
417
429
|
} else if (sButtonType == 'primary') {
|
|
418
|
-
// eslint-disable-next-line sonarjs/no-small-switch
|
|
419
430
|
switch (sAction) {
|
|
420
431
|
case 'finishAssignment':
|
|
421
432
|
this.erService.sendMessage('publish', '');
|
|
@@ -437,6 +448,19 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
437
448
|
this.erService.sendMessage('show', this.localizedVal('Please fix errors on form.', this.localeCategory));
|
|
438
449
|
}
|
|
439
450
|
break;
|
|
451
|
+
|
|
452
|
+
case 'approveCase': {
|
|
453
|
+
const approvePromise = this.approveCase(this.itemKey$);
|
|
454
|
+
|
|
455
|
+
approvePromise
|
|
456
|
+
.then(() => {})
|
|
457
|
+
.catch(() => {
|
|
458
|
+
this.psService.sendMessage(false);
|
|
459
|
+
this.snackBar.open(`${this.localizedVal('Approve failed!', this.localeCategory)}`, 'Ok');
|
|
460
|
+
});
|
|
461
|
+
|
|
462
|
+
break;
|
|
463
|
+
}
|
|
440
464
|
default:
|
|
441
465
|
break;
|
|
442
466
|
}
|
|
@@ -47,7 +47,6 @@ export class DashboardFilterComponent implements OnInit {
|
|
|
47
47
|
|
|
48
48
|
clearFilters() {
|
|
49
49
|
this.filtersFormGroup$.reset();
|
|
50
|
-
// @ts-ignore - second parameter “payload” for publish method should be optional
|
|
51
50
|
PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.EVENT_DASHBOARD_FILTER_CLEAR_ALL);
|
|
52
51
|
}
|
|
53
52
|
|
|
@@ -44,7 +44,8 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
44
44
|
|
|
45
45
|
ngOnInit(): void {
|
|
46
46
|
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
47
|
-
|
|
47
|
+
// The below call is causing an error while creating/opening a case, hence commenting it out
|
|
48
|
+
// this.loadActiveTab();
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
ngOnDestroy(): void {
|
|
@@ -56,7 +57,6 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
56
57
|
onStateChange() {
|
|
57
58
|
// Should always check the bridge to see if the component should
|
|
58
59
|
// update itself (re-render)
|
|
59
|
-
// @ts-ignore - second parameter pageReference for getValue method should be optional
|
|
60
60
|
const theRequestedAssignment = this.pConn$.getValue(PCore.getConstants().CASE_INFO.ASSIGNMENT_LABEL);
|
|
61
61
|
if (theRequestedAssignment !== this.currentLoadedAssignment) {
|
|
62
62
|
this.currentLoadedAssignment = theRequestedAssignment;
|
|
@@ -65,7 +65,6 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
ngOnChanges() {
|
|
68
|
-
// @ts-ignore - second parameter pageReference for getValue method should be optional
|
|
69
68
|
this.loadViewCaseID = this.pConn$.getValue(this.constants.PZINSKEY) || this.pConn$.getValue(this.constants.CASE_INFO.CASE_INFO_ID);
|
|
70
69
|
let containerItemData;
|
|
71
70
|
const targetName = this.pConn$.getTarget();
|
|
@@ -91,7 +90,6 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
91
90
|
|
|
92
91
|
getViewOptions = () => ({
|
|
93
92
|
viewContext: this.resourceType,
|
|
94
|
-
// @ts-ignore - parameter “contextName” for getDataObject method should be optional
|
|
95
93
|
pageClass: this.loadViewCaseID ? '' : this.pConn$.getDataObject().pyPortal.classID,
|
|
96
94
|
container: this.isContainerPreview ? 'preview' : null,
|
|
97
95
|
containerName: this.isContainerPreview ? 'preview' : null,
|
|
@@ -138,9 +136,8 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
138
136
|
this.pConn$
|
|
139
137
|
.getActionsApi()
|
|
140
138
|
.showData(this.name, dataContext, dataContextParameters, {
|
|
141
|
-
// @ts-ignore - skipSemanticUrl should be boolean type
|
|
142
139
|
skipSemanticUrl: true,
|
|
143
|
-
// @ts-ignore
|
|
140
|
+
// @ts-ignore - Object literal may only specify known properties, and 'isDeferLoaded' does not exist in type '{ containerName: string; skipSemanticUrl: boolean; }'
|
|
144
141
|
isDeferLoaded: true
|
|
145
142
|
})
|
|
146
143
|
.then(data => {
|
|
@@ -160,8 +157,8 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
160
157
|
} else {
|
|
161
158
|
this.pConn$
|
|
162
159
|
.getActionsApi()
|
|
163
|
-
.refreshCaseView(encodeURI(this.loadViewCaseID), this.name,
|
|
164
|
-
.then(data => {
|
|
160
|
+
.refreshCaseView(encodeURI(this.loadViewCaseID), this.name, '')
|
|
161
|
+
.then((data: any) => {
|
|
165
162
|
this.onResponse(data.root);
|
|
166
163
|
});
|
|
167
164
|
}
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
<span>{{ i + 1 }}</span>
|
|
55
55
|
</div>
|
|
56
56
|
</div>
|
|
57
|
-
<div class="{{ _getHLabelClass(mainStep.visited_status) }}">
|
|
57
|
+
<div id="multi-step-label" class="{{ _getHLabelClass(mainStep.visited_status) }}">
|
|
58
58
|
<div class="psdk-horizontal-step-text-label">
|
|
59
59
|
{{ mainStep.name }}
|
|
60
60
|
</div>
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
</div>
|
|
40
40
|
<div class="psdk-nav-divider"></div>
|
|
41
41
|
<div>
|
|
42
|
-
<mat-list>
|
|
42
|
+
<mat-list id="profile">
|
|
43
43
|
<mat-list-item [matMenuTriggerFor]="menu" class="psdk-profile-list-item">
|
|
44
44
|
<div class="flex-box">
|
|
45
45
|
<div class="psdk-nav-oper-avatar">{{ portalOperatorInitials$ }}</div>
|
|
@@ -120,7 +120,6 @@ export class NavbarComponent implements OnInit, OnDestroy {
|
|
|
120
120
|
this.navPages$.forEach(page => {
|
|
121
121
|
page.iconName = this.utils.getImageSrc(page.pxPageViewIcon, this.utils.getSDKStaticContentUrl());
|
|
122
122
|
});
|
|
123
|
-
// @ts-ignore - second parameter pageReference for getValue method should be optional
|
|
124
123
|
this.localeReference = this.pConn$.getValue('.pyLocaleReference');
|
|
125
124
|
this.actionsAPI = this.pConn$.getActionsApi();
|
|
126
125
|
this.createWork = this.actionsAPI.createWork.bind(this.actionsAPI);
|
|
@@ -165,7 +164,9 @@ export class NavbarComponent implements OnInit, OnDestroy {
|
|
|
165
164
|
containerName: 'primary',
|
|
166
165
|
flowType: sFlowType || 'pyStartCase'
|
|
167
166
|
};
|
|
168
|
-
this.createWork(sCaseType, actionInfo)
|
|
167
|
+
this.createWork(sCaseType, actionInfo).then(() => {
|
|
168
|
+
console.log('createWork completed');
|
|
169
|
+
});
|
|
169
170
|
}
|
|
170
171
|
|
|
171
172
|
navPanelLogoutClick() {
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
<img class="psdk-case-svg-icon" src="{{ svgCase$ }}" />
|
|
7
7
|
</div>
|
|
8
8
|
<div class="psdk-case-view-heading">
|
|
9
|
-
<div id="current-caseID" [hidden]="true">{{ currentCaseID }}</div>
|
|
10
|
-
<div class="psdk-case-view-heading-id" id="caseId">{{ id$ }}</div>
|
|
11
9
|
<div>
|
|
12
|
-
<h1>{{ heading$ }}</h1>
|
|
10
|
+
<h1 id="case-name">{{ heading$ }}</h1>
|
|
13
11
|
</div>
|
|
12
|
+
<div id="current-caseID" [hidden]="true">{{ currentCaseID }}</div>
|
|
13
|
+
<div class="psdk-case-view-heading-id" id="caseId">{{ id$ }}</div>
|
|
14
14
|
</div>
|
|
15
15
|
</mat-toolbar-row>
|
|
16
16
|
</mat-toolbar>
|
|
@@ -106,9 +106,7 @@ export class CaseViewComponent implements OnInit, OnDestroy {
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
hasCaseIDChanged(): boolean {
|
|
109
|
-
// @ts-ignore - parameter “contextName” for getDataObject method should be optional
|
|
110
109
|
if (this.currentCaseID !== this.pConn$.getDataObject().caseInfo.ID) {
|
|
111
|
-
// @ts-ignore - parameter “contextName” for getDataObject method should be optional
|
|
112
110
|
this.currentCaseID = this.pConn$.getDataObject().caseInfo.ID;
|
|
113
111
|
return true;
|
|
114
112
|
}
|
|
@@ -117,13 +115,11 @@ export class CaseViewComponent implements OnInit, OnDestroy {
|
|
|
117
115
|
|
|
118
116
|
updateHeaderAndSummary() {
|
|
119
117
|
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as CaseViewProps;
|
|
120
|
-
// @ts-ignore - parameter “contextName” for getDataObject method should be optional
|
|
121
118
|
const hasNewAttachments = this.pConn$.getDataObject().caseInfo?.hasNewAttachments;
|
|
122
119
|
|
|
123
120
|
if (hasNewAttachments !== this.bHasNewAttachments) {
|
|
124
121
|
this.bHasNewAttachments = hasNewAttachments;
|
|
125
122
|
if (this.bHasNewAttachments) {
|
|
126
|
-
// @ts-ignore - Argument of type 'boolean' is not assignable to parameter of type 'object'
|
|
127
123
|
PCore.getPubSubUtils().publish((PCore.getEvents().getCaseEvent() as any).CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW, true);
|
|
128
124
|
}
|
|
129
125
|
}
|
|
@@ -142,7 +138,6 @@ export class CaseViewComponent implements OnInit, OnDestroy {
|
|
|
142
138
|
|
|
143
139
|
this.heading$ = PCore.getLocaleUtils().getLocaleValue(this.configProps$.header, '', this.localeKey);
|
|
144
140
|
this.id$ = this.configProps$.subheader;
|
|
145
|
-
// @ts-ignore - second parameter pageReference for getValue method should be optional
|
|
146
141
|
this.status$ = this.pConn$.getValue('.pyStatusWork');
|
|
147
142
|
});
|
|
148
143
|
}
|
|
@@ -158,7 +153,6 @@ export class CaseViewComponent implements OnInit, OnDestroy {
|
|
|
158
153
|
|
|
159
154
|
this.arChildren$ = this.pConn$.getChildren() as any[];
|
|
160
155
|
|
|
161
|
-
// @ts-ignore - parameter “contextName” for getDataObject method should be optional
|
|
162
156
|
const caseInfo = this.pConn$.getDataObject().caseInfo;
|
|
163
157
|
this.currentCaseID = caseInfo.ID;
|
|
164
158
|
this.arAvailableActions$ = caseInfo?.availableActions ? caseInfo.availableActions : [];
|
|
@@ -176,10 +176,8 @@ export class DataReferenceComponent implements OnInit, OnDestroy {
|
|
|
176
176
|
handleSelection(event) {
|
|
177
177
|
const caseKey = this.pConn$.getCaseInfo().getKey();
|
|
178
178
|
const refreshOptions = { autoDetectRefresh: true };
|
|
179
|
-
// @ts-ignore - second parameter pageReference for getValue method should be optional
|
|
180
179
|
if (this.canBeChangedInReviewMode && this.pConn$.getValue('__currentPageTabViewName')) {
|
|
181
|
-
|
|
182
|
-
this.pConn$.getActionsApi().refreshCaseView(caseKey, this.pConn$.getValue('__currentPageTabViewName'), null, refreshOptions);
|
|
180
|
+
this.pConn$.getActionsApi().refreshCaseView(caseKey, this.pConn$.getValue('__currentPageTabViewName'), '', refreshOptions);
|
|
183
181
|
PCore.getDeferLoadManager().refreshActiveComponents(this.pConn$.getContextName());
|
|
184
182
|
} else {
|
|
185
183
|
const pgRef = this.pConn$.getPageReference().replace('caseInfo.content', '');
|