Skip to main content

EKAJAYA - MOVER

🚛 Technical Specification: Mover Setup


📋 Feature Overview

AttributeDetail
Module📂 Directory (MOVER)
Feature NameMover Management (Prime Movers)
DescriptionManages fleet of prime movers (truck heads). Tracks vehicle ID, specs, and compliance expiry dates (Road Tax, Permits).
User Guide📄 [Ekajaya Admin User Guide - Directory Module, Section 3]

đŸ•šī¸ Functional Workflow

  • 📍 Navigation  Go to Directory > Mover 
  • đŸ‘ī¸ Listing View Paginated list displaying Plate No, Model, Permit Owner, BDM, and expiry dates.
  • ➕ Add Action Click the + button to register a new mover.
  • âœī¸ Edit Action Click the Pencil icon to modify vehicle details or renew permits.
  • đŸ—‘ī¸ Delete Action Click the Trash icon to remove a mover (validation required).

đŸ› ī¸ Technical Implementation

A. Permissions & Access Control

Note: Access is controlled via PermissionGuard and component-level checks.
ScopePermission CodeDescription
Menu VisibilityMOVER.MENUSidebar menu visibility.
Page AccessMOVER.LISTINGAccess to /listing-mover-manage.
Create ActionMOVER.UPDATEControls the + Add button on listing.
View AccessMOVER.VIEWAccess to /add-mover-manage.
Edit/Save ActionMOVER.UPDATEAbility to save changes.
Delete ActionMOVER.DELETEVisibility of the Delete đŸ—‘ī¸ icon.

B. API Interaction

Base URL: ${environment.baseApiUrl}
1. Retrieve Mover List
Endpoint
/movers/getQuery
Method
POST
Key Params
filter: isDeleted||$eq||0 (plus dynamic filters).
join: vehicleBrand, company
2. Get Single Mover (Edit Mode)
Endpoint
/movers/getQuery
Method
POST
Query Params
filter: id||$eq||{id}
limit: 1
3. Create/Update Mover
Create EP
/movers/create
Update EP
/movers/update
Method
POST
{
  "companyId": Number,
  "plateNo": "String",
  "vehicleBrandId": Number,
  "model": "String",
  "chassisNumber": "String",
  "bdm": "String",
  "spadPermitOwner": "String",
  "malaysiaRoadTaxExpiry": "yyyy-MM-dd",
  "isDeleted": 0
}
4. Delete Mover
Endpoint
/movers/update
Method
POST
{ "id": Number, "isDeleted": true }
5. Helper APIs (Dropdowns)
Companies
/companies/getQuery
POST
Vehicle Brands
/vehicleBrands/getQuery
POST
Permit Owners
/settings/getQuery (type="SPAD Permit Owner")
POST
Gear Box Types
/settings/getQuery (type="Gear Box Type")
POST

C. Validation & Business Logic

1. Unique Plate Number Validation

  • Trigger: On Save.
  • Logic: Calls /movers/getQuery. Filter: plateNo||$eq||{input}.
  • Error: Blocking error: "Mover plate number already exists".

2. Dependency Checks (Pre-Delete)

Before deleting a mover, the system ensures it is not assigned to an active Carrier.

ModuleEndpointFilter LogicMethod
🚛 Carriers/carriers/getQuerymoverIdPOST
Error: "Unable to delete Mover due to tagging to carrier."

3. Date Formatting

  • Library: Luxon (DateTime).
  • Logic: Before saving, all date fields (malaysiaRoadTaxExpiry, etc.) are converted to standard yyyy-MM-dd format.