diff --git a/client/route/routes.json b/client/route/routes.json
index e6da8754f1..b1b9358c98 100644
--- a/client/route/routes.json
+++ b/client/route/routes.json
@@ -1,13 +1,66 @@
{
"module": "route",
"name": "Route",
-
+ "icon" : "local_shipping",
"validations" : false,
"routes": [
{
"url": "/routes",
"state": "routes",
+ "abstract": true,
+ "component": "ui-view"
+ },
+ {
+ "url": "/list",
+ "state": "routes.index",
"component": "vn-route-index"
+ },
+ {
+ "url": "/create",
+ "state": "routes.create",
+ "component": "vn-route-create"
+ },
+ {
+ "url": "/:id",
+ "state": "routes.card",
+ "abstract": true,
+ "component": "vn-route-card"
+ },
+ {
+ "url": "/basicData",
+ "state": "routes.card.basicData",
+ "component": "vn-route-basic-data",
+ "params": {
+ "route": "$ctrl.route"
+ },
+ "menu": {
+ "description": "Datos básicos",
+ "icon": "person"
+ }
+ },
+ {
+ "url": "/logisticData",
+ "state": "routes.card.logisticData",
+ "component": "vn-route-logistic-data",
+ "params": {
+ "route": "$ctrl.route"
+ },
+ "menu": {
+ "description": "Datos logísticos",
+ "icon": "local_shipping"
+ }
+ },
+ {
+ "url": "/tickets",
+ "state": "routes.card.tickets",
+ "component": "vn-route-tickets",
+ "params": {
+ "route": "$ctrl.route"
+ },
+ "menu": {
+ "description": "Tickets asignados",
+ "icon": "assignment"
+ }
}
]
}
\ No newline at end of file
diff --git a/client/route/src/card/card.html b/client/route/src/card/card.html
new file mode 100644
index 0000000000..985c02d90e
--- /dev/null
+++ b/client/route/src/card/card.html
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+ local_shipping
+
+
+ Ruta {{::$ctrl.route.id}}
+ {{$ctrl.route.date | date:'dd/MM/yyyy'}}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/client/route/src/card/card.js b/client/route/src/card/card.js
new file mode 100644
index 0000000000..e0655c0691
--- /dev/null
+++ b/client/route/src/card/card.js
@@ -0,0 +1,12 @@
+import ngModule from '../module';
+
+class RouteCard {
+ constructor() {
+ this.route = null;
+ }
+}
+
+ngModule.component('vnRouteCard', {
+ template: require('./card.html'),
+ controller: RouteCard
+});
diff --git a/client/route/src/create/create.html b/client/route/src/create/create.html
new file mode 100644
index 0000000000..f976ccdead
--- /dev/null
+++ b/client/route/src/create/create.html
@@ -0,0 +1,29 @@
+
+
+
+
diff --git a/client/route/src/create/create.js b/client/route/src/create/create.js
new file mode 100644
index 0000000000..e5092c7323
--- /dev/null
+++ b/client/route/src/create/create.js
@@ -0,0 +1,21 @@
+import ngModule from '../module';
+
+class RouteCreate {
+ constructor($scope, $state) {
+ this.$ = $scope;
+ this.$state = $state;
+ this.route = {};
+ console.log('hi world');
+ }
+ onSubmit() {
+ this.$.watcher.submit().then(
+ json => this.$state.go('routes.card.basicData', {id: json.data.id})
+ );
+ }
+}
+RouteCreate.$inject = ['$scope', '$state'];
+
+ngModule.component('vnRouteCreate', {
+ template: require('./create.html'),
+ controller: RouteCreate
+});
diff --git a/client/route/src/index/index.html b/client/route/src/index/index.html
index 337bb2a2ad..7cbf0100f9 100644
--- a/client/route/src/index/index.html
+++ b/client/route/src/index/index.html
@@ -8,7 +8,7 @@
on-search="$ctrl.search(index)"
advanced="true"
search="$ctrl.model.search"
- popover="vn-client-search-panel">
+ popover="vn-route-search-panel">
@@ -17,7 +17,7 @@
-
+
diff --git a/client/route/src/index/item-route.html b/client/route/src/index/item-route.html
index 6b982b9aac..226d75810c 100644
--- a/client/route/src/index/item-route.html
+++ b/client/route/src/index/item-route.html
@@ -1,4 +1,4 @@
-
+
diff --git a/client/route/src/route.js b/client/route/src/route.js
index 69a09db10e..b490a2039b 100644
--- a/client/route/src/route.js
+++ b/client/route/src/route.js
@@ -2,3 +2,6 @@ export * from './module';
// import components
import './index/index';
+import './search-panel/search-panel';
+import './create/create';
+import './card/card';
diff --git a/client/route/src/search-panel/locale/es.json b/client/route/src/search-panel/locale/es.json
new file mode 100644
index 0000000000..1dc7b850f4
--- /dev/null
+++ b/client/route/src/search-panel/locale/es.json
@@ -0,0 +1,10 @@
+{
+ "Client id": "Id cliente",
+ "Tax number": "NIF/CIF",
+ "Name": "Nombre",
+ "Social name": "Razon social",
+ "Town/City": "Ciudad",
+ "Postcode": "Código postal",
+ "Email": "Correo electrónico",
+ "Phone": "Teléfono"
+}
\ No newline at end of file
diff --git a/client/route/src/search-panel/search-panel.html b/client/route/src/search-panel/search-panel.html
new file mode 100644
index 0000000000..7249bbd9c4
--- /dev/null
+++ b/client/route/src/search-panel/search-panel.html
@@ -0,0 +1,17 @@
+
+
+
diff --git a/client/route/src/search-panel/search-panel.js b/client/route/src/search-panel/search-panel.js
new file mode 100644
index 0000000000..c1b79d5de0
--- /dev/null
+++ b/client/route/src/search-panel/search-panel.js
@@ -0,0 +1,27 @@
+import ngModule from '../module';
+
+export default class Controller {
+ constructor($window) {
+ this.$window = $window;
+ // onSubmit() is defined by @vnSearchbar
+ this.onSubmit = () => {};
+ }
+ onSearch() {
+ this.setStorageValue();
+ this.onSubmit(this.filter);
+ }
+ $onChanges() {
+ var value = JSON.parse(this.$window.sessionStorage.getItem('filter'));
+ if (value !== undefined)
+ this.filter = value;
+ }
+ setStorageValue() {
+ this.$window.sessionStorage.setItem('filter', JSON.stringify(this.filter));
+ }
+}
+Controller.$inject = ['$window'];
+
+ngModule.component('vnRouteSearchPanel', {
+ template: require('./search-panel.html'),
+ controller: Controller
+});
diff --git a/client/salix/src/components/home/style.scss b/client/salix/src/components/home/style.scss
index 135f5d461e..b35c1a1c75 100644
--- a/client/salix/src/components/home/style.scss
+++ b/client/salix/src/components/home/style.scss
@@ -45,8 +45,9 @@ vn-home {
}
i{
- font-size: 50px !important;
+ font-size: 75px !important;
margin: 0 auto;
+ padding-top: 15px;
}
&:hover{
opacity: 0.7;
diff --git a/client/salix/src/components/main-menu/main-menu.html b/client/salix/src/components/main-menu/main-menu.html
index a85bebb7c3..25b375fd39 100644
--- a/client/salix/src/components/main-menu/main-menu.html
+++ b/client/salix/src/components/main-menu/main-menu.html
@@ -6,6 +6,7 @@