diff --git a/health/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaign.scss b/health/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaign.scss index 9a5de956769..81527da06fb 100644 --- a/health/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaign.scss +++ b/health/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaign.scss @@ -149,3 +149,31 @@ width: -webkit-fill-available; } } +.label-field-grid { + display: grid; + grid-template-columns: 20rem 20rem 20rem; + gap: 2rem; + + .update-date-labelField { + display: grid; + grid-template-columns: 1fr; + align-items: start; + + .update-label { + display: flex; + + p { + margin: 0; + margin-bottom: 0.25rem; + } + + .mandatory-date { + margin-top: -0.25rem; + } + } + } + + .digit-button-primary { + align-self: flex-end; + } +} diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignSummary.js b/health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignSummary.js index 4ffc2e5e6f2..fe24da37a2e 100644 --- a/health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignSummary.js +++ b/health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignSummary.js @@ -224,6 +224,9 @@ const fetchcd = async (tenantId, projectId) => { }, ], }, + config:{ + enabled: projectId ? true: false + } }; try { const res = await Digit.CustomService.getResponse(reqCriteriaResource); @@ -318,7 +321,7 @@ const CampaignSummary = (props) => { // }, [props?.props?.summaryErrors]); useEffect(() => { - const fun = async () => { + const fetchData = async () => { let temp = await fetchcd(tenantId, projectId); if (temp) { await new Promise((resolve) => { @@ -329,9 +332,13 @@ const CampaignSummary = (props) => { }); } }; - fun(); + + if (projectId) { + fetchData(); + } }, [projectId]); + const { isLoading, data, error, refetch } = Digit.Hooks.campaign.useSearchCampaign({ tenantId: tenantId, filter: { diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/myCampaignConfig.js b/health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/myCampaignConfig.js index bcf30616526..2507d4a605d 100644 --- a/health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/myCampaignConfig.js +++ b/health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/myCampaignConfig.js @@ -41,8 +41,8 @@ export const myCampaignConfig = { secondaryLabel: "ES_COMMON_CLEAR_SEARCH", minReqFields: 0, defaultValues: { - name: "", - type: "", + campaignName: "", + campaignType: "", }, fields: [ { diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/UpdateBoundary.js b/health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/UpdateBoundary.js index 08f8b9c44ec..1d1e1daeb28 100644 --- a/health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/UpdateBoundary.js +++ b/health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/UpdateBoundary.js @@ -121,7 +121,7 @@ const UpdateBoundary = ({hierarchyData }) => { const [fetchUpload, setFetchUpload] = useState(false); const [active, setActive] = useState(0); const { data: hierarchyConfig } = Digit.Hooks.useCustomMDMS(tenantId, "HCM-ADMIN-CONSOLE", [{ name: "hierarchyConfig" }]); - const [hierarchyType, setHierarchyType] = useState({}); + const [hierarchyType, setHierarchyType] = useState(); const lowestHierarchy = useMemo(() => { return hierarchyConfig?.["HCM-ADMIN-CONSOLE"]?.hierarchyConfig?.find((item) => item.hierarchy === hierarchyType)?.lowestHierarchy; }, [hierarchyConfig, hierarchyType]); @@ -648,6 +648,9 @@ const UpdateBoundary = ({hierarchyData }) => { setShowToast({ key: "error", label: "AT_LEAST_ONE_FILE_REQUIRED_ERROR" }); return false; } + if (updateBoundary.length === 0 && (!isTargetError || !isFacilityError || !isUserError)) { + return true; + } if (isTargetError) { setShowToast({ key: "error", label: "TARGET_DETAILS_ERROR" }); return false;