Add vehicle management features in Falukant
- Introduced vehicle types and transport management in the backend, including new models and associations for vehicles and transports. - Implemented service methods to retrieve vehicle types and handle vehicle purchases, ensuring user validation and transaction management. - Updated the FalukantController and router to expose new endpoints for fetching vehicle types and buying vehicles. - Enhanced the frontend with a new transport tab in BranchView, allowing users to buy vehicles, and added localization for vehicle-related terms. - Included initialization logic for vehicle types in the database setup.
This commit is contained in:
@@ -181,6 +181,12 @@ class FalukantController {
|
||||
});
|
||||
});
|
||||
|
||||
this.getVehicleTypes = this._wrapWithUser((userId) => this.service.getVehicleTypes(userId));
|
||||
this.buyVehicles = this._wrapWithUser(
|
||||
(userId, req) => this.service.buyVehicles(userId, req.body),
|
||||
{ successStatus: 201 }
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user