33 lines
952 B
TypeScript
33 lines
952 B
TypeScript
// * Packages
|
|
import { HistoryIcon } from "lucide-react";
|
|
// * Other
|
|
import { NavListLinksProps } from "@/back/Components/Layout/Sidebar/AppSidebar";
|
|
import { SidebarGroupLink } from "@/back/Components/Layout/Sidebar/SidebarRegistry";
|
|
|
|
import str from "@/hooks/use-string";
|
|
import { GetTranslation } from "@/lib/utils";
|
|
|
|
import container from "@/services/container";
|
|
|
|
export default function ActivityLogs(): SidebarGroupLink {
|
|
const authService = container.resolve("authService");
|
|
const modelName = "activity-logs";
|
|
const transActivityLogs = GetTranslation(
|
|
`uwil-activity-logs::models.classes.${modelName}`,
|
|
{
|
|
choice: 2,
|
|
},
|
|
);
|
|
|
|
const link: NavListLinksProps = {
|
|
title: str(transActivityLogs).ucFirst().value(),
|
|
model: modelName,
|
|
icon: HistoryIcon,
|
|
show: authService.canGlobal(
|
|
"viewAny",
|
|
String.raw`Uwil\LaravelActivityLogs\Models\ActivityLog`,
|
|
),
|
|
};
|
|
|
|
return { link, group: "admin" };
|
|
}
|