> For the complete documentation index, see [llms.txt](https://docs.digit.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digit.org/local-governance/v2.8/platform/configure-digit/configuring-digit-services/water-services/water-and-sewerage-service-ui-docs/citizen-my-connections.md).

# Citizen: My Connections

Water & Sewerage my connection feature for citizen users - technical implementation doc

**Objective:** Provide the UI technical implementation details for the My Connections feature available for citizen users.

## Workflow Details

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

![](https://1885278393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYtUmELy66UydIQtJOn5%2Fuploads%2FRuWmMOPQbsYE1R5GBeER%2Fimage.png?alt=media\&token=be52b256-13d8-4f40-8f3c-73e1d77ba744)

Once the user clicks on the View Details button, the Connection Details page is displayed with all the necessary information about the connection.

![](https://1885278393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYtUmELy66UydIQtJOn5%2Fuploads%2FnlsLhdGuRIQsSU0ZSymm%2Fimage.png?alt=media\&token=45d00f96-7ec0-4527-8282-abbbaf3e7939)

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](/local-governance/v2.8/platform/configure-digit/configuring-digit-services/water-services/water-and-sewerage-service-ui-docs/citizen-my-applications.md)

## **Technical Implementation Details**

The path for the My Connections and Connection Details common Index is given below. It provides an understanding of the working of the code.&#x20;

**File path** - packages/modules/ws/src/pages/citizen/MyConnection/index.js

The template for My Connection is present within packages/modules/ws/src/pages/citizen/MyConnection/WSConnection.js. The Connection Details page is available within packages/modules/ws/src/pages/citizen/MyConnection/ConnectionDetails.js. The Connection list is 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:

{% code lineNumbers="true" %}

```
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 });
```

{% endcode %}

The code to the linked page, Consumption Details is available in the file: packages/modules/ws/src/pages/citizen/MyConnection/ConsumptionDetails.js

## **MDMS Data**

No MDMS data is used here. All data is loaded from the Search API.

## &#x20;**Localization**

For My Applications, the localization keys are added in the ‘*rainmaker-ws*’ locale module same as My connections and create. Changes, updates or addition of any new localization key is done in the same locale module only.

## **API Role Action Mapping**

| 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`    |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.digit.org/local-governance/v2.8/platform/configure-digit/configuring-digit-services/water-services/water-and-sewerage-service-ui-docs/citizen-my-connections.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
