Data Mapping Screen

Overview

The Data Mapping Screen is designed to facilitate efficient mapping and management of data for facility mapping and user mapping tasks. It provides an interactive interface that allows users to view, modify, and manage the data uploaded via sheets. The screen offers features such as status updates, boundary modifications, and adding, editing, or deleting rows directly from the mapping interface.

Features

  1. Change Status

    • Users can update the status of individual rows in the sheet directly from the mapping screen.

    • Status options are predefined and ensure consistent data integrity.

  2. Modify Boundaries

    • Users can update the boundary information for rows uploaded in the sheet.

    • Boundary updates are validated to align with the application's existing structure.

  3. Add New Rows

    • Users can add, edit, and delete rows in the data sheet, offering flexibility in organising and maintaining the mapping data.

The screen is designed to provide a seamless user experience for data modification and management, with a focus on ease of use and intuitive interaction.

Integration into Setup Campaign

The mapping screen is integrated into the setup campaign workflow via a configuration object defined in setupCampaign.js. This ensures the mapping screen renders dynamically as part of the campaign setup process for user and facility mapping.

Configuration Details

Key Highlights

  • Step Count: stepCount: "4" defines the mapping screen's position in the workflow.

  • Component Integration: The component key renders the DataUploadWrapper component.

  • Custom Props:

    • module: Specifies "HCM" for Human Capital Management.

    • type: Indicates whether the data pertains to userMapping or another module.

    • Other dynamic data (dataParams, sessionData, hierarchyData) ensures a seamless connection to form data.

File References

The following files handle core functionality:

  1. DataUploadWrapper: Path: DataUploadWrapper.js

  2. UploadDataMappingWrapper: Path: UploadDataMappingWrapper.js

MDMS and API Integrations

MDMS

  • Schema: adminSchema

API Calls

  1. Boundary Data Fetch: API Endpoint: boundary-service/boundary-relationships/_search

    • Fetches all lowest-hierarchy boundary codes required for boundary mapping.

  2. Excel File Processing:

    • The useReadExcelData and useUpdateAndUploadExcel hooks manage reading, processing, updating, and re-uploading Excel data.

Key Hooks

1. useReadExcelData

This hook reads the uploaded Excel file, converts its data into an array, and stores it in the context state.

  1. useUpdateAndUploadExcel

This hook converts the updated data back into a new Excel sheet, validates it, and re-uploads it to the backend for further processing.

User Flow for Facility and User Mapping Screen

  • The user uploads an Excel file containing Facility Mapping or User Mapping data. After uploading the file, the user will click on next.

  • The uploaded data is shown in a tabular format. Users can change the status and boundary of the selected row. Users can also add the new data row in the the mapping screen.

Users can change the boundary of the selected row using the hange boundary option. A pop-up will appear.

Users have to select the boundary level and boundary for the selected boundaries of the respective campaign.

Once a user completes the updation, the user can click on next. The filestore ID is being called to upload the updated sheet back.

After uploading the file, we validate the file and check if the status is validated or not.

Once this is successful, keep on checking the status to see whether the status is validated or not.

Once everything is in place, the user can step forward and complete the setup process.

Last updated

Was this helpful?