Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Joan Sanchez 2020-06-01 13:32:35 +02:00
commit 3d8bc3b7b4
3 changed files with 13 additions and 2 deletions

View File

@ -84,3 +84,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>

View File

@ -60,6 +60,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', {

View File

@ -23,7 +23,7 @@ module.exports = app => {
for (const ticket of tickets) { for (const ticket of tickets) {
try { try {
await db.rawSql(`CALL vn.ticketClosureTicket(:ticketId)`, { await db.rawSql(`CALL vn.ticket_closeByTicket(:ticketId)`, {
ticketId: ticket.id ticketId: ticket.id
}); });