Merge branch 'master' into test
This commit is contained in:
commit
3fcb76246d
|
@ -8,6 +8,12 @@
|
|||
translate>
|
||||
Regularize stock
|
||||
</vn-item>
|
||||
<vn-item
|
||||
ng-click="clone.show()"
|
||||
name="cloneItem"
|
||||
translate>
|
||||
Clone
|
||||
</vn-item>
|
||||
</slot-menu>
|
||||
<slot-before>
|
||||
<div style="position: relative" text-center>
|
||||
|
@ -84,3 +90,9 @@
|
|||
<button response="accept" translate>Save</button>
|
||||
</tpl-buttons>
|
||||
</vn-dialog>
|
||||
<vn-confirm
|
||||
vn-id="clone"
|
||||
on-accept="$ctrl.onCloneAccept()"
|
||||
question="Do you want to clone this item?"
|
||||
message="All it's properties will be copied">
|
||||
</vn-confirm>
|
||||
|
|
|
@ -59,6 +59,11 @@ class Controller extends Descriptor {
|
|||
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}));
|
||||
}
|
||||
}
|
||||
|
||||
ngModule.vnComponent('vnItemDescriptor', {
|
||||
|
|
Loading…
Reference in New Issue