EKAJAYA - CLIENT
đĨ Technical Specification: Client Setup
đ Feature Overview
đšī¸ Functional Workflow
đ ī¸ Technical Implementation
A. Permissions & Access Control
Note: Access is controlled via
PermissionGuard and template checks.| Scope | Permission Code | Description |
|---|---|---|
| Menu Visibility | CLIENT.MENU |
Sidebar menu visibility. |
| Page Access | CLIENT.LISTING |
Access to /listing-client-profile. |
| View/Edit Access | CLIENT.VIEW |
Access to /add-client-profile-manage. |
| Create Action | CLIENT.CREATE |
Visibility of the + Add button. |
| Update Action | CLIENT.UPDATE |
Ability to save changes on Edit screen. |
| Delete Action | CLIENT.DELETE |
Visibility of the Delete đī¸ icon. |
B. API Interaction
Base URL:
${environment.baseApiUrl}1. Retrieve Client List
Endpoint
/clients/getQuery
Method
POST
Key Params
filter: isDeleted||$eq||0 (plus search).sort: clientName2. Get Single Client (Edit Mode)
Endpoint
/clients/getQuery
Method
POST
Query Params
filter: id||$eq||{id}join: deliveryAddressList, deliveryAddressList.district...3. Create Client (Master-Detail)
Endpoint
/clients/mdCreate
Method
POST
{
"clientCode": "String",
"clientName": "String",
"deliveryAddressList": [ ... ],
"clientType": "String",
"countryId": Number
}
4. Update Client
Endpoint
/clients/mdUpdate
Method
POST
Payload is same as Create, but includes "id": Number.
5. Delete Client
Endpoint
/client/delete
Method
POST
{ "id": Number }
6. Assign User Functionality
Dialog
AssignUserDialog
POST
Check Link
/clientUsers/getQuery (clientId filter)
POST
Available Users
/users/getQuery
POST
Create/Update
/clientUsers/create OR /update
POST
C. Validation & Business Logic
1. Unique Code Validation
- Trigger: On Save.
- Logic: Calls
/clients/getQuery. Filter:clientCode||$eq||{inputCode}. - Error: Blocking error: "Client code already exists".
2. Delivery Address Validation
- Trigger: On Save.
- Logic: Checks
this.dataSource.deliveryAddressList. - Error: If list is null or empty: "Please add delivery address".
3. User Assignment Logic
Ensures a client can be linked to a system user (User ID) for Client Portal login.
- Behavior: If a link exists, it updates the record in
client_userstable; otherwise, it creates a new record.