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:
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.
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.
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:
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: