The User Management screen enables the Microplan admin to manage user roles like 'Population Data Approver.' Only roles related to the microplan are displayed here.
The screen is accessed when user logins in as MICROPLAN_ADMIN, goes to Setup Microplan Card and clicks on the User Management link.
This page allows the Microplan Admin to view all registered people for different microplan-related roles, uploaded using bulk upload. When clicking on the corresponding employee in the microplan, the details of the employee are shown.
Administrators can search for users by Name or Contact Number.
Search supports partial string matching.
API Details
The /health-hrms/employees/_search API returns all roles related to the microplan. By default, it shows all roles, but when filtered, it only shows users with the selected roles.
End Point
Roles
/health-hrms/employees/_search
MICROPLAN_ADMIN
Use the role checkboxes on the left-hand panel to filter users based on their assigned roles.
By default all roles are shown in the table.
The roles are fetched from the mdms, module.master is hcm-microplanning.rolesformicroplan .
Link for hcm-microplanning.rolesformicroplan
When one or more checkboxes are selected for role-based filtering, the roles
query string parameter is set to match the selected checkboxes for the /health-hrms/employees/_search
API.
End Point
Roles
/health-hrms/employees/_search
MICROPLAN_ADMIN
Navigation Links
The user can go to the Bulk User Data and Download User Data by clicking on the links.
The Bulk Upload Users is used to create multiple users of various roles to the Microplan.
The Download Users Data allows administrators to view and download various user templates and employee details, including user credentials created through bulk creation.
Employee Details
By clicking on the row of the table the employee details can be viewed.
Navigating to employee details
window.location.href=microplan-ui/employee/hrms/details/${tenantId}/${row}
The data for the different roles are fetched from the MDMS using api call:
API Details
End Point
Roles
/mdms-v2/v2/_search
MICROPLAN_ADMIN
The Download User Data screen allows administrators to view and download various user templates and employee details, including user credentials created through bulk creation.
Download Functionality:
Each listed file has a dedicated Download button to save the respective data locally.
Files are downloaded in .xlsx
format.
Implementation of the files displayed :
The /project-factory/v1/data/_search will return all the files uploaded related to microplan.
API Details:
End Point
Method
Payload
/project-factory/v1/data/_search
POST
{"RequestInfo": {},
SearchCriteria: {tenantId: "mz", type: "user"}}
The API will return a ResourceDetails
array containing all the filestore IDs related to the microplan. Each entry will include the fileStoreId
, processedFilestoreId
, and status
Status
The files are downloadable only if the status of the files are "completed",
if the status of the file is "invalid" in resouceDetails.status then the file is not downloadable.
Download Button:
Upon clicking the download button, the following Digit function is invoked using the file's .processedFilestoreId
to enable the download functionality.
Once Downloaded:
The UserName and password are generated for each user in the downloaded sheet.
File Structure
The downloaded .xlsx
files may include the following data fields:
Name: The full name of the user.
Contact Number: The user's phone number.
Email: The user's email address.
Roles: The designated role(s) for each user (e.g., Population Data Approver).
Navigation:
Use the Back button to exit the download screen.
The Bulk Upload Users functionality allows the System Administrator to create multiple users with various roles in the Microplan by uploading an Excel template containing user details.
Template generation
Editing template
Browsing and Uploading
Validating File
Submitting file
To fill up the details in excel sheet a template is downloadable. The template is created by using the api call to /project-factory/v1/data/_generate
The user fills up the template and making sure to fill it in a valid manner.
Fill in user details (Name, contact number, and email) in each sheet according to the role.
Do not assign the same user to both the Microplan Estimation Approver and National Microplan Estimation Approver roles.
Do not assign the same user to both the Facility Boundary Assigner and National Facility Boundary Assigner roles.
Do not assign the same user to both the Population Data Approver and National Population Data Approver roles.
When the user clicks on Browse in My Files, they can select a file of type .xlsx
, .xls
and only the downloaded template can be uploaded. Once the file is selected, the validation of the Excel file begins. This validation is performed using the following hook:
The file is then set in the state and validated through the below hook.
This hook returns fileUrl
, which contains the URL attribute. For example, the URL might look like:
This is a pre-signed URL generated by Amazon S3 (Simple Storage Service), which provides temporary access to a specific file stored in an S3 bucket.
When the fileUrl
is set, the file can be downloaded by clicking a button that uses the following hook:
When the files are selected, the following api calls are being made.
Actions is set to validate when the file is first selected its sent for payload for /project-factory/v1/data/_create
End Point
Method
/project-factory/v1/data/_create
MICROPLAN_ADMIN
/project-factory/v1/data/_search
MICROPLAN_ADMIN
This hook does the validation of the xlsx file uploaded.
The error description is shown in error details.
The action is set to create for the payload for /project-factory/v1/data/_create
The page goes
End Point
Roles
/project-factory/v1/data/_create
MICROPLAN_ADMIN
When the delete button is clicked, the uploaded file is deleted.