COMPANY
🏢 Technical Specification: Company Setup
📋 Feature Overview
🛠️ Technical Implementation
A. Permissions & Access Control
Note: Access is controlled via
PermissionGuard and UI directives.| Scope | Permission Code | Description & Page Usage |
|---|---|---|
| Menu Visibility | COMPANY.MENU |
Sidebar menu item
|
| Page |
COMPANY.LISTING |
Access to listing route.\listing-company |
| Page Routing | COMPANY.VIEW |
Access to add route.
|
|
Create Action |
COMPANY.CREATE |
Visibility of the Add + button. |
| View/Edit Access | COMPANY.VIEW |
Controls visibility of action buttons to navigate to edit page.\listing-company |
| Delete Action | COMPANY.DELETE |
Visibility of the Delete 🗑️ icon.\listing-company |
| Update/Edit Action | COMPANY.UPDATE |
Ability to save changes on Edit screen.\add-company-manage |
B. API Interaction
Base URL:
${environment.baseApiUrl}1. RetrieveListing Company List (Query)
Endpoint
Method
UsageFilter:
Params
:Filter:
: (Dependency Check - Movers)
Endpoint
/companies/update
Method
POST
Logic
Updates record setting .
\listing-company/companies/getQuery
POSTFilter:
\add-company-managecompanyName, description, remark, isDeleted=0/companies/companyUsers/getQuery
POST
companyId (Dependency Check - Users)Listing:/drivers/getQueryFetchesPOSTAdd/Manage:Used to check for Unique Company NameisDeleted=0(DuplicateDependencyCheck).Check - Drivers)
Filter: datafor the grid.
companyId, /movers/getQuery
POSTfilterisDeleted||$eq||companyId, isDeleted=0sort/tankers/getQuery
POSTFilter:
companyNamecompanyId, isDeleted=0 (Dependency Check - Tankers)/companies/update
POSTPurpose: Soft Delete (
isDeleted=true)2. DeleteAdd Company (Soft Delete)
\listing-companyisDeleted: true{ "id": Number, "isDeleted": true }
\add-company-manage/companies/getOne
GET
idFetch /companies/getQuery
Filter:
\add-company-managecompanyName (Uniqueness Check)/companies/create
POSTdataSource record/companies/update
dataSource record{ "companyName": "String", "description": "String", "remark": "String", "isInternal": Boolean }
C. Validation & Business Logic
1. Pre-Delete Dependency Checks \listing-company
Before allowing a delete, the system checks if the company is tied to active records in other modules.
| |||
| |||
| |||
|
2. Unique Name Validation \add-company-manage
Trigger:On Save (Create Mode Only)Logic:Calls/companies/getQuerywith filtercompanyName||$eq||{Input}Error:Blocking error: "Company name already exists".