Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
feat: added ListItem component to incidents in Sidebar for visualize tab
Browse files Browse the repository at this point in the history
  • Loading branch information
yosephAHMED committed Aug 12, 2020
1 parent e23c913 commit d73a3e7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/shared/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,17 @@ const Sidebar = () => {
{!sidebarCollapsed && t('incidents.reports.label')}
</ListItem>
)}
{permissions.includes(Permissions.ViewIncidentWidgets) && (
<ListItem
className="nav-item"
style={listSubItemStyle}
onClick={() => navigateTo('/incidents/visualize')}
active={splittedPath[1].includes('incidents') && splittedPath.length < 3}
>
<Icon icon="incident" style={iconMargin} />
{!sidebarCollapsed && t('incidents.visualize.label')}
</ListItem>
)}
</List>
)}
</>
Expand Down
1 change: 1 addition & 0 deletions src/user/user-slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const initialState: UserState = {
Permissions.ViewIncidents,
Permissions.ReportIncident,
Permissions.ResolveIncident,
Permissions.ViewIncidentWidgets,
Permissions.AddCarePlan,
Permissions.ReadCarePlan,
Permissions.AddVisit,
Expand Down

0 comments on commit d73a3e7

Please sign in to comment.