# Employee Search Application Search License UI Flow

Search Application and Search License pages are used for searching any application/ license that may or may not be relevant to the workflow action of the logged-in users.

Search Application has 2 components.

## Search Fields

A search field component is a form which takes inputs and passes them into tl-search API params. It utilizes SearchForm and SearchField components to create and arrange the form.

![](/files/-MgiG_sVWI6r6v4qsP2o)

## Result Table

Result Table uses the Table react component and the result from API is adapted to the table config using a custom hook inside the common parent wrapper and passing the response to individual components.

![](/files/-MgiG_sYgEHzzEJfwOMU)

Search License has a fixed param where the status of the application is *“APPROVED”*, other than differences in table config

## APIs

The API end point for searching trade licenses is `{env}/tl-services/v1/_search`

API CURL -

```
curl 'https://qa.digit.org/tl-services/v1/_search?tenantId=pb.amritsar&fromDate=1625077800000&toDate=1627410599000&limit=10&sortBy=commencementDate&sortOrder=DESC&status=APPROVED&_=1627375567840' \
  -H 'authority: qa.digit.org' \
  -H 'sec-ch-ua: " Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"' \
  -H 'accept: application/json, text/plain, */*' \
  -H 'dnt: 1' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36' \
  -H 'content-type: application/json;charset=UTF-8' \
  -H 'origin: https://qa.digit.org' \
  -H 'sec-fetch-site: same-origin' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-dest: empty' \
  -H 'referer: https://qa.digit.org/digit-ui/employee/tl/search/license' \
  -H 'accept-language: en-US,en;q=0.9,hi;q=0.8' \
  --data-raw '{"RequestInfo":{"apiId":"Rainmaker","authToken":"18158d2b-0a50-4a60-baa3-a83c157e7aad"}}' \
  --compressed
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digit.org/local-governance/v2.8/platform/configure-digit/configuring-digit-services/tl-service-configuration/tl-ui-configuration/employee-search-application-search-license-ui-flow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
