Employee Inbox(Old UI)

Employee Inbox

Objective

Provide Employee to show the Assigned, Escalated applications and all the applications which are pending for action.

Route - https://qa.digit.org/employee/inbox

Technical Implementation Details:

Inbox screen is loaded based on the file https://github.com/egovernments/frontend/blob/master/web/rainmaker/packages/employee/src/modules/employee/Inbox/index.js

Inbox screen can be divided into 4 sub components as listed below,

  1. Sidebar

  2. Quick action button

  3. Service List

  4. Inbox worklist

Sidebar:

Action Menu is the component which shows the menu items in the sidebar based on the response from the

access/v1/actions/mdms/_get API .

Action Menu component file is present inhttps://github.com/egovernments/frontend/blob/master/web/rainmaker/dev-packages/egov-ui-kit-dev/src/common/common/ActionMenu/index.js

based on the response the actions gets filtered based on the condition navigationURL

Quick action:

Quick Action button which shows the menu based on the response from the

access/v1/actions/mdms/_get API .

The quick Action button is present in https://github.com/egovernments/frontend/blob/master/web/rainmaker/dev-packages/egov-ui-framework-core/src/ui-molecules/MenuButton/index.js

based on the response the actions get filtered based on the condition item.url === "quickAction"

Service List:

Service List is the component that shows the menu based on the response from the

access/v1/actions/mdms/_get API .

https://github.com/egovernments/frontend/blob/master/web/rainmaker/dev-packages/egov-ui-kit-dev/src/common/common/ServiceList/index.js

based on the response the actions get filtered based on the condition item.url === "card"

Inbox worklist

Inbox worklist is the component that shows the records based on the response from the

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

https://github.com/egovernments/DIGIT-Dev/blob/6e5fd85e97c00a07869cae8324f04c27602b8adc/frontend/mono-ui/web/rainmaker/dev-packages/egov-inbox-dev/src/components/Inbox.js

Inbox worklist contains options to filter and search the records based on the options.

Fetching all the records from the process instance is not made a single call since we might lot of records,

so we make a call to get the total count from egov-workflow-v2/egov-wf/process/_count API

then we load initial records for all business service.

once we receive all the records we load the locality of the records. based on the locality search provided by the service (BUSINESS SERVICE)

 

Assigned to me Tab :

Assigned to me Tab which shows the Assigned applications based on the logged-in user.

from the process instance response, we get all the records from which we filter the records based on the following condition

get(item, 'assignes[0].uuid')=== uuid;

here UUID is the logged-in Employees User id and item is the total records.

SLA,

SLA of the Application is based on the businesssServiceSla and it is converted in the following conversion.

item.businesssServiceSla / (1000 * 60 * 60 * 24)

Nearing Escalation and Escalated

Nearing Escalation and Escalated is identified based on the businesssServiceSla present in that record and the configured MDMS data wfSlaConfig

it contains the slot color and percentage.

Pagination

Pagination is configured in the MDMS to hold default records and default options to show rows per page

Table and Table pagination can be accessed from this file

https://github.com/egovernments/DIGIT-Dev/blob/cb2877690c9eb8fd6668c973ac7cb9565964fcbe/frontend/mono-ui/web/rainmaker/dev-packages/egov-inbox-dev/src/components/TablePaginationWrapper.js

MDMS config

https://github.com/egovernments/egov-mdms-data/blob/77f19c91861fab275c1b22d5063f69b4099bda15/data/pb/common-masters/TablePaginationOptions.json

 

{ "tenantId": "pb", "moduleName": "common-masters", "TablePaginationOptions": [ { "rowsPerPageOptions": [25, 50, 100], "defaultValue": 100 } ] }

Application Redirection

In every row, we have an option to view/perform an action on the record, for that it redirects to the module,

it is configured in CommonInboxConfig MDMS https://github.com/egovernments/egov-mdms-data/blob/e8b7bad5ad7c4e17816dedb673b2f4085c92c8a6/data/pb/common-masters/CommonInboxConfig.json

Config is explained below,

"tenantId": "pb", "moduleName": "common-masters", "CommonInboxConfig": [{ "moduleName": "PT", "BusinessService": "PT.CREATE", "roles": ["PT_CEMP", "PT_DOC_VERIFIER","PT_FIELD_INSPECTOR","PT_APPROVER"], "active": false, "locality":false, "localityModule":"property-services", "redirectConfig": { "INITIATED": "/employee/property-tax/application-preview?applicationNumber=^WFBID^&tenantId=^WFTNID^&type=property", "DEFAULT": "/employee/property-tax/application-preview?applicationNumber=^WFBID^&tenantId=^WFTNID^&type=property" } },

for redirection for every module should be configured in redirectConfig

and similarly another config like active, locality, and locality modules

Escalated Tab:

Here in Escalated tab, it makes an escalation search , using egov-workflow-v2/egov-wf/escalate/_search

the object structure is similar to the process search

On View History:

It shows which state has it got escalated through flag isEscalatedApplicationbased on it it shows red mark for the corresponding state.

Functionality file path: https://github.com/egovernments/frontend/blob/master/web/rainmaker/packages/employee/src/modules/employee/Inbox/components/Table/index.js

Filter Options,

Here all the filter options are derived from the records that we receive through the process instances.

it was not from any MDMS data.

 

  • ROLE ACTION MAPPING

API

ROLES

ACTION ID

API

ROLES

ACTION ID

1

egov-mdms-service/v1/_search

 

954

2

access/v1/actions/mdms/_get

 

870

3

egov-workflow-v2/egov-wf/process/_count

EMPLOYEE

2027

4

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

EMPLOYEE

1730

5

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

EMPLOYEE

1743

6

egov-workflow-v2/egov-wf/escalate/_search

EMPLOYEE

2168