diff --git a/client/client/src/address-edit/address-edit.html b/client/client/src/address-edit/address-edit.html index dcb28d5ac..56fe01aab 100644 --- a/client/client/src/address-edit/address-edit.html +++ b/client/client/src/address-edit/address-edit.html @@ -11,8 +11,12 @@ Address - - + + + + + + diff --git a/client/client/src/billing-data/billing-data.html b/client/client/src/billing-data/billing-data.html index 75aeb93be..09590dee6 100644 --- a/client/client/src/billing-data/billing-data.html +++ b/client/client/src/billing-data/billing-data.html @@ -27,8 +27,12 @@ - - + + + + + + @@ -36,9 +40,15 @@ Documentación - - - + + + + + + + + + diff --git a/client/client/src/descriptor/descriptor.html b/client/client/src/descriptor/descriptor.html index 8659bec6e..64dd29fe4 100644 --- a/client/client/src/descriptor/descriptor.html +++ b/client/client/src/descriptor/descriptor.html @@ -1,9 +1,9 @@ - + person - +
{{::$ctrl.client.id}}
{{$ctrl.client.name}}
diff --git a/client/client/src/fiscal-data/fiscal-data.html b/client/client/src/fiscal-data/fiscal-data.html index a9aa7f7b0..ce221c67f 100644 --- a/client/client/src/fiscal-data/fiscal-data.html +++ b/client/client/src/fiscal-data/fiscal-data.html @@ -10,8 +10,12 @@ Fiscal data - - + + + + + + diff --git a/client/client/src/web-access/web-access.html b/client/client/src/web-access/web-access.html index 7d7cc4f92..71a251247 100644 --- a/client/client/src/web-access/web-access.html +++ b/client/client/src/web-access/web-access.html @@ -8,9 +8,15 @@
- Web access - - + + Web access + + + + + + + diff --git a/client/core/src/check/check.js b/client/core/src/check/check.js index 5976a6625..aea298be9 100644 --- a/client/core/src/check/check.js +++ b/client/core/src/check/check.js @@ -2,6 +2,7 @@ import {module as _module} from '../module'; import * as resolveFactory from '../lib/resolveDefaultComponents'; import * as normalizerFactory from '../lib/inputAttrsNormalizer'; import * as util from '../lib/util'; +import './style.css'; const _NAME = 'check'; export const NAME = util.getName(_NAME); diff --git a/client/core/src/check/style.css b/client/core/src/check/style.css new file mode 100644 index 000000000..1088ad05e --- /dev/null +++ b/client/core/src/check/style.css @@ -0,0 +1,3 @@ +vn-check { + float: left; +} \ No newline at end of file diff --git a/client/core/src/datePicker/datePicker.html b/client/core/src/datePicker/datePicker.html index b4cb4c83f..d91f0a53f 100644 --- a/client/core/src/datePicker/datePicker.html +++ b/client/core/src/datePicker/datePicker.html @@ -1,19 +1,21 @@ -
+
- - + rule="{{::$ctrl.rule}}"/> + +
+ query_builder + clear +
+
\ No newline at end of file diff --git a/client/core/src/datePicker/datePicker.js b/client/core/src/datePicker/datePicker.js index 43f34d9df..2ebed10d6 100644 --- a/client/core/src/datePicker/datePicker.js +++ b/client/core/src/datePicker/datePicker.js @@ -27,7 +27,9 @@ class DatePicker extends Component { this.enabled = true; this._modelView = null; this._model = undefined; - + this._optionsChecked = false; + this.hasFocus = false; + this.hasMouseIn = false; componentHandler.upgradeElement($element[0].firstChild); } @@ -37,7 +39,8 @@ class DatePicker extends Component { set model(value) { this._model = value; if (value && !this.modelView) { - let initialDateFormat = (this.iniOptions && this.iniOptions.dateFormat) ? this.iniOptions.dateFormat : 'Y-m-d'; + let options = this._getOptions(); + let initialDateFormat = (options && options.dateFormat) ? options.dateFormat : 'Y-m-d'; let format = this._formatFlat2Angular(initialDateFormat); this.modelView = this.$filter('date')(value, format); } @@ -135,9 +138,12 @@ class DatePicker extends Component { } } - $onInit() { - if (!this.iniOptions) + _getOptions() { + if (this.iniOptions && this._optionsChecked) { + return this.iniOptions; + } else if (!this.iniOptions) { this.iniOptions = {}; + } if (!this.iniOptions.locale) this.iniOptions.locale = this.$translate.use(); @@ -157,9 +163,14 @@ class DatePicker extends Component { } ); } + this._optionsChecked = true; + return this.iniOptions; + } - if (this.input) - this.vp = new Flatpickr(this.input, this.iniOptions); + $onInit() { + this.iniOptions = this._getOptions(); + this.isTimePicker = (this.iniOptions && this.iniOptions.enableTime && this.iniOptions.noCalendar); + this.vp = new Flatpickr(this.input, this.iniOptions); } $onDestroy() { if (this.vp) diff --git a/client/core/src/datePicker/datePicker.spec.js b/client/core/src/datePicker/datePicker.spec.js index 4672a71e8..bd0807dd7 100644 --- a/client/core/src/datePicker/datePicker.spec.js +++ b/client/core/src/datePicker/datePicker.spec.js @@ -12,12 +12,12 @@ describe('Component vnDatePicker', () => { angular.mock.module('client'); }); - beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$timeout_) => { + beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$timeout_, _$translate_) => { $componentController = _$componentController_; $scope = $rootScope.$new(); $timeout = _$timeout_; $element = angular.element(`
`); - $translate = {}; + $translate = _$translate_; controller = $componentController('vnDatePicker', {$scope, $element, $translate, $timeout}); })); diff --git a/client/core/src/datePicker/style.scss b/client/core/src/datePicker/style.scss index f1bd30dab..d729ba947 100644 --- a/client/core/src/datePicker/style.scss +++ b/client/core/src/datePicker/style.scss @@ -1,12 +1,18 @@ vn-date-picker { + div { + outline: none; //remove chrome outline + } .mdl-chip__action { - position: absolute; + position: absolute; + width: auto; top: 0px; right: -6px; margin: 22px 0px; background-color: white; } .material-icons { - font-size: 18px; + font-size: 18px; + float: right; + margin-right: 5px; } } \ No newline at end of file diff --git a/client/locator/index.js b/client/locator/index.js new file mode 100644 index 000000000..d2b755cd8 --- /dev/null +++ b/client/locator/index.js @@ -0,0 +1 @@ +export * from './src/locator'; diff --git a/client/locator/routes.json b/client/locator/routes.json new file mode 100644 index 000000000..6907d7ee7 --- /dev/null +++ b/client/locator/routes.json @@ -0,0 +1,13 @@ +{ + "module": "locator", + "name": "Locator", + "icon": "add_location", + "validations" : false, + "routes": [ + { + "url": "/locator", + "state": "locator", + "component": "vn-locator-index" + } + ] +} \ No newline at end of file diff --git a/client/locator/src/index/index.html b/client/locator/src/index/index.html new file mode 100644 index 000000000..522689f23 --- /dev/null +++ b/client/locator/src/index/index.html @@ -0,0 +1,8 @@ + + + + Routes locator + + + + \ No newline at end of file diff --git a/client/locator/src/index/index.js b/client/locator/src/index/index.js new file mode 100644 index 000000000..b13a33b80 --- /dev/null +++ b/client/locator/src/index/index.js @@ -0,0 +1,14 @@ +import ngModule from '../module'; +//import './style.scss'; + +class LocatorIndex { + constructor($state) { + this.$state = $state; + } +} +LocatorIndex.$inject = ['$state']; + +ngModule.component('vnLocatorIndex', { + template: require('./index.html'), + controller: LocatorIndex +}); diff --git a/client/locator/src/locale/en.json b/client/locator/src/locale/en.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/client/locator/src/locale/en.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/client/locator/src/locale/es.json b/client/locator/src/locale/es.json new file mode 100644 index 000000000..4746789ec --- /dev/null +++ b/client/locator/src/locale/es.json @@ -0,0 +1,3 @@ +{ + "Routes locator": "Localizador de rutas" +} \ No newline at end of file diff --git a/client/locator/src/locator.js b/client/locator/src/locator.js new file mode 100644 index 000000000..ad5e0bb9d --- /dev/null +++ b/client/locator/src/locator.js @@ -0,0 +1,3 @@ +export * from './module'; + +import './index/index'; diff --git a/client/locator/src/module.js b/client/locator/src/module.js new file mode 100644 index 000000000..2d50fd2ef --- /dev/null +++ b/client/locator/src/module.js @@ -0,0 +1,5 @@ +import {ng} from 'vendor'; +import 'core'; + +const ngModule = ng.module('locator', []); +export default ngModule; diff --git a/client/modules.json b/client/modules.json index 6dbad069d..62c5e11a1 100644 --- a/client/modules.json +++ b/client/modules.json @@ -4,5 +4,6 @@ "core": [], "client": [], "production": [], - "route": [] + "route": [], + "locator": [] } diff --git a/client/route/routes.json b/client/route/routes.json index 4980238a9..1ccf632c1 100644 --- a/client/route/routes.json +++ b/client/route/routes.json @@ -13,7 +13,8 @@ { "url": "/list", "state": "routes.index", - "component": "vn-route-index" + "component": "vn-route-index", + "acl": ["employee"] }, { "url": "/create", @@ -34,7 +35,7 @@ "route": "$ctrl.route" }, "menu": { - "description": "Datos básicos", + "description": "Basic data", "icon": "person" } }, @@ -46,7 +47,7 @@ "route": "$ctrl.route" }, "menu": { - "description": "Datos logísticos", + "description": "Logistic data", "icon": "local_shipping" } }, @@ -58,7 +59,7 @@ "route": "$ctrl.route" }, "menu": { - "description": "Tickets asignados", + "description": "Assigned tickets", "icon": "assignment" } } diff --git a/client/route/src/basic-data/basic-data.html b/client/route/src/basic-data/basic-data.html new file mode 100644 index 000000000..cae7035da --- /dev/null +++ b/client/route/src/basic-data/basic-data.html @@ -0,0 +1,37 @@ + + + + + + Basic data + + + + + + + + + + + + + + \ No newline at end of file diff --git a/client/route/src/basic-data/basic-data.js b/client/route/src/basic-data/basic-data.js new file mode 100644 index 000000000..9f2278dbb --- /dev/null +++ b/client/route/src/basic-data/basic-data.js @@ -0,0 +1,8 @@ +import ngModule from '../module'; + +ngModule.component('vnRouteBasicData', { + template: require('./basic-data.html'), + bindings: { + route: '<' + } +}); diff --git a/client/route/src/card/card.html b/client/route/src/card/card.html index 985c02d90..c87155a74 100644 --- a/client/route/src/card/card.html +++ b/client/route/src/card/card.html @@ -8,11 +8,11 @@ - + local_shipping - + -
Ruta {{::$ctrl.route.id}}
+
Route {{::$ctrl.route.id}}
{{$ctrl.route.date | date:'dd/MM/yyyy'}}
diff --git a/client/route/src/card/style.css b/client/route/src/card/style.css new file mode 100644 index 000000000..e69de29bb diff --git a/client/route/src/locale/es.json b/client/route/src/locale/es.json index 616431fe5..1c2b2f4c4 100644 --- a/client/route/src/locale/es.json +++ b/client/route/src/locale/es.json @@ -1,3 +1,17 @@ { - "Routes" : "Rutas" + "Basic data": "Datos básicos", + "Logistic data": "Datos logísticos", + "Assigned tickets": "Tickets asignados", + "Routes" : "Rutas", + "Route" : "Ruta", + "Date": "Fecha", + "Agency": "Agencia", + "Driver": "Conductor", + "Vehicle": "Vehículo", + "Start Hour" : "Hora Inicio", + "End Hour": "Hora Fin", + "Start Km": "Km Inicio", + "End Km": "Km Fin", + "Packages": "Bultos", + "Route document": "Documento de Ruta" } diff --git a/client/route/src/logistic-data/logistic-data.html b/client/route/src/logistic-data/logistic-data.html new file mode 100644 index 000000000..5c5a2df55 --- /dev/null +++ b/client/route/src/logistic-data/logistic-data.html @@ -0,0 +1,28 @@ + + +
+ + + Logistic data + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/client/route/src/logistic-data/logistic-data.js b/client/route/src/logistic-data/logistic-data.js new file mode 100644 index 000000000..4230a8282 --- /dev/null +++ b/client/route/src/logistic-data/logistic-data.js @@ -0,0 +1,8 @@ +import ngModule from '../module'; + +ngModule.component('vnRouteLogisticData', { + template: require('./logistic-data.html'), + bindings: { + route: '<' + } +}); diff --git a/client/route/src/route.js b/client/route/src/route.js index b490a2039..a9db6db33 100644 --- a/client/route/src/route.js +++ b/client/route/src/route.js @@ -5,3 +5,6 @@ import './index/index'; import './search-panel/search-panel'; import './create/create'; import './card/card'; +import './basic-data/basic-data'; +import './logistic-data/logistic-data'; +import './tickets/tickets'; diff --git a/client/route/src/tickets/tickets.html b/client/route/src/tickets/tickets.html new file mode 100644 index 000000000..e78e9ab70 --- /dev/null +++ b/client/route/src/tickets/tickets.html @@ -0,0 +1,7 @@ + + + + Assigned tickets + + + \ No newline at end of file diff --git a/client/route/src/tickets/tickets.js b/client/route/src/tickets/tickets.js new file mode 100644 index 000000000..2405d5d9e --- /dev/null +++ b/client/route/src/tickets/tickets.js @@ -0,0 +1,8 @@ +import ngModule from '../module'; + +ngModule.component('vnRouteTickets', { + template: require('./tickets.html'), + bindings: { + route: '<' + } +}); diff --git a/client/salix/src/components/left-menu/menu-item.html b/client/salix/src/components/left-menu/menu-item.html index b3315b2fa..6930039f0 100644 --- a/client/salix/src/components/left-menu/menu-item.html +++ b/client/salix/src/components/left-menu/menu-item.html @@ -2,6 +2,6 @@ keyboard_arrow_right {{$ctrl.item.icon}} - {{$ctrl.item.description}} + {{$ctrl.item.description}} \ No newline at end of file diff --git a/client/salix/src/locale/es.json b/client/salix/src/locale/es.json index fc0932817..a5f88410b 100644 --- a/client/salix/src/locale/es.json +++ b/client/salix/src/locale/es.json @@ -11,5 +11,6 @@ "Clients": "Clientes", "Routes" : "Rutas", "Production" : "Producción", - "Modules access" : "Acceso a módulos" + "Modules access" : "Acceso a módulos", + "Locator": "Localizador" } \ No newline at end of file diff --git a/client/salix/src/spliting.js b/client/salix/src/spliting.js index 4918d5acc..697bcef98 100644 --- a/client/salix/src/spliting.js +++ b/client/salix/src/spliting.js @@ -32,3 +32,14 @@ export const route = () => { }; core.splitingRegister.register('route', route); + +export const locator = () => { + return new Promise(resolve => { + require.ensure([], () => { + require('locator'); + resolve('locator'); + }, 'locator'); + }); +}; + +core.splitingRegister.register('locator', locator);