diff --git a/db/changes/10160-postValentineDay/00-zoneEvent.sql b/db/changes/10160-postValentineDay/00-zoneEvent.sql new file mode 100644 index 000000000..1554afbec --- /dev/null +++ b/db/changes/10160-postValentineDay/00-zoneEvent.sql @@ -0,0 +1,2 @@ +ALTER TABLE `vn`.`zoneEvent` +ADD COLUMN m3Max DECIMAL(10,2) UNSIGNED NULL DEFAULT NULL AFTER bonus; \ No newline at end of file diff --git a/front/module-import.js b/front/module-import.js index 0bfe7f8ca..dd1692c18 100755 --- a/front/module-import.js +++ b/front/module-import.js @@ -12,7 +12,7 @@ export default function moduleImport(moduleName) { case 'ticket' : return import('ticket/front'); case 'order' : return import('order/front'); case 'claim' : return import('claim/front'); - case 'agency' : return import('agency/front'); + case 'zone' : return import('zone/front'); case 'travel' : return import('travel/front'); case 'worker' : return import('worker/front'); case 'invoiceOut' : return import('invoiceOut/front'); diff --git a/front/salix/locale/es.yml b/front/salix/locale/es.yml index 34e1a2487..3ce39af8d 100644 --- a/front/salix/locale/es.yml +++ b/front/salix/locale/es.yml @@ -32,7 +32,7 @@ Remove: Quitar # Modules -Agencies: Agencias +Zones: Zonas Claims: Reclamaciones Clients: Clientes Items: Artículos diff --git a/jest-front.js b/jest-front.js index 40c0e52fc..5d6c342c0 100644 --- a/jest-front.js +++ b/jest-front.js @@ -2,7 +2,7 @@ import 'angular'; import 'angular-mocks'; import core from './front/core/module.js'; import './front/salix/components/app/app.js'; -import './modules/agency/front/module.js'; +import './modules/zone/front/module.js'; import './modules/claim/front/module.js'; import './modules/client/front/module.js'; import './modules/invoiceOut/front/module.js'; diff --git a/modules/agency/front/module.js b/modules/agency/front/module.js deleted file mode 100644 index cf38d7fe9..000000000 --- a/modules/agency/front/module.js +++ /dev/null @@ -1,3 +0,0 @@ -import {ng} from 'core/vendor'; - -export default ng.module('agency', ['vnCore']); diff --git a/modules/agency/back/methods/agency/getAgenciesWithWarehouse.js b/modules/zone/back/methods/agency/getAgenciesWithWarehouse.js similarity index 100% rename from modules/agency/back/methods/agency/getAgenciesWithWarehouse.js rename to modules/zone/back/methods/agency/getAgenciesWithWarehouse.js diff --git a/modules/agency/back/methods/agency/getLanded.js b/modules/zone/back/methods/agency/getLanded.js similarity index 100% rename from modules/agency/back/methods/agency/getLanded.js rename to modules/zone/back/methods/agency/getLanded.js diff --git a/modules/agency/back/methods/agency/getShipped.js b/modules/zone/back/methods/agency/getShipped.js similarity index 100% rename from modules/agency/back/methods/agency/getShipped.js rename to modules/zone/back/methods/agency/getShipped.js diff --git a/modules/agency/back/methods/agency/landsThatDay.js b/modules/zone/back/methods/agency/landsThatDay.js similarity index 100% rename from modules/agency/back/methods/agency/landsThatDay.js rename to modules/zone/back/methods/agency/landsThatDay.js diff --git a/modules/agency/back/methods/agency/specs/getAgenciesWithWarehouse.spec.js b/modules/zone/back/methods/agency/specs/getAgenciesWithWarehouse.spec.js similarity index 100% rename from modules/agency/back/methods/agency/specs/getAgenciesWithWarehouse.spec.js rename to modules/zone/back/methods/agency/specs/getAgenciesWithWarehouse.spec.js diff --git a/modules/agency/back/methods/agency/specs/getLanded.spec.js b/modules/zone/back/methods/agency/specs/getLanded.spec.js similarity index 100% rename from modules/agency/back/methods/agency/specs/getLanded.spec.js rename to modules/zone/back/methods/agency/specs/getLanded.spec.js diff --git a/modules/agency/back/methods/agency/specs/getShipped.spec.js b/modules/zone/back/methods/agency/specs/getShipped.spec.js similarity index 100% rename from modules/agency/back/methods/agency/specs/getShipped.spec.js rename to modules/zone/back/methods/agency/specs/getShipped.spec.js diff --git a/modules/agency/back/methods/agency/specs/landsThatDay.spec.js b/modules/zone/back/methods/agency/specs/landsThatDay.spec.js similarity index 100% rename from modules/agency/back/methods/agency/specs/landsThatDay.spec.js rename to modules/zone/back/methods/agency/specs/landsThatDay.spec.js diff --git a/modules/agency/back/methods/zone/clone.js b/modules/zone/back/methods/zone/clone.js similarity index 100% rename from modules/agency/back/methods/zone/clone.js rename to modules/zone/back/methods/zone/clone.js diff --git a/modules/agency/back/methods/zone/getEvents.js b/modules/zone/back/methods/zone/getEvents.js similarity index 100% rename from modules/agency/back/methods/zone/getEvents.js rename to modules/zone/back/methods/zone/getEvents.js diff --git a/modules/agency/back/methods/zone/getLeaves.js b/modules/zone/back/methods/zone/getLeaves.js similarity index 100% rename from modules/agency/back/methods/zone/getLeaves.js rename to modules/zone/back/methods/zone/getLeaves.js diff --git a/modules/agency/back/methods/zone/specs/clone.spec.js b/modules/zone/back/methods/zone/specs/clone.spec.js similarity index 100% rename from modules/agency/back/methods/zone/specs/clone.spec.js rename to modules/zone/back/methods/zone/specs/clone.spec.js diff --git a/modules/agency/back/methods/zone/toggleIsIncluded.js b/modules/zone/back/methods/zone/toggleIsIncluded.js similarity index 100% rename from modules/agency/back/methods/zone/toggleIsIncluded.js rename to modules/zone/back/methods/zone/toggleIsIncluded.js diff --git a/modules/agency/back/model-config.json b/modules/zone/back/model-config.json similarity index 100% rename from modules/agency/back/model-config.json rename to modules/zone/back/model-config.json diff --git a/modules/agency/back/models/agency-mode.json b/modules/zone/back/models/agency-mode.json similarity index 100% rename from modules/agency/back/models/agency-mode.json rename to modules/zone/back/models/agency-mode.json diff --git a/modules/agency/back/models/agency.js b/modules/zone/back/models/agency.js similarity index 100% rename from modules/agency/back/models/agency.js rename to modules/zone/back/models/agency.js diff --git a/modules/agency/back/models/agency.json b/modules/zone/back/models/agency.json similarity index 100% rename from modules/agency/back/models/agency.json rename to modules/zone/back/models/agency.json diff --git a/modules/agency/back/models/delivery-method.json b/modules/zone/back/models/delivery-method.json similarity index 100% rename from modules/agency/back/models/delivery-method.json rename to modules/zone/back/models/delivery-method.json diff --git a/modules/agency/back/models/zone-closure.js b/modules/zone/back/models/zone-closure.js similarity index 100% rename from modules/agency/back/models/zone-closure.js rename to modules/zone/back/models/zone-closure.js diff --git a/modules/agency/back/models/zone-closure.json b/modules/zone/back/models/zone-closure.json similarity index 100% rename from modules/agency/back/models/zone-closure.json rename to modules/zone/back/models/zone-closure.json diff --git a/modules/agency/back/models/zone-event.js b/modules/zone/back/models/zone-event.js similarity index 100% rename from modules/agency/back/models/zone-event.js rename to modules/zone/back/models/zone-event.js diff --git a/modules/agency/back/models/zone-event.json b/modules/zone/back/models/zone-event.json similarity index 94% rename from modules/agency/back/models/zone-event.json rename to modules/zone/back/models/zone-event.json index 0d46b1fe2..9ac1007b5 100644 --- a/modules/agency/back/models/zone-event.json +++ b/modules/zone/back/models/zone-event.json @@ -41,6 +41,9 @@ }, "bonus": { "type": "Number" + }, + "m3Max": { + "type": "Number" } }, "relations": { diff --git a/modules/agency/back/models/zone-exclusion.json b/modules/zone/back/models/zone-exclusion.json similarity index 100% rename from modules/agency/back/models/zone-exclusion.json rename to modules/zone/back/models/zone-exclusion.json diff --git a/modules/agency/back/models/zone-geo.json b/modules/zone/back/models/zone-geo.json similarity index 100% rename from modules/agency/back/models/zone-geo.json rename to modules/zone/back/models/zone-geo.json diff --git a/modules/agency/back/models/zone-included.json b/modules/zone/back/models/zone-included.json similarity index 100% rename from modules/agency/back/models/zone-included.json rename to modules/zone/back/models/zone-included.json diff --git a/modules/agency/back/models/zone-warehouse.json b/modules/zone/back/models/zone-warehouse.json similarity index 100% rename from modules/agency/back/models/zone-warehouse.json rename to modules/zone/back/models/zone-warehouse.json diff --git a/modules/agency/back/models/zone.js b/modules/zone/back/models/zone.js similarity index 100% rename from modules/agency/back/models/zone.js rename to modules/zone/back/models/zone.js diff --git a/modules/agency/back/models/zone.json b/modules/zone/back/models/zone.json similarity index 100% rename from modules/agency/back/models/zone.json rename to modules/zone/back/models/zone.json diff --git a/modules/agency/front/basic-data/index.html b/modules/zone/front/basic-data/index.html similarity index 100% rename from modules/agency/front/basic-data/index.html rename to modules/zone/front/basic-data/index.html diff --git a/modules/agency/front/basic-data/index.js b/modules/zone/front/basic-data/index.js similarity index 100% rename from modules/agency/front/basic-data/index.js rename to modules/zone/front/basic-data/index.js diff --git a/modules/agency/front/calendar/index.html b/modules/zone/front/calendar/index.html similarity index 100% rename from modules/agency/front/calendar/index.html rename to modules/zone/front/calendar/index.html diff --git a/modules/agency/front/calendar/index.js b/modules/zone/front/calendar/index.js similarity index 100% rename from modules/agency/front/calendar/index.js rename to modules/zone/front/calendar/index.js diff --git a/modules/agency/front/calendar/style.scss b/modules/zone/front/calendar/style.scss similarity index 100% rename from modules/agency/front/calendar/style.scss rename to modules/zone/front/calendar/style.scss diff --git a/modules/agency/front/card/index.html b/modules/zone/front/card/index.html similarity index 100% rename from modules/agency/front/card/index.html rename to modules/zone/front/card/index.html diff --git a/modules/agency/front/card/index.js b/modules/zone/front/card/index.js similarity index 100% rename from modules/agency/front/card/index.js rename to modules/zone/front/card/index.js diff --git a/modules/agency/front/card/index.spec.js b/modules/zone/front/card/index.spec.js similarity index 95% rename from modules/agency/front/card/index.spec.js rename to modules/zone/front/card/index.spec.js index cc53fe946..48970ce6b 100644 --- a/modules/agency/front/card/index.spec.js +++ b/modules/zone/front/card/index.spec.js @@ -5,7 +5,7 @@ describe('Agency Component vnZoneCard', () => { let $httpBackend; let data = {id: 1, name: 'fooName'}; - beforeEach(ngModule('agency')); + beforeEach(ngModule('zone')); beforeEach(angular.mock.inject(($componentController, _$httpBackend_, $stateParams) => { $httpBackend = _$httpBackend_; diff --git a/modules/agency/front/create/index.html b/modules/zone/front/create/index.html similarity index 100% rename from modules/agency/front/create/index.html rename to modules/zone/front/create/index.html diff --git a/modules/agency/front/create/index.js b/modules/zone/front/create/index.js similarity index 100% rename from modules/agency/front/create/index.js rename to modules/zone/front/create/index.js diff --git a/modules/agency/front/create/index.spec.js b/modules/zone/front/create/index.spec.js similarity index 96% rename from modules/agency/front/create/index.spec.js rename to modules/zone/front/create/index.spec.js index 5b2a022f8..5041e5095 100644 --- a/modules/agency/front/create/index.spec.js +++ b/modules/zone/front/create/index.spec.js @@ -6,7 +6,7 @@ describe('Agency Component vnZoneCreate', () => { let $state; let controller; - beforeEach(ngModule('agency')); + beforeEach(ngModule('zone')); beforeEach(angular.mock.inject(($componentController, $rootScope, _$state_) => { $scope = $rootScope.$new(); diff --git a/modules/agency/front/create/locale/es.yml b/modules/zone/front/create/locale/es.yml similarity index 100% rename from modules/agency/front/create/locale/es.yml rename to modules/zone/front/create/locale/es.yml diff --git a/modules/agency/front/delivery-days/index.html b/modules/zone/front/delivery-days/index.html similarity index 100% rename from modules/agency/front/delivery-days/index.html rename to modules/zone/front/delivery-days/index.html diff --git a/modules/agency/front/delivery-days/index.js b/modules/zone/front/delivery-days/index.js similarity index 100% rename from modules/agency/front/delivery-days/index.js rename to modules/zone/front/delivery-days/index.js diff --git a/modules/agency/front/delivery-days/style.scss b/modules/zone/front/delivery-days/style.scss similarity index 100% rename from modules/agency/front/delivery-days/style.scss rename to modules/zone/front/delivery-days/style.scss diff --git a/modules/agency/front/descriptor/index.html b/modules/zone/front/descriptor/index.html similarity index 100% rename from modules/agency/front/descriptor/index.html rename to modules/zone/front/descriptor/index.html diff --git a/modules/agency/front/descriptor/index.js b/modules/zone/front/descriptor/index.js similarity index 100% rename from modules/agency/front/descriptor/index.js rename to modules/zone/front/descriptor/index.js diff --git a/modules/agency/front/events/index.html b/modules/zone/front/events/index.html similarity index 82% rename from modules/agency/front/events/index.html rename to modules/zone/front/events/index.html index 693b24a85..0df58287f 100644 --- a/modules/agency/front/events/index.html +++ b/modules/zone/front/events/index.html @@ -75,6 +75,10 @@ label="Bonus" value="{{::row.bonus | currency:'EUR':2}}"> + + - - + + + + + + + + + + + + - - - - diff --git a/modules/agency/front/events/index.js b/modules/zone/front/events/index.js similarity index 100% rename from modules/agency/front/events/index.js rename to modules/zone/front/events/index.js diff --git a/modules/agency/front/events/locale/es.yml b/modules/zone/front/events/locale/es.yml similarity index 100% rename from modules/agency/front/events/locale/es.yml rename to modules/zone/front/events/locale/es.yml diff --git a/modules/agency/front/index.js b/modules/zone/front/index.js similarity index 100% rename from modules/agency/front/index.js rename to modules/zone/front/index.js diff --git a/modules/agency/front/index/index.html b/modules/zone/front/index/index.html similarity index 100% rename from modules/agency/front/index/index.html rename to modules/zone/front/index/index.html diff --git a/modules/agency/front/index/index.js b/modules/zone/front/index/index.js similarity index 100% rename from modules/agency/front/index/index.js rename to modules/zone/front/index/index.js diff --git a/modules/agency/front/index/index.spec.js b/modules/zone/front/index/index.spec.js similarity index 96% rename from modules/agency/front/index/index.spec.js rename to modules/zone/front/index/index.spec.js index cf2fdfab5..04fc599b7 100644 --- a/modules/agency/front/index/index.spec.js +++ b/modules/zone/front/index/index.spec.js @@ -4,7 +4,7 @@ describe('Agency Component vnZoneIndex', () => { let $componentController; let controller; - beforeEach(ngModule('agency')); + beforeEach(ngModule('zone')); beforeEach(angular.mock.inject(_$componentController_ => { $componentController = _$componentController_; diff --git a/modules/agency/front/index/locale/es.yml b/modules/zone/front/index/locale/es.yml similarity index 100% rename from modules/agency/front/index/locale/es.yml rename to modules/zone/front/index/locale/es.yml diff --git a/modules/agency/front/locale/es.yml b/modules/zone/front/locale/es.yml similarity index 100% rename from modules/agency/front/locale/es.yml rename to modules/zone/front/locale/es.yml diff --git a/modules/agency/front/location/index.html b/modules/zone/front/location/index.html similarity index 100% rename from modules/agency/front/location/index.html rename to modules/zone/front/location/index.html diff --git a/modules/agency/front/location/index.js b/modules/zone/front/location/index.js similarity index 100% rename from modules/agency/front/location/index.js rename to modules/zone/front/location/index.js diff --git a/modules/agency/front/location/style.scss b/modules/zone/front/location/style.scss similarity index 100% rename from modules/agency/front/location/style.scss rename to modules/zone/front/location/style.scss diff --git a/modules/agency/front/main/index.html b/modules/zone/front/main/index.html similarity index 100% rename from modules/agency/front/main/index.html rename to modules/zone/front/main/index.html diff --git a/modules/agency/front/main/index.js b/modules/zone/front/main/index.js similarity index 100% rename from modules/agency/front/main/index.js rename to modules/zone/front/main/index.js diff --git a/modules/zone/front/module.js b/modules/zone/front/module.js new file mode 100644 index 000000000..08a427e04 --- /dev/null +++ b/modules/zone/front/module.js @@ -0,0 +1,3 @@ +import {ng} from 'core/vendor'; + +export default ng.module('zone', ['vnCore']); diff --git a/modules/agency/front/routes.json b/modules/zone/front/routes.json similarity index 94% rename from modules/agency/front/routes.json rename to modules/zone/front/routes.json index 7c5b1338d..857b4b0a4 100644 --- a/modules/agency/front/routes.json +++ b/modules/zone/front/routes.json @@ -1,12 +1,12 @@ { - "module": "agency", - "name": "Agencies", - "icon" : "icon-delivery", + "module": "zone", + "name": "Zones", + "icon" : "location_on", "validations" : true, "dependencies": ["worker"], "menus": { "main": [ - {"state": "zone.index", "icon": "icon-delivery"}, + {"state": "zone.index", "icon": "location_on"}, {"state": "zone.deliveryDays", "icon": "today"} ], "card": [ diff --git a/modules/agency/front/search-panel/index.html b/modules/zone/front/search-panel/index.html similarity index 100% rename from modules/agency/front/search-panel/index.html rename to modules/zone/front/search-panel/index.html diff --git a/modules/agency/front/search-panel/index.js b/modules/zone/front/search-panel/index.js similarity index 100% rename from modules/agency/front/search-panel/index.js rename to modules/zone/front/search-panel/index.js diff --git a/modules/agency/front/summary/index.html b/modules/zone/front/summary/index.html similarity index 100% rename from modules/agency/front/summary/index.html rename to modules/zone/front/summary/index.html diff --git a/modules/agency/front/summary/index.js b/modules/zone/front/summary/index.js similarity index 100% rename from modules/agency/front/summary/index.js rename to modules/zone/front/summary/index.js diff --git a/modules/agency/front/summary/index.spec.js b/modules/zone/front/summary/index.spec.js similarity index 98% rename from modules/agency/front/summary/index.spec.js rename to modules/zone/front/summary/index.spec.js index d0f99dbb2..03faf4cfd 100644 --- a/modules/agency/front/summary/index.spec.js +++ b/modules/zone/front/summary/index.spec.js @@ -7,7 +7,7 @@ describe('component vnZoneSummary', () => { let $httpBackend; let $httpParamSerializer; - beforeEach(ngModule('agency')); + beforeEach(ngModule('zone')); beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_, _$httpParamSerializer_) => { $httpBackend = _$httpBackend_; diff --git a/modules/agency/front/warehouses/index.html b/modules/zone/front/warehouses/index.html similarity index 100% rename from modules/agency/front/warehouses/index.html rename to modules/zone/front/warehouses/index.html diff --git a/modules/agency/front/warehouses/index.js b/modules/zone/front/warehouses/index.js similarity index 100% rename from modules/agency/front/warehouses/index.js rename to modules/zone/front/warehouses/index.js