Update WarehouseShippingNoteModal.js

This commit is contained in:
Luca Haid
2025-10-13 07:47:03 +00:00
parent 20338e57fd
commit b5acbd9bea

View File

@@ -260,13 +260,10 @@ Vue.component('warehouse-shipping-note-modal', {
return window.notify('error', 'Mindestens eine Position oder eine Stundenbuchung sind erforderlich');
}
if (this.availableTypes.find(t => t.text === this.shippingNote.type)) {
this.shippingNote.type = this.availableTypes.find(t => t.name === this.shippingNote.type).value;
}
const foundType = this.availableTypes.find(t => t.text === this.shippingNote.type);
if (foundType) this.shippingNote.type = foundType?.value;
if (newStatus !== null) {
this.shippingNote.status = newStatus;
}
if (newStatus !== null) this.shippingNote.status = newStatus;
const response = await axios.post(`${window.TT_CONFIG["BASE_PATH"]}/WarehouseShippingNote/${this.id === 'create' ? 'create' : 'update'}`, this.shippingNote);