EKAJAYA - DRIVER
đˇđŧ Technical Specification: Driver Setup
đ Feature Overview
đšī¸ Functional Workflow
đ ī¸ Technical Implementation
A. Permissions & Access Control
Note: Access is controlled via
PermissionGuard and component-level checks.| Scope | Permission Code | Description |
|---|---|---|
| Menu Visibility | DRIVER.MENU |
Sidebar menu visibility. |
| Page Access | DRIVER.LISTING |
Access to /listing-driver-manage. |
| Create Action | DRIVER.UPDATE |
Controls the + Add button on listing. |
| View Access | DRIVER.VIEW |
Access to /add-driver-manage. |
| Edit/Save Action | DRIVER.UPDATE |
Ability to save changes. |
| Delete Action | DRIVER.DELETE |
Visibility of the Delete đī¸ icon. |
| Bank Info Access | DRIVER_BANK_INFO.VIEW |
Visibility of the Bank icon. |
| Bank Info Update | DRIVER_BANK_INFO.UPDATE |
Ability to save bank details. |
B. API Interaction
Base URL:
${environment.baseApiUrl}1. Retrieve Driver List
Endpoint
/drivers/getQuery
Method
POST
Key Params
filter: isDeleted||$eq||0 (plus fullName/companyId).join: company2. Get Single Driver (Edit Mode)
Endpoint
/drivers/getQuery
Method
POST
Query Params
filter: id||$eq||{id}join: user, district, district.state3. Create/Update Driver Profile
Create
/drivers/create
Update
/drivers/update
Method
POST
{
"companyId": Number,
"fullName": "String",
"identificationNumber": "String",
"nationality": "String",
"mobileNumber": "String",
"drivingLicenseClass": "String",
"licenseExpiryDate": "yyyy-MM-dd",
"gdlExpiryDate": "yyyy-MM-dd",
"isDeleted": 0
}
4. Manage Bank Info (Sub-Page)
Get Info
/driverBankInfos/getQuery (filter: driverId)
Create/Update
/driverBankInfos/create OR /update
Method
POST
{
"driverId": Number,
"accountCode": "String",
"bankBeneficiaryName": "String",
"bankBeneficiaryNric": "String",
"bankBeneficiaryAccountNo": "String",
"driverBeneficiaryRelationship": "String"
}
5. User Activation (Driver App Access)
Create User
/admin/createUser
Link User
/drivers/update (Updates driver with returned userId)
Detach User
/driver/detachDriver (Payload: { driverId })
Method
POST
6. Delete Driver
Endpoint
/drivers/update
Method
POST
{ "id": Number, "isDeleted": true }
7. Helper APIs (Dropdowns)
Companies
/companies/getQuery
Nationalities
/settings/getQuery (Type: Nationality)
Relationships
/settings/getQuery (Type: Driver Beneficiary Relation)
Address
/countries/getQuery, /states/getQuery, /districts/getQuery
Method
POST
C. Validation & Business Logic
1. Unique ID Validation
- Trigger: On Save.
- Logic: Calls
/drivers/getQuery. Filter:identificationNumber||$eq||{inputID};isDeleted||$eq||0. - Error: "Driver identification number already exists".
2. Dependency Checks (Pre-Delete)
Before deleting a driver, the system ensures they are not assigned to an active Carrier.
| Module | Endpoint | Filter Logic |
|---|---|---|
| đ Carriers | /carriers/getQuery |
driverId |
Error: "Unable to delete Driver due to tagging to carrier."
3. Mandatory Bank Fields
When adding Bank Info, the following are strictly required:
- âĸ
accountCode - âĸ
bankBeneficiaryName - âĸ
bankBeneficiaryNric - âĸ
bankBeneficiaryAccountNo - âĸ
driverBeneficiaryRelationship