Citizen : Water & Sewerage - My Connections

My Connections 

Users can review the list of connections and their status registered under their mobile number in My connections tab. Each connection for the initial view will display Consumer No, Service Name, Consumer Name, status, and property Address with View Details option, through which User can look up more details about the connection.

Once the user clicks on View Details Button, the Connection Details Page will be displayed with all the necessary information about the connection.

the link provided in the connection details page is similar to the link provided in the applications details page, eg Consumption details, for more reference Citizen : Water & Sewerage - My Applications

 

Technical Implementation Details:

The path for the My Connections and Connection Details common Index is given below, it can be used to understand the working of the code, Below is the file path.

packages/modules/ws/src/pages/citizen/MyConnection/index.js

The template for My Connection is present under packages/modules/ws/src/pages/citizen/MyConnection/WSConnection.jsand Connection Details page is present inside packages/modules/ws/src/pages/citizen/MyConnection/ConnectionDetails.js. All the Connection list is being retrieved by calling the search API "/ws-services/wc/_search" & "/sw-services/swc/_search" using the searchType as CONNECTION for the filter params

Hooks used for fetching the connections for Water and Sewerage are :

let filter1 = !isNaN(parseInt(filter)) ? { tenantId: tenantId, mobileNumber: user?.info?.mobileNumber, searchType:"CONNECTION" } : { tenantId: tenantId, mobileNumber: user?.info?.mobileNumber, searchType:"CONNECTION" }; const { isLoading, isError, error, data } = Digit.Hooks.ws.useMyApplicationSearch({ filters: filter1 }, { filters: filter1 }); const { isLoading: isSWLoading, isError : isSWError, error : SWerror, data: SWdata } = Digit.Hooks.ws.useMyApplicationSearch({ filters: filter1,BusinessService:"SW"}, { filters: filter1 });

The code to linked page, Consumption details can be found :

packages/modules/ws/src/pages/citizen/MyConnection/ConsumptionDetails.js

 

MDMS:

No MDMS data being used here, all the data is being loaded from Search API.

 

Localization :

For My Applications also the Localization keys are being added in the ‘rainmaker-ws’ locale module same as My connections and create. To change, update or of adding  any new localization key will be done in the same locale module only.

 

Role Actions:

Url

Roles

Action Id

Url

Roles

Action Id

egov-workflow-v2/egov-wf/process/_search

PTCEMP,FI,APPROVER,DV

1730

/ws-services/wc/_search

PTCEMP,FI,APPROVER,DV

 

/sw-services/swc/_search

PTCEMP,FI,APPROVER,DV

 

/egov-workflow-v2/egov-wf/businessservice/_search

PTCEMP,FI,APPROVER,DV

1743

/filestore/v1/files/url

PTCEMP,FI,APPROVER,DV

1528