lemo-crm/web/app/router.js
2018-02-23 18:50:44 +08:00

74 lines
1.9 KiB
JavaScript

import Ember from 'ember';
import config from './config/environment';
const Router = Ember.Router.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');
});
});
export default Router;