183 lines
4.4 KiB
TypeScript
183 lines
4.4 KiB
TypeScript
// Ported from legacy henza_admin/src/router/branch.js
|
|
//
|
|
// Converted MECHANICALLY (see scratchpad/convert_routes.js) so every path, name,
|
|
// meta.role, breadcrumb and pageTitle survives byte-exact. Only the component
|
|
// imports are rewritten to point at the ported views. As of Batch 15 every
|
|
// referenced view exists, so no placeholder is emitted.
|
|
//
|
|
// NOTE: legacy also shipped 8 router files with zero importers (apps.js,
|
|
// category.js, customer.js, dashboard.js, full.js, manage.js, order.js,
|
|
// product.js, temp.js). They are dead code and are not ported.
|
|
import type { RouteRecordRaw } from 'vue-router';
|
|
|
|
export const branchRoute: RouteRecordRaw[] = [
|
|
{
|
|
path: '/',
|
|
name: 'main',
|
|
redirect: '/dashboard'
|
|
},
|
|
{
|
|
path: '/dashboard',
|
|
name: 'dashboard',
|
|
component: () => import('../views/branch/dashboard.vue'),
|
|
meta: {
|
|
rule: 'admin',
|
|
role: 'dashboard.omde'
|
|
}
|
|
},
|
|
{
|
|
path: '/products',
|
|
name: 'product-list',
|
|
component: () => import('../views/apps/product/ProductList.vue'),
|
|
meta: {
|
|
rule: 'editor',
|
|
role: 'product.list',
|
|
parent: 'product',
|
|
no_scroll: true
|
|
}
|
|
},
|
|
/*{
|
|
path: '/order',
|
|
redirect: '/order/list',
|
|
name: 'order'
|
|
},*/
|
|
{
|
|
path: '/order/list',
|
|
component: () => import('../views/order/List.vue'),
|
|
meta: {
|
|
rule: 'editor',
|
|
role: 'order.list',
|
|
parent: 'order',
|
|
no_scroll: true
|
|
}
|
|
},
|
|
{
|
|
path: '/buy/order/list',
|
|
component: () => import('../views/branch/buyList.vue'),
|
|
meta: {
|
|
rule: 'editor',
|
|
role: 'order.list',
|
|
parent: 'order',
|
|
no_scroll: true
|
|
}
|
|
},
|
|
/*{
|
|
path: '/buy/order/list',
|
|
component: () => import('../views/order/List.vue'),
|
|
meta: {
|
|
rule: 'editor',
|
|
role: 'buy.order.list',
|
|
no_scroll: true
|
|
}
|
|
},*/
|
|
{
|
|
path: '/order/create',
|
|
component: () => import('../views/branch/order/create.vue'),
|
|
meta: {
|
|
rule: 'editor',
|
|
role: 'order.create',
|
|
parent: 'order',
|
|
no_scroll: true
|
|
}
|
|
},
|
|
/*{
|
|
path: '/singleCustomer/edit/:id',
|
|
name: 'singleCustomer-edit',
|
|
component: () => import('../views/apps/customer/EditSingleCustomer.vue'),
|
|
meta: {
|
|
rule: 'editor',
|
|
role: 'persons.list.client.single.edit',
|
|
parent: 'product',
|
|
no_scroll: true
|
|
}
|
|
},*/
|
|
{
|
|
path: '/singleCustomer/view/:id',
|
|
name: 'singleCustomer-view',
|
|
component: () => import('../views/customer/single-customer/ViewSingleCustomer.vue'),
|
|
meta: {
|
|
rule: 'editor',
|
|
role: 'persons.list.client.single.view',
|
|
parent: 'product',
|
|
no_scroll: true
|
|
}
|
|
},
|
|
{
|
|
path: '/singleCustomer/edit/:id',
|
|
name: 'singleCustomer-edit',
|
|
component: () => import('../views/apps/customer/EditSingleCustomer.vue'),
|
|
meta: {
|
|
rule: 'editor',
|
|
role: 'persons.list.client.single.edit',
|
|
parent: 'product',
|
|
no_scroll: true
|
|
}
|
|
},
|
|
{
|
|
path: '/customer/add',
|
|
name: 'add-customer',
|
|
component: () => import('../views/branch/addCustomer.vue'),
|
|
meta: {
|
|
role: 'persons.create',
|
|
rule: 'editor'
|
|
}
|
|
},
|
|
{
|
|
path: '/customer/list',
|
|
name: 'list-customer',
|
|
component: () => import('../views/customer/single-customer/SingleCustomer.vue'),
|
|
meta: {
|
|
role: 'persons.list.client.single',
|
|
rule: 'editor'
|
|
}
|
|
},
|
|
/*{
|
|
path: '/report/order_item',
|
|
name: 'report_order_item',
|
|
component: () => import('../views/report/order_item.vue'),
|
|
meta: {
|
|
/!* breadcrumb: [
|
|
{title: 'خانه', url: '/'},
|
|
{title: 'مشتریان'}
|
|
],*!/
|
|
//pageTitle: 'لیست مشتریان',
|
|
role: 'report.order.item',
|
|
rule: 'editor'
|
|
}
|
|
},*/
|
|
/*{
|
|
path: '/report/product',
|
|
name: 'report_product',
|
|
component: () => import('../views/report/product.vue'),
|
|
meta: {
|
|
role: 'report.product',
|
|
rule: 'editor'
|
|
}
|
|
},*/
|
|
/*{
|
|
path: '/finical/list',
|
|
name: 'finical_list',
|
|
component: () => import('../views/finical/list.vue'),
|
|
meta: {
|
|
/!* breadcrumb: [
|
|
{title: 'خانه', url: '/'},
|
|
{title: 'مشتریان'}
|
|
],*!/
|
|
//pageTitle: 'لیست مشتریان',
|
|
role: 'document.list',
|
|
rule: 'editor'
|
|
}
|
|
},*/
|
|
]
|
|
|
|
export const fullPageBranchRoute: RouteRecordRaw[] = [ {
|
|
path: '/auth/login',
|
|
name: 'page-login',
|
|
//component: () => import('../views/auth/Login.vue'),
|
|
component: () => import('../views/branch/login.vue'),
|
|
meta: {
|
|
rule: 'editor'
|
|
}
|
|
},
|
|
]
|