From 95069621d2e1093a0be54ea5756fbdb6163f4f4a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 9 Nov 2023 16:38:53 +0200 Subject: [PATCH] disabled button for manual import,added guardin rerun button --- .../grid/RerunTransactionsSyncDialog.tsx | 11 +++++++---- .../admin/donations/grid/GridAppbar.tsx | 18 ++++++++++-------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/components/admin/bank-transactions/grid/RerunTransactionsSyncDialog.tsx b/src/components/admin/bank-transactions/grid/RerunTransactionsSyncDialog.tsx index f13bf6d5b..3715d1a9a 100644 --- a/src/components/admin/bank-transactions/grid/RerunTransactionsSyncDialog.tsx +++ b/src/components/admin/bank-transactions/grid/RerunTransactionsSyncDialog.tsx @@ -11,10 +11,13 @@ import FormDatePicker from 'components/common/form/FormDatePicker' import { useMutation } from '@tanstack/react-query' import { AlertStore } from 'stores/AlertStore' -const validationSchema: yup.SchemaOf = yup.object().defined().shape({ - startDate: yup.date().required(), - endDate: yup.date().required(), -}) +const validationSchema: yup.SchemaOf = yup + .object() + .defined() + .shape({ + startDate: yup.date().required().min(new Date('2023, 07, 17')), + endDate: yup.date().required(), + }) export default function RerunTransactionSyncModal({ isOpen, diff --git a/src/components/admin/donations/grid/GridAppbar.tsx b/src/components/admin/donations/grid/GridAppbar.tsx index 6eadd115e..3c307c349 100644 --- a/src/components/admin/donations/grid/GridAppbar.tsx +++ b/src/components/admin/donations/grid/GridAppbar.tsx @@ -1,6 +1,6 @@ import { useRouter } from 'next/router' import { useTranslation } from 'next-i18next' -import { Box, TextField, Toolbar, Tooltip, Typography } from '@mui/material' +import { Box, Button, TextField, Toolbar, Tooltip, Typography } from '@mui/material' import { Receipt, GetApp as DownloadFileIcon } from '@mui/icons-material' import { routes } from 'common/routes' @@ -77,13 +77,15 @@ export default function GridAppbar() { /> - - router.push(routes.admin.donations.addBankTransactionsFile)} - /> - +