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