@@ -84,48 +84,42 @@ export const WORKSPACE_SETTINGS = {
8484 i18n_label : "workspace_settings.settings.general.title" ,
8585 href : `/settings` ,
8686 access : [ EUserWorkspaceRoles . ADMIN ] ,
87- highlight : ( pathname : string , baseUrl : string ) =>
88- pathname === `${ baseUrl } /settings/` ,
87+ highlight : ( pathname : string , baseUrl : string ) => pathname === `${ baseUrl } /settings/` ,
8988 } ,
9089 members : {
9190 key : "members" ,
9291 i18n_label : "workspace_settings.settings.members.title" ,
9392 href : `/settings/members` ,
9493 access : [ EUserWorkspaceRoles . ADMIN ] ,
95- highlight : ( pathname : string , baseUrl : string ) =>
96- pathname === `${ baseUrl } /settings/members/` ,
94+ highlight : ( pathname : string , baseUrl : string ) => pathname === `${ baseUrl } /settings/members/` ,
9795 } ,
9896 "billing-and-plans" : {
9997 key : "billing-and-plans" ,
10098 i18n_label : "workspace_settings.settings.billing_and_plans.title" ,
10199 href : `/settings/billing` ,
102100 access : [ EUserWorkspaceRoles . ADMIN ] ,
103- highlight : ( pathname : string , baseUrl : string ) =>
104- pathname === `${ baseUrl } /settings/billing/` ,
101+ highlight : ( pathname : string , baseUrl : string ) => pathname === `${ baseUrl } /settings/billing/` ,
105102 } ,
106103 export : {
107104 key : "export" ,
108105 i18n_label : "workspace_settings.settings.exports.title" ,
109106 href : `/settings/exports` ,
110107 access : [ EUserWorkspaceRoles . ADMIN ] ,
111- highlight : ( pathname : string , baseUrl : string ) =>
112- pathname === `${ baseUrl } /settings/exports/` ,
108+ highlight : ( pathname : string , baseUrl : string ) => pathname === `${ baseUrl } /settings/exports/` ,
113109 } ,
114110 webhooks : {
115111 key : "webhooks" ,
116112 i18n_label : "workspace_settings.settings.webhooks.title" ,
117113 href : `/settings/webhooks` ,
118114 access : [ EUserWorkspaceRoles . ADMIN ] ,
119- highlight : ( pathname : string , baseUrl : string ) =>
120- pathname === `${ baseUrl } /settings/webhooks/` ,
115+ highlight : ( pathname : string , baseUrl : string ) => pathname === `${ baseUrl } /settings/webhooks/` ,
121116 } ,
122117 "api-tokens" : {
123118 key : "api-tokens" ,
124119 i18n_label : "workspace_settings.settings.api_tokens.title" ,
125120 href : `/settings/api-tokens` ,
126121 access : [ EUserWorkspaceRoles . ADMIN ] ,
127- highlight : ( pathname : string , baseUrl : string ) =>
128- pathname === `${ baseUrl } /settings/api-tokens/` ,
122+ highlight : ( pathname : string , baseUrl : string ) => pathname === `${ baseUrl } /settings/api-tokens/` ,
129123 } ,
130124} ;
131125
@@ -256,3 +250,84 @@ export const DEFAULT_GLOBAL_VIEWS_LIST: {
256250 i18n_label : "default_global_view.subscribed" ,
257251 } ,
258252] ;
253+
254+ export interface IWorkspaceSidebarNavigationItem {
255+ key : string ;
256+ labelTranslationKey : string ;
257+ href : string ;
258+ access : EUserWorkspaceRoles [ ] ;
259+ }
260+
261+ export const WORKSPACE_SIDEBAR_DYNAMIC_NAVIGATION_ITEMS : Record < string , IWorkspaceSidebarNavigationItem > = {
262+ "your-work" : {
263+ key : "your_work" ,
264+ labelTranslationKey : "your_work" ,
265+ href : `/profile/` ,
266+ access : [ EUserWorkspaceRoles . ADMIN , EUserWorkspaceRoles . MEMBER ] ,
267+ } ,
268+ views : {
269+ key : "views" ,
270+ labelTranslationKey : "views" ,
271+ href : `/workspace-views/all-issues/` ,
272+ access : [ EUserWorkspaceRoles . ADMIN , EUserWorkspaceRoles . MEMBER , EUserWorkspaceRoles . GUEST ] ,
273+ } ,
274+ "active-cycles" : {
275+ key : "active_cycles" ,
276+ labelTranslationKey : "cycles" ,
277+ href : `/active-cycles/` ,
278+ access : [ EUserWorkspaceRoles . ADMIN , EUserWorkspaceRoles . MEMBER ] ,
279+ } ,
280+ analytics : {
281+ key : "analytics" ,
282+ labelTranslationKey : "analytics" ,
283+ href : `/analytics/` ,
284+ access : [ EUserWorkspaceRoles . ADMIN , EUserWorkspaceRoles . MEMBER ] ,
285+ } ,
286+ drafts : {
287+ key : "drafts" ,
288+ labelTranslationKey : "drafts" ,
289+ href : `/drafts/` ,
290+ access : [ EUserWorkspaceRoles . ADMIN , EUserWorkspaceRoles . MEMBER ] ,
291+ } ,
292+ archives : {
293+ key : "archives" ,
294+ labelTranslationKey : "archives" ,
295+ href : `/projects/archives/` ,
296+ access : [ EUserWorkspaceRoles . ADMIN , EUserWorkspaceRoles . MEMBER ] ,
297+ } ,
298+ } ;
299+ export const WORKSPACE_SIDEBAR_DYNAMIC_NAVIGATION_ITEMS_LINKS : IWorkspaceSidebarNavigationItem [ ] = [
300+ WORKSPACE_SIDEBAR_DYNAMIC_NAVIGATION_ITEMS [ "views" ] ,
301+ WORKSPACE_SIDEBAR_DYNAMIC_NAVIGATION_ITEMS [ "active-cycles" ] ,
302+ WORKSPACE_SIDEBAR_DYNAMIC_NAVIGATION_ITEMS [ "analytics" ] ,
303+ WORKSPACE_SIDEBAR_DYNAMIC_NAVIGATION_ITEMS [ "your-work" ] ,
304+ WORKSPACE_SIDEBAR_DYNAMIC_NAVIGATION_ITEMS [ "drafts" ] ,
305+ WORKSPACE_SIDEBAR_DYNAMIC_NAVIGATION_ITEMS [ "archives" ] ,
306+ ] ;
307+
308+ export const WORKSPACE_SIDEBAR_STATIC_NAVIGATION_ITEMS : Record < string , IWorkspaceSidebarNavigationItem > = {
309+ home : {
310+ key : "home" ,
311+ labelTranslationKey : "home.title" ,
312+ href : `/` ,
313+ access : [ EUserWorkspaceRoles . ADMIN , EUserWorkspaceRoles . MEMBER , EUserWorkspaceRoles . GUEST ] ,
314+ } ,
315+ notifications : {
316+ key : "notifications" ,
317+ labelTranslationKey : "notification.label" ,
318+ href : `/notifications/` ,
319+ access : [ EUserWorkspaceRoles . ADMIN , EUserWorkspaceRoles . MEMBER , EUserWorkspaceRoles . GUEST ] ,
320+ } ,
321+ projects : {
322+ key : "projects" ,
323+ labelTranslationKey : "projects" ,
324+ href : `/projects/` ,
325+ access : [ EUserWorkspaceRoles . ADMIN , EUserWorkspaceRoles . MEMBER , EUserWorkspaceRoles . GUEST ] ,
326+ } ,
327+ } ;
328+
329+ export const WORKSPACE_SIDEBAR_STATIC_NAVIGATION_ITEMS_LINKS : IWorkspaceSidebarNavigationItem [ ] = [
330+ WORKSPACE_SIDEBAR_STATIC_NAVIGATION_ITEMS [ "home" ] ,
331+ WORKSPACE_SIDEBAR_STATIC_NAVIGATION_ITEMS [ "notifications" ] ,
332+ WORKSPACE_SIDEBAR_STATIC_NAVIGATION_ITEMS [ "projects" ] ,
333+ ] ;
0 commit comments