@pega/angular-sdk-overrides 0.24.9 → 0.25.2
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/alert/alert.component.scss +3 -3
- package/lib/designSystemExtension/alert/alert.component.ts +0 -1
- package/lib/designSystemExtension/alert-banner/alert-banner.component.ts +1 -2
- package/lib/designSystemExtension/banner/banner.component.scss +12 -2
- package/lib/designSystemExtension/banner/banner.component.ts +0 -1
- package/lib/designSystemExtension/case-create-stage/case-create-stage.component.ts +1 -2
- package/lib/designSystemExtension/field-group/field-group.component.ts +0 -1
- package/lib/designSystemExtension/material-case-summary/material-case-summary.component.html +6 -3
- package/lib/designSystemExtension/material-case-summary/material-case-summary.component.scss +7 -35
- package/lib/designSystemExtension/material-case-summary/material-case-summary.component.ts +0 -2
- package/lib/designSystemExtension/material-details/material-details.component.scss +0 -5
- package/lib/designSystemExtension/material-details/material-details.component.ts +0 -1
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.html +4 -4
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.scss +4 -3
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.ts +10 -2
- package/lib/designSystemExtension/material-summary-item/material-summary-item.component.scss +2 -17
- package/lib/designSystemExtension/material-summary-item/material-summary-item.component.ts +0 -1
- package/lib/designSystemExtension/material-summary-list/material-summary-list.component.ts +0 -1
- package/lib/designSystemExtension/material-utility/material-utility.component.scss +1 -2
- package/lib/designSystemExtension/material-vertical-tabs/material-vertical-tabs.component.scss +1 -1
- package/lib/designSystemExtension/material-vertical-tabs/material-vertical-tabs.component.ts +0 -1
- package/lib/designSystemExtension/operator/operator.component.html +2 -2
- package/lib/designSystemExtension/operator/operator.component.scss +13 -12
- package/lib/designSystemExtension/operator/operator.component.ts +5 -6
- package/lib/designSystemExtension/pulse/pulse.component.scss +2 -2
- package/lib/designSystemExtension/pulse/pulse.component.ts +7 -8
- package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.scss +0 -1
- package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.ts +0 -1
- package/lib/designSystemExtension/wss-quick-create/wss-quick-create.component.scss +16 -8
- package/lib/designSystemExtension/wss-quick-create/wss-quick-create.component.ts +0 -1
- package/lib/field/auto-complete/auto-complete.component.html +0 -2
- package/lib/field/auto-complete/auto-complete.component.ts +56 -178
- package/lib/field/cancel-alert/cancel-alert.component.html +8 -12
- package/lib/field/cancel-alert/cancel-alert.component.scss +2 -3
- package/lib/field/cancel-alert/cancel-alert.component.ts +24 -37
- package/lib/field/check-box/check-box.component.html +17 -6
- package/lib/field/check-box/check-box.component.scss +0 -1
- package/lib/field/check-box/check-box.component.ts +32 -157
- package/lib/field/currency/currency.component.html +4 -4
- package/lib/field/currency/currency.component.ts +65 -175
- package/lib/field/date/date.component.html +4 -8
- package/lib/field/date/date.component.ts +39 -177
- package/lib/field/date-time/date-time.component.html +3 -4
- package/lib/field/date-time/date-time.component.ts +46 -146
- package/lib/field/decimal/decimal.component.html +4 -3
- package/lib/field/decimal/decimal.component.ts +66 -166
- package/lib/field/dropdown/dropdown.component.html +1 -0
- package/lib/field/dropdown/dropdown.component.ts +158 -153
- package/lib/field/email/email.component.ts +28 -148
- package/lib/field/field.base.ts +149 -0
- package/lib/field/group/group.component.ts +9 -7
- package/lib/field/integer/integer.component.ts +30 -152
- package/lib/field/list-view-action-buttons/list-view-action-buttons.component.html +1 -1
- package/lib/field/list-view-action-buttons/list-view-action-buttons.component.ts +3 -3
- package/lib/field/location/config-ext.json +8 -0
- package/lib/field/location/location.component.html +45 -0
- package/lib/field/location/location.component.scss +18 -0
- package/lib/field/location/location.component.spec.ts +22 -0
- package/lib/field/location/location.component.ts +385 -0
- package/lib/field/multiselect/multiselect.component.ts +56 -151
- package/lib/field/multiselect/utils.ts +55 -47
- package/lib/field/object-reference/object-reference.component.html +17 -0
- package/lib/field/object-reference/object-reference.component.scss +0 -0
- package/lib/field/object-reference/object-reference.component.spec.ts +22 -0
- package/lib/field/object-reference/object-reference.component.ts +237 -0
- package/lib/field/percentage/percentage.component.html +3 -3
- package/lib/field/percentage/percentage.component.ts +68 -161
- package/lib/field/phone/config-ext.json +1 -1
- package/lib/field/phone/phone.component.html +9 -6
- package/lib/field/phone/phone.component.scss +9 -0
- package/lib/field/phone/phone.component.ts +48 -159
- package/lib/field/radio-buttons/radio-buttons.component.html +17 -12
- package/lib/field/radio-buttons/radio-buttons.component.scss +4 -2
- package/lib/field/radio-buttons/radio-buttons.component.ts +39 -162
- package/lib/field/rich-text/rich-text.component.ts +32 -93
- package/lib/field/scalar-list/scalar-list.component.ts +20 -77
- package/lib/field/selectable-card/selectable-card.component.html +70 -0
- package/lib/field/selectable-card/selectable-card.component.scss +11 -0
- package/lib/field/selectable-card/selectable-card.component.spec.ts +22 -0
- package/lib/field/selectable-card/selectable-card.component.ts +219 -0
- package/lib/field/semantic-link/semantic-link.component.html +4 -8
- package/lib/field/semantic-link/semantic-link.component.scss +0 -13
- package/lib/field/semantic-link/semantic-link.component.ts +165 -6
- package/lib/field/text/text.component.scss +0 -1
- package/lib/field/text/text.component.ts +8 -5
- package/lib/field/text-area/text-area.component.html +4 -1
- package/lib/field/text-area/text-area.component.ts +30 -148
- package/lib/field/text-content/text-content.component.ts +0 -1
- package/lib/field/text-input/text-input.component.ts +28 -150
- package/lib/field/time/time.component.html +2 -2
- package/lib/field/time/time.component.ts +39 -145
- package/lib/field/url/url.component.ts +28 -149
- package/lib/field/user-reference/user-reference.component.html +40 -46
- package/lib/field/user-reference/user-reference.component.scss +0 -1
- package/lib/field/user-reference/user-reference.component.ts +110 -21
- package/lib/infra/Containers/flow-container/flow-container.component.html +1 -1
- package/lib/infra/Containers/flow-container/flow-container.component.ts +29 -54
- package/lib/infra/Containers/flow-container/helpers.ts +2 -2
- package/lib/infra/Containers/hybrid-view-container/hybrid-view-container.component.ts +0 -1
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.html +1 -11
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +6 -19
- package/lib/infra/Containers/preview-view-container/preview-view-container.component.ts +1 -1
- package/lib/infra/Containers/view-container/helper.ts +55 -0
- package/lib/infra/Containers/view-container/view-container.component.ts +6 -19
- package/lib/infra/action-buttons/action-buttons.component.html +13 -8
- package/lib/infra/action-buttons/action-buttons.component.scss +23 -0
- package/lib/infra/action-buttons/action-buttons.component.ts +1 -3
- package/lib/infra/assignment/assignment.component.html +1 -1
- package/lib/infra/assignment/assignment.component.ts +90 -47
- package/lib/infra/assignment-card/assignment-card.component.html +2 -2
- package/lib/infra/assignment-card/assignment-card.component.scss +0 -4
- package/lib/infra/assignment-card/assignment-card.component.ts +21 -5
- package/lib/infra/dashboard-filter/dashboard-filter.component.ts +0 -1
- package/lib/infra/defer-load/defer-load.component.html +6 -2
- package/lib/infra/defer-load/defer-load.component.ts +24 -16
- package/lib/infra/error-boundary/error-boundary.component.ts +0 -1
- package/lib/infra/multi-step/multi-step.component.scss +1 -21
- package/lib/infra/multi-step/multi-step.component.ts +0 -1
- package/lib/infra/navbar/navbar.component.html +25 -28
- package/lib/infra/navbar/navbar.component.scss +16 -4
- package/lib/infra/navbar/navbar.component.ts +11 -9
- package/lib/infra/reference/reference.component.ts +77 -90
- package/lib/infra/region/region.component.ts +0 -1
- package/lib/infra/root-container/root-container.component.html +2 -15
- package/lib/infra/root-container/root-container.component.scss +0 -1
- package/lib/infra/root-container/root-container.component.ts +28 -35
- package/lib/infra/stages/stages.component.html +2 -2
- package/lib/infra/stages/stages.component.scss +9 -37
- package/lib/infra/stages/stages.component.ts +4 -3
- package/lib/infra/view/view.component.html +7 -20
- package/lib/infra/view/view.component.ts +20 -5
- package/lib/template/advanced-search/advanced-search.component.html +12 -0
- package/lib/template/advanced-search/advanced-search.component.scss +0 -0
- package/lib/template/advanced-search/advanced-search.component.spec.ts +0 -0
- package/lib/template/advanced-search/advanced-search.component.ts +112 -0
- package/lib/template/advanced-search/advanced-search.service.ts +27 -0
- package/lib/template/advanced-search/search-group/persist-utils.ts +56 -0
- package/lib/template/advanced-search/search-groups/search-groups.component.html +32 -0
- package/lib/template/advanced-search/search-groups/search-groups.component.scss +0 -0
- package/lib/template/advanced-search/search-groups/search-groups.component.spec.ts +0 -0
- package/lib/template/advanced-search/search-groups/search-groups.component.ts +294 -0
- package/lib/template/advanced-search/search-groups/utils.ts +29 -0
- package/lib/template/app-shell/app-shell.component.html +4 -1
- package/lib/template/app-shell/app-shell.component.scss +0 -3
- package/lib/template/app-shell/app-shell.component.ts +66 -10
- package/lib/template/banner-page/banner-page.component.ts +0 -1
- package/lib/template/base/details-template-base.ts +67 -0
- package/lib/template/base/form-template-base.ts +16 -0
- package/lib/template/case-summary/case-summary.component.scss +0 -2
- package/lib/template/case-summary/case-summary.component.ts +7 -23
- package/lib/template/case-view/case-view.component.html +7 -7
- package/lib/template/case-view/case-view.component.scss +18 -10
- package/lib/template/case-view/case-view.component.ts +9 -15
- package/lib/template/confirmation/confirmation.component.html +1 -1
- package/lib/template/confirmation/confirmation.component.ts +1 -2
- package/lib/template/data-reference/data-reference-advanced-search.service.ts +16 -0
- package/lib/template/data-reference/data-reference.component.html +11 -8
- package/lib/template/data-reference/data-reference.component.ts +377 -148
- package/lib/template/data-reference/search-form/search-form.component.html +39 -0
- package/lib/template/data-reference/search-form/search-form.component.scss +11 -0
- package/lib/template/data-reference/search-form/search-form.component.spec.ts +0 -0
- package/lib/template/data-reference/search-form/search-form.component.ts +167 -0
- package/lib/template/data-reference/search-form/tabsData.ts +160 -0
- package/lib/template/data-reference/utils.ts +92 -0
- package/lib/template/default-form/default-form.component.html +0 -4
- package/lib/template/default-form/default-form.component.ts +50 -26
- package/lib/template/default-page/default-page.component.html +34 -0
- package/lib/template/default-page/default-page.component.scss +31 -0
- package/lib/template/default-page/default-page.component.spec.ts +24 -0
- package/lib/template/default-page/default-page.component.ts +64 -0
- package/lib/template/details/details.component.ts +7 -42
- package/lib/template/details-narrow-wide/details-narrow-wide.component.ts +6 -40
- package/lib/template/details-one-column/details-one-column.component.ts +7 -43
- package/lib/template/details-sub-tabs/details-sub-tabs.component.html +1 -2
- package/lib/template/details-sub-tabs/details-sub-tabs.component.ts +5 -38
- package/lib/template/details-three-column/details-three-column.component.ts +7 -44
- package/lib/template/details-two-column/details-two-column.component.ts +8 -45
- package/lib/template/details-wide-narrow/details-wide-narrow.component.ts +7 -43
- package/lib/template/dynamic-tabs/dynamic-tabs.component.html +3 -0
- package/lib/template/dynamic-tabs/dynamic-tabs.component.ts +8 -4
- package/lib/template/field-group-list/field-group-list.component.scss +0 -1
- package/lib/template/field-group-list/field-group-list.component.ts +0 -1
- package/lib/template/field-group-template/field-group-template.component.html +7 -7
- package/lib/template/field-group-template/field-group-template.component.scss +8 -0
- package/lib/template/field-group-template/field-group-template.component.ts +68 -48
- package/lib/template/field-value-list/field-value-list.component.html +2 -2
- package/lib/template/field-value-list/field-value-list.component.scss +6 -1
- package/lib/template/field-value-list/field-value-list.component.ts +0 -1
- package/lib/template/inline-dashboard/inline-dashboard.component.ts +0 -1
- package/lib/template/inline-dashboard-page/inline-dashboard-page.component.ts +2 -3
- package/lib/template/list-page/list-page.component.ts +0 -1
- package/lib/template/list-view/list-view.component.html +14 -4
- package/lib/template/list-view/list-view.component.scss +30 -19
- package/lib/template/list-view/list-view.component.ts +179 -95
- package/lib/template/list-view/listViewHelpers.ts +4 -10
- package/lib/template/list-view/utils.ts +27 -7
- package/lib/template/multi-reference-readonly/multi-reference-readonly.component.ts +0 -1
- package/lib/template/narrow-wide-form/narrow-wide-form.component.ts +1 -2
- package/lib/template/object-page/object-page.component.html +1 -0
- package/lib/template/object-page/object-page.component.scss +0 -0
- package/lib/template/object-page/object-page.component.spec.ts +22 -0
- package/lib/template/object-page/object-page.component.ts +14 -0
- package/lib/template/one-column/one-column.component.ts +4 -4
- package/lib/template/one-column-page/one-column-page.component.ts +0 -1
- package/lib/template/one-column-tab/one-column-tab.component.scss +1 -1
- package/lib/template/one-column-tab/one-column-tab.component.ts +1 -2
- package/lib/template/page/page.component.ts +1 -2
- package/lib/template/promoted-filters/promoted-filters.component.ts +1 -2
- package/lib/template/repeating-structures/repeating-structures.component.ts +1 -3
- package/lib/template/self-service-case-view/self-service-case-view.component.html +80 -0
- package/lib/template/self-service-case-view/self-service-case-view.component.scss +124 -0
- package/lib/template/self-service-case-view/self-service-case-view.component.spec.ts +24 -0
- package/lib/template/self-service-case-view/self-service-case-view.component.ts +216 -0
- package/lib/template/simple-table/simple-table.component.ts +0 -2
- package/lib/template/simple-table-manual/helpers.ts +127 -11
- package/lib/template/simple-table-manual/simple-table-manual.component.html +27 -8
- package/lib/template/simple-table-manual/simple-table-manual.component.scss +16 -17
- package/lib/template/simple-table-manual/simple-table-manual.component.ts +118 -58
- package/lib/template/simple-table-select/simple-table-select.component.ts +3 -4
- package/lib/template/single-reference-readonly/single-reference-readonly.component.html +4 -1
- package/lib/template/single-reference-readonly/single-reference-readonly.component.scss +21 -0
- package/lib/template/single-reference-readonly/single-reference-readonly.component.ts +104 -4
- package/lib/template/sub-tabs/sub-tabs.component.ts +0 -1
- package/lib/template/three-column/three-column.component.ts +4 -4
- package/lib/template/three-column-page/three-column-page.component.ts +0 -1
- package/lib/template/two-column/two-column.component.ts +4 -4
- package/lib/template/two-column-page/two-column-page.component.ts +0 -1
- package/lib/template/two-column-tab/two-column-tab.component.ts +1 -2
- package/lib/template/utils.ts +58 -0
- package/lib/template/wide-narrow-form/wide-narrow-form.component.ts +4 -4
- package/lib/template/wide-narrow-page/wide-narrow-page.component.ts +1 -2
- package/lib/template/wss-nav-bar/wss-nav-bar.component.html +5 -4
- package/lib/template/wss-nav-bar/wss-nav-bar.component.scss +2 -8
- package/lib/template/wss-nav-bar/wss-nav-bar.component.ts +3 -11
- package/lib/widget/app-announcement/app-announcement.component.html +1 -2
- package/lib/widget/app-announcement/app-announcement.component.scss +2 -2
- package/lib/widget/app-announcement/app-announcement.component.ts +0 -1
- package/lib/widget/attachment/Attachment.types.ts +92 -0
- package/lib/widget/attachment/AttachmentUtils.ts +287 -0
- package/lib/widget/attachment/attachment.component.html +3 -3
- package/lib/widget/attachment/attachment.component.scss +2 -5
- package/lib/widget/attachment/attachment.component.ts +256 -259
- package/lib/widget/case-history/case-history.component.ts +0 -1
- package/lib/widget/feed-container/feed-container.component.scss +3 -9
- package/lib/widget/feed-container/feed-container.component.ts +9 -12
- package/lib/widget/file-utility/file-utility.component.html +3 -3
- package/lib/widget/file-utility/file-utility.component.scss +5 -16
- package/lib/widget/file-utility/file-utility.component.ts +2 -6
- package/lib/widget/list-utility/list-utility.component.scss +3 -5
- package/lib/widget/list-utility/list-utility.component.ts +0 -1
- package/lib/widget/quick-create/quick-create.component.ts +0 -1
- package/lib/widget/todo/todo.component.html +13 -11
- package/lib/widget/todo/todo.component.scss +19 -11
- package/lib/widget/todo/todo.component.ts +101 -87
- package/lib/widget/utility/utility.component.ts +0 -1
- package/package.json +1 -1
|
@@ -18,12 +18,10 @@ import { ReferenceComponent } from '@pega/angular-sdk-components';
|
|
|
18
18
|
selector: 'app-modal-view-container',
|
|
19
19
|
templateUrl: './modal-view-container.component.html',
|
|
20
20
|
styleUrls: ['./modal-view-container.component.scss'],
|
|
21
|
-
standalone: true,
|
|
22
21
|
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
23
22
|
})
|
|
24
23
|
export class ModalViewContainerComponent implements OnInit, OnDestroy {
|
|
25
24
|
@Input() pConn$: typeof PConnect;
|
|
26
|
-
@Input() displayOnlyFA$: boolean;
|
|
27
25
|
|
|
28
26
|
// for when non modal
|
|
29
27
|
@Output() modalVisibleChange = new EventEmitter<boolean>();
|
|
@@ -32,17 +30,16 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy {
|
|
|
32
30
|
angularPConnectData: AngularPConnectData = {};
|
|
33
31
|
|
|
34
32
|
arChildren$: any[];
|
|
35
|
-
stateProps$:
|
|
33
|
+
stateProps$: object;
|
|
36
34
|
banners: any;
|
|
37
35
|
templateName$: string;
|
|
38
36
|
buildName$: string;
|
|
39
37
|
context$: string;
|
|
40
38
|
title$ = '';
|
|
41
39
|
bShowModal$ = false;
|
|
42
|
-
bShowAsModal$ = true;
|
|
43
40
|
itemKey$: string;
|
|
44
41
|
formGroup$: FormGroup;
|
|
45
|
-
oCaseInfo:
|
|
42
|
+
oCaseInfo: object = {};
|
|
46
43
|
|
|
47
44
|
// for causing a change on assignment
|
|
48
45
|
updateToken$ = 0;
|
|
@@ -73,11 +70,6 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy {
|
|
|
73
70
|
}
|
|
74
71
|
|
|
75
72
|
ngOnInit(): void {
|
|
76
|
-
if (this.displayOnlyFA$) {
|
|
77
|
-
// for when non modal
|
|
78
|
-
this.bShowAsModal$ = false;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
73
|
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
82
74
|
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
83
75
|
|
|
@@ -89,7 +81,7 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy {
|
|
|
89
81
|
this.itemKey$ = baseContext.concat('/').concat(acName);
|
|
90
82
|
}
|
|
91
83
|
|
|
92
|
-
const containerMgr
|
|
84
|
+
const containerMgr = this.pConn$.getContainerManager();
|
|
93
85
|
|
|
94
86
|
containerMgr.initializeContainers({
|
|
95
87
|
type: 'multiple'
|
|
@@ -142,7 +134,7 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy {
|
|
|
142
134
|
// @ts-ignore - Property 'getLoadingStatus' is private and only accessible within class 'C11nEnv'
|
|
143
135
|
loadingInfo = this.pConn$.getLoadingStatus();
|
|
144
136
|
} catch (ex) {
|
|
145
|
-
|
|
137
|
+
console.log(ex);
|
|
146
138
|
}
|
|
147
139
|
// const configProps = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps());
|
|
148
140
|
this.stateProps$ = this.pConn$.getStateProps();
|
|
@@ -242,12 +234,7 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy {
|
|
|
242
234
|
this.title$ =
|
|
243
235
|
isDataObject || this.isMultiRecord
|
|
244
236
|
? this.getModalHeading(dataObjectAction)
|
|
245
|
-
: this.determineModalHeaderByAction(
|
|
246
|
-
actionName,
|
|
247
|
-
caseTypeName,
|
|
248
|
-
ID,
|
|
249
|
-
`${theNewCaseInfo?.getClassName()}!CASE!${theNewCaseInfo.getName()}`.toUpperCase()
|
|
250
|
-
);
|
|
237
|
+
: this.determineModalHeaderByAction(actionName, caseTypeName, ID, this.createdViewPConn$?.getCaseLocaleReference());
|
|
251
238
|
|
|
252
239
|
const bIsRefComponent = this.checkIfRefComponent(newComp);
|
|
253
240
|
|
|
@@ -372,7 +359,7 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy {
|
|
|
372
359
|
return {};
|
|
373
360
|
}
|
|
374
361
|
|
|
375
|
-
compareCaseInfoIsDifferent(oCurrentCaseInfo:
|
|
362
|
+
compareCaseInfoIsDifferent(oCurrentCaseInfo: object): boolean {
|
|
376
363
|
let bRet = false;
|
|
377
364
|
|
|
378
365
|
// fast-deep-equal version
|
|
@@ -18,7 +18,7 @@ export class PreviewViewContainerComponent implements OnInit {
|
|
|
18
18
|
@Input() pConn$: typeof PConnect;
|
|
19
19
|
|
|
20
20
|
ngOnInit(): void {
|
|
21
|
-
const containerMgr
|
|
21
|
+
const containerMgr = this.pConn$.getContainerManager();
|
|
22
22
|
|
|
23
23
|
containerMgr.initializeContainers({
|
|
24
24
|
type: 'multiple'
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export const addContainerItem = pConnect => {
|
|
2
|
+
const containerManager = pConnect.getContainerManager();
|
|
3
|
+
const context = pConnect.getContextName();
|
|
4
|
+
containerManager.addContainerItem({
|
|
5
|
+
context,
|
|
6
|
+
semanticURL: ''
|
|
7
|
+
});
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const configureBrowserBookmark = pConnect => {
|
|
11
|
+
const context = pConnect.getContextName();
|
|
12
|
+
const containerName = pConnect.getContainerName();
|
|
13
|
+
const envInfo = PCore.getEnvironmentInfo();
|
|
14
|
+
const { APP } = PCore.getConstants();
|
|
15
|
+
|
|
16
|
+
const navPages = pConnect.getValue('pyPortal.pyPrimaryNavPages');
|
|
17
|
+
let ruleName = '';
|
|
18
|
+
let className = '';
|
|
19
|
+
let defaultViewLabel = '';
|
|
20
|
+
|
|
21
|
+
const isNextGenLandingPageRouting = (envInfo?.environmentInfoObject as any)?.pyExecutionRuntimeName === (APP as any).INFINITY_RUNTIME;
|
|
22
|
+
|
|
23
|
+
if (Array.isArray(navPages) && navPages.length > 0) {
|
|
24
|
+
const firstNavPage = navPages[0];
|
|
25
|
+
const nestedNavPage = firstNavPage.NavigationPages?.[0];
|
|
26
|
+
|
|
27
|
+
if (isNextGenLandingPageRouting) {
|
|
28
|
+
if (nestedNavPage?.pyRuleName) {
|
|
29
|
+
ruleName = nestedNavPage.pyRuleName;
|
|
30
|
+
className = nestedNavPage.pyClassName || '';
|
|
31
|
+
} else if (firstNavPage?.pyRuleName) {
|
|
32
|
+
ruleName = firstNavPage.pyRuleName;
|
|
33
|
+
className = firstNavPage.pyClassName || '';
|
|
34
|
+
} else if (nestedNavPage?.pyLabel) {
|
|
35
|
+
defaultViewLabel = nestedNavPage.pyLabel;
|
|
36
|
+
} else if (firstNavPage?.pyLabel) {
|
|
37
|
+
defaultViewLabel = firstNavPage.pyLabel;
|
|
38
|
+
}
|
|
39
|
+
} else if (nestedNavPage?.pyLabel) {
|
|
40
|
+
defaultViewLabel = nestedNavPage.pyLabel;
|
|
41
|
+
} else if (firstNavPage?.pyLabel) {
|
|
42
|
+
defaultViewLabel = firstNavPage.pyLabel;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
PCore.configureForBrowserBookmark({
|
|
47
|
+
context,
|
|
48
|
+
containerName,
|
|
49
|
+
acName: containerName,
|
|
50
|
+
semanticURL: '',
|
|
51
|
+
defaultViewLabel,
|
|
52
|
+
ruleName,
|
|
53
|
+
className
|
|
54
|
+
});
|
|
55
|
+
};
|
|
@@ -5,6 +5,7 @@ import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-c
|
|
|
5
5
|
import { ProgressSpinnerService } from '@pega/angular-sdk-components';
|
|
6
6
|
import { ReferenceComponent } from '@pega/angular-sdk-components';
|
|
7
7
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
8
|
+
import { configureBrowserBookmark } from './helper';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with
|
|
@@ -27,7 +28,6 @@ interface ViewContainerProps {
|
|
|
27
28
|
selector: 'app-view-container',
|
|
28
29
|
templateUrl: './view-container.component.html',
|
|
29
30
|
styleUrls: ['./view-container.component.scss'],
|
|
30
|
-
standalone: true,
|
|
31
31
|
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
32
32
|
})
|
|
33
33
|
export class ViewContainerComponent implements OnInit, OnDestroy {
|
|
@@ -86,7 +86,7 @@ export class ViewContainerComponent implements OnInit, OnDestroy {
|
|
|
86
86
|
|
|
87
87
|
this.pConn$.isBoundToState();
|
|
88
88
|
|
|
89
|
-
const containerMgr
|
|
89
|
+
const containerMgr = this.pConn$.getContainerManager();
|
|
90
90
|
|
|
91
91
|
this.prepareDispatchObject = this.prepareDispatchObject.bind(this);
|
|
92
92
|
|
|
@@ -96,20 +96,10 @@ export class ViewContainerComponent implements OnInit, OnDestroy {
|
|
|
96
96
|
// And expose less via ui-bootstrap.js
|
|
97
97
|
this.state = {
|
|
98
98
|
dispatchObject: this.dispatchObject,
|
|
99
|
-
// PCore is defined in pxBootstrapShell - eventually will be exported in place of constellationCore
|
|
100
|
-
|
|
101
99
|
visible: !PCore.checkIfSemanticURL()
|
|
102
100
|
};
|
|
103
101
|
|
|
104
|
-
// here, to match Nebula/Constellation, the constructor of ViewContainer is only called once, and thus init/add container is only
|
|
105
|
-
// called once. Because of Angular creating and destroy components if the parent changes a lot, this component will be
|
|
106
|
-
// created and destroyed more than once. So the sessionStore "hasViewContainer" is set to false in rootContainer and then
|
|
107
|
-
// after first round is true here. Subsequent ViewContainer creation will not init/add more containers.
|
|
108
|
-
|
|
109
102
|
if (sessionStorage.getItem('hasViewContainer') == 'false') {
|
|
110
|
-
// unlike Nebula/Constellation, have to initializeContainer after we create a dispatcObject and state, otherwise, when calling
|
|
111
|
-
// initializeContainer before, code will get executed that needs state that wasn't defined.
|
|
112
|
-
|
|
113
103
|
containerMgr.initializeContainers({
|
|
114
104
|
type: mode === CONTAINER_TYPE.MULTIPLE ? CONTAINER_TYPE.MULTIPLE : CONTAINER_TYPE.SINGLE
|
|
115
105
|
});
|
|
@@ -118,12 +108,9 @@ export class ViewContainerComponent implements OnInit, OnDestroy {
|
|
|
118
108
|
/* NOTE: setContainerLimit use is temporary. It is a non-public, unsupported API. */
|
|
119
109
|
PCore.getContainerUtils().setContainerLimit(`${APP.APP}/${name}`, limit);
|
|
120
110
|
}
|
|
121
|
-
}
|
|
122
111
|
|
|
123
|
-
|
|
124
|
-
if (this.
|
|
125
|
-
containerMgr.addContainerItem(this.dispatchObject);
|
|
126
|
-
}
|
|
112
|
+
if (!PCore.checkIfSemanticURL()) containerMgr.addContainerItem(this.pConn$ as any);
|
|
113
|
+
if (!this.displayOnlyFA$) configureBrowserBookmark(this.pConn$);
|
|
127
114
|
|
|
128
115
|
sessionStorage.setItem('hasViewContainer', 'true');
|
|
129
116
|
}
|
|
@@ -174,7 +161,7 @@ export class ViewContainerComponent implements OnInit, OnDestroy {
|
|
|
174
161
|
|
|
175
162
|
this.psService.sendMessage(loadingInfo);
|
|
176
163
|
} catch (ex) {
|
|
177
|
-
|
|
164
|
+
console.log(ex);
|
|
178
165
|
}
|
|
179
166
|
|
|
180
167
|
// const buildName = this.buildName();
|
|
@@ -254,7 +241,7 @@ export class ViewContainerComponent implements OnInit, OnDestroy {
|
|
|
254
241
|
console.error(`ViewContainer has a newComp that is NOT a reference!`);
|
|
255
242
|
|
|
256
243
|
this.createdViewPConn$ = newComp;
|
|
257
|
-
const newConfigProps
|
|
244
|
+
const newConfigProps = newComp.getConfigProps();
|
|
258
245
|
this.templateName$ = newConfigProps.template || '';
|
|
259
246
|
this.title$ = newConfigProps.title || '';
|
|
260
247
|
// update children with new view's children
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
<
|
|
2
|
-
<
|
|
3
|
-
<button
|
|
1
|
+
<div class="button-bar" *ngIf="arMainButtons$ && arSecondaryButtons$">
|
|
2
|
+
<div class="left-group">
|
|
3
|
+
<button
|
|
4
|
+
*ngFor="let aButton of arSecondaryButtons$"
|
|
5
|
+
mat-stroked-button
|
|
6
|
+
class="secondary-button"
|
|
7
|
+
(click)="buttonClick(aButton.jsAction, 'secondary')"
|
|
8
|
+
>
|
|
4
9
|
{{ localizedVal(aButton.name, localeCategory) }}
|
|
5
10
|
</button>
|
|
6
|
-
</
|
|
7
|
-
<
|
|
8
|
-
<button *ngFor="let aButton of arMainButtons$" mat-
|
|
11
|
+
</div>
|
|
12
|
+
<div class="right-group">
|
|
13
|
+
<button *ngFor="let aButton of arMainButtons$" mat-flat-button (click)="buttonClick(aButton.jsAction, 'primary')">
|
|
9
14
|
{{ localizedVal(aButton.name, localeCategory) }}
|
|
10
15
|
</button>
|
|
11
|
-
</
|
|
12
|
-
</
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.button-bar {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: row;
|
|
5
|
+
align-items: center;
|
|
6
|
+
width: 100%;
|
|
7
|
+
padding: 1rem;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.left-group,
|
|
11
|
+
.right-group {
|
|
12
|
+
display: flex;
|
|
13
|
+
gap: 1rem;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.right-group {
|
|
17
|
+
margin-left: auto;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.secondary-button {
|
|
21
|
+
background-color: var(--app-sys-secondary-button-background);
|
|
22
|
+
border-color: var(--app-sys-secondary-button-border);
|
|
23
|
+
}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { MatButtonModule } from '@angular/material/button';
|
|
4
|
-
import { MatGridListModule } from '@angular/material/grid-list';
|
|
5
4
|
|
|
6
5
|
@Component({
|
|
7
6
|
selector: 'app-action-buttons',
|
|
8
7
|
templateUrl: './action-buttons.component.html',
|
|
9
8
|
styleUrls: ['./action-buttons.component.scss'],
|
|
10
|
-
|
|
11
|
-
imports: [CommonModule, MatGridListModule, MatButtonModule]
|
|
9
|
+
imports: [CommonModule, MatButtonModule]
|
|
12
10
|
})
|
|
13
11
|
export class ActionButtonsComponent {
|
|
14
12
|
@Input() arMainButtons$: any[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div>
|
|
2
|
-
<div><component-mapper name="AlertBanner" [props]="{ banners }" [parent]="this"></component-mapper></div>
|
|
2
|
+
<div><component-mapper name="AlertBanner" [props]="{ banners: bannerService.banners }" [parent]="this"></component-mapper></div>
|
|
3
3
|
<div *ngIf="bHasNavigation$" class="psdk-stepper">
|
|
4
4
|
<component-mapper
|
|
5
5
|
name="MultiStep"
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
/* eslint-disable no-case-declarations */
|
|
2
|
-
import { Component, OnInit, Input,
|
|
2
|
+
import { Component, OnInit, Input, forwardRef, OnDestroy, OnChanges } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import { MatSnackBarModule, MatSnackBar } from '@angular/material/snack-bar';
|
|
5
5
|
import { FormGroup } from '@angular/forms';
|
|
6
6
|
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
7
7
|
import { ErrorMessagesService } from '@pega/angular-sdk-components';
|
|
8
8
|
import { ProgressSpinnerService } from '@pega/angular-sdk-components';
|
|
9
|
+
import { BannerService } from '@pega/angular-sdk-components';
|
|
9
10
|
import { ReferenceComponent } from '@pega/angular-sdk-components';
|
|
10
11
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
11
12
|
|
|
13
|
+
function getRefreshProps(refreshConditions) {
|
|
14
|
+
// refreshConditions cuurently supports only "Changes" event
|
|
15
|
+
if (!refreshConditions) {
|
|
16
|
+
return [];
|
|
17
|
+
}
|
|
18
|
+
return refreshConditions.filter(item => item.event && item.event === 'Changes').map(item => [item.field, item.field?.substring(1)]) || [];
|
|
19
|
+
}
|
|
20
|
+
|
|
12
21
|
interface AssignmentProps {
|
|
13
22
|
// If any, enter additional props that only exist on this component
|
|
14
23
|
template: string;
|
|
@@ -18,7 +27,6 @@ interface AssignmentProps {
|
|
|
18
27
|
selector: 'app-assignment',
|
|
19
28
|
templateUrl: './assignment.component.html',
|
|
20
29
|
styleUrls: ['./assignment.component.scss'],
|
|
21
|
-
standalone: true,
|
|
22
30
|
imports: [CommonModule, MatSnackBarModule, forwardRef(() => ComponentMapperComponent)]
|
|
23
31
|
})
|
|
24
32
|
export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
@@ -29,7 +37,6 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
29
37
|
@Input() isCreateStage$: boolean;
|
|
30
38
|
@Input() updateToken$: number;
|
|
31
39
|
@Input() isInModal$ = false;
|
|
32
|
-
@Input() banners;
|
|
33
40
|
|
|
34
41
|
// For interaction with AngularPConnect
|
|
35
42
|
angularPConnectData: AngularPConnectData = {};
|
|
@@ -49,6 +56,7 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
49
56
|
|
|
50
57
|
bHasNavigation$ = false;
|
|
51
58
|
bIsVertical$ = false;
|
|
59
|
+
prevNavigationSteps: any[] = [];
|
|
52
60
|
arCurrentStepIndicies$: number[] = [];
|
|
53
61
|
arNavigationSteps$: any[] = [];
|
|
54
62
|
|
|
@@ -69,12 +77,14 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
69
77
|
localeCategory = 'Assignment';
|
|
70
78
|
localeReference;
|
|
71
79
|
|
|
80
|
+
snackBarRef;
|
|
81
|
+
|
|
72
82
|
constructor(
|
|
73
83
|
private angularPConnect: AngularPConnectService,
|
|
74
84
|
private psService: ProgressSpinnerService,
|
|
75
85
|
private erService: ErrorMessagesService,
|
|
76
|
-
private
|
|
77
|
-
|
|
86
|
+
private snackBar: MatSnackBar,
|
|
87
|
+
public bannerService: BannerService
|
|
78
88
|
) {}
|
|
79
89
|
|
|
80
90
|
ngOnInit(): void {
|
|
@@ -105,6 +115,8 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
105
115
|
// Should always check the bridge to see if the component should update itself (re-render)
|
|
106
116
|
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
107
117
|
|
|
118
|
+
this.bannerService.updateBanners(this.itemKey$);
|
|
119
|
+
|
|
108
120
|
// ONLY call updateSelf when the component should update
|
|
109
121
|
// AND removing the "gate" that was put there since shouldComponentUpdate
|
|
110
122
|
// should be the real "gate"
|
|
@@ -116,7 +128,7 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
116
128
|
|
|
117
129
|
this.psService.sendMessage(loadingInfo);
|
|
118
130
|
} catch (ex) {
|
|
119
|
-
|
|
131
|
+
console.log(ex);
|
|
120
132
|
}
|
|
121
133
|
}
|
|
122
134
|
}
|
|
@@ -128,6 +140,8 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
128
140
|
}
|
|
129
141
|
|
|
130
142
|
updateChanges() {
|
|
143
|
+
this.registerForRefresh();
|
|
144
|
+
|
|
131
145
|
// pConn$ may be a 'reference' component, so normalize it
|
|
132
146
|
this.newPConn$ = ReferenceComponent.normalizePConn(this.pConn$);
|
|
133
147
|
|
|
@@ -236,17 +250,19 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
236
250
|
|
|
237
251
|
// iterate through steps to find current one(s)
|
|
238
252
|
// immutable, so we want to change the local copy, so need to make a copy
|
|
239
|
-
|
|
253
|
+
|
|
254
|
+
if (!PCore.isDeepEqual(this.prevNavigationSteps, oCaseInfo.navigation.steps)) {
|
|
240
255
|
// what comes back now in configObject is the children of the flowContainer
|
|
241
256
|
this.arNavigationSteps$ = JSON.parse(JSON.stringify(oCaseInfo.navigation.steps));
|
|
257
|
+
this.prevNavigationSteps = JSON.parse(JSON.stringify(oCaseInfo.navigation.steps));
|
|
242
258
|
this.arNavigationSteps$.forEach(step => {
|
|
243
259
|
if (step.name) {
|
|
244
|
-
step.name =
|
|
260
|
+
step.name = this.pConn$.getLocalizationService().getLocalizedText(step.name);
|
|
245
261
|
}
|
|
246
262
|
});
|
|
247
263
|
this.arCurrentStepIndicies$ = [];
|
|
248
264
|
this.arCurrentStepIndicies$ = this.findCurrentIndicies(this.arNavigationSteps$, this.arCurrentStepIndicies$, 0);
|
|
249
|
-
}
|
|
265
|
+
}
|
|
250
266
|
}
|
|
251
267
|
|
|
252
268
|
findCurrentIndicies(arStepperSteps: any[], arIndicies: number[], depth: number): number[] {
|
|
@@ -285,6 +301,9 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
285
301
|
}
|
|
286
302
|
|
|
287
303
|
buttonClick(sAction, sButtonType) {
|
|
304
|
+
this.snackBarRef?.dismiss();
|
|
305
|
+
this.bannerService.clearBanners();
|
|
306
|
+
PCore.getPubSubUtils().publish('clearBannerMessages');
|
|
288
307
|
// right now, done on an individual basis, setting bReInit to true
|
|
289
308
|
// upon the next flow container state change, will cause the flow container
|
|
290
309
|
// to re-initialize
|
|
@@ -308,21 +327,21 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
308
327
|
switch (sAction) {
|
|
309
328
|
case 'navigateToStep':
|
|
310
329
|
this.erService.sendMessage('publish', '');
|
|
311
|
-
if (this.formValid()) {
|
|
312
|
-
this.bReInit = true;
|
|
313
|
-
this.psService.sendMessage(true);
|
|
314
330
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
.
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
331
|
+
this.bReInit = true;
|
|
332
|
+
this.psService.sendMessage(true);
|
|
333
|
+
|
|
334
|
+
const navigatePromise = this.navigateToStep('previous', this.itemKey$);
|
|
335
|
+
navigatePromise
|
|
336
|
+
.then(() => {
|
|
337
|
+
this.updateChanges();
|
|
338
|
+
this.psService.sendMessage(false);
|
|
339
|
+
})
|
|
340
|
+
.catch(() => {
|
|
341
|
+
this.psService.sendMessage(false);
|
|
342
|
+
this.snackBarRef = this.snackBar.open(`${this.localizedVal('Navigation failed!', this.localeCategory)}`, 'Ok');
|
|
343
|
+
});
|
|
344
|
+
|
|
326
345
|
break;
|
|
327
346
|
|
|
328
347
|
case 'saveAssignment': {
|
|
@@ -332,14 +351,13 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
332
351
|
|
|
333
352
|
savePromise
|
|
334
353
|
.then(() => {
|
|
335
|
-
// @ts-ignore - Property 'c11nEnv' is private and only accessible within class 'CaseInfo'.
|
|
336
354
|
const caseType = this.pConn$.getCaseInfo().c11nEnv.getValue(PCore.getConstants().CASE_INFO.CASE_TYPE_ID);
|
|
337
355
|
PCore.getPubSubUtils().publish('cancelPressed');
|
|
338
356
|
this.onSaveActionSuccess({ caseType, caseID, assignmentID });
|
|
339
357
|
})
|
|
340
358
|
.catch(() => {
|
|
341
359
|
this.psService.sendMessage(false);
|
|
342
|
-
this.snackBar.open(`${this.localizedVal('Save failed', this.localeCategory)}`, 'Ok');
|
|
360
|
+
this.snackBarRef = this.snackBar.open(`${this.localizedVal('Save failed', this.localeCategory)}`, 'Ok');
|
|
343
361
|
});
|
|
344
362
|
|
|
345
363
|
break;
|
|
@@ -363,7 +381,7 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
363
381
|
})
|
|
364
382
|
.catch(() => {
|
|
365
383
|
this.psService.sendMessage(false);
|
|
366
|
-
this.snackBar.open(`${this.localizedVal('Cancel failed!', this.localeCategory)}`, 'Ok');
|
|
384
|
+
this.snackBarRef = this.snackBar.open(`${this.localizedVal('Cancel failed!', this.localeCategory)}`, 'Ok');
|
|
367
385
|
});
|
|
368
386
|
} else {
|
|
369
387
|
this.psService.sendMessage(true);
|
|
@@ -380,7 +398,7 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
380
398
|
})
|
|
381
399
|
.catch(() => {
|
|
382
400
|
this.psService.sendMessage(false);
|
|
383
|
-
this.snackBar.open(`${this.localizedVal('Cancel failed!', this.localeCategory)}`, 'Ok');
|
|
401
|
+
this.snackBarRef = this.snackBar.open(`${this.localizedVal('Cancel failed!', this.localeCategory)}`, 'Ok');
|
|
384
402
|
});
|
|
385
403
|
}
|
|
386
404
|
break;
|
|
@@ -392,7 +410,7 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
392
410
|
.then(() => {})
|
|
393
411
|
.catch(() => {
|
|
394
412
|
this.psService.sendMessage(false);
|
|
395
|
-
this.snackBar.open(`${this.localizedVal('Rejection failed!', this.localeCategory)}`, 'Ok');
|
|
413
|
+
this.snackBarRef = this.snackBar.open(`${this.localizedVal('Rejection failed!', this.localeCategory)}`, 'Ok');
|
|
396
414
|
});
|
|
397
415
|
|
|
398
416
|
break;
|
|
@@ -405,23 +423,18 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
405
423
|
switch (sAction) {
|
|
406
424
|
case 'finishAssignment':
|
|
407
425
|
this.erService.sendMessage('publish', '');
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
.
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
.
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
});
|
|
421
|
-
} else {
|
|
422
|
-
// let snackBarRef = this.snackBar.open("Please fix errors on form.", "Ok");
|
|
423
|
-
this.erService.sendMessage('show', this.localizedVal('Please fix errors on form.', this.localeCategory));
|
|
424
|
-
}
|
|
426
|
+
this.bReInit = true;
|
|
427
|
+
this.psService.sendMessage(true);
|
|
428
|
+
const finishPromise = this.finishAssignment(this.itemKey$); // JA - was itemID but Nebula/Constellation uses itemKey
|
|
429
|
+
finishPromise
|
|
430
|
+
.then(() => {
|
|
431
|
+
this.psService.sendMessage(false);
|
|
432
|
+
this.updateChanges();
|
|
433
|
+
})
|
|
434
|
+
.catch(() => {
|
|
435
|
+
this.psService.sendMessage(false);
|
|
436
|
+
this.snackBarRef = this.snackBar.open(`${this.localizedVal('Submit failed!', this.localeCategory)}`, 'Ok');
|
|
437
|
+
});
|
|
425
438
|
break;
|
|
426
439
|
|
|
427
440
|
case 'approveCase': {
|
|
@@ -431,7 +444,7 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
431
444
|
.then(() => {})
|
|
432
445
|
.catch(() => {
|
|
433
446
|
this.psService.sendMessage(false);
|
|
434
|
-
this.snackBar.open(`${this.localizedVal('Approve failed!', this.localeCategory)}`, 'Ok');
|
|
447
|
+
this.snackBarRef = this.snackBar.open(`${this.localizedVal('Approve failed!', this.localeCategory)}`, 'Ok');
|
|
435
448
|
});
|
|
436
449
|
|
|
437
450
|
break;
|
|
@@ -453,10 +466,40 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
453
466
|
});
|
|
454
467
|
}
|
|
455
468
|
|
|
456
|
-
// eslint-disable-next-line sonarjs/no-identical-functions
|
|
457
469
|
topViewRefresh(): void {
|
|
458
470
|
Object.values(this.formGroup$.controls).forEach((control: any) => {
|
|
459
471
|
control.markAsTouched();
|
|
460
472
|
});
|
|
461
473
|
}
|
|
474
|
+
|
|
475
|
+
registerForRefresh() {
|
|
476
|
+
const refreshConditions = this.pConn$.getCaseInfo()?.getActionRefreshConditions();
|
|
477
|
+
const pageReference = this.pConn$.getPageReference();
|
|
478
|
+
const context = this.pConn$.getContextName();
|
|
479
|
+
|
|
480
|
+
// refresh api de-registration
|
|
481
|
+
PCore.getRefreshManager().deRegisterForRefresh(context);
|
|
482
|
+
|
|
483
|
+
// refresh api registration
|
|
484
|
+
const refreshProps = getRefreshProps(refreshConditions);
|
|
485
|
+
const caseKey = this.pConn$.getCaseInfo().getKey();
|
|
486
|
+
const refreshOptions = {
|
|
487
|
+
autoDetectRefresh: true,
|
|
488
|
+
preserveClientChanges: false
|
|
489
|
+
};
|
|
490
|
+
if (refreshProps.length > 0) {
|
|
491
|
+
refreshProps.forEach(prop => {
|
|
492
|
+
PCore.getRefreshManager().registerForRefresh(
|
|
493
|
+
'PROP_CHANGE',
|
|
494
|
+
this.pConn$.getActionsApi().refreshCaseView.bind(this.pConn$.getActionsApi(), caseKey, '', pageReference, {
|
|
495
|
+
...refreshOptions,
|
|
496
|
+
refreshFor: prop[0]
|
|
497
|
+
}),
|
|
498
|
+
`${pageReference}.${prop[1]}`,
|
|
499
|
+
`${context}/${pageReference}`,
|
|
500
|
+
context
|
|
501
|
+
);
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
}
|
|
462
505
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<form [formGroup]="formGroup$" name="flowContainer" class="psdk-flow-container">
|
|
2
|
-
<div *ngFor="let kid of
|
|
2
|
+
<div *ngFor="let kid of childrenArray" class="psdk-assignment-card-child">
|
|
3
3
|
<div [ngSwitch]="kid.getPConnect().getComponentName()">
|
|
4
4
|
<component-mapper *ngSwitchCase="'View'" name="View" [props]="{ formGroup$, pConn$: kid.getPConnect() }"></component-mapper>
|
|
5
5
|
<component-mapper
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
</form>
|
|
15
15
|
|
|
16
16
|
<div>
|
|
17
|
-
<br />
|
|
18
17
|
<div class="psdk-case-view-divider"></div>
|
|
19
18
|
|
|
20
19
|
<component-mapper
|
|
20
|
+
*ngIf="arMainButtons$ && arSecondaryButtons$"
|
|
21
21
|
name="ActionButtons"
|
|
22
22
|
[props]="{ arMainButtons$, arSecondaryButtons$ }"
|
|
23
23
|
[parent]="this"
|