Skip to content

Commit

Permalink
BUGFIX/HCMPRE-2243 : Showing only supported campaign types for microp…
Browse files Browse the repository at this point in the history
…lan ui (#2185)

* BUGFIX/HCMPRE-2243 : Showing only supported campaign types for microplan

* Added review changes

* Updated to hcm-microplanning module

* Fixed typo
  • Loading branch information
Swathi-eGov authored Feb 3, 2025
1 parent 00199c6 commit 621dc5f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ const CampaignDetails = ({ onSelect, props: customProps, ...props }) => {
{ schemaCode: "ProjectType" }
);

const campaignTypeOptions = state?.MicroplanCampaignTypes?.map(item => item.code) || [];

useEffect(() => {
onSelect(customProps.name, {
distributionStrat,
Expand Down Expand Up @@ -112,7 +114,7 @@ const CampaignDetails = ({ onSelect, props: customProps, ...props }) => {
// variant={error ? "error" : ""}
t={t}
option={data?.campaignTypes?.filter(
(campaign) => campaign.code !== "IRS-mz"
(campaign) => campaignTypeOptions?.includes(campaign.code)
)}
optionKey={"i18nKey"}
selected={campaignType}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ const App = ({ path, stateCode, userType, tenants, BOUNDARY_HIERARCHY_TYPE, hier
{ name: "VehicleDetails" },
{ name: "ContextPathForUser" },
{ name: "DssKpiConfigs" },
{ name: "MicroplanCampaignTypes" },
],
{
cacheTime: Infinity,
Expand Down

0 comments on commit 621dc5f

Please sign in to comment.