Skip to content

Commit

Permalink
Fix error on Home page
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalshrm539 committed Oct 11, 2023
1 parent 0e0dcf7 commit 0bb0e75
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ <h2 *ngIf="!todo_showTodo$">{{ containerName$ }}</h2>
showTodoList$: todo_showTodoList$,
headerText$: todo_headerText$,
type$: 'TODO',
context$: todo_context$
context$: todo_context$,
itemKey$: itemKey$
}"
></component-mapper>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,14 @@ export class FlowContainerComponent implements OnInit {
let baseContext = this.pConn$.getContextName();
let acName = this.pConn$.getContainerName();

if(this.itemKey$ === ''){
this.itemKey$ = baseContext.concat('/').concat(acName);
}

this.pConn$.isBoundToState();

// inside
// get fist kid, get the name and displa
// get fist kid, get the name and display
// pass first kid to a view container, which will disperse it to a view which will use one column, two column, etc.
let oWorkItem = this.arChildren$[0].getPConnect();
let oWorkMeta = oWorkItem.getRawMetadata();
Expand Down Expand Up @@ -310,7 +314,7 @@ export class FlowContainerComponent implements OnInit {

const caseActions = this.pConn$.getValue(CASE_CONSTS.CASE_INFO_ACTIONS);
const activeActionID = this.pConn$.getValue(CASE_CONSTS.ACTIVE_ACTION_ID);
const activeAction = caseActions.find((action) => action.ID === activeActionID);
const activeAction = caseActions?.find((action) => action.ID === activeActionID);
if (activeAction) {
activeActionLabel = activeAction.name;
}
Expand Down Expand Up @@ -414,7 +418,7 @@ export class FlowContainerComponent implements OnInit {
if (sessionStorage.getItem('okToInitFlowContainer') == 'true') {
this.initContainer();
}
} else if (caseViewMode && caseViewMode == 'perform') {
} else if (caseViewMode && caseViewMode === 'perform') {
// perform
this.todo_showTodo$ = false;

Expand All @@ -440,14 +444,14 @@ export class FlowContainerComponent implements OnInit {
this.PCore$.getPubSubUtils().publish('assignmentFinished');

this.psService.sendMessage(false);
} else if (this.bHasCaseMessages$) {
} else if(this.bHasCaseMessages$) {
this.bHasCaseMessages$ = false;
this.bShowConfirm = false;
}

// this check in routingInfo, mimic Nebula/Constellation (React) to check and get the internals of the
// flowContainer and force updates to pConnect/redux
if (routingInfo && loadingInfo != undefined) {
if (routingInfo && loadingInfo !== undefined) {
let currentOrder = routingInfo.accessedOrder;
let currentItems = routingInfo.items;
let type = routingInfo.type;
Expand All @@ -471,9 +475,14 @@ export class FlowContainerComponent implements OnInit {

let currentItem = currentItems[key];
let rootView = currentItem.view;
let { context } = rootView.config;
let { context, name: ViewName } = rootView.config;
let config = { meta: rootView };

// Don't go ahead if View doesn't exist
if( !ViewName ){
return;
}

this.todo_context$ = currentItem.context;

config['options'] = {
Expand Down Expand Up @@ -507,7 +516,7 @@ export class FlowContainerComponent implements OnInit {

this.psService.sendMessage(false);

let oWorkItem = this.arChildren$[0].getPConnect();
let oWorkItem = configObject.getPConnect();
let oWorkData = oWorkItem.getDataObject();

this.containerName$ = this.getActiveViewLabel() || oWorkData.caseInfo.assignments?.[0].name;
Expand Down

0 comments on commit 0bb0e75

Please sign in to comment.