diff --git a/src/components/dashboard/machinary-office/Form/ConfirmForm.jsx b/src/components/dashboard/machinary-office/Form/ConfirmForm.jsx index 6166ff4..f2988ef 100644 --- a/src/components/dashboard/machinary-office/Form/ConfirmForm.jsx +++ b/src/components/dashboard/machinary-office/Form/ConfirmForm.jsx @@ -61,6 +61,7 @@ const ConfirmForm = ({ open, handleClose, rowId, confirmData }) => { const maxFileSize = 2 * 1024 * 1024; if (uploadedFile.size > maxFileSize) { UploadFileNotification(directionApp, t); + event.target.value = ""; return; } const fileType = event.target?.files?.[0].type; diff --git a/src/components/dashboard/machinary-office/Form/RejectForm.jsx b/src/components/dashboard/machinary-office/Form/RejectForm.jsx index 70c606c..b7a37e9 100644 --- a/src/components/dashboard/machinary-office/Form/RejectForm.jsx +++ b/src/components/dashboard/machinary-office/Form/RejectForm.jsx @@ -53,6 +53,7 @@ const RejectForm = ({ open, handleClose, rowId, rejectData }) => { const maxFileSize = 2 * 1024 * 1024; if (uploadedFile.size > maxFileSize) { UploadFileNotification(directionApp, t); + event.target.value = ""; return; } const fileType = event.target?.files?.[0].type; diff --git a/src/components/dashboard/passenger-boss/Form/ConfirmForm.jsx b/src/components/dashboard/passenger-boss/Form/ConfirmForm.jsx index 788305c..ec01590 100644 --- a/src/components/dashboard/passenger-boss/Form/ConfirmForm.jsx +++ b/src/components/dashboard/passenger-boss/Form/ConfirmForm.jsx @@ -62,6 +62,7 @@ const ConfirmForm = ({ open, handleClose, rowId, confirmData }) => { const maxFileSize = 2 * 1024 * 1024; if (uploadedFile.size > maxFileSize) { UploadFileNotification(directionApp, t); + event.target.value = ""; return; } const fileType = event.target?.files?.[0].type; diff --git a/src/components/dashboard/passenger-boss/Form/RejectForm.jsx b/src/components/dashboard/passenger-boss/Form/RejectForm.jsx index eeb23c1..955a487 100644 --- a/src/components/dashboard/passenger-boss/Form/RejectForm.jsx +++ b/src/components/dashboard/passenger-boss/Form/RejectForm.jsx @@ -53,6 +53,7 @@ const RejectForm = ({ open, handleClose, rowId, rejectData }) => { const maxFileSize = 2 * 1024 * 1024; if (uploadedFile.size > maxFileSize) { UploadFileNotification(directionApp, t); + event.target.value = ""; return; } const fileType = event.target?.files?.[0].type; diff --git a/src/components/dashboard/passenger-office/Form/ConfirmForm.jsx b/src/components/dashboard/passenger-office/Form/ConfirmForm.jsx index 645c2f6..1e02f33 100644 --- a/src/components/dashboard/passenger-office/Form/ConfirmForm.jsx +++ b/src/components/dashboard/passenger-office/Form/ConfirmForm.jsx @@ -48,6 +48,7 @@ const ConfirmForm = ({ open, handleClose, rowId, confirmData }) => { const maxFileSize = 2 * 1024 * 1024; if (uploadedFile.size > maxFileSize) { UploadFileNotification(directionApp, t); + event.target.value = ""; return; } const fileType = event.target?.files?.[0].type; diff --git a/src/components/dashboard/passenger-office/Form/RejectForm.jsx b/src/components/dashboard/passenger-office/Form/RejectForm.jsx index d4ab6d6..6b66c7a 100644 --- a/src/components/dashboard/passenger-office/Form/RejectForm.jsx +++ b/src/components/dashboard/passenger-office/Form/RejectForm.jsx @@ -52,6 +52,7 @@ const RejectForm = ({ open, handleClose, rowId, rejectData }) => { const maxFileSize = 2 * 1024 * 1024; if (uploadedFile.size > maxFileSize) { UploadFileNotification(directionApp, t); + event.target.value = ""; return; } const fileType = event.target?.files?.[0].type; diff --git a/src/components/dashboard/province-manager/Form/ConfirmForm.jsx b/src/components/dashboard/province-manager/Form/ConfirmForm.jsx index e5c04ec..69e3a62 100644 --- a/src/components/dashboard/province-manager/Form/ConfirmForm.jsx +++ b/src/components/dashboard/province-manager/Form/ConfirmForm.jsx @@ -48,6 +48,7 @@ const ConfirmForm = ({ open, handleClose, rowId, confirmData }) => { const maxFileSize = 2 * 1024 * 1024; if (uploadedFile.size > maxFileSize) { UploadFileNotification(directionApp, t); + event.target.value = ""; return; } const fileType = event.target?.files?.[0].type; diff --git a/src/components/dashboard/province-manager/Form/RejectForm.jsx b/src/components/dashboard/province-manager/Form/RejectForm.jsx index 430c5b2..f1e266d 100644 --- a/src/components/dashboard/province-manager/Form/RejectForm.jsx +++ b/src/components/dashboard/province-manager/Form/RejectForm.jsx @@ -52,6 +52,7 @@ const RejectForm = ({ open, handleClose, rowId, rejectData }) => { const maxFileSize = 2 * 1024 * 1024; if (uploadedFile.size > maxFileSize) { UploadFileNotification(directionApp, t); + event.target.value = ""; return; } const fileType = event.target?.files?.[0].type; diff --git a/src/components/dashboard/transportation-assistance/Form/ConfirmForm.jsx b/src/components/dashboard/transportation-assistance/Form/ConfirmForm.jsx index 93a76e8..8067eee 100644 --- a/src/components/dashboard/transportation-assistance/Form/ConfirmForm.jsx +++ b/src/components/dashboard/transportation-assistance/Form/ConfirmForm.jsx @@ -45,6 +45,7 @@ const ConfirmForm = ({ open, handleClose, rowId, confirmData }) => { const maxFileSize = 2 * 1024 * 1024; if (uploadedFile.size > maxFileSize) { UploadFileNotification(directionApp, t); + event.target.value = ""; return; } diff --git a/src/components/dashboard/transportation-assistance/Form/RejectForm.jsx b/src/components/dashboard/transportation-assistance/Form/RejectForm.jsx index a022a33..fb3a290 100644 --- a/src/components/dashboard/transportation-assistance/Form/RejectForm.jsx +++ b/src/components/dashboard/transportation-assistance/Form/RejectForm.jsx @@ -23,7 +23,7 @@ const RejectForm = ({ open, handleClose, rowId, rejectData }) => { const [fileName, setfileName] = useState(null); const [showAddIcon, setShowAddIcon] = useState(true); const t = useTranslations(); - const { directionApp } = useDirection(); + const { directionApp } = useDirection(); const validationSchema = Yup.object().shape({ description: Yup.string().required(t("RejectDialog.description_error")), @@ -52,6 +52,7 @@ const RejectForm = ({ open, handleClose, rowId, rejectData }) => { const maxFileSize = 2 * 1024 * 1024; if (uploadedFile.size > maxFileSize) { UploadFileNotification(directionApp, t); + event.target.value = ""; return; } const fileType = event.target?.files?.[0].type;