New Trade License Application

Objective

The trade license 'apply' is the major feature in TL Module. It allows Citizen or Counter Employee to create TL Applications for the current financial year.

Every application is a part of the workflow.

Once the user login with TL_CEMP Role, then the User will get the option for creating New TL Application in the TL card and as well as in the inbox..

 

File path: https://github.com/egovernments/DIGIT-Dev/blob/master/frontend/micro-ui/web/micro-ui-internals/packages/modules/tl/src/components/TLCard.js and https://github.com/egovernments/DIGIT-Dev/blob/master/frontend/micro-ui/web/micro-ui-internals/packages/modules/tl/src/components/inbox/DesktopInbox.js

Clicking of New Application it navigates to the New Trade License Application screen.

Route: https://qa.digit.org/digit-ui/employee/tl/new-application

File Path: https://github.com/egovernments/DIGIT-Dev/blob/master/frontend/micro-ui/web/micro-ui-internals/packages/modules/tl/src/pages/employee/NewApplication/index.js

 

TL Enhanced Flow :

If the user selects Movable as the structure type, then the commonPT search property incorporation and Building Name in Trade address component as well as “Same as Property Owner’s” check box in owner details component will not be visible.

If the user selects Immovable as the structure type then user is allowed to add the property details, Once property is added, Trade address details will get auto populated and disabled, where as for owner details “Same as Property Owner’s” checkbox will be there, if selected, the data will get auto populated and frozen.

Release 2.8 Enhancements & Changes:

In the Trade Units page, values for trade type and trade subtype has been loaded by the following MDMS call :

const { isLoading, data: Data = {} } = Digit.Hooks.tl.useTradeLicenseMDMS(stateId, "TradeLicense", "TradeUnits", "[?(@.type=='TL')]");

Following Validation has been added for the same :

Users when select trade type and then subtype, it compared with the available billing slab for which the hook has been mentioned below, and if the billing slab is not there it wont allow users to move forward and error will get displayed.

const { data: billingSlabTradeTypeData, isLoading : isBillingSlabLoading } = Digit.Hooks.tl.useTradeLicenseBillingslab({ tenantId: tenantId, filters: {} }, { select: (data) => { return data?.billingSlab.filter((e) => e.tradeType && e.applicationType === "NEW" && e.licenseType === "PERMANENT" && e.uom); }});

once the right trade type and subtype is added, and correct billing slab is there, then for the UOM value validation is added, it will check the value in the given range, mentioned in the billing slab object and displays the error if the value is outside of the range.

 

Technical Implementation Details:

Initial MDMS call is being made on page load like old UI.

Mdms data :

Structure Type and Sub Structure Type field data is fetched from https://github.com/egovernments/egov-mdms-data/blob/master/data/pb/common-masters/StructureType.json

Trade Category , Trade Type , Trade Sub Type field data is fetched from https://github.com/egovernments/egov-mdms-data/blob/master/data/pb/TradeLicense/TradeType.json

Mohalla Data - https://github.com/egovernments/egov-mdms-data/blob/master/data/pb/amritsar/egov-location/boundary-data.json (For Amritsar)

Accessories - https://github.com/egovernments/egov-mdms-data/blob/master/data/pb/TradeLicense/AccessoriesCategory.json

Type of Ownership and Type of Sub ownership - https://github.com/egovernments/egov-mdms-data/blob/master/data/pb/common-masters/OwnerShipCategory.json https://github.com/egovernments/egov-mdms-data/blob/master/data/pb/common-masters/OwnerType.json

documents: https://github.com/egovernments/egov-mdms-data/blob/master/data/pb/TradeLicense/documentObj.json

 

Data fetch , load and render :

Acknowledgement screen:

 

After Success of create and update calls, will route to acknowledgement screen.

File Path: https://github.com/egovernments/DIGIT-Dev/blob/master/frontend/micro-ui/web/micro-ui-internals/packages/modules/tl/src/utils/getTLAcknowledgementData.js

 

ROLE ACTION MAPPING

API

ROLES

ACTION ID

API

ROLES

ACTION ID

1

/egov-mdms-service/v1/_search

TL_CEMP

954

2

/tl-services/v1/_create

TL_CEMP

1685

3

/tl-services/v1/_update

TL_CEMP

1686

4

/tl-calculator/billingslab/_search

TL_CEMP

1684