Skip to content

Commit 6cf28aa

Browse files
vishalshrm539Sharma
andauthored
Fix when default portal is not wss (#350)
Co-authored-by: Sharma <[email protected]>
1 parent 4aa503f commit 6cf28aa

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/angular-sdk-components/src/lib/_components/template/app-shell/app-shell.component.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ export class AppShellComponent implements OnInit, OnDestroy {
6767

6868
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as AppShellProps;
6969

70+
this.portalTemplate = this.configProps$.portalTemplate;
71+
7072
// making a copy, so can add info
7173
this.pages$ = this.configProps$.pages;
7274

@@ -78,6 +80,11 @@ export class AppShellComponent implements OnInit, OnDestroy {
7880
this.bShowAppShell$ = true;
7981
}
8082

83+
/* TODO: We're setting the `pyPortalTemplate` for now, this would be handled by the CoreJS in the future releases */
84+
if (this.portalTemplate === 'wss') {
85+
PCore.getEnvironmentInfo().setEnvironmentInfo({ ...PCore.getEnvironmentInfo().environmentInfoObject, pyPortalTemplate: 'wss' } as any);
86+
}
87+
8188
// @ts-ignore - Property 'pyCaseTypesAvailableToCreateDP' does not exist on type pxApplication
8289
const caseTypesAvailableToCreateDP = PCore.getEnvironmentInfo().environmentInfoObject?.pxApplication?.pyCaseTypesAvailableToCreateDP;
8390
if (caseTypesAvailableToCreateDP) {
@@ -99,8 +106,6 @@ export class AppShellComponent implements OnInit, OnDestroy {
99106

100107
this.arChildren$ = this.pConn$.getChildren();
101108

102-
this.portalTemplate = this.configProps$.portalTemplate;
103-
104109
// handle showing and hiding the progress spinner
105110
this.errorMessagesSubscription = this.erService.getMessage().subscribe(message => {
106111
this.showDismissErrorMessages(message);

0 commit comments

Comments
 (0)