# Employee Activation-Deactivation UI Flow

Logged-in users can activate or deactivate employees as required.

## **Deactivate Employee**

If the employee Status is Active - Users can deactivate the employee by clicking on the Take Action button available in the Employee Detail screen.

On the click of Deactivate Employee button, a PopUp appears where users should provide necessary details such as

Mandatory

* Reason for Deactivation
* Effective Date

Optional

* Order No.
* Supported Documents (File Upload)
* Remarks

![](/files/-MgiGggZNj4DXETR3wtS)

On deactivation, users will be re-directed to the Acknowledgement screen

## **Activation Employee**

If an employee status is inactive, users can reactivate employees by clicking on the Take Action button placed on the Employee Detail screen.

On the click of Deactivate Employee button, a popup appears where users should provide necessary details such as

Mandatory

* Reason for Reactivation
* Effective Date

Optional

* Order No.
* Supported Documents (File Upload)
* Remarks

![](/files/-MgiGggdmhq4rTPz7rSC)

On reactivation, users are routed to the Acknowledgement screen

<table><thead><tr><th width="203">API</th><th>Details</th></tr></thead><tbody><tr><td><code>/egov-hrms/employees/_update</code></td><td><code>1 let documents = { 2 referenceType: "ACTIVATION", 3 documentId: uploadedFile, 4 documentName: file.name, 5 }; 6 applicationData.Employees[0]["documents"].push(documents); 7 } 8 9 Employees[0]["reactivationDetails"].push(data); 10 Employees[0].isActive = true;</code></td></tr><tr><td><code>/egov-hrms/employees/_update</code></td><td><code>1 let documents = { 2 referenceType: "DEACTIVATION", 3 documentId: uploadedFile, 4 documentName: file.name, 5 }; 6 applicationData.Employees[0]["documents"].push(documents); 7 } 8 Employees[0]["deactivationDetails"].push(data); 9 Employees[0].isActive = false; 10 history.push("/digit-ui/employee/hrms/response", { Employees, key: "UPDATE", action: "DEACTIVATION" });</code></td></tr></tbody></table>

Primary Files: <https://github.com/egovernments/digit-ui-internals/blob/development/packages/modules/hrms/src/components/EmployeeAction.js>

Secondary Files: <https://github.com/egovernments/digit-ui-internals/blob/development/packages/modules/hrms/src/components/Modal/index.js>

<https://github.com/egovernments/digit-ui-internals/blob/development/packages/modules/hrms/src/components/Modal/EmployeeActivation.js>

<https://github.com/egovernments/digit-ui-internals/blob/development/packages/modules/hrms/src/components/Modal/EmployeeAppliaction.js>

## MDMS Hook

```
const { isLoading, isError, errors, data, ...rest } = Digit.Hooks.hrms.useHrmsMDMS(tenantId, "egov-hrms", "DeactivationReason");
```


---

# 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/access/local-governance-stack/hrms/hrms-service-configuration/hrms-ui-configuration/employee-activation-deactivation-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.
