From b94c97d322147e67aa54523b49d544ab7c1f45c6 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Wed, 13 May 2020 17:51:27 +0200 Subject: [PATCH] Hotfix: Clone option added to vnItemDescriptor --- modules/item/front/descriptor/index.html | 8 +++++++- modules/item/front/descriptor/index.js | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/modules/item/front/descriptor/index.html b/modules/item/front/descriptor/index.html index 81f8299b0..16ea76cf7 100644 --- a/modules/item/front/descriptor/index.html +++ b/modules/item/front/descriptor/index.html @@ -99,4 +99,10 @@ - \ No newline at end of file + + + diff --git a/modules/item/front/descriptor/index.js b/modules/item/front/descriptor/index.js index e04fdb595..105216fbd 100644 --- a/modules/item/front/descriptor/index.js +++ b/modules/item/front/descriptor/index.js @@ -6,7 +6,8 @@ class Controller extends Component { constructor($element, $) { super($element, $); this.moreOptions = [ - {callback: this.showRegularizeDialog, name: 'Regularize stock'} + {callback: this.showRegularizeDialog, name: 'Regularize stock'}, + {callback: () => this.$.clone.show(), name: 'Clone'} ]; } @@ -88,6 +89,11 @@ class Controller extends Component { this.warehouseFk = null; this.quantity = null; } + + onCloneAccept() { + this.$http.post(`Items/${this.item.id}/clone`) + .then(res => this.$state.go('item.card.tags', {id: res.data.id})); + } } Controller.$inject = ['$element', '$scope'];