diff --git a/modules/claim/front/action/index.html b/modules/claim/front/action/index.html index 44f9bb68c..4aa8909b9 100644 --- a/modules/claim/front/action/index.html +++ b/modules/claim/front/action/index.html @@ -186,8 +186,7 @@ + vn-id="descriptor"> diff --git a/modules/claim/front/action/index.js b/modules/claim/front/action/index.js index 0b12a54d0..2d74a2aff 100644 --- a/modules/claim/front/action/index.js +++ b/modules/claim/front/action/index.js @@ -161,15 +161,6 @@ class Controller { } // Item Descriptor showDescriptor(event, itemFk) { - this.quicklinks = { - btnThree: { - icon: 'icon-transaction', - state: `item.card.diary({ - id: ${itemFk} - })`, - tooltip: 'Item diary' - } - }; this.$.descriptor.itemFk = itemFk; this.$.descriptor.parent = event.target; this.$.descriptor.show(); diff --git a/modules/claim/front/detail/index.html b/modules/claim/front/detail/index.html index fde90835d..5c6de8466 100644 --- a/modules/claim/front/detail/index.html +++ b/modules/claim/front/detail/index.html @@ -110,6 +110,5 @@ + vn-id="descriptor"> \ No newline at end of file diff --git a/modules/claim/front/detail/index.js b/modules/claim/front/detail/index.js index aeca8946e..f859316a8 100644 --- a/modules/claim/front/detail/index.js +++ b/modules/claim/front/detail/index.js @@ -103,15 +103,6 @@ class Controller { // Item Descriptor showDescriptor(event, itemFk) { - this.quicklinks = { - btnThree: { - icon: 'icon-transaction', - state: `item.card.diary({ - id: ${itemFk} - })`, - tooltip: 'Item diary' - } - }; this.$scope.descriptor.itemFk = itemFk; this.$scope.descriptor.parent = event.target; this.$scope.descriptor.show(); diff --git a/modules/claim/front/summary/index.html b/modules/claim/front/summary/index.html index 0e4b62a09..2d58364af 100644 --- a/modules/claim/front/summary/index.html +++ b/modules/claim/front/summary/index.html @@ -151,8 +151,7 @@ + vn-id="itemDescriptor"> { + this._quicklinks[key] = value[key]; + }); + } + show() { this.$.popover.parent = this.parent; this.$.popover.show(); diff --git a/modules/invoiceOut/front/descriptor-popover/index.js b/modules/invoiceOut/front/descriptor-popover/index.js index c6f52e1a6..c47632e33 100644 --- a/modules/invoiceOut/front/descriptor-popover/index.js +++ b/modules/invoiceOut/front/descriptor-popover/index.js @@ -9,6 +9,7 @@ class Controller extends Component { this.$http = $http; this.$q = $q; this.worker = null; + this._quicklinks = {}; } set invoiceOutId(id) { @@ -23,14 +24,16 @@ class Controller extends Component { return this._invoiceOutId; } - set quicklinks(value = {}) { - this._quicklinks = Object.assign(value, this._quicklinks); - } - get quicklinks() { return this._quicklinks; } + set quicklinks(value = {}) { + Object.keys(value).forEach(key => { + this._quicklinks[key] = value[key]; + }); + } + show() { this.$.popover.parent = this.parent; this.$.popover.show(); diff --git a/modules/item/front/descriptor-popover/index.js b/modules/item/front/descriptor-popover/index.js index ed0cc01d0..1fada5838 100644 --- a/modules/item/front/descriptor-popover/index.js +++ b/modules/item/front/descriptor-popover/index.js @@ -9,6 +9,7 @@ class Controller extends Component { this.$http = $http; this.$q = $q; this.item = null; + this._quicklinks = {}; } set itemFk(id) { @@ -16,6 +17,15 @@ class Controller extends Component { this._itemFk = id; this.item = null; + this._quicklinks = { + btnThree: { + icon: 'icon-transaction', + state: `item.card.diary({ + id: ${id}, + })`, + tooltip: 'Item diary' + } + }; this.getCard(); } @@ -28,14 +38,16 @@ class Controller extends Component { return this._item; } - set quicklinks(value = {}) { - this._quicklinks = Object.assign(value, this._quicklinks); - } - get quicklinks() { return this._quicklinks; } + set quicklinks(value = {}) { + Object.keys(value).forEach(key => { + this._quicklinks[key] = value[key]; + }); + } + show() { this.$.popover.parent = this.parent; this.$.popover.show(); diff --git a/modules/item/front/index/index.html b/modules/item/front/index/index.html index 6054c7bb7..fcdbb6c9d 100644 --- a/modules/item/front/index/index.html +++ b/modules/item/front/index/index.html @@ -139,8 +139,7 @@ question="Do you want to clone this item?" message="All it's properties will be copied"> - - + diff --git a/modules/item/front/index/index.js b/modules/item/front/index/index.js index aa8150cc3..d53e2998b 100644 --- a/modules/item/front/index/index.js +++ b/modules/item/front/index/index.js @@ -53,15 +53,6 @@ class Controller { event.preventDefault(); event.stopPropagation(); - this.quicklinks = { - btnThree: { - icon: 'icon-transaction', - state: `item.card.diary({ - id: ${itemFk}, - })`, - tooltip: 'Item diary' - } - }; this.$.itemDescriptor.itemFk = itemFk; this.$.itemDescriptor.parent = event.target; this.$.itemDescriptor.show(); diff --git a/modules/order/front/summary/index.html b/modules/order/front/summary/index.html index ea2abef08..e46537f49 100644 --- a/modules/order/front/summary/index.html +++ b/modules/order/front/summary/index.html @@ -85,6 +85,5 @@ + vn-id="descriptor"> diff --git a/modules/order/front/summary/index.js b/modules/order/front/summary/index.js index 8b32415c8..19323e4bb 100644 --- a/modules/order/front/summary/index.js +++ b/modules/order/front/summary/index.js @@ -31,15 +31,6 @@ class Controller { } showDescriptor(event, itemFk) { - this.quicklinks = { - btnThree: { - icon: 'icon-transaction', - state: `item.card.diary({ - id: ${itemFk}, - })`, - tooltip: 'Item diary' - } - }; this.$scope.descriptor.itemFk = itemFk; this.$scope.descriptor.parent = event.target; this.$scope.descriptor.show(); diff --git a/modules/ticket/front/descriptor-popover/index.js b/modules/ticket/front/descriptor-popover/index.js index e552fde16..1c8b997a7 100644 --- a/modules/ticket/front/descriptor-popover/index.js +++ b/modules/ticket/front/descriptor-popover/index.js @@ -9,6 +9,7 @@ class Controller extends Component { this.$http = $http; this.$q = $q; this.ticket = null; + this._quicklinks = {}; } set ticketFk(id) { @@ -28,14 +29,16 @@ class Controller extends Component { return this._ticket; } - set quicklinks(value = {}) { - this._quicklinks = Object.assign(value, this._quicklinks); - } - get quicklinks() { return this._quicklinks; } + set quicklinks(value = {}) { + Object.keys(value).forEach(key => { + this._quicklinks[key] = value[key]; + }); + } + show() { this.$.popover.parent = this.parent; this.$.popover.show(); diff --git a/modules/worker/front/descriptor-popover/index.js b/modules/worker/front/descriptor-popover/index.js index 168b2f423..fd3d85cb7 100644 --- a/modules/worker/front/descriptor-popover/index.js +++ b/modules/worker/front/descriptor-popover/index.js @@ -9,6 +9,7 @@ class Controller extends Component { this.$http = $http; this.$q = $q; this.worker = null; + this._quicklinks = {}; } set workerFk(workerFk) { @@ -23,14 +24,16 @@ class Controller extends Component { return this._workerFk; } - set quicklinks(value = {}) { - this._quicklinks = Object.assign(value, this._quicklinks); - } - get quicklinks() { return this._quicklinks; } + set quicklinks(value = {}) { + Object.keys(value).forEach(key => { + this._quicklinks[key] = value[key]; + }); + } + show() { this.$.popover.parent = this.parent; this.$.popover.show();