Update WarehouseShippingNote.js
This commit is contained in:
@@ -284,7 +284,7 @@ Vue.component('warehouse-shipping-note-see-through', {
|
||||
<div style="margin-top: 20px;" v-if="currentRow">
|
||||
<template v-for="action in window.TT_CONFIG.CRUD_CONFIG.additionalActions">
|
||||
<template v-if="typeof action.condition === 'function' ? action.condition(currentRow) : true && action.key !== 'add_log' && action.key !== 'print'">
|
||||
<i @click="changeStatus('status_to_' + action.key, currentRow)" :class="action.class" style="font-size: 20px; cursor: pointer; margin-right: 10px;"></i>
|
||||
<i @click="changeStatus(action.key, currentRow)" :class="action.class" style="font-size: 20px; cursor: pointer; margin-right: 10px;"></i>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
@@ -342,7 +342,7 @@ Vue.component('warehouse-shipping-note-see-through', {
|
||||
}
|
||||
},
|
||||
async changeStatus(action, row) {
|
||||
this.$emit('status_to_' + action, row);
|
||||
this.$emit(action, row);
|
||||
await new Promise(resolve => setTimeout(resolve, 50));
|
||||
await this.fetchData();
|
||||
},
|
||||
@@ -369,14 +369,16 @@ Vue.component('warehouse-shipping-note', {
|
||||
//language=Vue
|
||||
template: `
|
||||
<tt-card>
|
||||
<warehouse-shipping-note-see-through @close="shippingNoteSeeThrough = false" v-if="shippingNoteSeeThrough !== false" :wanted-state="shippingNoteSeeThrough"
|
||||
@status_to_progress="changeStatus($event.id, 'in_progress')"
|
||||
@status_to_new="changeStatus($event.id, 'new')"
|
||||
@status_to_on_hold="changeStatus($event.id, 'on_hold')"
|
||||
@status_to_cancelled="changeStatus($event.id, 'cancelled')"
|
||||
@status_to_invoiced="changeStatus($event.id, 'invoiced')"
|
||||
@status_to_accepted="changeStatus($event.id, 'accepted')"/>
|
||||
/>
|
||||
<warehouse-shipping-note-see-through
|
||||
@close="shippingNoteSeeThrough = false"
|
||||
v-if="shippingNoteSeeThrough !== false"
|
||||
:wanted-state="shippingNoteSeeThrough"
|
||||
@status_to_progress="changeStatus($event.id, 'in_progress')"
|
||||
@status_to_new="changeStatus($event.id, 'new')"
|
||||
@status_to_on_hold="changeStatus($event.id, 'on_hold')"
|
||||
@status_to_cancelled="changeStatus($event.id, 'cancelled')"
|
||||
@status_to_invoiced="changeStatus($event.id, 'invoiced')"
|
||||
@status_to_accepted="changeStatus($event.id, 'accepted')"/>
|
||||
<warehouse-shipping-note-modal v-if="shippingNoteModalId" :id="shippingNoteModalId"
|
||||
@close="shippingNoteModalId = null;$refs.table.$refs.table.refreshTable()"
|
||||
@open-signing-modal="signingShippingNoteId = $event"/>
|
||||
|
||||
Reference in New Issue
Block a user