DIGIT Docs
v0.3
  • DIGIT Knowledge Base
  • Local Governance
v0.3
  • Introducing HCM Console
  • Release Notes
    • v0.3: Release Notes
      • v0.3 Technical Release Summary
      • Service Build Updates
      • Master Data Management Service (MDMS) & Configuration Updates
      • HCM Console Test Cases V0.3
      • Gate 2 Release Checklist
        • Release Showcase
    • v0.2: Release Notes
      • v0.2 Technical Release Summary
      • Service Build Updates
      • Master Data Management Service (MDMS) & Configuration Updates
    • v0.1: Release Notes
      • v0.1 Technical Release Summary
      • Service Build Updates
      • Master Data Management Service (MDMS) & Configuration Updates
      • Gate 2 Release Checklist
  • PRODUCT SPECIFICATION
    • User Manual
    • Product Requirement Document (PRD)
    • Functional Specifications
  • TECHNOLOGY
    • Architecture
      • High Level Design
        • Project Factory
      • Low Level Design
        • Project Factory (Campaign Manager)
          • Create Campaign
          • Update Campaign
          • Manage Resources
        • Admin Console
          • Campaign Creation Flow
          • Campaign Updation Flow
          • Checklist Management
      • Services
        • Project Factory
          • Manage Campaign APIs
            • Microplan Integration
            • Update an Ongoing Campaign
          • Manage Data APIs
            • Target Upload
          • Manage Boundary APIs
            • Boundary Generation
            • Boundary Management
            • Boundary Management Through GeoJson
        • HCM Console Web
          • User Interface Design
          • Manage Campaign
            • Setup Campaign (New Campaign)
              • Campaign Details
              • Boundary Details
              • Delivery Details
              • Resource Upload Details
              • Summary Screen
              • Setup Campaign from Microplan
              • Setup and Implementation of Campaign
              • IRS Console Support
            • My Campaign
              • My Campaign Actions
              • Campaign Timeline
              • Update Campaign (Boundary/ Resources)
              • Update Campaign Dates
          • Boundary Data Management
          • Manage Checklist
            • Default Templates
  • SETUP
    • Installation
    • Configuration
      • UI Configurations
      • Steps to Enable a New Campaign Type in Console
      • Advanced Configurations
    • Quality Assurance Testing
      • Automation - Run HCM Console Script
        • User
        • Target
        • Facility
      • Performance Testing
  • GENERAL
    • Product Roadmap
Powered by GitBook

All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.

On this page
  • New Campaign & Implementing Local Storage
  • Draft Campaign & Data Fetching
  • Stepper
  • New Changes:

Was this helpful?

Export as PDF
  1. TECHNOLOGY
  2. Architecture
  3. Services
  4. HCM Console Web
  5. Manage Campaign
  6. Setup Campaign (New Campaign)

Setup and Implementation of Campaign

PreviousSetup Campaign from MicroplanNextIRS Console Support

Last updated 5 months ago

Was this helpful?

The logic for the step-by-step screens, stepper functionality, storing data in localStorage, creating/updating campaigns, and restructuring API data back into localStorage is all managed within SetupCampaign.js.

All screens are present in the given configuration. Link:

In the configuration:

  • stepCount represents the step number. Multiple configuration objects can share the same stepCount.

  • skipAPICall: If this is set to true, the API call for the screen is skipped.

  • sessionData: Local storage data is passed in custom props, allowing for custom logic to be added to the screens as needed.

export const CampaignConfig = (totalFormData, dataParams) => {
  return [
    {
      form: [
        {
          stepCount: "1",
          key: "1",
          name: "HCM_CAMPAIGN_TYPE",
          body: [
            {
              isMandatory: false,
              key: "projectType",
              type: "component",
              skipAPICall: true,
              component: "CampaignSelection",
              withoutLabel: true,
              disable: false,
              customProps: {
                module: "HCM",
                sessionData: totalFormData,
              },
              populators: {
                name: "projectType",
              },
            },
          ],
        },
        ``````

In setup campaign, we have functions to perform specific logic:

  • loopAndReturn: This function takes the delivery rule conditions coming from API response and restructure the data in local storage format.

  • cycleDataRemap: This function takes the delivery rules data coming from API response and return array of object of start date and end date based on cycles.

  • reverseDeliveryRemap: This function takes the deliveryConditions from the API response and return the structure of delivery data.

  • groupByTypeRemap: This function creates the local structure of boundaries.

  • updateUrlParams: This function is used to update the URL.

New Campaign & Implementing Local Storage

  • In a new campaign, we update the total form when a user clicks on next after entering the data.

  • After updating the total form data, we store the data in localStorage.

  • We also call the API to draft the data in case a user wants to come back and resume the campaign.

  • Refer to the following link:

Draft Campaign & Data Fetching

  • When a user clicks on the draft campaign, he/she can fetch campaign data from the response.

  • After getting a response, one can restructure the data in screen format and store it in the local storage.

  • After updating, the user is redirected to the last screen where additional details are stored in response.

  • Refer to the following link:

Stepper

  • Based on screens, a user can filter the configuration and show the stepper based on the configuration.

  • Refer to the following link:

New Changes:

As part of v0.3, we have introduced a new vertical stepper and summary screens for all the steps.

The vertical steppers are clickable and the user can navigate between the screens using the steppers.

Summary screens will show all the details entered by the user in that step.

https://github.com/egovernments/DIGIT-Frontend/blob/campaign/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js
https://github.com/egovernments/DIGIT-Frontend/blob/campaign/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/CampaignConfig.js
https://github.com/egovernments/DIGIT-Frontend/blob/campaign/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js#L545
https://github.com/egovernments/DIGIT-Frontend/blob/campaign/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js#L327
https://github.com/egovernments/DIGIT-Frontend/blob/campaign/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js#L1159