diff --git a/modules/route/front/card/index.html b/modules/route/front/card/index.html
new file mode 100644
index 000000000..08b6c9de6
--- /dev/null
+++ b/modules/route/front/card/index.html
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/modules/route/front/card/index.js b/modules/route/front/card/index.js
new file mode 100644
index 000000000..99441584e
--- /dev/null
+++ b/modules/route/front/card/index.js
@@ -0,0 +1,49 @@
+import ngModule from '../module';
+
+export default class Controller {
+ constructor($stateParams, $http) {
+ this.$http = $http;
+ this.$stateParams = $stateParams;
+ this.route = null;
+ this.filter = {
+ fields: ['id', 'agencyModeFk', 'created', 'm3', 'warehouseFk', 'description', 'vehicleFk'],
+ where: {id: $stateParams.id},
+ include: [
+ {
+ relation: 'agencyMode',
+ scope: {
+ fields: ['id', 'name']
+ }
+ },
+ {
+ relation: 'vehicle',
+ scope: {
+ fields: ['id', 'm3']
+ }
+ }
+ ]
+ };
+ }
+
+ $onInit() {
+ this.getCard();
+ }
+
+ getCard() {
+ let json = encodeURIComponent(JSON.stringify(this.filter));
+ this.$http.get(`/client/api/Routes?filter=${json}`).then(response => {
+ this.route = response.data[0];
+ });
+ }
+
+ reload() {
+ this.getCard();
+ }
+}
+Controller.$inject = ['$stateParams', '$http'];
+
+ngModule.component('vnRouteCard', {
+ template: require('./index.html'),
+ controller: Controller
+});
+
diff --git a/modules/route/front/descriptor/index.html b/modules/route/front/descriptor/index.html
new file mode 100644
index 000000000..9ccd7444b
--- /dev/null
+++ b/modules/route/front/descriptor/index.html
@@ -0,0 +1,63 @@
+
+
+
+
+
{{$ctrl.route.name}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/route/front/descriptor/index.js b/modules/route/front/descriptor/index.js
new file mode 100644
index 000000000..5c47c864f
--- /dev/null
+++ b/modules/route/front/descriptor/index.js
@@ -0,0 +1,22 @@
+import ngModule from '../module';
+
+class Controller {
+ set quicklinks(value = {}) {
+ this._quicklinks = Object.assign(value, this._quicklinks);
+ }
+
+ get quicklinks() {
+ return this._quicklinks;
+ }
+}
+
+Controller.$inject = ['$http', '$state'];
+
+ngModule.component('vnRouteDescriptor', {
+ template: require('./index.html'),
+ bindings: {
+ route: '<',
+ quicklinks: '<'
+ },
+ controller: Controller
+});
diff --git a/modules/route/front/descriptor/locale/es.yml b/modules/route/front/descriptor/locale/es.yml
new file mode 100644
index 000000000..3f7596ae0
--- /dev/null
+++ b/modules/route/front/descriptor/locale/es.yml
@@ -0,0 +1,2 @@
+Volume exceded: Volumen excedido
+Volume: Volumen
\ No newline at end of file
diff --git a/modules/route/front/index.js b/modules/route/front/index.js
index 6849e9df3..f2f13ce9a 100644
--- a/modules/route/front/index.js
+++ b/modules/route/front/index.js
@@ -2,3 +2,6 @@ export * from './module';
import './index/';
import './search-panel';
+import './descriptor';
+import './summary';
+import './card';
diff --git a/modules/route/front/routes.json b/modules/route/front/routes.json
index 2671d3e0d..4dcbac150 100644
--- a/modules/route/front/routes.json
+++ b/modules/route/front/routes.json
@@ -3,7 +3,7 @@
"name": "Routes",
"icon": "icon-delivery",
"validations" : true,
- "dependencies": ["client", "worker"],
+ "dependencies": ["client", "worker", "ticket"],
"routes": [
{
"url": "/route",
@@ -18,6 +18,21 @@
"state": "route.index",
"component": "vn-route-index",
"description": "Routes"
+ },
+ {
+ "url": "/:id",
+ "state": "route.card",
+ "abstract": true,
+ "component": "vn-route-card"
+ },
+ {
+ "url": "/summary",
+ "state": "route.card.summary",
+ "component": "vn-route-summary",
+ "description": "Summary",
+ "params": {
+ "route": "$ctrl.route"
+ }
}
]
}
\ No newline at end of file