Frontend
Masters
Industry Type

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 NameDescription
S NoSerial number
CodeIndustry type code
DescriptionIndustry type description
ActionsEdit and Delete options

Row Actions

ActionDescription
EditOpens Edit Industry Type page with pre-filled data
DeleteOpens 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 NameTypeMandatoryDescription
CodeText InputYesEnter unique industry type code
DescriptionText InputYesEnter industry type description

Actions

ActionBehavior
SaveValidates and saves the industry type
ResetClears all entered values
CancelReturns 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 NameEditable
CodeYes
DescriptionYes

Actions

ActionBehavior
UpdateSaves changes
CancelDiscards 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 NameData TypeDescriptionExample Value
descriptionStringSectors or industry name (Required).Manufacturing, IT Services
codeStringUnique industry classification code (Auto-generated).IND0015
companyIdObjectIdReference to the parent Company.60d8a...

2. Field Usage & System Impact

CategoryValidation / RuleSystem Behavior
Classificationdescription (Unique)Prevents duplicate industry sectors within the same company profile.
Automationpre-save hookIf code is empty, the system generates a sequential INDXXXX code.
ReferentialindustryTypeUsed 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:

  1. Search: The system identifies the maximum numeric suffix among existing codes matching IND\d{4}.
  2. Increment: It generates the next sequential number (e.g., IND0001IND0002).
  3. 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 /import endpoint maps the Excel Description column 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, and code for system synchronization.

C. Operational State

  • Soft-Delete: Uses the standard isDeleted.status flag. 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

EndpointMethodDescriptionParameters/Body
${INDUSTRYTYPEMASTER_URL}POSTCreate a new industry type masterBody: data
${INDUSTRYTYPEMASTER_URL}GETGet all industry type mastersQuery: page, limit
${INDUSTRYTYPEMASTER_URL}/searchGETSearch industry type mastersQuery: query
${INDUSTRYTYPEMASTER_URL}/:industryTypeMasterIdGETGet industry type master by IDPath: industryTypeMasterId
${INDUSTRYTYPEMASTER_URL}/:industryTypeMasterIdPATCHUpdate an existing industry type masterPath: industryTypeMasterId, Body: body
${INDUSTRYTYPEMASTER_URL}/delete/:industryTypeMasterIdPATCHDelete a industry type masterPath: industryTypeMasterId

RTK Query Hooks

The following hooks are available for frontend integration:

  • useCreateIndustryTypeMasterMutation
  • useGetAllIndustryTypeMastersQuery
  • useSearchIndustryTypeMastersQuery
  • useGetIndustryTypeMasterByIdQuery
  • useUpdateIndustryTypeMasterMutation
  • useDeleteIndustryTypeMasterMutation

End of Documentation