Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
Update SearchUserForm.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mukund-egov authored Oct 7, 2024
1 parent 02477a5 commit 6fdeef7
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,6 @@ const SearchUserForm = React.memo(({ uniqueTenants, setUniqueTenants, roles, set
if (divisionAdmin) setRequiredOptions(data);
if (Object.keys(data).length === 0 || Object.values(data).every((value) => !value)) {
//toast message
console.log("pakda gaya");
setShowToast({ warning: true, label: t("ES_COMMON_MIN_SEARCH_CRITERIA_MSG") });
setTimeout(closeToast, 5000);
return;
Expand All @@ -372,15 +371,13 @@ const SearchUserForm = React.memo(({ uniqueTenants, setUniqueTenants, roles, set
});

if (areMandatoryFieldsNotFilled) {
console.log("I got it");
setShowToast({ warning: true, label: t("ES_COMMON_MIN_SEARCH_CRITERIA_MSG") });
setTimeout(closeToast, 5000);
return;
}

//checking roles
if (data?.roles?.length === 0 || !data?.roles) {
console.log("I got it:roles");

setShowToast({ warning: true, label: t("ES_COMMON_MIN_SEARCH_CRITERIA_MSG") });
setTimeout(closeToast, 5000);
Expand Down Expand Up @@ -423,7 +420,6 @@ const SearchUserForm = React.memo(({ uniqueTenants, setUniqueTenants, roles, set
const divisionC = userData[0].divisionCode;

if (tree && tree[zoneC] && tree[zoneC][circleC]) {
console.log(tree[zoneC][circleC][divisionC]);
setDivisionTree(tree[zoneC][circleC][divisionC]);
}
}
Expand Down

0 comments on commit 6fdeef7

Please sign in to comment.