Skip to content

Commit

Permalink
FEATURE/HCMPRE-1826 : Fixed 0 capacity validation from microplan
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhavya-egov committed Jan 20, 2025
1 parent 90e62bd commit a82d166
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,16 @@ const UploadData = ({ formData, onSelect, ...props }) => {
downloadExcelWithCustomName({ fileStoreId: file?.filestoreId, customName: fileNameWithoutExtension });
}
};
useEffect(() =>{
if(totalData?.HCM_CAMPAIGN_UPLOAD_FACILITY_DATA?.uploadFacility?.uploadedFile?.[0]?.resourceId == "not-validated"){
const errorMessage = t("HCM_INVALID_CAPACITY");
setErrorsType((prevErrors) => ({
...prevErrors,
[type]: errorMessage,
}));
setIsError(true);
}
},[totalData?.HCM_CAMPAIGN_UPLOAD_FACILITY_DATA?.uploadFacility?.uploadedFile?.[0]?.resourceId])
useEffect(() => {
const fetchData = async () => {
if (!errorsType[type] && uploadedFile?.length > 0 && !isSuccess) {
Expand Down

0 comments on commit a82d166

Please sign in to comment.