fix: Reset save button after error handling
feat: Clear review mode and revert to edit mode when navigating to next item feat: Implement close button functionality fix: Handle edge case with zero delivery notes feat: Add new type field with free text option fix: Enable cancellation reversal in WarehouseAdmin improve: Enhance article search autocomplete functionality
This commit is contained in:
@@ -188,4 +188,9 @@ input:disabled + .ios-switch-slider {
|
||||
.see-through-test-modal .modal {
|
||||
position: unset !important;
|
||||
background: unset !important;
|
||||
}
|
||||
}
|
||||
|
||||
.see-through-test-modal .btn-secondary {
|
||||
display:none;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,12 @@ window.TT_CONFIG["CRUD_CONFIG"]["additionalActions"] = [
|
||||
"class": "fas fa-ban text-danger",
|
||||
"condition": (row) => (window.TT_CONFIG['WAREHOUSE_ADMIN'] === '1' && ['new', 'in_progress', 'accepted'].includes(row.status)) || (row.status === 'new' && row.signature === null),
|
||||
},
|
||||
{
|
||||
"key": "status_to_new",
|
||||
"title": "Lieferschein wiedereröffnen",
|
||||
"class": "fas fa-redo-alt text-success",
|
||||
"condition": (row) => (window.TT_CONFIG['WAREHOUSE_ADMIN'] === '1' && row.status === 'cancelled'),
|
||||
},
|
||||
{
|
||||
"key": "add_log",
|
||||
"title": "Log Eintrag hinzufügen",
|
||||
@@ -294,8 +300,8 @@ Vue.component('warehouse-shipping-note-see-through', {
|
||||
<warehouse-shipping-note-modal v-if="currentRow" :id="currentRow.id" @close="fetchData" ref="modal"/>
|
||||
</div>
|
||||
<div v-if="activeTab === 'Logs'" style="flex: 1; overflow: auto;" class="see-through-test-modal">
|
||||
<warehouse-shipping-note-logs :shipping-note-id="currentRow.id"/>
|
||||
<add-log-modal-sn v-if="currentRow" :shipping-note-id="currentRow.id" @close="fetchData"/>
|
||||
<warehouse-shipping-note-logs :shipping-note-id="currentRow.id" :key="'logs' + logModalKey"/>
|
||||
<add-log-modal-sn v-if="currentRow" :shipping-note-id="currentRow.id" @close="logModalKey++" :key="'modal'+logModalKey"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -305,6 +311,7 @@ Vue.component('warehouse-shipping-note-see-through', {
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
logModalKey: 0,
|
||||
currentPage: 1,
|
||||
perPage: 1,
|
||||
rows: [],
|
||||
@@ -355,6 +362,10 @@ Vue.component('warehouse-shipping-note-see-through', {
|
||||
})
|
||||
|
||||
this.rows = response.data.rows;
|
||||
if (this.rows.length === 0) {
|
||||
this.$emit('close');
|
||||
this.window.notify('info', 'Keine Lieferscheine mit diesem Status gefunden');
|
||||
}
|
||||
|
||||
this.loading = false;
|
||||
}
|
||||
@@ -408,6 +419,7 @@ Vue.component('warehouse-shipping-note', {
|
||||
@status_to_invoiced="changeStatus($event.id, 'invoiced')"
|
||||
@status_to_on_hold="changeStatus($event.id, 'on_hold')"
|
||||
@status_to_cancelled="changeStatus($event.id, 'cancelled')"
|
||||
@status_to_new="changeStatus($event.id, 'new')"
|
||||
@add_log="addLogModalId = $event.id"
|
||||
@edit="shippingNoteModalId = $event.id"
|
||||
ref="table">
|
||||
|
||||
@@ -21,6 +21,13 @@ Vue.component('warehouse-shipping-note-modal', {
|
||||
textElements: [],
|
||||
hoursEntries: [],
|
||||
},
|
||||
availableTypes: [
|
||||
{text: 'Xinon Intern (XI)', value: 'XI'},
|
||||
{text: 'Xinon Hersteller (XH)', value: 'XH'},
|
||||
{text: 'Energie Steiermark (ESTMK)', value: 'ESTMK'},
|
||||
{text: 'Steirische Breitband- und Digitalinfrastrukturgesellschaft (SBIDI)', value: 'SBIDI'},
|
||||
{text: 'Verrechnen (V)', value: 'V'},
|
||||
],
|
||||
hoursLoading: false,
|
||||
geoAddr: '',
|
||||
selectedBillingAddress: '',
|
||||
@@ -108,6 +115,7 @@ Vue.component('warehouse-shipping-note-modal', {
|
||||
<template v-if="window.TT_CONFIG['WAREHOUSE_ADMIN'] == true">
|
||||
<hr>
|
||||
<tt-autocomplete v-model="shippingNote.billingAddressId" :api-url="billAddrAutoCompleteUrl" label="Rechnungsadresse" sm row/>
|
||||
<tt-autocomplete v-model="shippingNote.type" :items="availableTypes" label="Typ" sm row return-text/>
|
||||
</template>
|
||||
|
||||
<tt-textarea v-model="shippingNote.note" label="Art der Arbeit" sm row/>
|
||||
@@ -171,8 +179,14 @@ Vue.component('warehouse-shipping-note-modal', {
|
||||
methods: {
|
||||
async submit() {
|
||||
this.loading = true;
|
||||
if (!this.shippingNote.positions.length && !this.shippingNote.hoursEntries.length)
|
||||
if (!this.shippingNote.positions.length && !this.shippingNote.hoursEntries.length) {
|
||||
this.loading = false;
|
||||
return window.notify('error', 'Mindestens eine Position oder eine Stundenbuchung sind erforderlich');
|
||||
}
|
||||
|
||||
if (this.availableTypes.find(t => t.name === this.shippingNote.type)) {
|
||||
this.shippingNote.type = this.availableTypes.find(t => t.name === this.shippingNote.type).value;
|
||||
}
|
||||
|
||||
const response = await axios.post(`${window.TT_CONFIG["BASE_PATH"]}/WarehouseShippingNote/${this.id === 'create' ? 'create' : 'update'}`, this.shippingNote);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user