From b5acbd9beabb306ca21dd8ed4c0116069a69f743 Mon Sep 17 00:00:00 2001 From: Luca Haid Date: Mon, 13 Oct 2025 07:47:03 +0000 Subject: [PATCH] Update WarehouseShippingNoteModal.js --- .../WarehouseShippingNote/WarehouseShippingNoteModal.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/public/js/pages/WarehouseShippingNote/WarehouseShippingNoteModal.js b/public/js/pages/WarehouseShippingNote/WarehouseShippingNoteModal.js index 7f9f9b653..b1efb5bb8 100644 --- a/public/js/pages/WarehouseShippingNote/WarehouseShippingNoteModal.js +++ b/public/js/pages/WarehouseShippingNote/WarehouseShippingNoteModal.js @@ -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);