Skip to main content

EKAJAYA

🏭 Technical Specification: Supplier Setup


📋 Feature Overview

AttributeDetail
Module📂 Directory (SUPPLIER)
Feature NameSupplier Profile Management
DescriptionManages supplier profiles including general details, contact information, address logic (Country/State/District), and associated pickup addresses.
User Guide📄 [Ekajaya Admin User Guide - Directory Module, Section 6]

💼 Functional Workflow

  • 📍 Navigation  Go to Directory > Supplier 
  • 👁️ Listing View Paginated list displaying Supplier Code, Name, and Registration Number.
  • ➕ Add Action Click the + button to create a new supplier. Requires entering a list of Pickup Addresses.
  • ✏️ Edit Action Click the Pencil icon on a row to modify details.
  • 🗑️ Delete Action Click the Trash icon to remove a supplier.

🛠️ Technical Implementation

A. Permissions & Access Control

Note: Access is controlled via PermissionGuard and template checks.
ScopePermission CodeDescription
Menu VisibilitySUPPLIER.MENUSidebar menu visibility.
Page AccessSUPPLIER.LISTINGAccess to /listing-supplier-profile.
View/Edit AccessSUPPLIER.VIEWAccess to /add-supplier-profile-manage.
Create ActionSUPPLIER.CREATEVisibility of the + Add button.
Update ActionSUPPLIER.UPDATEAbility to save changes on Edit screen.
Delete ActionSUPPLIER.DELETEVisibility of the Delete 🗑️ icon.

B. API Interaction

Base URL: ${environment.baseApiUrl}
1. Retrieve Supplier List
Endpoint
/suppliers/getQuery
Method
POST
Purpose
Fetches paginated data for the grid.
Params
filter: isDeleted||$eq||0 (plus dynamic search).
sort: supplierCode
2. Get Single Supplier (Edit Mode)
Endpoint
/suppliers/getQuery
Method
POST
Params
filter: id||$eq||{id}
limit: 1
Note: Uses getQuery with limit 1, not getOne.
3. Create Supplier
Endpoint
/suppliers/mdCreate
Method
POST
{
  "supplierCode": "String",
  "supplierName": "String",
  "pickupAddressList": [ ... ],
  "countryId": Number,
  "stateId": Number,
  "districtId": Number,
  "isCima": Boolean
}
4. Update Supplier
Endpoint
/suppliers/mdUpdate
Method
POST
Payload is same as Create, but includes "id": Number.
5. Delete Supplier
Endpoint
/supplier/delete
Method
POST
{
  "id": Number
}
6. Helper APIs (Dropdowns)
Countries
/countries/getQuery
States
/states/getQuery (countryId filter)
Districts
/districts/getQuery (stateId filter)

C. Validation & Business Logic

1. Unique Code Validation

  • Trigger: On Save.
  • Logic: Calls /suppliers/getQuery with filter supplierCode||$eq||{inputCode}.
  • Error: Blocking error: "Supplier code already exists".

2. Pickup Address Validation

  • Trigger: On Save.
  • Logic: Checks this.dataSource.pickupAddressList.
  • Condition: If the list is null or length is 0.
  • Error: "Please add pickup address".