Files
portal-api/config/admin-sidebar.php
T
pbao9 17b02631e4 Refactor views to use new layout structure and update routes for administrator pages
- Changed view extends from "admin.main" to "administrator.layout.master" across multiple files.
- Updated route names in admin.php and administrator.php to reflect new structure for user, order, invoice, and other management functionalities.
- Adjusted view includes to point to the new directory structure for blocks and components.
- Ensured all permission checks remain intact while refactoring the views.
2026-02-02 10:31:11 +07:00

140 lines
6.3 KiB
PHP

<?php
return [
[
'type' => 'category',
'title' => 'Modules',
],
[
'type' => 'group',
'title' => 'Package vCenter',
'icon' => 'box',
'active' => ['package.datacenter.*', 'package.host.*', 'package.datastore.*', 'package.folder.*', 'package.network.*', 'package.group.*', 'package.version.*', 'package.ipaddress.*', 'package.vm.*'],
'children' => [
['title' => 'Datacenter', 'route' => 'package.datacenter.index', 'active' => ['package.datacenter.*']],
['title' => 'Host', 'route' => 'package.host.index', 'active' => ['package.host.*']],
['title' => 'Datastore', 'route' => 'package.datastore.index', 'active' => ['package.datastore.*']],
['title' => 'Folder', 'route' => 'package.folder.index', 'active' => ['package.folder.*']],
['title' => 'Network Adapter', 'route' => 'package.network.index', 'active' => ['package.network.*']],
['title' => 'Group Os', 'route' => 'package.group.index', 'active' => ['package.group.*']],
['title' => 'Os Version', 'route' => 'package.version.index', 'active' => ['package.version.*']],
['title' => 'IP Mapping', 'route' => 'package.ipaddress.index', 'active' => ['package.ipaddress.*']],
['title' => 'Virtual Machines', 'route' => 'package.vm.index', 'active' => ['package.vm.*']],
],
],
[
'type' => 'group',
'title' => 'Module',
'icon' => 'server',
'active' => ['module.dns.*', 'module.hosting.*', 'module.vcenter.*', 'module.ippool.*'],
'children' => [
['title' => 'Module DNS', 'route' => 'module.dns.index', 'active' => ['module.dns.*']],
['title' => 'Module Hosting', 'route' => 'module.hosting.index', 'active' => ['module.hosting.*']],
['title' => 'Module vCenter', 'route' => 'module.vcenter.index', 'active' => ['module.vcenter.*']],
['title' => 'Module IP Pool', 'route' => 'module.ippool.index', 'active' => ['module.ippool.*']],
],
],
[
'type' => 'category',
'title' => 'Manager',
],
[
'type' => 'group',
'title' => 'Manager Admin',
'icon' => 'users',
'active' => ['administrator.pages.user.*', 'role.*'],
'children' => [
['title' => 'List Admin', 'route' => 'administrator.pages.user.index', 'active' => ['administrator.pages.user.*']],
['title' => 'Administrator Roles', 'route' => 'role.index', 'active' => ['role.*']],
],
],
[
'type' => 'group',
'title' => 'Client',
'icon' => 'users',
'active' => ['customer.*'],
'children' => [
['title' => 'View All Client', 'route' => 'customer.index', 'active' => ['customer.index', 'customer.info', 'customer.profile', 'customer.product', 'customer.domain', 'customer.invoice', 'customer.trans', 'customer.email', 'customer.log']],
['title' => 'Add new Client', 'route' => 'customer.create', 'active' => ['customer.create']],
],
],
[
'type' => 'group',
'title' => 'Product',
'icon' => 'cloud',
'active' => ['product.*', 'addon.*', 'domain.*'],
'children' => [
['title' => 'All Product/Services', 'route' => 'product.index', 'active' => ['product.*']],
['title' => 'Product Addon', 'route' => 'addon.index', 'active' => ['addon.*']],
['title' => 'Domain Pricing', 'route' => 'domain.index', 'active' => ['domain.*']],
],
],
[
'type' => 'group',
'title' => 'Orders',
'icon' => 'shopping-cart',
'active' => ['administrator.pages.order.*'],
'children' => [
['title' => 'View All Orders', 'route' => 'administrator.pages.order.index', 'active' => ['administrator.pages.order.index'], 'params' => []],
['title' => 'Pending Orders', 'route' => 'administrator.pages.order.index', 'active' => [], 'params' => ['status' => 'pending']],
['title' => 'Processing Orders', 'route' => 'administrator.pages.order.index', 'active' => [], 'params' => ['status' => 'processing']],
['title' => 'Active Orders', 'route' => 'administrator.pages.order.index', 'active' => [], 'params' => ['status' => 'active']],
['title' => 'Cancel Orders', 'route' => 'administrator.pages.order.index', 'active' => [], 'params' => ['status' => 'cancel']],
['title' => 'Add New Orders', 'route' => 'administrator.pages.order.create', 'active' => ['administrator.pages.order.create']],
],
],
[
'type' => 'group',
'title' => 'Invoices',
'icon' => 'file-text',
'active' => ['administrator.pages.invoice.*'],
'children' => [
['title' => 'View All Invoice', 'route' => 'administrator.pages.invoice.index', 'active' => ['administrator.pages.invoice.index'], 'params' => []],
['title' => 'Pending Invoice', 'route' => 'administrator.pages.invoice.index', 'active' => [], 'params' => ['status' => 'unpaid']],
['title' => 'Paid Invoice', 'route' => 'administrator.pages.invoice.index', 'active' => [], 'params' => ['status' => 'active']],
['title' => 'Cancel Invoice', 'route' => 'administrator.pages.invoice.index', 'active' => [], 'params' => ['status' => 'cancel']],
],
],
[
'type' => 'category',
'title' => 'Settings',
],
[
'type' => 'group',
'title' => 'Menus',
'icon' => 'folder',
'active' => ['menu.*'],
'children' => [
['title' => 'View All Menu', 'route' => 'menu.index', 'active' => ['menu.*']],
],
],
[
'type' => 'item',
'title' => 'Coupon',
'icon' => 'tags',
'route' => 'coupon.index',
'active' => ['coupon.*'],
],
[
'type' => 'item',
'title' => 'Posts',
'icon' => 'pencil',
'route' => 'post.index',
'active' => ['post.*'],
],
[
'type' => 'item',
'title' => 'Support',
'icon' => 'ticket',
'route' => 'support.index',
'active' => ['support.*'],
],
[
'type' => 'item',
'title' => 'Payment Method',
'icon' => 'credit-card',
'route' => 'payment.index',
'active' => ['payment.*'],
],
];