@@ -191,14 +191,12 @@ export function useWorkflowNavigationConfigOJS(pageInitConfig) {
191
191
) ;
192
192
}
193
193
194
- if ( permissions . canAccessProduction ) {
195
- items . push (
196
- getPublicationItem ( {
197
- name : 'galleys' ,
198
- label : t ( 'submission.layout.galleys' ) ,
199
- } ) ,
200
- ) ;
201
- }
194
+ items . push (
195
+ getPublicationItem ( {
196
+ name : 'galleys' ,
197
+ label : t ( 'submission.layout.galleys' ) ,
198
+ } ) ,
199
+ ) ;
202
200
203
201
return items ;
204
202
}
@@ -283,25 +281,35 @@ export function useWorkflowNavigationConfigOJS(pageInitConfig) {
283
281
return [ ] ;
284
282
}
285
283
286
- const menuItems = [
287
- {
288
- key : 'workflow' ,
289
- label : t ( 'manager.workflow' ) ,
290
- icon : 'Dashboard' ,
291
- items : getWorkflowItems ( { submission, permissions} ) ,
292
- } ,
293
- {
284
+ let menuItems = [ ] ;
285
+
286
+ menuItems . push ( {
287
+ key : 'workflow' ,
288
+ label : t ( 'manager.workflow' ) ,
289
+ icon : 'Dashboard' ,
290
+ items : getWorkflowItems ( { submission, permissions} ) ,
291
+ } ) ;
292
+
293
+ if (
294
+ pageInitConfig . dashboardPage === DashboardPageTypes . EDITORIAL_DASHBOARD &&
295
+ permissions . canAccessPublication
296
+ ) {
297
+ menuItems . push ( {
294
298
key : 'publication' ,
295
299
label : t ( 'submission.publication' ) ,
296
300
icon : 'MySubmissions' ,
297
- items :
298
- pageInitConfig . dashboardPage ===
299
- DashboardPageTypes . EDITORIAL_DASHBOARD
300
- ? getPublicationItemsEditorial ( { submission, permissions} )
301
- : getPublicationItemsAuthor ( { submission, permissions} ) ,
302
- } ,
303
- ] ;
304
-
301
+ items : getPublicationItemsEditorial ( { submission, permissions} ) ,
302
+ } ) ;
303
+ } else if (
304
+ pageInitConfig . dashboardPage === DashboardPageTypes . MY_SUBMISSIONS
305
+ ) {
306
+ menuItems . push ( {
307
+ key : 'publication' ,
308
+ label : t ( 'submission.publication' ) ,
309
+ icon : 'MySubmissions' ,
310
+ items : getPublicationItemsAuthor ( { submission, permissions} ) ,
311
+ } ) ;
312
+ }
305
313
return menuItems ;
306
314
}
307
315
0 commit comments