EKAJAYA - DRIVER
đđ Technical Specification: Driver Setup
đ Feature Overview
đšī¸ Functional Workflow
đ ī¸ Technical Implementation
A. Permissions & Access Control
Note: Access is granular,controlled separatingvia generaldriverand infocomponent-level from sensitive bank info.checks.
PermissionGuard | Scope | Permission Code | Description |
|---|---|---|
| Menu Visibility | DRIVER.MENU |
Sidebar menu visibility. |
DRIVER.LISTING |
Access to /listing-driver-manage. |
|
DRIVER.UPDATE |
Controls |
|
| View |
DRIVER. | |
| ||
|
Access to /add-driver-. |
|
| Edit/Save Action | DRIVER.UPDATE |
Ability to save changes. |
| Delete Action | DRIVER.DELETE |
Visibility of the Delete đī¸ icon. |
| Bank Info |
DRIVER_BANK_INFO.VIEW |
Visibility of the Bank icon. |
| Bank Info Update | DRIVER_BANK_INFO.UPDATE |
Ability to |
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: companyfilter2. CreateGet 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-yyyy-MM-DD"dd",
"gdlExpiryDate": "YYYY-yyyy-MM-DD"dd",
"isConnected"isDeleted": false0
}
/drivers/driverBankInfos/getQuery (filter: driverId)
Create/Update
/driverBankInfos/create OR /update
Method
POST
activateUser()/drivers/update{ "driverId": Number }
{
"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. Pre-DeleteDependency CheckChecks (Carrier Tagging)Pre-Delete)
Before deleting,deleting a driver, the system checksensures ifthey theare driver isnot assigned to aan Carrieractive (Truck).Carrier.
Endpoint:Module Endpoint Filter Logic đ Carriers /carriers/getQueryFilter:driverId driverId||$eq||{id};isDeleted||$eq||0
Error: "Unable to delete Driver due to tagging to carrier."
3. DateMandatory FormattingBank Fields
When adding Bank Info, the following are strictly required:
Library:âĸLuxon (DateTime).accountCodeLogic:Frontend converts UI date objects toâĸyyyy-MM-ddbankBeneficiaryName- âĸ
formatbankBeneficiaryNric - âĸ
sendingbankBeneficiaryAccountNo - âĸ
the API.driverBeneficiaryRelationship