import Vue from 'vue';
import Router from 'vue-router';
import { AuthGuard } from '@/utils';
import qs from 'qs';
import { globalRoutes, indexRoutes} from '@/router'

Vue.use(Router);

const router = new Router({
    routes: [
        {
            path: '/central/:central?',
            beforeEnter: (to: any, from: any, next: any) => {
                const routerParamsName = 'central';
                const params: any = {};
                if (to.params && to.params[routerParamsName]) {
                    Object.assign(params, qs.parse(to.params[routerParamsName], { delimiter: ';' }));
                }
                const url: string = '/appdata';
                const auth: Promise<any> = AuthGuard.getInstance().authGuard(url, params, router);
                auth.then(() => {
                    next();
                }).catch(() => {
                    next();
                });
            },
            meta: {  
                caption: 'app.views.central.title',
                info:'',
                viewType: 'APPINDEX',
                parameters: [
                    { pathName: 'central', parameterName: 'central' },
                ],
                requireAuth: true,
            },
            component: () => import('@pages/ungroup/central/central.vue'),
            children: [
                {
                    path: 'accounts/:account?/optionview/:optionview?',
                    meta: {
                        caption: 'entities.account.views.optionview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'accounts', parameterName: 'account' },
                            { pathName: 'optionview', parameterName: 'optionview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/account-option-view/account-option-view.vue'),
                },
                {
                    path: 'appointments/:appointment?/quickcreate/:quickcreate?',
                    meta: {
                        caption: 'entities.appointment.views.quickcreate.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'appointments', parameterName: 'appointment' },
                            { pathName: 'quickcreate', parameterName: 'quickcreate' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/appointment-quick-create/appointment-quick-create.vue'),
                },
                {
                    path: 'accounts/:account?/introduction/:introduction?',
                    meta: {
                        caption: 'entities.account.views.introduction.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'accounts', parameterName: 'account' },
                            { pathName: 'introduction', parameterName: 'introduction' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/account-introduction/account-introduction.vue'),
                },
                {
                    path: 'campaignresponses/:campaignresponse?/editview/:editview?',
                    meta: {
                        caption: 'entities.campaignresponse.views.editview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'campaignresponses', parameterName: 'campaignresponse' },
                            { pathName: 'editview', parameterName: 'editview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/marketing/campaign-response-edit-view/campaign-response-edit-view.vue'),
                },
                {
                    path: 'salesorders/:salesorder?/editview/:editview?',
                    meta: {
                        caption: 'entities.salesorder.views.editview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'salesorders', parameterName: 'salesorder' },
                            { pathName: 'editview', parameterName: 'editview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/sales/sales-order-edit-view/sales-order-edit-view.vue'),
                },
                {
                    path: 'accounts/:account?/editview/:editview?',
                    meta: {
                        caption: 'entities.account.views.editview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'accounts', parameterName: 'account' },
                            { pathName: 'editview', parameterName: 'editview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/account-edit-view/account-edit-view.vue'),
                },
                {
                    path: 'faxes/:fax?/editview/:editview?',
                    meta: {
                        caption: 'entities.fax.views.editview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'faxes', parameterName: 'fax' },
                            { pathName: 'editview', parameterName: 'editview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/fax-edit-view/fax-edit-view.vue'),
                },
                {
                    path: 'contacts/:contact?/abstracteditview9/:abstracteditview9?',
                    meta: {
                        caption: 'entities.contact.views.abstracteditview9.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'contacts', parameterName: 'contact' },
                            { pathName: 'abstracteditview9', parameterName: 'abstracteditview9' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/contact-abstract-edit-view9/contact-abstract-edit-view9.vue'),
                },
                {
                    path: 'incidents/:incident?/editview/:editview?',
                    meta: {
                        caption: 'entities.incident.views.editview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'incidents', parameterName: 'incident' },
                            { pathName: 'editview', parameterName: 'editview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/service/incident-edit-view/incident-edit-view.vue'),
                },
                {
                    path: 'activitypointers/:activitypointer?/editview/:editview?',
                    meta: {
                        caption: 'entities.activitypointer.views.editview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'activitypointers', parameterName: 'activitypointer' },
                            { pathName: 'editview', parameterName: 'editview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/activity-pointer-edit-view/activity-pointer-edit-view.vue'),
                },
                {
                    path: 'leads/:lead?/gridview/:gridview?',
                    meta: {
                        caption: 'entities.lead.views.gridview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'leads', parameterName: 'lead' },
                            { pathName: 'gridview', parameterName: 'gridview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/sales/lead-grid-view/lead-grid-view.vue'),
                },
                {
                    path: 'salesliteratures/:salesliterature?/gridview/:gridview?',
                    meta: {
                        caption: 'entities.salesliterature.views.gridview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'salesliteratures', parameterName: 'salesliterature' },
                            { pathName: 'gridview', parameterName: 'gridview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/sales/sales-literature-grid-view/sales-literature-grid-view.vue'),
                },
                {
                    path: 'competitors/:competitor?/editview/:editview?',
                    meta: {
                        caption: 'entities.competitor.views.editview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'competitors', parameterName: 'competitor' },
                            { pathName: 'editview', parameterName: 'editview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/sales/competitor-edit-view/competitor-edit-view.vue'),
                },
                {
                    path: 'centeralportal/:centeralportal?',
                    meta: {
                        caption: 'app.views.centeralportal.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'centeralportal', parameterName: 'centeralportal' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/ungroup/centeral-portal/centeral-portal.vue'),
                },
                {
                    path: 'accounts/:account?/edit_address/:edit_address?',
                    meta: {
                        caption: 'entities.account.views.edit_address.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'accounts', parameterName: 'account' },
                            { pathName: 'edit_address', parameterName: 'edit_address' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/account-edit-address/account-edit-address.vue'),
                },
                {
                    path: 'products/:product?/editview/:editview?',
                    meta: {
                        caption: 'entities.product.views.editview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'products', parameterName: 'product' },
                            { pathName: 'editview', parameterName: 'editview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/product/product-edit-view/product-edit-view.vue'),
                },
                {
                    path: 'tasks/:task?/quickcreate/:quickcreate?',
                    meta: {
                        caption: 'entities.task.views.quickcreate.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'tasks', parameterName: 'task' },
                            { pathName: 'quickcreate', parameterName: 'quickcreate' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/task-quick-create/task-quick-create.vue'),
                },
                {
                    path: 'quotes/:quote?/gridview/:gridview?',
                    meta: {
                        caption: 'entities.quote.views.gridview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'quotes', parameterName: 'quote' },
                            { pathName: 'gridview', parameterName: 'gridview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/sales/quote-grid-view/quote-grid-view.vue'),
                },
                {
                    path: 'accounts/:account?/accountinfo/:accountinfo?',
                    meta: {
                        caption: 'entities.account.views.accountinfo.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'accounts', parameterName: 'account' },
                            { pathName: 'accountinfo', parameterName: 'accountinfo' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/account-account-info/account-account-info.vue'),
                },
                {
                    path: 'invoices/:invoice?/editview/:editview?',
                    meta: {
                        caption: 'entities.invoice.views.editview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'invoices', parameterName: 'invoice' },
                            { pathName: 'editview', parameterName: 'editview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/finance/invoice-edit-view/invoice-edit-view.vue'),
                },
                {
                    path: 'accounts/:account?/summary/:summary?',
                    meta: {
                        caption: 'entities.account.views.summary.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'accounts', parameterName: 'account' },
                            { pathName: 'summary', parameterName: 'summary' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/account-summary/account-summary.vue'),
                },
                {
                    path: 'contacts/:contact?/pickupview/:pickupview?',
                    meta: {
                        caption: 'entities.contact.views.pickupview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'contacts', parameterName: 'contact' },
                            { pathName: 'pickupview', parameterName: 'pickupview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/contact-pickup-view/contact-pickup-view.vue'),
                },
                {
                    path: 'accounts/:account?/contactsetting/:contactsetting?',
                    meta: {
                        caption: 'entities.account.views.contactsetting.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'accounts', parameterName: 'account' },
                            { pathName: 'contactsetting', parameterName: 'contactsetting' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/account-contact-setting/account-contact-setting.vue'),
                },
                {
                    path: 'opportunities/:opportunity?/gridview/:gridview?',
                    meta: {
                        caption: 'entities.opportunity.views.gridview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'opportunities', parameterName: 'opportunity' },
                            { pathName: 'gridview', parameterName: 'gridview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/sales/opportunity-grid-view/opportunity-grid-view.vue'),
                },
                {
                    path: 'letters/:letter?/editview/:editview?',
                    meta: {
                        caption: 'entities.letter.views.editview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'letters', parameterName: 'letter' },
                            { pathName: 'editview', parameterName: 'editview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/letter-edit-view/letter-edit-view.vue'),
                },
                {
                    path: 'goals/:goal?/editview/:editview?',
                    meta: {
                        caption: 'entities.goal.views.editview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'goals', parameterName: 'goal' },
                            { pathName: 'editview', parameterName: 'editview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/sales/goal-edit-view/goal-edit-view.vue'),
                },
                {
                    path: 'accounts/:account?/address/:address?',
                    meta: {
                        caption: 'entities.account.views.address.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'accounts', parameterName: 'account' },
                            { pathName: 'address', parameterName: 'address' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/account-address/account-address.vue'),
                },
                {
                    path: 'appointments/:appointment?/editview/:editview?',
                    meta: {
                        caption: 'entities.appointment.views.editview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'appointments', parameterName: 'appointment' },
                            { pathName: 'editview', parameterName: 'editview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/appointment-edit-view/appointment-edit-view.vue'),
                },
                {
                    path: 'contacts/:contact?/detailinfoeditview9/:detailinfoeditview9?',
                    meta: {
                        caption: 'entities.contact.views.detailinfoeditview9.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'contacts', parameterName: 'contact' },
                            { pathName: 'detailinfoeditview9', parameterName: 'detailinfoeditview9' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/contact-detail-info-edit-view9/contact-detail-info-edit-view9.vue'),
                },
                {
                    path: 'contacts/:contact?/tabexpview/:tabexpview?',
                    meta: {
                        caption: 'entities.contact.views.tabexpview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'contacts', parameterName: 'contact' },
                            { pathName: 'tabexpview', parameterName: 'tabexpview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/contact-tab-exp-view/contact-tab-exp-view.vue'),
                },
                {
                    path: 'emails/:email?/editview/:editview?',
                    meta: {
                        caption: 'entities.email.views.editview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'emails', parameterName: 'email' },
                            { pathName: 'editview', parameterName: 'editview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/email-edit-view/email-edit-view.vue'),
                },
                {
                    path: 'contacts/:contact?/pickupgridview/:pickupgridview?',
                    meta: {
                        caption: 'entities.contact.views.pickupgridview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'contacts', parameterName: 'contact' },
                            { pathName: 'pickupgridview', parameterName: 'pickupgridview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/contact-pickup-grid-view/contact-pickup-grid-view.vue'),
                },
                {
                    path: 'goals/:goal?/gridview/:gridview?',
                    meta: {
                        caption: 'entities.goal.views.gridview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'goals', parameterName: 'goal' },
                            { pathName: 'gridview', parameterName: 'gridview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/sales/goal-grid-view/goal-grid-view.vue'),
                },
                {
                    path: 'contacts/:contact?/gridview/:gridview?',
                    meta: {
                        caption: 'entities.contact.views.gridview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'contacts', parameterName: 'contact' },
                            { pathName: 'gridview', parameterName: 'gridview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/contact-grid-view/contact-grid-view.vue'),
                },
                {
                    path: 'serviceappointments/:serviceappointment?/editview/:editview?',
                    meta: {
                        caption: 'entities.serviceappointment.views.editview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'serviceappointments', parameterName: 'serviceappointment' },
                            { pathName: 'editview', parameterName: 'editview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/service/service-appointment-edit-view/service-appointment-edit-view.vue'),
                },
                {
                    path: 'accounts/:account?/gridview/:gridview?',
                    meta: {
                        caption: 'entities.account.views.gridview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'accounts', parameterName: 'account' },
                            { pathName: 'gridview', parameterName: 'gridview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/account-grid-view/account-grid-view.vue'),
                },
                {
                    path: 'activitypointers/:activitypointer?/gridview/:gridview?',
                    meta: {
                        caption: 'entities.activitypointer.views.gridview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'activitypointers', parameterName: 'activitypointer' },
                            { pathName: 'gridview', parameterName: 'gridview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/activity-pointer-grid-view/activity-pointer-grid-view.vue'),
                },
                {
                    path: 'invoices/:invoice?/gridview/:gridview?',
                    meta: {
                        caption: 'entities.invoice.views.gridview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'invoices', parameterName: 'invoice' },
                            { pathName: 'gridview', parameterName: 'gridview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/finance/invoice-grid-view/invoice-grid-view.vue'),
                },
                {
                    path: 'accounts/:account?/distribution/:distribution?',
                    meta: {
                        caption: 'entities.account.views.distribution.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'accounts', parameterName: 'account' },
                            { pathName: 'distribution', parameterName: 'distribution' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/account-distribution/account-distribution.vue'),
                },
                {
                    path: 'accounts/:account?/pickupview/:pickupview?',
                    meta: {
                        caption: 'entities.account.views.pickupview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'accounts', parameterName: 'account' },
                            { pathName: 'pickupview', parameterName: 'pickupview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/account-pickup-view/account-pickup-view.vue'),
                },
                {
                    path: 'pricelevels/:pricelevel?/pickupgridview/:pickupgridview?',
                    meta: {
                        caption: 'entities.pricelevel.views.pickupgridview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'pricelevels', parameterName: 'pricelevel' },
                            { pathName: 'pickupgridview', parameterName: 'pickupgridview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/product/price-level-pickup-grid-view/price-level-pickup-grid-view.vue'),
                },
                {
                    path: 'ibizlists/:ibizlist?/gridview/:gridview?',
                    meta: {
                        caption: 'entities.ibizlist.views.gridview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'ibizlists', parameterName: 'ibizlist' },
                            { pathName: 'gridview', parameterName: 'gridview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/marketing/ibiz-list-grid-view/ibiz-list-grid-view.vue'),
                },
                {
                    path: 'contacts/:contact?/byaccount/:byaccount?',
                    meta: {
                        caption: 'entities.contact.views.byaccount.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'contacts', parameterName: 'contact' },
                            { pathName: 'byaccount', parameterName: 'byaccount' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/contact-by-account/contact-by-account.vue'),
                },
                {
                    path: 'products/:product?/gridview/:gridview?',
                    meta: {
                        caption: 'entities.product.views.gridview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'products', parameterName: 'product' },
                            { pathName: 'gridview', parameterName: 'gridview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/product/product-grid-view/product-grid-view.vue'),
                },
                {
                    path: 'salesliteratures/:salesliterature?/editview/:editview?',
                    meta: {
                        caption: 'entities.salesliterature.views.editview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'salesliteratures', parameterName: 'salesliterature' },
                            { pathName: 'editview', parameterName: 'editview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/sales/sales-literature-edit-view/sales-literature-edit-view.vue'),
                },
                {
                    path: 'accounts/:account?/pickupgridview/:pickupgridview?',
                    meta: {
                        caption: 'entities.account.views.pickupgridview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'accounts', parameterName: 'account' },
                            { pathName: 'pickupgridview', parameterName: 'pickupgridview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/account-pickup-grid-view/account-pickup-grid-view.vue'),
                },
                {
                    path: 'accounts/:account?/info/:info?',
                    meta: {
                        caption: 'entities.account.views.info.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'accounts', parameterName: 'account' },
                            { pathName: 'info', parameterName: 'info' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/account-info/account-info.vue'),
                },
                {
                    path: 'accounts/:account?/majorcontact/:majorcontact?',
                    meta: {
                        caption: 'entities.account.views.majorcontact.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'accounts', parameterName: 'account' },
                            { pathName: 'majorcontact', parameterName: 'majorcontact' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/account-major-contact/account-major-contact.vue'),
                },
                {
                    path: 'salesorders/:salesorder?/gridview/:gridview?',
                    meta: {
                        caption: 'entities.salesorder.views.gridview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'salesorders', parameterName: 'salesorder' },
                            { pathName: 'gridview', parameterName: 'gridview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/sales/sales-order-grid-view/sales-order-grid-view.vue'),
                },
                {
                    path: 'contacts/:contact?/optionview/:optionview?',
                    meta: {
                        caption: 'entities.contact.views.optionview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'contacts', parameterName: 'contact' },
                            { pathName: 'optionview', parameterName: 'optionview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/contact-option-view/contact-option-view.vue'),
                },
                {
                    path: 'activitypointers/:activitypointer?/byparentkey/:byparentkey?',
                    meta: {
                        caption: 'entities.activitypointer.views.byparentkey.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'activitypointers', parameterName: 'activitypointer' },
                            { pathName: 'byparentkey', parameterName: 'byparentkey' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/activity-pointer-by-parent-key/activity-pointer-by-parent-key.vue'),
                },
                {
                    path: 'leads/:lead?/editview/:editview?',
                    meta: {
                        caption: 'entities.lead.views.editview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'leads', parameterName: 'lead' },
                            { pathName: 'editview', parameterName: 'editview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/sales/lead-edit-view/lead-edit-view.vue'),
                },
                {
                    path: 'phonecalls/:phonecall?/editview/:editview?',
                    meta: {
                        caption: 'entities.phonecall.views.editview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'phonecalls', parameterName: 'phonecall' },
                            { pathName: 'editview', parameterName: 'editview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/phone-call-edit-view/phone-call-edit-view.vue'),
                },
                {
                    path: 'tasks/:task?/editview/:editview?',
                    meta: {
                        caption: 'entities.task.views.editview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'tasks', parameterName: 'task' },
                            { pathName: 'editview', parameterName: 'editview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/task-edit-view/task-edit-view.vue'),
                },
                {
                    path: 'pricelevels/:pricelevel?/pickupview/:pickupview?',
                    meta: {
                        caption: 'entities.pricelevel.views.pickupview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'pricelevels', parameterName: 'pricelevel' },
                            { pathName: 'pickupview', parameterName: 'pickupview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/product/price-level-pickup-view/price-level-pickup-view.vue'),
                },
                {
                    path: 'opportunities/:opportunity?/editview/:editview?',
                    meta: {
                        caption: 'entities.opportunity.views.editview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'opportunities', parameterName: 'opportunity' },
                            { pathName: 'editview', parameterName: 'editview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/sales/opportunity-edit-view/opportunity-edit-view.vue'),
                },
                {
                    path: 'competitors/:competitor?/gridview/:gridview?',
                    meta: {
                        caption: 'entities.competitor.views.gridview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'competitors', parameterName: 'competitor' },
                            { pathName: 'gridview', parameterName: 'gridview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/sales/competitor-grid-view/competitor-grid-view.vue'),
                },
                {
                    path: 'ibizlists/:ibizlist?/editview/:editview?',
                    meta: {
                        caption: 'entities.ibizlist.views.editview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'ibizlists', parameterName: 'ibizlist' },
                            { pathName: 'editview', parameterName: 'editview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/marketing/ibiz-list-edit-view/ibiz-list-edit-view.vue'),
                },
                {
                    path: 'quotes/:quote?/editview/:editview?',
                    meta: {
                        caption: 'entities.quote.views.editview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'quotes', parameterName: 'quote' },
                            { pathName: 'editview', parameterName: 'editview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/sales/quote-edit-view/quote-edit-view.vue'),
                },
                {
                    path: 'accounts/:account?/edit_accountinfo/:edit_accountinfo?',
                    meta: {
                        caption: 'entities.account.views.edit_accountinfo.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'accounts', parameterName: 'account' },
                            { pathName: 'edit_accountinfo', parameterName: 'edit_accountinfo' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/base/account-edit-account-info/account-edit-account-info.vue'),
                },
                {
                    path: 'incidents/:incident?/gridview/:gridview?',
                    meta: {
                        caption: 'entities.incident.views.gridview.title',
                        info:'',
                        parameters: [
                            { pathName: 'central', parameterName: 'central' },
                            { pathName: 'incidents', parameterName: 'incident' },
                            { pathName: 'gridview', parameterName: 'gridview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/service/incident-grid-view/incident-grid-view.vue'),
                },
            ...indexRoutes,
            ],
        },
    {
        path: '/invoices/:invoice?/editview/:editview?',
        meta: {
            caption: 'entities.invoice.views.editview.title',
            info:'',
            parameters: [
                { pathName: 'invoices', parameterName: 'invoice' },
                { pathName: 'editview', parameterName: 'editview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/finance/invoice-edit-view/invoice-edit-view.vue'),
    },
    {
        path: '/contacts/:contact?/gridview/:gridview?',
        meta: {
            caption: 'entities.contact.views.gridview.title',
            info:'',
            parameters: [
                { pathName: 'contacts', parameterName: 'contact' },
                { pathName: 'gridview', parameterName: 'gridview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/contact-grid-view/contact-grid-view.vue'),
    },
    {
        path: '/incidents/:incident?/editview/:editview?',
        meta: {
            caption: 'entities.incident.views.editview.title',
            info:'',
            parameters: [
                { pathName: 'incidents', parameterName: 'incident' },
                { pathName: 'editview', parameterName: 'editview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/service/incident-edit-view/incident-edit-view.vue'),
    },
    {
        path: '/salesorders/:salesorder?/editview/:editview?',
        meta: {
            caption: 'entities.salesorder.views.editview.title',
            info:'',
            parameters: [
                { pathName: 'salesorders', parameterName: 'salesorder' },
                { pathName: 'editview', parameterName: 'editview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/sales/sales-order-edit-view/sales-order-edit-view.vue'),
    },
    {
        path: '/quotes/:quote?/gridview/:gridview?',
        meta: {
            caption: 'entities.quote.views.gridview.title',
            info:'',
            parameters: [
                { pathName: 'quotes', parameterName: 'quote' },
                { pathName: 'gridview', parameterName: 'gridview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/sales/quote-grid-view/quote-grid-view.vue'),
    },
    {
        path: '/leads/:lead?/gridview/:gridview?',
        meta: {
            caption: 'entities.lead.views.gridview.title',
            info:'',
            parameters: [
                { pathName: 'leads', parameterName: 'lead' },
                { pathName: 'gridview', parameterName: 'gridview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/sales/lead-grid-view/lead-grid-view.vue'),
    },
    {
        path: '/accounts/:account?/accountinfo/:accountinfo?',
        meta: {
            caption: 'entities.account.views.accountinfo.title',
            info:'',
            parameters: [
                { pathName: 'accounts', parameterName: 'account' },
                { pathName: 'accountinfo', parameterName: 'accountinfo' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/account-account-info/account-account-info.vue'),
    },
    {
        path: '/ibizlists/:ibizlist?/gridview/:gridview?',
        meta: {
            caption: 'entities.ibizlist.views.gridview.title',
            info:'',
            parameters: [
                { pathName: 'ibizlists', parameterName: 'ibizlist' },
                { pathName: 'gridview', parameterName: 'gridview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/marketing/ibiz-list-grid-view/ibiz-list-grid-view.vue'),
    },
    {
        path: '/activitypointers/:activitypointer?/editview/:editview?',
        meta: {
            caption: 'entities.activitypointer.views.editview.title',
            info:'',
            parameters: [
                { pathName: 'activitypointers', parameterName: 'activitypointer' },
                { pathName: 'editview', parameterName: 'editview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/activity-pointer-edit-view/activity-pointer-edit-view.vue'),
    },
    {
        path: '/accounts/:account?/pickupview/:pickupview?',
        meta: {
            caption: 'entities.account.views.pickupview.title',
            info:'',
            parameters: [
                { pathName: 'accounts', parameterName: 'account' },
                { pathName: 'pickupview', parameterName: 'pickupview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/account-pickup-view/account-pickup-view.vue'),
    },
    {
        path: '/accounts/:account?/summary/:summary?',
        meta: {
            caption: 'entities.account.views.summary.title',
            info:'',
            parameters: [
                { pathName: 'accounts', parameterName: 'account' },
                { pathName: 'summary', parameterName: 'summary' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/account-summary/account-summary.vue'),
    },
    {
        path: '/leads/:lead?/editview/:editview?',
        meta: {
            caption: 'entities.lead.views.editview.title',
            info:'',
            parameters: [
                { pathName: 'leads', parameterName: 'lead' },
                { pathName: 'editview', parameterName: 'editview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/sales/lead-edit-view/lead-edit-view.vue'),
    },
    {
        path: '/accounts/:account?/info/:info?',
        meta: {
            caption: 'entities.account.views.info.title',
            info:'',
            parameters: [
                { pathName: 'accounts', parameterName: 'account' },
                { pathName: 'info', parameterName: 'info' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/account-info/account-info.vue'),
    },
    {
        path: '/salesliteratures/:salesliterature?/editview/:editview?',
        meta: {
            caption: 'entities.salesliterature.views.editview.title',
            info:'',
            parameters: [
                { pathName: 'salesliteratures', parameterName: 'salesliterature' },
                { pathName: 'editview', parameterName: 'editview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/sales/sales-literature-edit-view/sales-literature-edit-view.vue'),
    },
    {
        path: '/incidents/:incident?/gridview/:gridview?',
        meta: {
            caption: 'entities.incident.views.gridview.title',
            info:'',
            parameters: [
                { pathName: 'incidents', parameterName: 'incident' },
                { pathName: 'gridview', parameterName: 'gridview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/service/incident-grid-view/incident-grid-view.vue'),
    },
    {
        path: '/letters/:letter?/editview/:editview?',
        meta: {
            caption: 'entities.letter.views.editview.title',
            info:'',
            parameters: [
                { pathName: 'letters', parameterName: 'letter' },
                { pathName: 'editview', parameterName: 'editview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/letter-edit-view/letter-edit-view.vue'),
    },
    {
        path: '/faxes/:fax?/editview/:editview?',
        meta: {
            caption: 'entities.fax.views.editview.title',
            info:'',
            parameters: [
                { pathName: 'faxes', parameterName: 'fax' },
                { pathName: 'editview', parameterName: 'editview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/fax-edit-view/fax-edit-view.vue'),
    },
    {
        path: '/activitypointers/:activitypointer?/gridview/:gridview?',
        meta: {
            caption: 'entities.activitypointer.views.gridview.title',
            info:'',
            parameters: [
                { pathName: 'activitypointers', parameterName: 'activitypointer' },
                { pathName: 'gridview', parameterName: 'gridview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/activity-pointer-grid-view/activity-pointer-grid-view.vue'),
    },
    {
        path: '/products/:product?/editview/:editview?',
        meta: {
            caption: 'entities.product.views.editview.title',
            info:'',
            parameters: [
                { pathName: 'products', parameterName: 'product' },
                { pathName: 'editview', parameterName: 'editview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/product/product-edit-view/product-edit-view.vue'),
    },
    {
        path: '/accounts/:account?/gridview/:gridview?',
        meta: {
            caption: 'entities.account.views.gridview.title',
            info:'',
            parameters: [
                { pathName: 'accounts', parameterName: 'account' },
                { pathName: 'gridview', parameterName: 'gridview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/account-grid-view/account-grid-view.vue'),
    },
    {
        path: '/opportunities/:opportunity?/gridview/:gridview?',
        meta: {
            caption: 'entities.opportunity.views.gridview.title',
            info:'',
            parameters: [
                { pathName: 'opportunities', parameterName: 'opportunity' },
                { pathName: 'gridview', parameterName: 'gridview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/sales/opportunity-grid-view/opportunity-grid-view.vue'),
    },
    {
        path: '/contacts/:contact?/detailinfoeditview9/:detailinfoeditview9?',
        meta: {
            caption: 'entities.contact.views.detailinfoeditview9.title',
            info:'',
            parameters: [
                { pathName: 'contacts', parameterName: 'contact' },
                { pathName: 'detailinfoeditview9', parameterName: 'detailinfoeditview9' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/contact-detail-info-edit-view9/contact-detail-info-edit-view9.vue'),
    },
    {
        path: '/goals/:goal?/gridview/:gridview?',
        meta: {
            caption: 'entities.goal.views.gridview.title',
            info:'',
            parameters: [
                { pathName: 'goals', parameterName: 'goal' },
                { pathName: 'gridview', parameterName: 'gridview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/sales/goal-grid-view/goal-grid-view.vue'),
    },
    {
        path: '/accounts/:account?/edit_accountinfo/:edit_accountinfo?',
        meta: {
            caption: 'entities.account.views.edit_accountinfo.title',
            info:'',
            parameters: [
                { pathName: 'accounts', parameterName: 'account' },
                { pathName: 'edit_accountinfo', parameterName: 'edit_accountinfo' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/account-edit-account-info/account-edit-account-info.vue'),
    },
    {
        path: '/accounts/:account?/editview/:editview?',
        meta: {
            caption: 'entities.account.views.editview.title',
            info:'',
            parameters: [
                { pathName: 'accounts', parameterName: 'account' },
                { pathName: 'editview', parameterName: 'editview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/account-edit-view/account-edit-view.vue'),
    },
    {
        path: '/accounts/:account?/introduction/:introduction?',
        meta: {
            caption: 'entities.account.views.introduction.title',
            info:'',
            parameters: [
                { pathName: 'accounts', parameterName: 'account' },
                { pathName: 'introduction', parameterName: 'introduction' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/account-introduction/account-introduction.vue'),
    },
    {
        path: '/goals/:goal?/editview/:editview?',
        meta: {
            caption: 'entities.goal.views.editview.title',
            info:'',
            parameters: [
                { pathName: 'goals', parameterName: 'goal' },
                { pathName: 'editview', parameterName: 'editview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/sales/goal-edit-view/goal-edit-view.vue'),
    },
    {
        path: '/opportunities/:opportunity?/editview/:editview?',
        meta: {
            caption: 'entities.opportunity.views.editview.title',
            info:'',
            parameters: [
                { pathName: 'opportunities', parameterName: 'opportunity' },
                { pathName: 'editview', parameterName: 'editview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/sales/opportunity-edit-view/opportunity-edit-view.vue'),
    },
    {
        path: '/centeralportal/:centeralportal?',
        meta: {
            caption: 'app.views.centeralportal.title',
            info:'',
            parameters: [
                { pathName: 'centeralportal', parameterName: 'centeralportal' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/ungroup/centeral-portal/centeral-portal.vue'),
    },
    {
        path: '/contacts/:contact?/pickupgridview/:pickupgridview?',
        meta: {
            caption: 'entities.contact.views.pickupgridview.title',
            info:'',
            parameters: [
                { pathName: 'contacts', parameterName: 'contact' },
                { pathName: 'pickupgridview', parameterName: 'pickupgridview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/contact-pickup-grid-view/contact-pickup-grid-view.vue'),
    },
    {
        path: '/tasks/:task?/quickcreate/:quickcreate?',
        meta: {
            caption: 'entities.task.views.quickcreate.title',
            info:'',
            parameters: [
                { pathName: 'tasks', parameterName: 'task' },
                { pathName: 'quickcreate', parameterName: 'quickcreate' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/task-quick-create/task-quick-create.vue'),
    },
    {
        path: '/pricelevels/:pricelevel?/pickupview/:pickupview?',
        meta: {
            caption: 'entities.pricelevel.views.pickupview.title',
            info:'',
            parameters: [
                { pathName: 'pricelevels', parameterName: 'pricelevel' },
                { pathName: 'pickupview', parameterName: 'pickupview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/product/price-level-pickup-view/price-level-pickup-view.vue'),
    },
    {
        path: '/salesliteratures/:salesliterature?/gridview/:gridview?',
        meta: {
            caption: 'entities.salesliterature.views.gridview.title',
            info:'',
            parameters: [
                { pathName: 'salesliteratures', parameterName: 'salesliterature' },
                { pathName: 'gridview', parameterName: 'gridview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/sales/sales-literature-grid-view/sales-literature-grid-view.vue'),
    },
    {
        path: '/accounts/:account?/address/:address?',
        meta: {
            caption: 'entities.account.views.address.title',
            info:'',
            parameters: [
                { pathName: 'accounts', parameterName: 'account' },
                { pathName: 'address', parameterName: 'address' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/account-address/account-address.vue'),
    },
    {
        path: '/contacts/:contact?/byaccount/:byaccount?',
        meta: {
            caption: 'entities.contact.views.byaccount.title',
            info:'',
            parameters: [
                { pathName: 'contacts', parameterName: 'contact' },
                { pathName: 'byaccount', parameterName: 'byaccount' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/contact-by-account/contact-by-account.vue'),
    },
    {
        path: '/contacts/:contact?/abstracteditview9/:abstracteditview9?',
        meta: {
            caption: 'entities.contact.views.abstracteditview9.title',
            info:'',
            parameters: [
                { pathName: 'contacts', parameterName: 'contact' },
                { pathName: 'abstracteditview9', parameterName: 'abstracteditview9' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/contact-abstract-edit-view9/contact-abstract-edit-view9.vue'),
    },
    {
        path: '/serviceappointments/:serviceappointment?/editview/:editview?',
        meta: {
            caption: 'entities.serviceappointment.views.editview.title',
            info:'',
            parameters: [
                { pathName: 'serviceappointments', parameterName: 'serviceappointment' },
                { pathName: 'editview', parameterName: 'editview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/service/service-appointment-edit-view/service-appointment-edit-view.vue'),
    },
    {
        path: '/appointments/:appointment?/editview/:editview?',
        meta: {
            caption: 'entities.appointment.views.editview.title',
            info:'',
            parameters: [
                { pathName: 'appointments', parameterName: 'appointment' },
                { pathName: 'editview', parameterName: 'editview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/appointment-edit-view/appointment-edit-view.vue'),
    },
    {
        path: '/emails/:email?/editview/:editview?',
        meta: {
            caption: 'entities.email.views.editview.title',
            info:'',
            parameters: [
                { pathName: 'emails', parameterName: 'email' },
                { pathName: 'editview', parameterName: 'editview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/email-edit-view/email-edit-view.vue'),
    },
    {
        path: '/ibizlists/:ibizlist?/editview/:editview?',
        meta: {
            caption: 'entities.ibizlist.views.editview.title',
            info:'',
            parameters: [
                { pathName: 'ibizlists', parameterName: 'ibizlist' },
                { pathName: 'editview', parameterName: 'editview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/marketing/ibiz-list-edit-view/ibiz-list-edit-view.vue'),
    },
    {
        path: '/accounts/:account?/optionview/:optionview?',
        meta: {
            caption: 'entities.account.views.optionview.title',
            info:'',
            parameters: [
                { pathName: 'accounts', parameterName: 'account' },
                { pathName: 'optionview', parameterName: 'optionview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/account-option-view/account-option-view.vue'),
    },
    {
        path: '/phonecalls/:phonecall?/editview/:editview?',
        meta: {
            caption: 'entities.phonecall.views.editview.title',
            info:'',
            parameters: [
                { pathName: 'phonecalls', parameterName: 'phonecall' },
                { pathName: 'editview', parameterName: 'editview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/phone-call-edit-view/phone-call-edit-view.vue'),
    },
    {
        path: '/appointments/:appointment?/quickcreate/:quickcreate?',
        meta: {
            caption: 'entities.appointment.views.quickcreate.title',
            info:'',
            parameters: [
                { pathName: 'appointments', parameterName: 'appointment' },
                { pathName: 'quickcreate', parameterName: 'quickcreate' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/appointment-quick-create/appointment-quick-create.vue'),
    },
    {
        path: '/quotes/:quote?/editview/:editview?',
        meta: {
            caption: 'entities.quote.views.editview.title',
            info:'',
            parameters: [
                { pathName: 'quotes', parameterName: 'quote' },
                { pathName: 'editview', parameterName: 'editview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/sales/quote-edit-view/quote-edit-view.vue'),
    },
    {
        path: '/products/:product?/gridview/:gridview?',
        meta: {
            caption: 'entities.product.views.gridview.title',
            info:'',
            parameters: [
                { pathName: 'products', parameterName: 'product' },
                { pathName: 'gridview', parameterName: 'gridview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/product/product-grid-view/product-grid-view.vue'),
    },
    {
        path: '/campaignresponses/:campaignresponse?/editview/:editview?',
        meta: {
            caption: 'entities.campaignresponse.views.editview.title',
            info:'',
            parameters: [
                { pathName: 'campaignresponses', parameterName: 'campaignresponse' },
                { pathName: 'editview', parameterName: 'editview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/marketing/campaign-response-edit-view/campaign-response-edit-view.vue'),
    },
    {
        path: '/contacts/:contact?/pickupview/:pickupview?',
        meta: {
            caption: 'entities.contact.views.pickupview.title',
            info:'',
            parameters: [
                { pathName: 'contacts', parameterName: 'contact' },
                { pathName: 'pickupview', parameterName: 'pickupview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/contact-pickup-view/contact-pickup-view.vue'),
    },
    {
        path: '/activitypointers/:activitypointer?/byparentkey/:byparentkey?',
        meta: {
            caption: 'entities.activitypointer.views.byparentkey.title',
            info:'',
            parameters: [
                { pathName: 'activitypointers', parameterName: 'activitypointer' },
                { pathName: 'byparentkey', parameterName: 'byparentkey' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/activity-pointer-by-parent-key/activity-pointer-by-parent-key.vue'),
    },
    {
        path: '/accounts/:account?/distribution/:distribution?',
        meta: {
            caption: 'entities.account.views.distribution.title',
            info:'',
            parameters: [
                { pathName: 'accounts', parameterName: 'account' },
                { pathName: 'distribution', parameterName: 'distribution' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/account-distribution/account-distribution.vue'),
    },
    {
        path: '/competitors/:competitor?/gridview/:gridview?',
        meta: {
            caption: 'entities.competitor.views.gridview.title',
            info:'',
            parameters: [
                { pathName: 'competitors', parameterName: 'competitor' },
                { pathName: 'gridview', parameterName: 'gridview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/sales/competitor-grid-view/competitor-grid-view.vue'),
    },
    {
        path: '/pricelevels/:pricelevel?/pickupgridview/:pickupgridview?',
        meta: {
            caption: 'entities.pricelevel.views.pickupgridview.title',
            info:'',
            parameters: [
                { pathName: 'pricelevels', parameterName: 'pricelevel' },
                { pathName: 'pickupgridview', parameterName: 'pickupgridview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/product/price-level-pickup-grid-view/price-level-pickup-grid-view.vue'),
    },
    {
        path: '/salesorders/:salesorder?/gridview/:gridview?',
        meta: {
            caption: 'entities.salesorder.views.gridview.title',
            info:'',
            parameters: [
                { pathName: 'salesorders', parameterName: 'salesorder' },
                { pathName: 'gridview', parameterName: 'gridview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/sales/sales-order-grid-view/sales-order-grid-view.vue'),
    },
    {
        path: '/invoices/:invoice?/gridview/:gridview?',
        meta: {
            caption: 'entities.invoice.views.gridview.title',
            info:'',
            parameters: [
                { pathName: 'invoices', parameterName: 'invoice' },
                { pathName: 'gridview', parameterName: 'gridview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/finance/invoice-grid-view/invoice-grid-view.vue'),
    },
    {
        path: '/accounts/:account?/contactsetting/:contactsetting?',
        meta: {
            caption: 'entities.account.views.contactsetting.title',
            info:'',
            parameters: [
                { pathName: 'accounts', parameterName: 'account' },
                { pathName: 'contactsetting', parameterName: 'contactsetting' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/account-contact-setting/account-contact-setting.vue'),
    },
    {
        path: '/contacts/:contact?/optionview/:optionview?',
        meta: {
            caption: 'entities.contact.views.optionview.title',
            info:'',
            parameters: [
                { pathName: 'contacts', parameterName: 'contact' },
                { pathName: 'optionview', parameterName: 'optionview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/contact-option-view/contact-option-view.vue'),
    },
    {
        path: '/accounts/:account?/edit_address/:edit_address?',
        meta: {
            caption: 'entities.account.views.edit_address.title',
            info:'',
            parameters: [
                { pathName: 'accounts', parameterName: 'account' },
                { pathName: 'edit_address', parameterName: 'edit_address' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/account-edit-address/account-edit-address.vue'),
    },
    {
        path: '/accounts/:account?/pickupgridview/:pickupgridview?',
        meta: {
            caption: 'entities.account.views.pickupgridview.title',
            info:'',
            parameters: [
                { pathName: 'accounts', parameterName: 'account' },
                { pathName: 'pickupgridview', parameterName: 'pickupgridview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/account-pickup-grid-view/account-pickup-grid-view.vue'),
    },
    {
        path: '/tasks/:task?/editview/:editview?',
        meta: {
            caption: 'entities.task.views.editview.title',
            info:'',
            parameters: [
                { pathName: 'tasks', parameterName: 'task' },
                { pathName: 'editview', parameterName: 'editview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/task-edit-view/task-edit-view.vue'),
    },
    {
        path: '/accounts/:account?/majorcontact/:majorcontact?',
        meta: {
            caption: 'entities.account.views.majorcontact.title',
            info:'',
            parameters: [
                { pathName: 'accounts', parameterName: 'account' },
                { pathName: 'majorcontact', parameterName: 'majorcontact' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/account-major-contact/account-major-contact.vue'),
    },
    {
        path: '/competitors/:competitor?/editview/:editview?',
        meta: {
            caption: 'entities.competitor.views.editview.title',
            info:'',
            parameters: [
                { pathName: 'competitors', parameterName: 'competitor' },
                { pathName: 'editview', parameterName: 'editview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/sales/competitor-edit-view/competitor-edit-view.vue'),
    },
    {
        path: '/contacts/:contact?/tabexpview/:tabexpview?',
        meta: {
            caption: 'entities.contact.views.tabexpview.title',
            info:'',
            parameters: [
                { pathName: 'contacts', parameterName: 'contact' },
                { pathName: 'tabexpview', parameterName: 'tabexpview' },
            ],
            requireAuth: true,
        },
        component: () => import('@pages/base/contact-tab-exp-view/contact-tab-exp-view.vue'),
    },
        ...globalRoutes,
        {
            path: '/login/:login?',
            name: 'login',
            meta: {  
                caption: '登录',
                viewType: 'login',
                requireAuth: false,
                ignoreAddPage: true,
            },
            beforeEnter: (to: any, from: any, next: any) => {
                router.app.$store.commit('resetRootStateData');
                next();
            },
            component: () => import('@components/login/login.vue'),
        },
        {
            path: '/404',
            component: () => import('@components/404/404.vue')
        },
        {
            path: '/500',
            component: () => import('@components/500/500.vue')
        },
        {
            path: '*',
            redirect: 'central'
        },
    ],
});

export default router;
