Skip to content

Commit 47e99ae

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/pega/dx-component-builder-sdk-24.2.12
2 parents 42f0f8f + 5fcfd4e commit 47e99ae

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

sdk-config.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@
3333
"appMashupCaseType": "",
3434

3535
"excludePortals_comment": "Array of specific portals to avoid attempting to load with SDK",
36-
"excludePortals": ["pxExpress", "Developer", "pxPredictionStudio", "pxAdminStudio", "pyCaseWorker", "pyCaseManager7"]
36+
"excludePortals": ["pxExpress", "Developer", "pxPredictionStudio", "pxAdminStudio", "pyCaseWorker", "pyCaseManager7"],
37+
38+
"showModalsInEmbeddedMode_comment": "If true, modals will be shown in embedded mode",
39+
"showModalsInEmbeddedMode": false
3740
},
3841

3942
"dxcbConfig": {

src/app/_samples/embedded/main-screen/main-screen.component.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export class MainScreenComponent implements OnInit, OnDestroy {
2929
) {}
3030

3131
ngOnInit(): void {
32+
// Subscribe to the EVENT_CANCEL event to handle the assignment cancellation
3233
PCore.getPubSubUtils().subscribe(
3334
PCore.getConstants().PUB_SUB_EVENTS.EVENT_CANCEL,
3435
() => {
@@ -37,19 +38,20 @@ export class MainScreenComponent implements OnInit, OnDestroy {
3738
'cancelAssignment'
3839
);
3940

41+
// Subscribe to the END_OF_ASSIGNMENT_PROCESSING event to handle assignment completion
4042
PCore.getPubSubUtils().subscribe(
41-
'assignmentFinished',
43+
PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.END_OF_ASSIGNMENT_PROCESSING,
4244
() => {
4345
this.assignmentFinished();
4446
},
45-
'assignmentFinished'
47+
'endOfAssignmentProcessing'
4648
);
4749
}
4850

4951
ngOnDestroy() {
5052
PCore.getPubSubUtils().unsubscribe(PCore.getConstants().PUB_SUB_EVENTS.EVENT_CANCEL, 'cancelAssignment');
5153

52-
PCore.getPubSubUtils().unsubscribe('assignmentFinished', 'assignmentFinished');
54+
PCore.getPubSubUtils().unsubscribe(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.END_OF_ASSIGNMENT_PROCESSING, 'endOfAssignmentProcessing');
5355
}
5456

5557
cancelAssignment() {
@@ -71,8 +73,7 @@ export class MainScreenComponent implements OnInit, OnDestroy {
7173
this.scservice.getSdkConfig().then(sdkConfig => {
7274
let mashupCaseType = sdkConfig.serverConfig.appMashupCaseType;
7375
if (!mashupCaseType) {
74-
// @ts-ignore - Object is possibly 'null'
75-
const caseTypes: any = PCore.getEnvironmentInfo().environmentInfoObject.pyCaseTypeList;
76+
const caseTypes: any = PCore.getEnvironmentInfo().environmentInfoObject?.pyCaseTypeList;
7677
mashupCaseType = caseTypes[0].pyWorkTypeImplementationClassName;
7778
}
7879

0 commit comments

Comments
 (0)