vue-bbp-ui
Advanced tools
Comparing version 0.5.3 to 0.5.4
@@ -14,3 +14,3 @@ { | ||
], | ||
"version": "0.5.3", | ||
"version": "0.5.4", | ||
"private": false, | ||
@@ -17,0 +17,0 @@ "scripts": { |
@@ -11,3 +11,2 @@ import _ from 'lodash'; | ||
import './plugins/routes'; | ||
import './plugins/api'; | ||
@@ -14,0 +13,0 @@ // View |
import Home from '../views/Home'; | ||
import TasksList from '../views/Tasks'; | ||
import TasksList from '../views/task/List'; | ||
import TaskEditor from '../views/task/Editor'; | ||
import TaskRates from '../views/task/FormRates'; | ||
import TaskMain from '../views/task/FormMain'; | ||
@@ -8,2 +11,5 @@ // == Мета-данные маршрутов | ||
tasks: createMeta('/tasks', 'tasks', 'Заявки', 'format-list-checkbox'), | ||
taskAdd: createMeta('/task/add', 'task-add', 'Заявка', 'format-list-checkbox'), | ||
taskEdit: createMeta('/task/edit/:id', 'task-edit', 'Заявка', 'format-list-checkbox'), | ||
taskRates: createMeta('/task/edit/:id/rates', 'task-rates', 'Ставки', 'format-list-checkbox'), | ||
}; | ||
@@ -61,5 +67,46 @@ | ||
export default [ | ||
const routes = [ | ||
createRoute(META.home, Home), | ||
createRoute(META.tasks, TasksList) | ||
] | ||
{ | ||
path: '/tasks', | ||
component: TasksList | ||
}, | ||
{ | ||
path: '/task', | ||
component: TaskEditor, | ||
props: (route) => { | ||
return { | ||
isEdit: _.toLower(route.name) !== META.taskAdd.name, | ||
id: _.get(route, 'params.id', '') | ||
} | ||
}, | ||
children: [ | ||
{ | ||
path: 'add', | ||
component: TaskMain, | ||
name: META.taskAdd.name, | ||
props: { | ||
isEdit: false | ||
} | ||
}, | ||
{ | ||
path: 'edit/:id', | ||
name: META.taskEdit.name, | ||
component: TaskMain, | ||
props: { | ||
isEdit: true | ||
} | ||
}, | ||
{ | ||
path: 'edit/:id/rates', | ||
name: META.taskRates.name, | ||
component: TaskRates, | ||
props: true | ||
} | ||
] | ||
}, | ||
]; | ||
console.warn(routes); | ||
export default routes |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
164181
81
244