Industry Type Master
Navigation Path
Company → Masters → Industry Type Master
1. Industry Type List Page
URL
/masters/industry-type-master
Page Description
- Displays a list of all industry types configured in the system
- Provides actions to add, edit, and delete industry type records
List Table Columns
| Column Name | Description |
|---|---|
| S No | Serial number |
| Code | Industry type code |
| Description | Industry type description |
| Actions | Edit and Delete options |
Row Actions
| Action | Description |
|---|---|
| Edit | Opens Edit Industry Type page with pre-filled data |
| Delete | Opens delete confirmation alert |
2. Add Industry Type Page
Triggered From
Industry Type List Page → Add Industry Type button
Page Description
- Allows admins to create a new industry type
- Used for classifying organizations or units based on industry category
Add Industry Type – Fields
| Field Name | Type | Mandatory | Description |
|---|---|---|---|
| Code | Text Input | Yes | Enter unique industry type code |
| Description | Text Input | Yes | Enter industry type description |
Actions
| Action | Behavior |
|---|---|
| Save | Validates and saves the industry type |
| Reset | Clears all entered values |
| Cancel | Returns to Industry Type List page |
Validation Rules
- Code is mandatory
- Description is mandatory
- Duplicate codes are not allowed
3. Edit Industry Type Page
Triggered From
Industry Type List Page → Edit icon
Page Description
- Allows updating existing industry type details
- All fields are pre-filled with saved data
Editable Fields
| Field Name | Editable |
|---|---|
| Code | Yes |
| Description | Yes |
Actions
| Action | Behavior |
|---|---|
| Update | Saves changes |
| Cancel | Discards changes and navigates back |
4. Delete Industry Type Confirmation Alert
Triggered From
Industry Type List Page → Delete icon
Alert Content
- Confirmation message before deletion
Actions:
- Confirm / Yes → Deletes the industry type
- Cancel → Closes the alert without action
Delete Behavior
- Industry type is removed permanently after confirmation
- If the industry type is mapped to other records, deletion may be restricted
Field Definitions, Usage, and Calculation Logic
This section provides a technical analysis of the Industry Type Master's data structure and its role in organizational classification.
1. Field Definitions
| Field Name | Data Type | Description | Example Value |
|---|---|---|---|
description | String | Sectors or industry name (Required). | Manufacturing, IT Services |
code | String | Unique industry classification code (Auto-generated). | IND0015 |
companyId | ObjectId | Reference to the parent Company. | 60d8a... |
2. Field Usage & System Impact
| Category | Validation / Rule | System Behavior |
|---|---|---|
| Classification | description (Unique) | Prevents duplicate industry sectors within the same company profile. |
| Automation | pre-save hook | If code is empty, the system generates a sequential INDXXXX code. |
| Referential | industryType | Used in Client Master and Lead Management for market segmentation. |
3. Business & Calculation Logic
The Industry Type Master provides high-level categorization with the following system logic:
A. Automated Code Generation
A pre-save hook ensures data consistency for codes:
- Search: The system identifies the maximum numeric suffix among existing codes matching
IND\d{4}. - Increment: It generates the next sequential number (e.g.,
IND0001→IND0002). - Safe-Guard: It performs up to 100 collision checks to ensure the generated code is truly unique before final commit.
B. Bulk Operations
- Import: The
/importendpoint maps the ExcelDescriptioncolumn to the database. If a record with the same description exists, it updates the code; otherwise, it triggers a new entry with auto-generated code logic. - Export: Generates standard Excel reports including the internal
_id,description, andcodefor system synchronization.
C. Operational State
- Soft-Delete: Uses the standard
isDeleted.statusflag. Records remain in the database to prevent "orphan" references in client or vendor documents but are hidden from the active UI.
The Industry Type Master module interacts with the following API endpoints:
Base URL
export const INDUSTRYTYPEMASTER_URL = '/api/industryTypeMaster'
Endpoints
| Endpoint | Method | Description | Parameters/Body |
|---|---|---|---|
${INDUSTRYTYPEMASTER_URL} | POST | Create a new industry type master | Body: data |
${INDUSTRYTYPEMASTER_URL} | GET | Get all industry type masters | Query: page, limit |
${INDUSTRYTYPEMASTER_URL}/search | GET | Search industry type masters | Query: query |
${INDUSTRYTYPEMASTER_URL}/:industryTypeMasterId | GET | Get industry type master by ID | Path: industryTypeMasterId |
${INDUSTRYTYPEMASTER_URL}/:industryTypeMasterId | PATCH | Update an existing industry type master | Path: industryTypeMasterId, Body: body |
${INDUSTRYTYPEMASTER_URL}/delete/:industryTypeMasterId | PATCH | Delete a industry type master | Path: industryTypeMasterId |
RTK Query Hooks
The following hooks are available for frontend integration:
useCreateIndustryTypeMasterMutationuseGetAllIndustryTypeMastersQueryuseSearchIndustryTypeMastersQueryuseGetIndustryTypeMasterByIdQueryuseUpdateIndustryTypeMasterMutationuseDeleteIndustryTypeMasterMutation
End of Documentation