Skip to content

Commit edad816

Browse files
nikunj59davide-negretti
authored andcommitted
[DSC-854] fixed nested sections with BE connections
1 parent d5f70ee commit edad816

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

src/app/core/layout/models/section.model.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export class Section extends CacheableObject {
2929
@autoserialize
3030
componentRows: SectionComponent[][];
3131

32+
@autoserialize
3233
nestedSections: Section[];
3334

3435
/**

src/app/menu.resolver.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ const EXPLORE_SECTIONS_DEFINITIONS = [
2929
{
3030
id: 'definition2',
3131
nestedSections: [
32-
{ id: 'nested_definition1' },
33-
{ id: 'nested_definition2' }
32+
{ id: 'definition1' },
33+
{ id: 'definition2' }
3434
]
3535
},
3636
{ id: 'definition3' },
@@ -45,17 +45,17 @@ const ALL_NESTED_MENUS = [
4545
{
4646
id: 'definition1',
4747
nestedSections: [
48-
{ id: 'nested_definition1' },
48+
{ id: 'definition1' },
4949
]
5050
},{
5151
id: 'definition2',
5252
nestedSections: [
53-
{ id: 'nested_definition2' },
53+
{ id: 'definition2' },
5454
]
5555
},{
5656
id: 'definition3',
5757
nestedSections: [
58-
{ id: 'nested_definition3' },
58+
{ id: 'definition3' },
5959
]
6060
}
6161
];

src/app/menu.resolver.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ export class MenuResolver implements Resolve<boolean> {
128128
active: false,
129129
visible: true,
130130
};
131-
if (section.nestedSections) {
131+
if (section.nestedSections && section.nestedSections.length) {
132132
section.nestedSections.forEach((nested) => {
133133
menuList.push({
134-
id: `explore_${nested.id}`,
134+
id: `explore_nested_${nested.id}`,
135135
parentID: `explore_${section.id}`,
136136
active: false,
137137
visible: true,

0 commit comments

Comments
 (0)