Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Every plant operator created will be linked to one or more plants under an urban local body (ULB).
When a plant operator logs in to the system, the top bar is populated with a dropdown which shows a list of plants this user (plant operator) is linked to.
By default, the option "All Plants" is selected.
When a user selects a plant, lets say, plant A, all the data of plant A will be shown in the app, whether it's inbox, view past results page, home page, etc.
Whenever a change in a plant is detected through the dropdown, the app is redirected to the landing screen.
A plant operator is a sanitation worker; while creating a sanitation worker, you can link the sanitation worker to one or multiple plants.
Data such as a list of the current user's plants and active plant is stored in session storage, and is available to use within the app.
Whenever a plant operator logs in, he/she can make a call to this API endpoint "/pqm-service/plant/user/v1/_search" to get a list of the plants that the user is linked to .
Sample payload:
Send the user's individual id/uuid in the request object.
Curl for the above API call:
You will get a list of plants in the response which is used to populate the dropdown.
By default, the "All Plants" option is selected which is the default behaviour.
When a user selects a particular plant, it becomes active and one can filter the data (all tests shown in the app) by that plant's code in the UI.
UI for the top bar:
TQM UI Tech Documentation
TQM is an independent UI module which only depends on the core UI libraries.
Here are the articles in this section:
Logging in with the plant operator role will take the user to the landing page.
The landing page has a list of cards which includes the TQM card.
The landing page shows a pending tasks card at the bottom of the page.
The pending tasks card lists tests pending to be updated by this user.
The tasks which are overdue will show up first in the pending tasks card.
There is an option to view all the pending tasks which takes the user to TQM inbox page.
Clicking on the Treatment Quality Monitoring (TQM) card will take the user to the TQM home page.
The TQM home page shows a TQM card with the links to Inbox, View Past Tests.
It also shows 2 cards below which are -> Your performance, Alerts card.
The "Your Performance" card shows relevant metrics such as test compliance and the percentage of tests that passed which shows the efficiency of the plant(s) linked to the logged in user.
The 'Alerts' card shows a count of the different types of alerts that were raised by the system. This data comes from the anomaly finder.
Enabling TQM module in DIGIT-UI
To access the TQM module in DIGIT-UI, enable it from MDMS and add TQM specific roles for the user to access TQM UI.
Add the following configuration in citymodule.json under this path in MDMS. The reference file is given below.
Add TQM to these files in DIGIT-UI codebase. Add it in enabledModules Array.
Note: The name "TQM" should match the name "Tqm" added in mdms(citymodule). However, uppercase or lowercase does not matter.
frontend\micro-ui\web\micro-ui-internals\example\src\index.js
frontend\micro-ui\web\src\App.js
Files for reference:
Sample object:
PQM_TP_OPERATOR -> This role is for Plant Operator user
PQM_ADMIN -> This role is for ULB Admin user
Note: One user cannot have both these roles because flows and UI is different for these users. These roles are added in the mdms. The reference file is given below
Enhancements were made to the core module version to support some of the features in TQM UI such as help section and notification card in ULB admin's home page
The recommended core version for TQM UI is the following:
Every page in the plant operator's screen has a help button on the top right.
Clicking on it takes the user to the help screen which shows a list of videos. Each video has a title and a description.
Clicking on a video runs it in a media player.
Flows in the app can be stored in a video and it can be shown in this screen.
This page is fully configurable through MDMS.
Refer to the following MDMS file to configure the list of videos:
Multiple languages can be configured. Currently, English and Hindi are the two options available.
Sample configuration object:
The above configuration object is used to render the screen. It has a video level header and description along with URLs for Hindi and English videos. The page level header is also present.
The module name can be configured. For example, here we have added the module name as TQM.
From the TQM card in the home screen, there is a link to the inbox.
Tests are created through the cronjob scheduler at the backend.
These tests created have a two-step workflow: Scheduled (initial state) -> Select Lab -> Pending Results -> Submitted (final state).
By default, tests which are in the workflow, will show up in the inbox of a plant operator. The inbox shows a list of cards corresponding to each test.
Each card contains data relevant to the test such as Test ID, Treatment Process, Stage, Output, Status, etc.
There is a dynamic action button in each card. According to the current workflow status, it will show either update status (scheduled state) or update results.
Clicking on the update status opens an update test screen which shows data about the test and a dropdown which has a list of labs configured in MDMS. A user can select one of the labs and update the test.
Clicking on update results opens an update test screen, which also shows the same test details, but the bottom card shows a list of benchmarks to be tested in that test. A user can enter these benchmarks and update the test. There is an option to upload a document as well, and at least one benchmark is mandatory to enter.
A success/failure toast is shown once the test is updated.
Filter and sort options are available in the inbox.
A user can filter by -> Treatment Process, Output Type, Date Range, Workflow Status.
A user can sort by date (latest first/latest last).
Use the pqm-service.
URL for inbox "/pqm-service/v1/_update".
Sample request object:
Role-action mapping is done for the "/pqm-service/v1/_update" endpoint for a plant operator user role, that is:
Use the inbox-v2 API.
URL for inbox "/inbox/v2/_search".
Sample request object:
Role action mapping is done for the "/inbox/v2/_search" endpoint for a plant operator user role, that is:
Logging in with ULB admin role takes the user to the home page of DIGIT-UI.
If a ULB admin user is logged in, he/she will have access to TQM, and a TQM card will be visible on this screen.
Links such as Inbox, View Past Tests, and create test are available on this card.
A notification card is available on the bottom, which is specific to TQM. All the TQM-related notifications configured will show up here. Currently, it shows notifications for tests whose results are not updated on time (crossed scheduled date).
Use the egov-user-event service.
Sample request object:
The API returns a list of notifications relevant to the logged in user.
Sample curl for notifications:
The role-action mapping for /egov-user-event/v1/events/_search is added for this user that is, the ULB admin whose role code is PQM_ADMIN.
From the TQM card in the home screen, there is a link to the Inbox.
The inbox will show a list of tests that are in workflow.
Filters and search options are available such as Treatment process, Stage, Output, Status, Test Id and Plant name.
Clicking on a test will take the user to the test details screen.
Note: Unlike the plant operator inbox, this inbox is only for visibility purposes. A ULB admin cannot take any action in the tests that are in the inbox.
The test detail screen will show all the details about the test and status of the test.
When tests are in the submitted status, it's status will show as PASS or FAIL depending on the values of the benchmark.
If tests are in the workflow, it's status will show as pending.
Use inbox-v2 API.
URL for inbox "/inbox/v2/_search".
Sample request object:
Role-action mapping is done for the "/pqm-service/v1/_search" and "/inbox/v2/_search" endpoint for a ULB admin user role, that is:
Use pqm-service.
URL for search "/pqm-service/v1/_search".
Sample request object:
From the TQM card in the home screen, there is a link to "View Past Tests".
The view past tests screen will show the tests whose workflow is completed, that is, they are in the submitted status.
The screen shows a list of cards, each card corresponding to a test, and shows test details similar to inbox.
Filters and sort options are available.
User can filter by Treatment process, Output Type, Test Type and the date range.
Sort is similar to inbox.
Use the pqm-service.
URL for search "/pqm-service/v1/_search".
Sample request object:
Role-action mapping is done for the search endpoint for a plant operator user role, that is:
This screen is similar to the View Past Test Results screen for a plant operator.
Refer the following page View Past Test Results/Test's Summary Screen
UI for reference:
ULB admins have an option to create a test. This is an adhoc test which does not have any workflow involved. By default, it will be in the submitted state when created.
From the home screen, click on the Add Test Result link.
The user is redirected to Create Test screen. This page has two form cards. One is for entering Plant Name, Treatment Process, Stage and output type. The other card has a list of benchmarks according to the selection of the above form.
Note: After filling the first form, only the list of benchmarks will show up.
If any quality criteria is not found for the selection of parameters, an error is shown and user has to select another criteria.
After filling the forms, click on submit to create a test.
After a successful creation, the system automatically redirects to the view test details screen of the newly-created test.
Use pqm-service.
URL for inbox "/pqm-service/v1/_create".
Sample request object:
Role-action mapping is done for the "/pqm-service/v1/_create" and "/pqm-service/v1/search" endpoint for a ULB admin user role, that is: