Skip to content

Commit

Permalink
BUGFIX/HCMPRE-1826 : Enhanced microplan validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhavya-egov committed Jan 21, 2025
1 parent 00cad08 commit a16dad3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -855,10 +855,17 @@ const UploadData = ({ formData, onSelect, ...props }) => {
}
};
useEffect(() =>{
if(totalData?.HCM_CAMPAIGN_UPLOAD_FACILITY_DATA?.uploadFacility?.uploadedFile?.[0]?.resourceId == "not-validated"){
if(totalData?.HCM_CAMPAIGN_UPLOAD_FACILITY_DATA?.uploadFacility?.uploadedFile?.[0]?.resourceId == "not-validated" ||
totalData?.HCM_CAMPAIGN_UPLOAD_USER_DATA?.uploadUser?.uploadedFile?.[0]?.resourceId == "not-validated" ||
totalData?.HCM_CAMPAIGN_UPLOAD_BOUNDARY_DATA?.uploadBoundary?.uploadedFile?.[0]?.resourceId == "not-validated"
){
setNotValid(1);
}
},[totalData?.HCM_CAMPAIGN_UPLOAD_FACILITY_DATA?.uploadFacility?.uploadedFile?.[0]?.resourceId])
},[totalData?.HCM_CAMPAIGN_UPLOAD_FACILITY_DATA?.uploadFacility?.uploadedFile?.[0]?.resourceId ,
totalData?.HCM_CAMPAIGN_UPLOAD_USER_DATA?.uploadUser?.uploadedFile?.[0]?.resourceId,
totalData?.HCM_CAMPAIGN_UPLOAD_BOUNDARY_DATA?.uploadBoundary?.uploadedFile?.[0]?.resourceId
])

useEffect(() => {
const fetchData = async () => {
if ((!errorsType[type] && uploadedFile?.length > 0 && !isSuccess) || notValid==1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const useProductList = (tenantId,projectType) => {
config: {
enabled: true,
select: (data) => {
if (projectType === "Co-delivery") {
if (projectType === "DEFAULT") {
return data?.ProductVariant;
}
const filteredData = data?.ProductVariant?.filter(item =>
Expand Down

0 comments on commit a16dad3

Please sign in to comment.