11import { App , LinkMenuItem , WidgetOperationTypes , getAppConfig } from '@openedx/frontend-base' ;
22
3- import { appId } from '../../constants' ;
3+ import { appId , dashboardRole } from '../../constants' ;
44
55import ConfirmEmailBanner from './ConfirmEmailBanner' ;
66import MasqueradeBar from './MasqueradeBar' ;
@@ -18,6 +18,9 @@ const app: App = {
1818 id : 'org.openedx.frontend.widget.learnerDashboard.headerConfirmEmail.v1' ,
1919 op : WidgetOperationTypes . PREPEND ,
2020 component : ConfirmEmailBanner ,
21+ condition : {
22+ active : [ dashboardRole ]
23+ }
2124 } ,
2225 {
2326 slotId : 'org.openedx.frontend.slot.header.primaryLinks.v1' ,
@@ -29,7 +32,10 @@ const app: App = {
2932 url = "/"
3033 variant = "navLink"
3134 />
32- )
35+ ) ,
36+ condition : {
37+ active : [ dashboardRole ]
38+ }
3339 } ,
3440 {
3541 slotId : 'org.openedx.frontend.slot.header.primaryLinks.v1' ,
@@ -41,6 +47,7 @@ const app: App = {
4147 />
4248 ) ,
4349 condition : {
50+ active : [ dashboardRole ] ,
4451 callback : ( ) => getAppConfig ( appId ) . ENABLE_PROGRAMS === true ,
4552 }
4653 } ,
@@ -53,6 +60,9 @@ const app: App = {
5360 variant = "navLink"
5461 />
5562 ) ,
63+ condition : {
64+ active : [ dashboardRole ]
65+ }
5666 } ,
5767 {
5868 slotId : 'org.openedx.frontend.slot.header.secondaryLinks.v1' ,
@@ -64,6 +74,7 @@ const app: App = {
6474 />
6575 ) ,
6676 condition : {
77+ active : [ dashboardRole ] ,
6778 callback : ( ) => getAppConfig ( appId ) . SUPPORT_URL ? true : false ,
6879 }
6980 } ,
@@ -78,6 +89,7 @@ const app: App = {
7889 />
7990 ) ,
8091 condition : {
92+ active : [ dashboardRole ] ,
8193 callback : ( ) => getAppConfig ( appId ) . ORDER_HISTORY_URL ? true : false ,
8294 }
8395 } ,
@@ -86,6 +98,9 @@ const app: App = {
8698 id : 'org.openedx.frontend.widget.learnerDashboard.headerMasqueradeBar.v1' ,
8799 op : WidgetOperationTypes . APPEND ,
88100 component : MasqueradeBar ,
101+ condition : {
102+ active : [ dashboardRole ]
103+ }
89104 } ,
90105 ]
91106} ;
0 commit comments