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": "تاریخ بروزرسانی"
},
"ConfirmDialog": {
"confirm": "تایید",
"confirm": "ارجاع",
"context": "آیا از تایید این آیتم اطمینان دارید؟",
"button-cancel": "بستن",
"button-confirm": "تایید",
"button-confirm": "ارجاع",
"description_error": "وارد کردن توضیحات الزامی است!",
"optional": " (اختیاری)",
"unit": " (ریال)",

View File

@@ -33,7 +33,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => {
})
.test('fileType', `${t("MachinaryOffice.upload_file_format")}`, (value) => {
// 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);
})
});

View File

@@ -25,7 +25,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => {
})
.test('fileType', `${t("NavganProvinceManager.upload_file_format")}`, (value) => {
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);
})
})
@@ -71,7 +71,6 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => {
setShowAddIcon(false);
}
};
return (
<>
<DialogContent>

View File

@@ -31,7 +31,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => {
return value.size <= 2 * 1024 * 1024;
})
.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);
})
});

View File

@@ -25,7 +25,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => {
})
.test('fileType', `${t("PassengerOffice.upload_file_format")}`, (value) => {
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);
})
})

View File

@@ -25,7 +25,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => {
})
.test('fileType', `${t("TransportationAssistance.upload_file_format")}`, (value) => {
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);
})
})