Apply TradeLicence
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.
Stepper 1:
When user tries to create new TradeLicence, a popup comes upfront before navigating to the creation form. This popup tells about documents required to upload in the process so that user can collect those in advance.
This popup data is configurable in MDMS. On clicking Apply a MDMS call is made to get the required document information. This information is passed to the Popup.
An Apply button is located at the footer of this popup. Users can proceed to fill a new TradeLicence application on the clicking of this apply button. The code related to this popup is written in the apply.js file. below is the link to the file. This popup is integrated in search.js file please refer the below link and below image code.
In this configuration we need are triggering also from the side menu and quick action so for this cases we need a mdms configuration please refer the below mdms file.
link:https://github.com/egovernments/punjab-mdms-data/blob/master/data/pb/ACCESSCONTROL-ACTIONS-TEST/actions-test.json
please check the below image for the mdms config to trigger the ashocDialog for the quick action and side menu action click.
Below is the MDMS call configuration is in the beforeInitScreen
method of the search page you have to import the common util method of getRequiredDocData
from the common.js file and has to call from the beforeInitScreen
with the required document as mention in the image below.
Â
Stepper 2:
https://egov-micro-qa.egovernments.org/employee/tradelicence/apply?tenantId=pb.amritsar
All the drop down data are mapped through mdms response.
For to display MDMS data we have common container in UI Framework ( “DynamicMdmsContainer
“ ).
In Trade License : We used common container for Trade Category , Trade Type , Trade Sub Type , Structure Type and Sub Structure Type, Ownership , and Sub Ownership .
Sample JSON for Structure Type and Sub Structure Type :
dynamicMdmsStructureType : {
      uiFramework: "custom-containers",
      componentPath: "DynamicMdmsContainer",
      props: {
        dropdownFields: [
          {
            key : 'structureType',
            isDisabled:getQueryArg(window.location.href, "action") === "EDITRENEWAL"? true:false
          },
          {
            key : 'structureSubType',
            callBack : structureSubTypeChange
          }
        ],
        moduleName: "common-masters",
        masterName: "StructureType",
        rootBlockSub : 'structureTypes',
        callBackEdit: updateStructureTypes
      }
    }
Example :
jsonPath , sourceJsonPath are created as a dynamic in ( “DynamicMdmsContainer
“ ) based on module name and rootBlockSub , Key .
jsonPath is used to store the data in specified path when clicking event triggers or on handleFieldChange.
sourceJsonPath is the path where the data is fetched to populate in the dropdown.
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
Â
Stepper 3:
Type of Ownership and Type of Subownership - 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
The owner data is fetchedd once the Mobile Number field is filled and made a search call on user-service.
Apply Footer
The Next and Previous buttons are configured this son file.
Tradelicence create call is triggered on 2nd stepper’s Next button onclick().
Â
Stepper 4 :
Mdms data : https://github.com/egovernments/egov-mdms-data/blob/master/data/pb/TradeLicense/documentObj.json
The data formatting logic is as shown below. getDocList(state, dispatch);
in https://github.com/egovernments/frontend/blob/master/web/rainmaker/dev-packages/egov-tradelicence-dev/src/ui-config/screens/specs/utils/index.js
Â
Stepper 5 :
This is the Review/Summary screen - https://github.com/egovernments/frontend/blob/master/web/rainmaker/dev-packages/egov-tradelicence-dev/src/ui-config/screens/specs/tradelicence/applyResource/tradeReviewDetails.js
Update TradeLicence API - tl-services/v1/_update
is called on SUBMIT.
Â
Success Screen :
Search-Preview :
To load search preview page egov-workflow-v2/egov-wf/process/_search?businessIds=PB-TL-2020-05-23-006604&history=true&tenantId=pb.amritsar
API should return workflow history.
The topmost card is mainly rendered using the workflow response.https://github.com/egovernments/frontend/blob/master/web/rainmaker/dev-packages/egov-workflow-dev/src/ui-molecules-local/TaskStatusComponents/index.js
View History Buttons gives the list of workflow actions performed on the application.
Â
TradeLicence Workflow :
Role | Credentials | Action | Next State | Status |
---|---|---|---|---|
Citizen/Counter Employee/TL_CEMP | EMP1 / Citizen / TLCEMP01 | INITIATE | INITIATED | INITIATED |
Citizen/Counter Employee/TL_CEMP | EMP1 / Citizen | APPLY | Applied/ DOCUMENTVERIFICATION | Pending for Document Verification |
TL_DOC_VERIFIER | EMP1 | FORWARD | FIELDVERIFICATION | Pending for Field Verification |
TL_FIELD_VERIFIER | EMP1 | FORWARD | PENDINGAPPROVAL | Pending for APproval |
TL_Approver | EMP1 | APPROVE | PENDINGPAYMENT | Pending for Payment |
Citizen/Counter Employee/TL_CEMP | EMP1 / TLCEMP01 | PAY | Approved | Approved |
Â
API Call Role Action mapping:
S.No. | API | Action id | Roles |
---|---|---|---|
1 |
|
|
|
2 |
| 1684 |
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
|
7 |
|
|
|
8 |
|
|
|
9 |
|
|
|
10 |
|
|
|
11 |
|
| ALL |
Â