- Disabled default Car being ID:2

- Showing Message if User has no default car
This commit is contained in:
Luca Haid
2024-11-13 18:16:11 +01:00
parent 78a0019564
commit c393d8e6a1
2 changed files with 5 additions and 1 deletions

View File

@@ -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']));
}

View File

@@ -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() {