My Campaign Actions

A new 'Actions' column has been added to the "My Campaign" screen, allowing users to perform some tasks skillfully.

Users can click on 'Actions' to choose from the available action options in the menu.

Implementation:

We've added config for column actions in myCampaignConfig.js

 {
                label: "CAMPAIGN_ACTIONS",
                jsonPath: "actions",
                additionalCustomization: true,
 }

In UICustomization.js, we have added a component that needs to be rendered for the action column under additionalCustomizations.

case "CAMPAIGN_ACTIONS":
          return (
              <Button
                className="custom-className"
                type="actionButton"
                variation="secondary"
                label={"Action"}
                options={[{ key: 1, code: "OPTION", i18nKey: t("OPTION") }]}
                optionsKey="i18nKey"
                showBottom={true}
                isSearchable={false}
                onOptionSelect={(item) => onActionSelect(item, row)}
              />
          );

We have added an onActionSelect function which acts based on the selected option.

Actions are different according to the different campaign status

Here user will get all the actions such as:

For the case of ongoing campaigns user is able to update the campaign , configure checklist and to view user credentials , all the 4 options will be visible.

Action Ongoing

File Path:

https://github.com/egovernments/DIGIT-Frontend/blob/8e56e756453222445162013fec7d16ab227b85c5/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/MyCampaign.js

Config:

https://github.com/egovernments/DIGIT-Frontend/blob/f00410f4d8198d8eebfaf7d7655661c64aff2397/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/myCampaignConfig.js

UICustomisation:

https://github.com/egovernments/DIGIT-Frontend/blob/8e56e756453222445162013fec7d16ab227b85c5/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/UICustomizations.js

Was this helpful?