@@ -14,7 +14,7 @@ import { isEmpty } from "lodash";
1414import { Link } from "react-router-dom" ;
1515import { useAppDispatch , useAppSelector } from "../../store/hooks" ;
1616import { setSidebarActive , type IUiState } from "../../store/ui/uiSlice" ;
17- import type { IUserState } from "../../store/user/userSlice" ;
17+ import { Role , type IUserState } from "../../store/user/userSlice" ;
1818import brandImg from "../../assets/logo_chris_dashboard.png" ;
1919import styles from "./Sidebar.module.css" ;
2020import type { FormEvent } from "react" ;
@@ -149,6 +149,10 @@ const Sidebar: React.FC<AllProps> = (props: AllProps) => {
149149 const uploadDataColor =
150150 sidebarActiveItem === "uploadData" ? "#ffffff" : "#aaaaaa" ;
151151
152+ const classNameImportPackage = role === Role . Admin ? undefined : styles . hide ;
153+ const classNameComposePackage =
154+ role === Role . Clinician ? styles . hide : undefined ;
155+
152156 const PageNav = (
153157 < >
154158 < Nav onSelect = { onSelect } aria-label = "ChRIS Demo site navigation" >
@@ -204,7 +208,7 @@ const Sidebar: React.FC<AllProps> = (props: AllProps) => {
204208 </NavItem>
205209 */ }
206210 < NavItem itemId = "pacs" isActive = { sidebarActiveItem === "pacs" } >
207- { renderLink ( "/pacs" , "Retrieve PACS" , "pacs" ) }
211+ { renderLink ( "/pacs" , "Query and Retrieve PACS" , "pacs" ) }
208212 </ NavItem >
209213 </ NavGroup >
210214 < NavGroup title = "Packages" >
@@ -214,21 +218,28 @@ const Sidebar: React.FC<AllProps> = (props: AllProps) => {
214218 >
215219 { renderLink ( "/package" , "Browse Packages" , "catalog" ) }
216220 </ NavItem >
221+
217222 < NavExpandable
218223 title = "Tags"
219224 buttonProps = { { className : styles [ "tags-expand" ] } }
220225 isExpanded = { true }
221226 >
222227 { renderPackageTags ( ) }
223228 </ NavExpandable >
229+
224230 { ! isEmpty ( import . meta. env . VITE_CHRIS_STORE_URL ) && (
225- < NavItem itemId = "store" isActive = { sidebarActiveItem === "store" } >
231+ < NavItem
232+ itemId = "store"
233+ isActive = { sidebarActiveItem === "store" }
234+ className = { classNameImportPackage }
235+ >
226236 { renderLink ( "/import" , "Import Package" , "store" ) }
227237 </ NavItem >
228238 ) }
229239 < NavItem
230240 itemId = "compose"
231241 isActive = { sidebarActiveItem === "compose" }
242+ className = { classNameComposePackage }
232243 >
233244 { renderLink ( "/compose" , "Compose Package" , "compose" ) }
234245 </ NavItem >
0 commit comments