From 16ca2416d131e77d9c12e74b419a7d9034deb9c6 Mon Sep 17 00:00:00 2001 From: vicent Date: Thu, 4 May 2023 10:15:18 +0200 Subject: [PATCH] =?UTF-8?q?refs=20#=20a=C3=B1adidos=20botones=20para=20eli?= =?UTF-8?q?minar=20radmaps=20y=20para=20eliminar/insertar=20expeditionTruc?= =?UTF-8?q?ks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/changes/231601/00-roadmap.sql | 2 + .../route/front/roadmap/basic-data/index.html | 5 +- .../route/front/roadmap/descriptor/index.html | 15 +++- .../route/front/roadmap/descriptor/index.js | 6 ++ .../front/roadmap/descriptor/locale/es.yml | 3 + modules/route/front/roadmap/stops/index.html | 89 +++++++++++-------- modules/route/front/roadmap/stops/index.js | 20 ++--- .../route/front/roadmap/stops/locale/es.yml | 3 +- modules/shelving/front/descriptor/index.html | 8 +- .../shelving/front/descriptor/locale/es.yml | 3 + 10 files changed, 99 insertions(+), 55 deletions(-) create mode 100644 modules/route/front/roadmap/descriptor/locale/es.yml create mode 100644 modules/shelving/front/descriptor/locale/es.yml diff --git a/db/changes/231601/00-roadmap.sql b/db/changes/231601/00-roadmap.sql index 9b5db54eb..a2835160f 100644 --- a/db/changes/231601/00-roadmap.sql +++ b/db/changes/231601/00-roadmap.sql @@ -6,3 +6,5 @@ ALTER TABLE `vn`.`roadmap` CHANGE name name varchar(45) CHARACTER SET utf8mb3 CO ALTER TABLE `vn`.`roadmap` MODIFY COLUMN etd datetime NOT NULL; ALTER TABLE `vn`.`expeditionTruck` COMMENT='Distintas paradas que hacen los trocales'; +ALTER TABLE `vn`.`expeditionTruck` DROP FOREIGN KEY expeditionTruck_FK_2; +ALTER TABLE `vn`.`expeditionTruck` ADD CONSTRAINT expeditionTruck_FK_2 FOREIGN KEY (roadmapFk) REFERENCES vn.roadmap(id) ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/modules/route/front/roadmap/basic-data/index.html b/modules/route/front/roadmap/basic-data/index.html index 4fd6b98d3..e186f7f24 100644 --- a/modules/route/front/roadmap/basic-data/index.html +++ b/modules/route/front/roadmap/basic-data/index.html @@ -8,7 +8,7 @@
- + rule> diff --git a/modules/route/front/roadmap/descriptor/index.html b/modules/route/front/roadmap/descriptor/index.html index 00bc4eccf..92ae8eab1 100644 --- a/modules/route/front/roadmap/descriptor/index.html +++ b/modules/route/front/roadmap/descriptor/index.html @@ -2,6 +2,14 @@ module="route" base-state="route.roadmap" description="$ctrl.roadmap.name"> + + + Delete roadmap + +
- + + diff --git a/modules/route/front/roadmap/descriptor/index.js b/modules/route/front/roadmap/descriptor/index.js index b08fad37f..2846b073a 100644 --- a/modules/route/front/roadmap/descriptor/index.js +++ b/modules/route/front/roadmap/descriptor/index.js @@ -9,6 +9,12 @@ class Controller extends Descriptor { set roadmap(value) { this.entity = value; } + + onDelete() { + return this.$http.delete(`Roadmaps/${this.roadmap.id}`) + .then(() => this.$state.go('route.roadmap')) + .then(() => this.vnApp.showSuccess(this.$t('Roadmap removed'))); + } } ngModule.component('vnRoadmapDescriptor', { diff --git a/modules/route/front/roadmap/descriptor/locale/es.yml b/modules/route/front/roadmap/descriptor/locale/es.yml new file mode 100644 index 000000000..376209694 --- /dev/null +++ b/modules/route/front/roadmap/descriptor/locale/es.yml @@ -0,0 +1,3 @@ +Delete roadmap: Eliminar troncal +The roadmap will be removed: La troncal será eliminada +Roadmap removed: Troncal eliminada diff --git a/modules/route/front/roadmap/stops/index.html b/modules/route/front/roadmap/stops/index.html index c23c44ff7..908560365 100644 --- a/modules/route/front/roadmap/stops/index.html +++ b/modules/route/front/roadmap/stops/index.html @@ -6,42 +6,59 @@ data="$ctrl.expeditionTrucks" auto-load="true"> - - - -
- - - - Warehouse - ETA - Description - - - - - - {{::expeditionTruck.warehouseFk}} - {{::expeditionTruck.ETD | date:'dd/MM/yyyy HH:mm'}} - {{::expeditionTruck.description}} - - - - - - - -
-
- -
+ + +
+ + + + + + + + + + + + + + + + + + + + + + +
{ - this.$.model.remove($index); - this.vnApp.showSuccess(this.$t('Ticket removed from route')); - this.updateVolume(); + onSubmit() { + this.$.watcher.check(); + this.$.model.save().then(() => { + this.$.watcher.notifySaved(); + this.$.watcher.updateOriginalData(); + this.$.model.refresh(); }); } } diff --git a/modules/route/front/roadmap/stops/locale/es.yml b/modules/route/front/roadmap/stops/locale/es.yml index 32877518c..c3dcca265 100644 --- a/modules/route/front/roadmap/stops/locale/es.yml +++ b/modules/route/front/roadmap/stops/locale/es.yml @@ -1 +1,2 @@ -Delete stop: Eliminar parada +Remove stop: Eliminar parada +Add stop: Añadir parada diff --git a/modules/shelving/front/descriptor/index.html b/modules/shelving/front/descriptor/index.html index 1344bb52a..53dd37258 100644 --- a/modules/shelving/front/descriptor/index.html +++ b/modules/shelving/front/descriptor/index.html @@ -7,7 +7,7 @@ ng-click="deleteShelving.show()" name="deleteShelving" translate> - Delete + Delete shelving @@ -32,7 +32,7 @@ @@ -40,6 +40,6 @@ - - \ No newline at end of file + diff --git a/modules/shelving/front/descriptor/locale/es.yml b/modules/shelving/front/descriptor/locale/es.yml new file mode 100644 index 000000000..e7fafc320 --- /dev/null +++ b/modules/shelving/front/descriptor/locale/es.yml @@ -0,0 +1,3 @@ +Delete shelving: Eliminar carro +Shelving will be removed: El carro será eliminado +Shelving removed: Carro eliminado