diff --git a/app/(dashboard)/(main)/page.tsx b/app/(dashboard)/(main)/page.tsx index 6844a15..8a8f800 100644 --- a/app/(dashboard)/(main)/page.tsx +++ b/app/(dashboard)/(main)/page.tsx @@ -1,6 +1,5 @@ import { Suspense, lazy } from "react" import Link from "next/link" -import { getServerSession } from "next-auth" import dayjs from "dayjs" import { generateHourMinutes, titleCase } from "@/lib/helper" @@ -11,7 +10,7 @@ import { Button } from "@/components/ui/button" import { Card900, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" import LazyLoading from "@/components/loader/LazyLoading" -import { authOptions } from "@/lib/auth" +import { getAccessPagePermission, getCacheServerSession } from "@/lib/get-access-data" // const LastPresence = lazy(() => import("./components/LastPresence")) const WorkingHours = lazy(() => import("../components/WorkingHours")) @@ -29,7 +28,9 @@ const ApprovalLeaveSick = lazy(() => import("../components/ApprovalLeaveSick")) export const dynamic = 'force-dynamic' export default async function DashboardPage() { - const session = await getServerSession(authOptions) + const actions = await getAccessPagePermission('/', 'VIEW', false) + + const session = await getCacheServerSession() const today = fetchDataWithPost('/presence/history/today', { nik: session?.user.detail.nik }) const all = fetchDataWithPost('/presence/history', { nik: session?.user.detail.nik, start_date: dayjs().subtract(1, 'week'), end_date: dayjs().format('YYYY-MM-DD') }) @@ -207,7 +208,7 @@ export default async function DashboardPage() { - {(session?.user.detail.role.code === 'MNG' || session?.user.detail.role.code === 'TL') && + {actions.includes("VIEW_APPROVAL_ATTENDANCE") && Need to be Approve @@ -215,12 +216,12 @@ export default async function DashboardPage() { }> - + } - {(session?.user.detail.role.code === 'MNG' || session?.user.detail.role.code === 'TL') && dataDashboard.presence?.need_to_be_approved_auto_checkout?.total > 0 && + {actions.includes('VIEW_AUTOCHECKOUT') && Adjustment Autocheckout @@ -228,12 +229,12 @@ export default async function DashboardPage() { }> - + } - {(session?.user.detail.role.code === 'MNG' || session?.user.detail.role.code === 'TL') && dataDashboard.presence?.need_to_be_approved_application_form?.total > 0 && + {actions.includes("VIEW_LEAVE") && Work Leave and Sick Approval @@ -241,7 +242,7 @@ export default async function DashboardPage() { }> - + @@ -268,7 +269,7 @@ export default async function DashboardPage() { - {session?.user.detail.role.code === 'MNG' && + {actions.includes('VEIW_CONTRACT_EXPIRATION') && Employee Contract Expiration diff --git a/app/(dashboard)/components/AdjustmentAutoCheckout.tsx b/app/(dashboard)/components/AdjustmentAutoCheckout.tsx index a88cc8f..1eb1b1a 100644 --- a/app/(dashboard)/components/AdjustmentAutoCheckout.tsx +++ b/app/(dashboard)/components/AdjustmentAutoCheckout.tsx @@ -23,13 +23,14 @@ const Avatar = lazy(() => import('@/components/ViewAvatar').then(mod => ({ defau type Props = { data: any + isAllowApprove?: boolean className?: string }; const sortBy = 'presence_date' const filterBy = ['fullname', 'position_name', 'working_status'] -const AdjusmentAutoCheckout: FC = ({ data, className }) => { +const AdjusmentAutoCheckout: FC = ({ data, isAllowApprove, className }) => { const [isLoading, setIsLoading] = useState(false) const [isFullLoading, setIsFullLoading] = useState(false) const [showDialog, setShowDialog] = useState(false) @@ -287,12 +288,14 @@ const AdjusmentAutoCheckout: FC = ({ data, className }) => { { setShowDialog(false); setDataPresence(null) }} > Cancel - { setShowConfirm(true) }}> - {isLoading && ( - - )} - Approve AutoCheckout - + {isAllowApprove && + { setShowConfirm(true) }}> + {isLoading && ( + + )} + Approve AutoCheckout + + } diff --git a/app/(dashboard)/components/ApprovalLeaveSick.tsx b/app/(dashboard)/components/ApprovalLeaveSick.tsx index 8079e72..8d4783a 100644 --- a/app/(dashboard)/components/ApprovalLeaveSick.tsx +++ b/app/(dashboard)/components/ApprovalLeaveSick.tsx @@ -23,13 +23,14 @@ const Avatar = lazy(() => import('@/components/ViewAvatar').then(mod => ({ defau type Props = { data: any + isAllowApprove?: boolean className?: string }; const sortBy = 'start_date' const filterBy = ['fullname', 'position_name', 'category'] -const ApprovalLeaveSick: FC = ({ data, className }) => { +const ApprovalLeaveSick: FC = ({ data, className, isAllowApprove }) => { const [isLoading, setIsLoading] = useState(false) const [isFullLoading, setIsFullLoading] = useState(false) const [showDialog, setShowDialog] = useState(false) @@ -252,18 +253,20 @@ const ApprovalLeaveSick: FC = ({ data, className }) => { { setIsApproval(false); setShowConfirm(true) }} className='text-red-500 font-semibold'> Decline - { setIsApproval(true); setShowConfirm(true) }}> - {isLoading && ( - - )} - Approve - + {isAllowApprove && + { setIsApproval(true); setShowConfirm(true) }}> + {isLoading && ( + + )} + Approve + + } } - { - showConfirm && + + {showConfirm && @@ -286,6 +289,7 @@ const ApprovalLeaveSick: FC = ({ data, className }) => { } + {isFullLoading && } ); diff --git a/app/(dashboard)/components/NeedApproval.tsx b/app/(dashboard)/components/NeedApproval.tsx index 021183d..c199f99 100644 --- a/app/(dashboard)/components/NeedApproval.tsx +++ b/app/(dashboard)/components/NeedApproval.tsx @@ -20,13 +20,14 @@ const Avatar = lazy(() => import('@/components/ViewAvatar').then(mod => ({ defau type Props = { data: any + isAllowApprove?: boolean className?: string }; const sortBy = 'presence_date' const filterBy = ['fullname', 'position_name', 'working_status'] -const NeedApproval: FC = ({ data, className }) => { +const NeedApproval: FC = ({ data, isAllowApprove, className }) => { const [isLoading, setIsLoading] = useState(false) const [isFullLoading, setIsFullLoading] = useState(false) const [showDialog, setShowDialog] = useState(false) @@ -242,17 +243,19 @@ const NeedApproval: FC = ({ data, className }) => { - - { setIsApproval(false); setShowConfirm(true) }} className='text-red-500 font-semibold'> - Decline - - { setIsApproval(true); setShowConfirm(true) }}> - {isLoading && ( - - )} - Approve - - + {isAllowApprove && + + { setIsApproval(false); setShowConfirm(true) }} className='text-red-500 font-semibold'> + Decline + + { setIsApproval(true); setShowConfirm(true) }}> + {isLoading && ( + + )} + Approve + + + } } diff --git a/app/(dashboard)/history/attendance/DataTable.tsx b/app/(dashboard)/history/attendance/DataTable.tsx index 4cf9f8b..faed4eb 100644 --- a/app/(dashboard)/history/attendance/DataTable.tsx +++ b/app/(dashboard)/history/attendance/DataTable.tsx @@ -18,9 +18,10 @@ import { CircleCheck } from "lucide-react" type Props = { data: IHistory[] + actions?: string[] } -export default function DataTable({ data }: Props) { +export default function DataTable({ data, actions }: Props) { const searchParams = useSearchParams(); const currentPage = Number(searchParams!.get('page') as string) || 1; @@ -62,7 +63,7 @@ export default function DataTable({ data }: Props) { // console.log(data) return (
- +
diff --git a/app/(dashboard)/history/attendance/index.tsx b/app/(dashboard)/history/attendance/index.tsx index ac9852b..92ef9a8 100644 --- a/app/(dashboard)/history/attendance/index.tsx +++ b/app/(dashboard)/history/attendance/index.tsx @@ -10,9 +10,10 @@ const DataTable = lazy(() => import('./DataTable')); type Props = { searchParams: Promise<{ [key: string]: string | string[] | undefined }> + actions?: string[] }; -export default async function AttendanceHistory({ searchParams }: Props) { +export default async function AttendanceHistory({ searchParams, actions }: Props) { const start_date = (await searchParams)!.start_date const end_date = (await searchParams)!.end_date const search = (await searchParams)!.search @@ -40,7 +41,7 @@ export default async function AttendanceHistory({ searchParams }: Props) { return ( }> - + ); } \ No newline at end of file diff --git a/app/(dashboard)/history/components/SortFilter.tsx b/app/(dashboard)/history/components/SortFilter.tsx index be883e0..4841575 100644 --- a/app/(dashboard)/history/components/SortFilter.tsx +++ b/app/(dashboard)/history/components/SortFilter.tsx @@ -7,9 +7,10 @@ import ExportComponent from './Export'; type Props = { data?: any[] + actions?: string[] }; -const SortFilter: FC = ({ data }) => { +const SortFilter: FC = ({ data, actions }) => { const searchParams = useSearchParams(); const router = useRouter() const path = usePathname() @@ -64,7 +65,9 @@ const SortFilter: FC = ({ data }) => { - + {actions?.includes('EXPORT') && + + } ); diff --git a/app/(dashboard)/history/leave-permit/DataTable.tsx b/app/(dashboard)/history/leave-permit/DataTable.tsx index 8051aa3..5cf23a0 100644 --- a/app/(dashboard)/history/leave-permit/DataTable.tsx +++ b/app/(dashboard)/history/leave-permit/DataTable.tsx @@ -28,9 +28,10 @@ dayjs.extend(customParseFormat); type Props = { data: ILeaveSickPermit[] + actions?: string[] } -export default function DataTable({ data }: Props) { +export default function DataTable({ data, actions }: Props) { const searchParams = useSearchParams(); const [isPreviewLoading, setIsPreviewLoading] = useState(false) const [isDownLoading, setIsDownLoading] = useState(false) @@ -183,7 +184,7 @@ export default function DataTable({ data }: Props) { return (
- +
diff --git a/app/(dashboard)/history/leave-permit/index.tsx b/app/(dashboard)/history/leave-permit/index.tsx index 6e3ae6c..c7dff94 100644 --- a/app/(dashboard)/history/leave-permit/index.tsx +++ b/app/(dashboard)/history/leave-permit/index.tsx @@ -10,9 +10,10 @@ const DataTable = lazy(() => import('./DataTable')); type Props = { searchParams: Promise<{ [key: string]: string | string[] | undefined }> + actions?: string[] }; -export default async function LeavePermitHistory({ searchParams }: Props) { +export default async function LeavePermitHistory({ searchParams, actions }: Props) { const start_date = (await searchParams)!.start_date const end_date = (await searchParams)!.end_date const search = (await searchParams)!.search diff --git a/app/(dashboard)/history/page.tsx b/app/(dashboard)/history/page.tsx index d544950..f35911d 100644 --- a/app/(dashboard)/history/page.tsx +++ b/app/(dashboard)/history/page.tsx @@ -5,15 +5,14 @@ import { Card, CardContent } from "@/components/ui/card"; import { Suspense, lazy } from "react"; import SkeletonTable from "@/components/skeleton/SkeletonTable"; import TabsComponent from "./components/Tabs"; -import { getServerSession } from "next-auth"; -import { authOptions } from "@/lib/auth"; +import { getAccessPagePermission, getCacheServerSession } from "@/lib/get-access-data"; const AttendanceHistory = lazy(() => import("./attendance")); const LeavePermitHistory = lazy(() => import("./leave-permit")); export async function generateMetadata(): Promise { - const session = await getServerSession(authOptions) + const session = await getCacheServerSession() return { title: `${session?.user?.detail.fullname || 'User'}'s History - HIS Attendance Task System (H.A.T.s)`, @@ -25,6 +24,8 @@ type Props = { }; export default async function HistoryPage({ searchParams }: Props) { + const actions = await getAccessPagePermission('/history', 'VIEW', false) + const tab = (await searchParams)!.tab return ( @@ -46,9 +47,9 @@ export default async function HistoryPage({ searchParams }: Props) { } key={tab as string}> {tab === 'leave-permit' ? - + : - + } diff --git a/app/(dashboard)/iam-here/page.tsx b/app/(dashboard)/iam-here/page.tsx index 456afc9..b88bcf9 100644 --- a/app/(dashboard)/iam-here/page.tsx +++ b/app/(dashboard)/iam-here/page.tsx @@ -4,9 +4,8 @@ import { Separator } from '@/components/ui/separator'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import PageLoading from '@/components/loader/PageLoading'; import { fetchDataWithPost } from '@/lib/fetchData'; -import { getServerSession } from 'next-auth'; import { redirect } from 'next/navigation'; -import { authOptions } from '@/lib/auth'; +import { getAccessPagePermission, getCacheServerSession } from '@/lib/get-access-data'; const FormComponent = lazy(() => import('./components/FormComponent')) @@ -17,7 +16,9 @@ export const metadata: Metadata = { type Props = {}; const IamHerePage: FC = async () => { - const session = await getServerSession(authOptions) + await getAccessPagePermission('/iam-here', 'CREATE', false) + + const session = await getCacheServerSession() const res = await fetchDataWithPost('/presence/last-status/today', { nik: session?.user.detail.nik }) if (res && res.is_checkin && res.device_code === '11001') { diff --git a/app/(dashboard)/leave/page.tsx b/app/(dashboard)/leave/page.tsx index 7856864..1f93b1c 100644 --- a/app/(dashboard)/leave/page.tsx +++ b/app/(dashboard)/leave/page.tsx @@ -4,6 +4,7 @@ import { Separator } from '@/components/ui/separator'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import PageLoading from '@/components/loader/PageLoading'; import { fetchDataWithPost } from '@/lib/fetchData'; +import { getAccessPagePermission } from '@/lib/get-access-data'; const FormComponent = lazy(() => import('./components')) @@ -12,6 +13,8 @@ export const metadata: Metadata = { } const WorkLeave = async () => { + await getAccessPagePermission('/leave', 'CREATE', false) + const res = await fetchDataWithPost('/user/position', { position_code: 'P02' }) return ( diff --git a/app/(dashboard)/presence-v2/page.tsx b/app/(dashboard)/presence-v2/page.tsx index 812439a..df75644 100644 --- a/app/(dashboard)/presence-v2/page.tsx +++ b/app/(dashboard)/presence-v2/page.tsx @@ -4,6 +4,7 @@ import { Separator } from '@/components/ui/separator'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import PageLoading from '@/components/loader/PageLoading'; import fetchData from '@/lib/fetchData'; +import { getAccessPagePermission } from '@/lib/get-access-data'; const FormComponent = lazy(() => import('./components/FormComponent')) @@ -21,6 +22,8 @@ type Props = { }; const PresencePage: FC = async ({ searchParams }) => { + await getAccessPagePermission('/presence-v2', 'CREATE', false) + const checkout = (await searchParams)?.checkout const res = await fetchData('/presence/list-status') diff --git a/app/(dashboard)/profile/page.tsx b/app/(dashboard)/profile/page.tsx index c4ac0bf..ed83631 100644 --- a/app/(dashboard)/profile/page.tsx +++ b/app/(dashboard)/profile/page.tsx @@ -9,8 +9,7 @@ import LazyLoading from '@/components/loader/LazyLoading'; import { type IProfile } from './components/type'; import { type IUser } from '@/app/admin/administration/user/component/type'; -import { getServerSession } from 'next-auth'; -import { authOptions } from '@/lib/auth'; +import { getAccessPagePermission, getCacheServerSession, getNonAdminAccessPagePermission } from '@/lib/get-access-data'; const ForgotPassword = lazy(() => import('./components/ForgotPassword')); const ChangeTheme = lazy(() => import("./components/ChangeTheme")) @@ -19,7 +18,7 @@ const EditProfile = lazy(() => import("./components/EditProfile")) const ChangeAvatar = lazy(() => import("./components/ChangeAvatar")) export async function generateMetadata(): Promise { - const session = await getServerSession(authOptions) + const session = await getCacheServerSession() return { title: `${session?.user?.detail.fullname || 'User'}'s Profile - H.A.T.s`, @@ -27,7 +26,9 @@ export async function generateMetadata(): Promise { } export default async function ProfilePage() { - const session = await getServerSession(authOptions) + await getAccessPagePermission('/profile', 'VIEW', false) + + const session = await getCacheServerSession() const data: IProfile = await fetchDataWithPost('/user/profile', {}, 'default', { tags: ['profile-data'] }) return ( diff --git a/app/(dashboard)/work-permit/page.tsx b/app/(dashboard)/work-permit/page.tsx index 01b87cc..4dff3e0 100644 --- a/app/(dashboard)/work-permit/page.tsx +++ b/app/(dashboard)/work-permit/page.tsx @@ -4,6 +4,7 @@ import { Separator } from '@/components/ui/separator'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import PageLoading from '@/components/loader/PageLoading'; import { fetchDataWithPost } from '@/lib/fetchData'; +import { getAccessPagePermission } from '@/lib/get-access-data'; const FormComponent = lazy(() => import('./components')) @@ -12,6 +13,8 @@ export const metadata: Metadata = { } const WorkPermit = async () => { + await getAccessPagePermission('/work-permit', 'CREATE', false) + const res = await fetchDataWithPost('/user/position', { position_code: 'P02' }) return ( diff --git a/app/admin/rbac/action-permissions/page.tsx b/app/admin/rbac/action-permissions/page.tsx index cbc862c..7b82fb7 100644 --- a/app/admin/rbac/action-permissions/page.tsx +++ b/app/admin/rbac/action-permissions/page.tsx @@ -28,7 +28,7 @@ async function getPermissions() { } export default async function PermissionPage() { - const actions = await getAccessPagePermission(['/rbac/action-permissions', '/rbac/action-pemission']); + const actions = await getAccessPagePermission('/rbac/action-permissions'); const permissions = await getPermissions(); return ( diff --git a/components/ui/rbac-badge.tsx b/components/ui/rbac-badge.tsx index 58c22c2..4ab48a4 100644 --- a/components/ui/rbac-badge.tsx +++ b/components/ui/rbac-badge.tsx @@ -25,6 +25,13 @@ export function getPermissionBadgeClass(permission: string): string { if (upper.includes('PASSWORD')) { return 'bg-amber-500/10 text-amber-600 border-amber-500/20 dark:bg-amber-500/20 dark:text-amber-300 dark:border-amber-500/30'; } + if (upper.includes('MANAGE')) { + return 'bg-lime-500/10 text-lime-600 border-lime-500/20 dark:bg-lime-500/20 dark:text-lime-300 dark:border-lime-500/30'; + } + if (upper.includes('VIEW') || upper.includes('READ')) { + // Primary / HIS theme color (#EA512C) + return 'bg-his/10 text-his border-his/20 dark:bg-his/20 dark:text-orange-300 dark:border-his/30'; + } if (upper.includes('APPROVE') || upper.includes('APPROVAL')) { return 'bg-fuchsia-500/10 text-fuchsia-600 border-fuchsia-500/20 dark:bg-fuchsia-500/20 dark:text-fuchsia-300 dark:border-fuchsia-500/30'; } @@ -40,20 +47,12 @@ export function getPermissionBadgeClass(permission: string): string { if (upper.includes('CREATE') || upper.includes('ADD')) { return 'bg-sky-500/10 text-sky-600 border-sky-500/20 dark:bg-sky-500/20 dark:text-sky-300 dark:border-sky-500/30'; } - if (upper.includes('VIEW') || upper.includes('READ')) { - // Primary / HIS theme color (#EA512C) - return 'bg-his/10 text-his border-his/20 dark:bg-his/20 dark:text-orange-300 dark:border-his/30'; - } // Default / Other: Cyan return 'bg-cyan-500/10 text-cyan-700 border-cyan-500/20 dark:bg-cyan-500/20 dark:text-cyan-300 dark:border-cyan-500/30'; } -export const RbacBadge: React.FC = ({ - permission, - className, - size = 'sm', -}) => { +export const RbacBadge: React.FC = ({ permission, className, size = 'sm' }) => { if (!permission) return null; const sizeClasses = size === 'sm' ? 'px-2 py-0.5 text-[11px] leading-4' : 'px-2.5 py-1 text-xs leading-4'; diff --git a/lib/get-access-data.tsx b/lib/get-access-data.tsx index 2a959ef..d99cf47 100644 --- a/lib/get-access-data.tsx +++ b/lib/get-access-data.tsx @@ -44,33 +44,35 @@ export const getAccessData = cache(async () => { }); -export async function getAccessPagePermission(path: string | string[], action: string = "view") { +export async function getAccessPagePermission(path: string, action: string = "VIEW", isAdminMenu: boolean = true) { const accessData = await getAccessData(); - const normalize = (p: string) => (p || '').trim().replace(/^\/+|\/+$/g, '').toLowerCase(); - const targetPaths = (Array.isArray(path) ? path : [path]).map(normalize); + const normalizePath = (value?: string) => (value ?? "").trim().replace(/\/+/g, "/").replace(/\/$/, "").replace(/^$/, "/").toLowerCase(); + + const targetPath = normalizePath(path); - // Check whether the current page is registered const menu = accessData?.role_detail?.find((item: any) => { - const itemPath = normalize(item.menu?.path_url || ''); - if (!itemPath) return false; - if (targetPaths.includes(itemPath)) return true; - if (targetPaths.includes('rbac/action-permissions') && itemPath === 'rbac/action-pemission') return true; - if (targetPaths.includes('rbac/action-pemission') && itemPath === 'rbac/action-permissions') return true; - return false; + const menuPath = normalizePath(item.menu?.path_url); + + return ( + menuPath === targetPath && + item.menu?.is_admin_menu === isAdminMenu + ); }); if (!menu?.menu) { forbidden(); } - // Role-specific assigned actions take precedence; fallback to menu actions if role actions are absent - const permittedActions: string[] = (Array.isArray(menu?.action) && menu.action.length > 0) - ? menu.action - : (Array.isArray(menu?.menu?.action) ? menu.menu.action : []); + const permittedActions: string[] = + Array.isArray(menu.action) && menu.action.length > 0 + ? menu.action + : Array.isArray(menu.menu.action) + ? menu.menu.action + : []; - // Check whether the user has permission const hasPermission = permittedActions.some((act: string) => act.toUpperCase() === action.toUpperCase()); + if (!hasPermission) { forbidden(); } diff --git a/lib/tabler-icons.ts b/lib/tabler-icons.ts index 4e9856e..70198a5 100644 --- a/lib/tabler-icons.ts +++ b/lib/tabler-icons.ts @@ -14,6 +14,7 @@ export const TABLER_ICON_OPTIONS: ITablerIconOption[] = [ { label: 'Overview', value: 'ti ti-layers-linked', category: 'General' }, { label: 'Dashboard', value: 'ti ti-layout-dashboard', category: 'General' }, { label: 'Home', value: 'ti ti-home', category: 'General' }, + { label: 'Home', value: 'ti ti-home-stats', category: 'General' }, { label: 'Menu', value: 'ti ti-menu-2', category: 'General' }, { label: 'Settings', value: 'ti ti-settings', category: 'General' }, { label: 'Adjustments', value: 'ti ti-adjustments', category: 'General' }, @@ -25,6 +26,7 @@ export const TABLER_ICON_OPTIONS: ITablerIconOption[] = [ { label: 'Users', value: 'ti ti-users', category: 'Administration' }, { label: 'User Shield', value: 'ti ti-user-shield', category: 'Administration' }, { label: 'User Check', value: 'ti ti-user-check', category: 'Administration' }, + { label: 'User Circle', value: 'ti ti-user-circle', category: 'Administration' }, { label: 'Shield Lock', value: 'ti ti-shield-lock', category: 'Administration' }, { label: 'Key', value: 'ti ti-key', category: 'Administration' }, { label: 'Lock', value: 'ti ti-lock', category: 'Administration' }, @@ -52,6 +54,7 @@ export const TABLER_ICON_OPTIONS: ITablerIconOption[] = [ { label: 'Calendar Off', value: 'ti ti-calendar-x', category: 'Operations' }, { label: 'Clock', value: 'ti ti-clock', category: 'Operations' }, { label: 'Checklist', value: 'ti ti-checklist', category: 'Operations' }, + { label: 'History', value: 'ti ti-history-toggle', category: 'Operations' }, // Reports & Analytics { label: 'Chart Bar', value: 'ti ti-chart-bar', category: 'Reports' },