Merge branch 'master-AIO' into feature/IO-3020-IO-3036-imex-lite-rome-lite
This commit is contained in:
@@ -274,6 +274,22 @@ export function ReportCenterModalComponent({ reportCenterModal, bodyshop }) {
|
||||
{
|
||||
required: true
|
||||
//message: t("general.validation.required"),
|
||||
},
|
||||
{
|
||||
validator: (_, value) => {
|
||||
if (
|
||||
(!import.meta.env.VITE_APP_IS_TEST && import.meta.env.PROD) &&
|
||||
value &&
|
||||
value[0] &&
|
||||
value[1]
|
||||
) {
|
||||
const diffInDays = (value[1] - value[0]) / (1000 * 3600 * 24);
|
||||
if (diffInDays > 92) {
|
||||
return Promise.reject(t("general.validation.dateRangeExceeded"));
|
||||
}
|
||||
}
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
]}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user