Files
mwitnessing/components/sidemenuData.js
Dobromir Popov 269553f2ec content for warehouse. HTML edit works ;
translations
2024-12-02 14:11:37 +02:00

174 lines
6.6 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { UserRole } from "@prisma/client";
// import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
// import { faStar } from '@fortawesome/free-solid-svg-icons'; // Star icon
// import { faClipboardList } from '@fortawesome/free-solid-svg-icons'; // Clipboard icon
import { FaStar } from 'react-icons/fa'; // Import FontAwesome icons
const sidemenu = [
{
id: "dashboard",
text: "Възможности",
url: "/dash",
roles: [UserRole.ADMIN, UserRole.USER, UserRole.POWERUSER],
svgData:
"M19 11H5M19 11C20.1046 11 21 11.8954 21 13V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19V13C3 11.8954 3.89543 11 5 11M19 11V9C19 7.89543 18.1046 7 17 7M5 11V9C5 7.89543 5.89543 7 7 7M7 7V5C7 3.89543 7.89543 3 9 3H15C16.1046 3 17 3.89543 17 5V7M7 7H17",
},
{
id: "shedule",
text: "График",
url: "/cart/calendar/schedule",
},
{
id: "myshedule",
text: "Моя График",
url: "/cart/publishers/myschedule",
},
{
id: "locations",
text: "Местоположения",
svgData: "M12 2C8.13401 2 5 5.13401 5 9C5 14.25 12 22 12 22C12 22 19 14.25 19 9C19 5.13401 15.866 2 12 2ZM12 11.5C10.6193 11.5 9.5 10.3807 9.5 9C9.5 7.61929 10.6193 6.5 12 6.5C13.3807 6.5 14.5 7.61929 14.5 9C14.5 10.3807 13.3807 11.5 12 11.5Z", // Example SVG path for location icon
url: "#",
children: [], // Placeholder to be dynamically populated
collapsable: true,
url: "/cart/locations",
},
{
id: "warehouse",
text: "Склад",
url: "/cart/locations/warehouse",
svgData: "M7 21V11.6C7 11.0399 7 10.7599 7.10899 10.546C7.20487 10.3578 7.35785 10.2048 7.54601 10.109C7.75992 9.99996 8.03995 9.99996 8.6 9.99996H15.4C15.9601 9.99996 16.2401 9.99996 16.454 10.109C16.6422 10.2048 16.7951 10.3578 16.891 10.546C17 10.7599 17 11.0399 17 11.6V21M10 14H14M10 18H14M3 10.4881V19.4C3 19.96 3 20.24 3.10899 20.454C3.20487 20.6421 3.35785 20.7951 3.54601 20.891C3.75992 21 4.03995 21 4.6 21H19.4C19.9601 21 20.2401 21 20.454 20.891C20.6422 20.7951 20.7951 20.6421 20.891 20.454C21 20.24 21 19.96 21 19.4V10.4881C21 9.41436 21 8.87747 20.8368 8.40316C20.6925 7.98371 20.457 7.60148 20.1472 7.28399C19.797 6.92498 19.3174 6.68357 18.3583 6.20075L14.1583 4.08645C13.3671 3.68819 12.9716 3.48905 12.5564 3.41069C12.1887 3.34129 11.8113 3.34129 11.4436 3.41069C11.0284 3.48905 10.6329 3.68818 9.84171 4.08645L5.64171 6.20075C4.6826 6.68357 4.20304 6.92498 3.85275 7.28399C3.54298 7.60148 3.30746 7.98371 3.16317 8.40316C3 8.87747 3 9.41437 3 10.4881Z"
},
{
id: "cart-report",
text: "Отчет",
url: "/cart/reports/report",
},
{
id: "cart-experience",
text: "Случки",
url: "/cart/reports/experience",
},
{
id: "guidelines",
text: "Напътствия",
url: "/guidelines",
},
{
id: "permits",
text: "Разрешителни",
url: "/permits",
},
{
id: "contactAll",
text: "Участници",
url: "/cart/publishers/contacts",
},
{
id: "feedback",
text: "Отзиви",
url: "/feedback",
},
{
id: "contactUs",
text: "За връзка",
url: "/contactUs",
},
{
id: "admin",
text: "Администрация",
url: "/admin",
roles: [UserRole.ADMIN, UserRole.POWERUSER],
svgData:
"M19 11H5M19 11C20.1046 11 21 11.8954 21 13V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19V13C3 11.8954 3.89543 11 5 11M19 11V9C19 7.89543 18.1046 7 17 7M5 11V9C5 7.89543 5.89543 7 7 7M7 7V5C7 3.89543 7.89543 3 9 3H15C16.1046 3 17 3.89543 17 5V7M7 7H17",
children: [
{
id: "cart-places",
text: "Места",
url: "/cart/locations",
roles: [UserRole.ADMIN, UserRole.POWERUSER],
},
{
id: "cart-publishers",
text: "Вестители",
url: "/cart/publishers",
roles: [UserRole.ADMIN, UserRole.POWERUSER],
},
// {
// id: "cart-availability",
// text: "Достъпности",
// url: "/cart/availabilities",
// roles: [UserRole.ADMIN, UserRole.POWERUSER],
// },
{
id: "cart-events",
text: "План",
url: "/cart/cartevents",
roles: [UserRole.ADMIN, UserRole.POWERUSER],
},
{
id: "cart-calendar",
text: "Календар",
url: "/cart/calendar",
roles: [UserRole.ADMIN, UserRole.POWERUSER],
},
{
id: "surveys",
// text: "Анкети",
// add new icon before text
// text: "Анкети",
text: (
<span>
<FaStar className="inline-block mr-2" />
Анкети
</span>
),
url: "/cart/surveys",
}, {
id: "cart-reports",
text: "Отчети",
url: "/cart/reports/list",
roles: [UserRole.ADMIN, UserRole.POWERUSER],
}, {
id: "statistics",
text: "Статистика",
url: "/cart/publishers/stats",
roles: [UserRole.ADMIN, UserRole.POWERUSER],
}, {
id: "coverMeLogs",
text: "Замествания",
url: "/cart/reports/coverMe",
roles: [UserRole.ADMIN, UserRole.POWERUSER],
},
{
id: "translations",
text: "Преводи",
url: "/cart/translations",
roles: [UserRole.ADMIN, UserRole.POWERUSER],
},
]
},
];
const footerMenu = [
{
id: "profile",
text: "Настройки",
url: `/cart/publishers/edit/me`,
roles: [UserRole.ADMIN, UserRole.POWERUSER, UserRole.USER],
svgData:
"M16 7C16 9.20914 14.2091 11 12 11C9.79086 11 8 9.20914 8 7C8 4.79086 9.79086 3 12 3C14.2091 3 16 4.79086 16 7Z M12 14C8.13401 14 5 17.134 5 21H19C19 17.134 15.866 14 12 14Z"
},
{
id: "privacy-policy",
text: "Политика за поверителност",
url: "/privacy",
},
]
export { footerMenu };
export default sidemenu;