lemo-crm/web/app/router.js
2022-06-24 21:56:55 +08:00

90 lines
2.3 KiB
JavaScript

import EmberRouter from '@ember/routing/router';
import config from './config/environment';
const Router = EmberRouter.extend({
location: config.locationType
});
Router.map(function() {
this.route('login');
this.route('user', function() {
this.route('list', {path: '/list/:page'});
this.route('create', function() {
this.route('role-select');
});
this.route('edit', {path: '/:id/edit'}, function() {
this.route('role-select');
});
this.route('profile', function() {
this.route('upload-avatar');
});
this.route('update-password');
});
this.route('customer', function() {
this.route('list', {path: '/list/:page'}, function() {
this.route('advanced-query');
});
this.route('import');
this.route('edit', {path: '/:id/edit'}, function() {
this.route('customer-status-select', {path: '/customer-status-select/:page'});
});
this.route('show', {path: '/:id/show'}, function() {
this.route('customer-status-select', {path: '/customer-status-select/:page'});
});
});
this.route('customer-ytd-sale', function() {
this.route('import');
});
this.route('customer-status', function() {
this.route('list', {path: '/list/:page'});
this.route('create');
this.route('edit', {path: '/:id/edit'});
});
this.route('customer-issue', function() {
this.route('create', {path: '/:customerId/create'});
this.route('edit', {path: '/:id/edit'});
});
this.route('week-goal', function() {
this.route('mine');
this.route('list', {path: '/list/:page'});
});
this.route('import-record', function() {
this.route('list', {path: '/list/:page'});
});
this.route('customer-application', function() {
this.route('list', {path: '/list/:page'});
this.route('create');
this.route('edit', {path: '/:id/edit'});
});
this.route('database-backup', function() {
this.route('list');
});
this.route('home-page', function() {
this.route('list', {path: '/list/:page'});
this.route('create');
this.route('edit', {path: '/:id/edit'});
});
this.route('local-product', function() {
this.route('list', {path: '/list/:page'});
this.route('create');
this.route('edit', {path: '/:id/edit'});
});
this.route('export-task', function() {
this.route('list', {path: '/list/:page'});
});
});
export default Router;