Skip to content

Commit

Permalink
Sidebar Client
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmarv committed Jan 24, 2025
1 parent 7bc0bc3 commit cf84b1a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 40 deletions.
3 changes: 1 addition & 2 deletions netmanager-app/app/(authenticated)/clients/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { ActivateClientDialog, DeactivateClientDialog } from "./dialogs"
import { getClientsApi, activateUserClientApi } from "@/core/apis/analytics"
import { useToast } from "@/components/ui/use-toast"
import type { Client } from "@/app/types/clients"
import withPermission from "@/app/pageAccess"

const formatDate = (dateString: string | undefined): string => {
if (!dateString) return "N/A"
Expand Down Expand Up @@ -152,5 +151,5 @@ const ClientManagement = () => {
)
}

export default withPermission(ClientManagement, 'CREATE_UPDATE_AND_DELETE_NETWORK_DEVICES');
export default ClientManagement;

38 changes: 0 additions & 38 deletions netmanager-app/app/pageAccess.tsx

This file was deleted.

16 changes: 16 additions & 0 deletions netmanager-app/components/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
Map,
ChevronDown,
Check,
Hospital,
PlusCircle,
MonitorSmartphone,
LogOut,
Expand Down Expand Up @@ -210,6 +211,21 @@ const Sidebar = () => {
</Link>
</li>
</PermissionGuard>
<PermissionGuard permission="CREATE_UPDATE_AND_DELETE_NETWORK_ROLES">
<li>
<Link
href="/clients"
className={`flex items-center gap-2 text-sm text-foreground hover:bg-accent hover:text-accent-foreground p-2 rounded-md ${
isActive("/access-control")
? "bg-accent text-accent-foreground"
: ""
}`}
>
<Hospital size={18} />
<span>Clients</span>
</Link>
</li>
</PermissionGuard>
<li>
<Link
href="/organizations"
Expand Down

0 comments on commit cf84b1a

Please sign in to comment.