Skip to content

Commit

Permalink
resolved HCMPRE-1070,1073-910,1075 (#1668)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhavya-egov authored Oct 25, 2024
1 parent 2a94f5a commit c59d73a
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ const fetchcd = async (tenantId, projectId) => {
},
],
},
config:{
enabled: projectId ? true: false
}
};
try {
const res = await Digit.CustomService.getResponse(reqCriteriaResource);
Expand Down Expand Up @@ -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) => {
Expand All @@ -329,9 +332,13 @@ const CampaignSummary = (props) => {
});
}
};
fun();

if (projectId) {
fetchData();
}
}, [projectId]);


const { isLoading, data, error, refetch } = Digit.Hooks.campaign.useSearchCampaign({
tenantId: tenantId,
filter: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export const myCampaignConfig = {
secondaryLabel: "ES_COMMON_CLEAR_SEARCH",
minReqFields: 0,
defaultValues: {
name: "",
type: "",
campaignName: "",
campaignType: "",
},
fields: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit c59d73a

Please sign in to comment.