There is a vendor dropdown available to each sanitation worker which shows a list of vendors that they can be tagged to. An admin can tag a sanitation worker to a vendor using that dropdown.
Vendors are listed based on agency type. Currently, there are two types of agency: ULB and private vendor.
If a sanitation worker is employed by the ULB, then the dropdown will show vendors whose agency type is ULB, and likewise for private vendors.
We are using the individual registry to create, update, and disable sanitation workers.
If an admin disables a sanitation worker already tagged to a vendor, then that vendor tagging is also disabled. This implies that the if an admin enables that user, we need to tag the vendor again.
There is an 'Add' option at the top right of this screen using which admins can create vehicle, vendor, and sanitation worker.
Note: There is a SANITATION_WORKER role in the system. All sanitation workers created through the system will have this role.
API Details
Individual Search
We will hit hit the individual search API to get a list of sanitation workers using the SANITATION_WORKER system role.
The curl is given below:
Vendor Search
We will hit the "vendor/v1/_search" endpoint to get a list of vendors.
The curl is given below:
Vendor Update
We will hit the "/vendor/v1/_update" to update tagging of sanitation workers to vendors.
The curl is given below:
Individual Update
We will utilise the individual update API for disabling/enabling sanitation workers.
The curl is given below:
Role-Action Mapping
Role-action mapping is done for the above mentioned API endpoints for FSM admin users with the following role code: