Add bulk vehicle repair functionality in Falukant module
- Implemented a new repairAllVehicles method in FalukantService to handle the repair of multiple vehicles at once, including cost calculation and precondition checks. - Updated FalukantController to expose the repairAllVehicles endpoint, allowing users to initiate bulk repairs via the API. - Enhanced FalukantRouter to include a new route for bulk vehicle repairs. - Modified BranchView component to add UI elements for repairing all vehicles, including a dialog for confirmation and displaying repair details. - Updated German localization files to include translations related to bulk vehicle repair actions, improving user experience for German-speaking users.
This commit is contained in:
@@ -221,6 +221,10 @@ class FalukantController {
|
||||
(userId, req) => this.service.repairVehicle(userId, req.params.vehicleId),
|
||||
{ successStatus: 200 }
|
||||
);
|
||||
this.repairAllVehicles = this._wrapWithUser(
|
||||
(userId, req) => this.service.repairAllVehicles(userId, req.body.vehicleIds),
|
||||
{ successStatus: 200 }
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user