diff --git a/application/WarehouseShippingNote/WarehouseShippingNoteController.php b/application/WarehouseShippingNote/WarehouseShippingNoteController.php index 9f3f390b4..e8181f742 100644 --- a/application/WarehouseShippingNote/WarehouseShippingNoteController.php +++ b/application/WarehouseShippingNote/WarehouseShippingNoteController.php @@ -384,7 +384,7 @@ class WarehouseShippingNoteController extends TTCrud { die(json_encode(['success' => true, 'id' => $timerecordingCar->id])); } } - die(json_encode(['success' => true, 'id' => 2])); + die(json_encode(['success' => true, 'status' => 'USER_NO_CAR'])); } diff --git a/public/js/pages/WarehouseShippingNote/WarehouseShippingNoteModal.js b/public/js/pages/WarehouseShippingNote/WarehouseShippingNoteModal.js index 4df50e00f..47813c404 100644 --- a/public/js/pages/WarehouseShippingNote/WarehouseShippingNoteModal.js +++ b/public/js/pages/WarehouseShippingNote/WarehouseShippingNoteModal.js @@ -97,6 +97,10 @@ Vue.component('warehouse-shipping-note-modal-hours-entry', { }, async updateCarId() { const response = await axios.get(window.TT_CONFIG["BASE_PATH"] + '/WarehouseShippingNote/timerecordingCarForUser?userId=' + this.userId); + if (response.data.status === 'USER_NO_CAR') { + this.window.notify('info', 'Kein zugewiesenes Fahrzeug gefunden'); + return; + } this.carId = response.data.id; }, updateDate() {