Employee Inbox
Employee Inbox
Objective
Provide Employee to show the Assigned applications and all the applications which are pending for action .
Route - https://egov-micro-uat.egovernments.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,
Sidebar
Quick action button
Service List
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 .
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 gets filtered based on the condition item.url === "quickAction"
Service List:
Service List is the component which shows the menu based on the response from the
access/v1/actions/mdms/_get
API .
based on the response the actions gets filtered based on the condition item.url === "card"
Inbox worklist
Inbox worklist is the component which shows the records based on the response from the
/egov-workflow-v2/egov-wf/process/_search
API .
Inbox worklist contains options to filter and search the records based 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 by 2 network calls one maximum 500 and the remaining records.
once we receive all the records we load locality of the records. based on the locality search provided from the service (BUSINESS SERVICE). Except for the Property Services , as for property records we load through property search.
Â
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
MDMS config
Â
{
"tenantId": "pb",
"moduleName": "common-masters",
"TablePaginationOptions": [
{
"rowsPerPageOptions": [25, 50, 100],
"defaultValue": 100
}
]
}
Application Redirection
In every row we have a option to view / perform action on the record , for that it redirects to the module,
it is configured in https://github.com/egovernments/frontend/blob/master/web/rainmaker/packages/employee/src/modules/employee/Inbox/components/Table/workflowRedirectionConfig.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 | |
---|---|---|---|
1 |
|
|
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
| 1730 |
6 |
|
|
|
Â