Merge branch 'master' into test
This commit is contained in:
commit
3fcb76246d
|
@ -8,6 +8,12 @@
|
||||||
translate>
|
translate>
|
||||||
Regularize stock
|
Regularize stock
|
||||||
</vn-item>
|
</vn-item>
|
||||||
|
<vn-item
|
||||||
|
ng-click="clone.show()"
|
||||||
|
name="cloneItem"
|
||||||
|
translate>
|
||||||
|
Clone
|
||||||
|
</vn-item>
|
||||||
</slot-menu>
|
</slot-menu>
|
||||||
<slot-before>
|
<slot-before>
|
||||||
<div style="position: relative" text-center>
|
<div style="position: relative" text-center>
|
||||||
|
@ -84,3 +90,9 @@
|
||||||
<button response="accept" translate>Save</button>
|
<button response="accept" translate>Save</button>
|
||||||
</tpl-buttons>
|
</tpl-buttons>
|
||||||
</vn-dialog>
|
</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.warehouseFk = null;
|
||||||
this.quantity = 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', {
|
ngModule.vnComponent('vnItemDescriptor', {
|
||||||
|
|
Loading…
Reference in New Issue