60 lines
1.5 KiB
JavaScript
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('show', {path: '/:id/show'});
|
|
});
|
|
|
|
this.route('admin', 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('show', {path: '/:id/show'});
|
|
});
|
|
|
|
this.route('op-detail', {path: '/:model/:id/op-detail'});
|
|
|
|
this.route('customer', function() {
|
|
this.route('list', {path: '/list/:page'});
|
|
this.route('import');
|
|
this.route('edit', {path: '/:id/edit'});
|
|
this.route('show');
|
|
});
|
|
|
|
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'});
|
|
});
|
|
});
|
|
|
|
export default Router;
|