LFFE-18 Merge branch 'feature/LFFE-18_confirm_title' into 'develop'

This commit is contained in:
AmirHossein Mahmoodi
2023-11-07 10:43:20 +00:00
6 changed files with 7 additions and 8 deletions

View File

@@ -325,10 +325,10 @@
"updated_at": "تاریخ بروزرسانی" "updated_at": "تاریخ بروزرسانی"
}, },
"ConfirmDialog": { "ConfirmDialog": {
"confirm": "تایید", "confirm": "ارجاع",
"context": "آیا از تایید این آیتم اطمینان دارید؟", "context": "آیا از تایید این آیتم اطمینان دارید؟",
"button-cancel": "بستن", "button-cancel": "بستن",
"button-confirm": "تایید", "button-confirm": "ارجاع",
"description_error": "وارد کردن توضیحات الزامی است!", "description_error": "وارد کردن توضیحات الزامی است!",
"optional": " (اختیاری)", "optional": " (اختیاری)",
"unit": " (ریال)", "unit": " (ریال)",

View File

@@ -33,7 +33,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => {
}) })
.test('fileType', `${t("MachinaryOffice.upload_file_format")}`, (value) => { .test('fileType', `${t("MachinaryOffice.upload_file_format")}`, (value) => {
// if (!value) return true; // Skip if no file is provided // if (!value) return true; // Skip if no file is provided
const allowedTypes = ['image/jpg', 'image/png', 'application/pdf']; // Define your allowed file types const allowedTypes = ['image/jpg', 'image/jpeg', 'image/png', 'application/pdf']; // Define your allowed file types
return allowedTypes.includes(value.type); return allowedTypes.includes(value.type);
}) })
}); });

View File

@@ -25,7 +25,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => {
}) })
.test('fileType', `${t("NavganProvinceManager.upload_file_format")}`, (value) => { .test('fileType', `${t("NavganProvinceManager.upload_file_format")}`, (value) => {
if (!value) return true if (!value) return true
const allowedTypes = ['image/jpg', 'image/png', 'application/pdf']; // Define your allowed file types const allowedTypes = ['image/jpg', 'image/jpeg', 'image/png', 'application/pdf']; // Define your allowed file types
return allowedTypes.includes(value.type); return allowedTypes.includes(value.type);
}) })
}) })
@@ -71,7 +71,6 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => {
setShowAddIcon(false); setShowAddIcon(false);
} }
}; };
return ( return (
<> <>
<DialogContent> <DialogContent>

View File

@@ -31,7 +31,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => {
return value.size <= 2 * 1024 * 1024; return value.size <= 2 * 1024 * 1024;
}) })
.test('fileType', `${t("PassengerBoss.upload_file_format")}`, (value) => { .test('fileType', `${t("PassengerBoss.upload_file_format")}`, (value) => {
const allowedTypes = ['image/jpg', 'image/png', 'application/pdf']; // Define your allowed file types const allowedTypes = ['image/jpg', 'image/jpeg', 'image/png', 'application/pdf']; // Define your allowed file types
return allowedTypes.includes(value.type); return allowedTypes.includes(value.type);
}) })
}); });

View File

@@ -25,7 +25,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => {
}) })
.test('fileType', `${t("PassengerOffice.upload_file_format")}`, (value) => { .test('fileType', `${t("PassengerOffice.upload_file_format")}`, (value) => {
if (!value) return true if (!value) return true
const allowedTypes = ['image/jpg', 'image/png', 'application/pdf']; // Define your allowed file types const allowedTypes = ['image/jpg', 'image/jpeg', 'image/png', 'application/pdf']; // Define your allowed file types
return allowedTypes.includes(value.type); return allowedTypes.includes(value.type);
}) })
}) })

View File

@@ -25,7 +25,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => {
}) })
.test('fileType', `${t("TransportationAssistance.upload_file_format")}`, (value) => { .test('fileType', `${t("TransportationAssistance.upload_file_format")}`, (value) => {
if (!value) return true if (!value) return true
const allowedTypes = ['image/jpg', 'image/png', 'application/pdf']; // Define your allowed file types const allowedTypes = ['image/jpg', 'image/jpeg', 'image/png', 'application/pdf']; // Define your allowed file types
return allowedTypes.includes(value.type); return allowedTypes.includes(value.type);
}) })
}) })