Fire NOC - Search
Objective - To provide options to search the applied NOC application and perform various operation on that such as Verification, Approval, Pay amount etc. This feature can be used by counter employee.
Technical Implementation details -
Dev-package - egov-firenoc-dev is the package which holds all the files and codes related to this application. It is built on top of mihy- micro framework architecture. Below is the link of the folder and files..
egov-firenoc-dev github folder
Search screen is the home page of the NOC application. Configurations for this page is written in search.js file. Below is the link of the file.
Search screen makes two MDMS call before initializing the screen.
Business service MDMS call - To get the business service MDMS information and store it in the localstorage. This data is required while applying for new NOC certificate or making payment or viewing the details of already created file.
Required Document MDMS call - This MDMS call returns the Data about the total no of valid documents which are required while creating a new NOC file. So that user can prepare the documents in advance while applying for NOC certificate.
Search screen has some supportive files written under searchResource folder at the same hierarchy. This folder contains the files which are responsible for making Search API call and showing the search results in the table format.
Search Table:
Search table configurations are written in searchResults.js file under searchResource folder. This table internally refers the Table component of the framework written in ui-molecules folder. This file has the configuration for table columns and header and table title. Below is the link of the configuration file.
Search api call is written in functon.js file. Once the search response comes then it is being formatted as per table required format. Below is the link of file.
Before calling the search API, field validations of search form is happening. If any required field is missing or any field having incorrect data entered then immediately returning the required error message and preventing the search API call.
The search criteria entered in the search form are being sent as query parameters to the search API call.
API call Details -
A common search function is written to call the http request by passing the required parameters. Below is the url details of the search api.
getSearchResults function is being imported in the functions.js file and being called on clicking of search button by passing the query params object. Below is the file link of utils file which holds this method.
Localization Implementation Details -
Localization key for NOC module are stored under rainmaker-noc locale module. If any new locales are being introduced while development, make sure its corresponding locale message should be stored under rainmaker-noc locale module.
{
"code": "WF_FIRENOC_PENDINGAPPROVAL",
"message": "Pending for Approval",
"module": "rainmaker-noc",
"locale": "en_IN"
},
{
"code": "WF_FIRENOC_PENDINGPAYMENT",
"message": "Pending for Payment",
"module": "rainmaker-noc",
"locale": "en_IN"
},
{
"code": "WF_FIRENOC_REFER",
"message": "Refer for Opinion",
"module": "rainmaker-noc",
"locale": "en_IN"
},
API Call Role Action mapping:
S. No. | API | Action id | Roles |
---|---|---|---|
1 |
|
|
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
|
Â