73a32380e7
NPM Installation / build (16.x, ubuntu-latest) (push) Has been cancelled
NPM Installation / build (16.x, windows-latest) (push) Has been cancelled
NPM Installation / build (17.x, ubuntu-latest) (push) Has been cancelled
NPM Installation / build (17.x, windows-latest) (push) Has been cancelled
NPM Installation / build (18.x, ubuntu-latest) (push) Has been cancelled
NPM Installation / build (18.x, windows-latest) (push) Has been cancelled
522 lines
11 KiB
JavaScript
522 lines
11 KiB
JavaScript
/**
|
|
* _nav.js - Sidebar Navigation Configuration
|
|
*
|
|
* This file defines the structure and content of the sidebar navigation menu.
|
|
* The navigation is rendered by AppSidebar component using CoreUI nav components.
|
|
*
|
|
* Navigation item types:
|
|
* - CNavItem: Single navigation link
|
|
* - CNavGroup: Expandable group of navigation items
|
|
* - CNavTitle: Section title/divider
|
|
*
|
|
* Each item can have:
|
|
* - component: CoreUI component type ('CNavItem', 'CNavGroup', 'CNavTitle')
|
|
* - name: Display text
|
|
* - to: Vue Router path (for CNavItem)
|
|
* - icon: CoreUI icon name (from @coreui/icons)
|
|
* - badge: Optional badge with color and text
|
|
* - items: Array of child items (for CNavGroup)
|
|
* - href: External link URL
|
|
* - external: Boolean for external links
|
|
*
|
|
* @type {Array<Object>}
|
|
*/
|
|
|
|
const baseNav = [
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Dashboard',
|
|
to: '/dashboard',
|
|
icon: 'cil-speedometer',
|
|
badge: {
|
|
color: 'primary',
|
|
text: 'NEW',
|
|
},
|
|
},
|
|
// {
|
|
// component: 'CNavTitle',
|
|
// name: 'Ticketing',
|
|
// },
|
|
// {
|
|
// component: 'CNavGroup',
|
|
// name: 'Ticketing',
|
|
// to: '/ticket',
|
|
// icon: 'cil-layers',
|
|
// items: [
|
|
// {
|
|
// component: 'CNavItem',
|
|
// name: 'Ticket',
|
|
// to: '/tickets/ticket',
|
|
// icon: 'cil-notes',
|
|
// },
|
|
// {
|
|
// component: 'CNavItem',
|
|
// name: 'Ticket Type',
|
|
// to: '/tickets/ticket-type',
|
|
// icon: 'cil-list',
|
|
// },
|
|
// {
|
|
// component: 'CNavItem',
|
|
// name: 'Ticket Materials',
|
|
// to: '/tickets/ticket-materials',
|
|
// icon: 'cil-file',
|
|
// },
|
|
// {
|
|
// component: 'CNavItem',
|
|
// name: 'Ticket Incident',
|
|
// to: '/tickets/ticket-incident',
|
|
// icon: 'cil-Puzzle',
|
|
// },
|
|
// {
|
|
// component: 'CNavItem',
|
|
// name: 'Approved',
|
|
// to: '/tickets/approved',
|
|
// icon: 'cil-check',
|
|
// },
|
|
// {
|
|
// component: 'CNavItem',
|
|
// name: 'Rejected',
|
|
// to: '/tickets/rejected',
|
|
// icon: 'cil-ban',
|
|
// },
|
|
// ],
|
|
// },
|
|
{
|
|
component: 'CNavTitle',
|
|
name: 'Theme',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Colors',
|
|
to: '/theme/colors',
|
|
icon: 'cil-square',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Typography',
|
|
to: '/theme/typography',
|
|
icon: 'cil-pencil',
|
|
},
|
|
{
|
|
component: 'CNavTitle',
|
|
name: 'Components',
|
|
},
|
|
{
|
|
component: 'CNavGroup',
|
|
name: 'Base',
|
|
to: '/base',
|
|
icon: 'cil-puzzle',
|
|
items: [
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Accordion',
|
|
to: '/base/accordion',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Breadcrumbs',
|
|
to: '/base/breadcrumbs',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Cards',
|
|
to: '/base/cards',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Calendar',
|
|
href: 'https://coreui.io/vue/docs/components/calendar.html',
|
|
external: true,
|
|
badge: {
|
|
color: 'danger',
|
|
text: 'PRO',
|
|
},
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Carousels',
|
|
to: '/base/carousels',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Chips',
|
|
to: '/base/chips',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Collapses',
|
|
to: '/base/collapses',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'List Groups',
|
|
to: '/base/list-groups',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Navs & Tabs',
|
|
to: '/base/navs',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Paginations',
|
|
to: '/base/paginations',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Placeholders',
|
|
to: '/base/placeholders',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Popovers',
|
|
to: '/base/popovers',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Progress',
|
|
to: '/base/progress',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Smart Pagination',
|
|
href: 'https://coreui.io/vue/docs/components/smart-pagination.html',
|
|
badge: {
|
|
color: 'danger',
|
|
text: 'PRO',
|
|
},
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Smart Table',
|
|
external: true,
|
|
href: 'https://coreui.io/vue/docs/components/smart-table.html',
|
|
badge: {
|
|
color: 'danger',
|
|
text: 'PRO',
|
|
},
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Spinners',
|
|
to: '/base/spinners',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Tables',
|
|
to: '/base/tables',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Tabs',
|
|
to: '/base/tabs',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Tooltips',
|
|
to: '/base/tooltips',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Virtual Scroller',
|
|
href: 'https://coreui.io/vue/docs/components/virtual-scroller.html',
|
|
external: true,
|
|
badge: {
|
|
color: 'danger',
|
|
text: 'PRO',
|
|
},
|
|
},
|
|
],
|
|
},
|
|
{
|
|
component: 'CNavGroup',
|
|
name: 'Buttons',
|
|
to: '/buttons',
|
|
icon: 'cil-cursor',
|
|
items: [
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Buttons',
|
|
to: '/buttons/standard-buttons',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Button Groups',
|
|
to: '/buttons/button-groups',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Loading Button',
|
|
href: 'https://coreui.io/vue/docs/components/loading-button.html',
|
|
external: true,
|
|
badge: {
|
|
color: 'danger',
|
|
text: 'PRO',
|
|
},
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Dropdowns',
|
|
to: '/buttons/dropdowns',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
component: 'CNavGroup',
|
|
name: 'Forms',
|
|
to: '/forms',
|
|
icon: 'cil-notes',
|
|
items: [
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Autocomplete',
|
|
href: 'https://coreui.io/vue/docs/forms/autocomplete.html',
|
|
external: true,
|
|
badge: {
|
|
color: 'danger',
|
|
text: 'PRO',
|
|
},
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Checks & Radios',
|
|
to: '/forms/checks-radios',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Chip Input',
|
|
to: '/forms/chip-input',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Date Picker',
|
|
href: 'https://coreui.io/vue/docs/forms/date-picker.html',
|
|
external: true,
|
|
badge: {
|
|
color: 'danger',
|
|
text: 'PRO',
|
|
},
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Date Range Picker',
|
|
href: 'https://coreui.io/vue/docs/forms/date-range-picker.html',
|
|
badge: {
|
|
color: 'danger',
|
|
text: 'PRO',
|
|
},
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Floating Labels',
|
|
to: '/forms/floating-labels',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Form Control',
|
|
to: '/forms/form-control',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Input Group',
|
|
to: '/forms/input-group',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Password Input',
|
|
href: 'https://coreui.io/vue/docs/forms/password-input.html',
|
|
external: true,
|
|
badge: {
|
|
color: 'danger',
|
|
text: 'PRO',
|
|
},
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Range',
|
|
to: '/forms/range',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Range Slider',
|
|
href: 'https://coreui.io/vue/docs/forms/range-slider.html',
|
|
external: true,
|
|
badge: {
|
|
color: 'danger',
|
|
text: 'PRO',
|
|
},
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Rating',
|
|
href: 'https://coreui.io/vue/docs/forms/rating.html',
|
|
external: true,
|
|
badge: {
|
|
color: 'danger',
|
|
text: 'PRO',
|
|
},
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Select',
|
|
to: '/forms/select',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Stepper',
|
|
href: 'https://coreui.io/vue/docs/forms/stepper.html',
|
|
external: true,
|
|
badge: {
|
|
color: 'danger',
|
|
text: 'PRO',
|
|
},
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Time Picker',
|
|
href: 'https://coreui.io/vue/docs/forms/time-picker.html',
|
|
external: true,
|
|
badge: {
|
|
color: 'danger',
|
|
text: 'PRO',
|
|
},
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Layout',
|
|
to: '/forms/layout',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Validation',
|
|
to: '/forms/validation',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Charts',
|
|
to: '/charts',
|
|
icon: 'cil-chart-pie',
|
|
},
|
|
{
|
|
component: 'CNavGroup',
|
|
name: 'Icons',
|
|
to: '/icons',
|
|
icon: 'cil-star',
|
|
items: [
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'CoreUI Icons',
|
|
to: '/icons/coreui-icons',
|
|
badge: {
|
|
color: 'info',
|
|
text: 'NEW',
|
|
},
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Brands',
|
|
to: '/icons/brands',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Flags',
|
|
to: '/icons/flags',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
component: 'CNavGroup',
|
|
name: 'Notifications',
|
|
to: '/notifications',
|
|
icon: 'cil-bell',
|
|
items: [
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Alerts',
|
|
to: '/notifications/alerts',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Badges',
|
|
to: '/notifications/badges',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Modals',
|
|
to: '/notifications/modals',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Toasts',
|
|
to: '/notifications/toasts',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Users',
|
|
to: '/users',
|
|
icon: 'cil-user',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Tenants',
|
|
to: '/tenants',
|
|
icon: 'cil-building',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Widgets',
|
|
to: '/widgets',
|
|
icon: 'cil-calculator',
|
|
badge: {
|
|
color: 'primary',
|
|
text: 'NEW',
|
|
shape: 'pill',
|
|
},
|
|
},
|
|
{
|
|
component: 'CNavTitle',
|
|
name: 'Extras',
|
|
},
|
|
{
|
|
component: 'CNavGroup',
|
|
name: 'Pages',
|
|
to: '/pages',
|
|
icon: 'cil-star',
|
|
items: [
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Login',
|
|
to: '/pages/login',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Register',
|
|
to: '/pages/register',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Error 404',
|
|
to: '/pages/404',
|
|
},
|
|
{
|
|
component: 'CNavItem',
|
|
name: 'Error 500',
|
|
to: '/pages/500',
|
|
},
|
|
],
|
|
},
|
|
]
|
|
|
|
export function injectMenusAfterDashboard(dynamicMenus = []) {
|
|
if (!Array.isArray(baseNav) || baseNav.length === 0) return dynamicMenus
|
|
|
|
const [dashboard] = baseNav
|
|
return [dashboard, ...dynamicMenus]
|
|
}
|
|
|
|
export default baseNav
|