lemo-crm/web/app/router.js
Shaun Chyxion ac583db42e add mine
2017-09-09 09:28:32 +08:00

60 lines
1.5 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('list');
this.route('mine');
});
});
export default Router;