Skip to content

Commit

Permalink
disabled button for manual import,added guardin rerun button
Browse files Browse the repository at this point in the history
  • Loading branch information
dzhaniivanov committed Nov 9, 2023
1 parent 72f5df2 commit 9506962
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<RerunTransactionsDatesInput> = yup.object().defined().shape({
startDate: yup.date().required(),
endDate: yup.date().required(),
})
const validationSchema: yup.SchemaOf<RerunTransactionsDatesInput> = yup
.object()
.defined()
.shape({
startDate: yup.date().required().min(new Date('2023, 07, 17')),
endDate: yup.date().required(),
})

export default function RerunTransactionSyncModal({
isOpen,
Expand Down
18 changes: 10 additions & 8 deletions src/components/admin/donations/grid/GridAppbar.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -77,13 +77,15 @@ export default function GridAppbar() {
/>
<Box sx={{ height: '64px', display: 'flex', alignItems: 'flex-end', pb: 1 }}>
<Box sx={{ display: 'flex', alignItems: 'center' }}>
<Tooltip title={t('donations:form-heading-bank-transactions-file') || ''}>
<Receipt
sx={addIconStyles}
fontSize="large"
onClick={() => router.push(routes.admin.donations.addBankTransactionsFile)}
/>
</Tooltip>
<Button disabled>
<Tooltip title={t('donations:form-heading-bank-transactions-file') || ''}>
<Receipt
sx={addIconStyles}
fontSize="large"
onClick={() => router.push(routes.admin.donations.addBankTransactionsFile)}
/>
</Tooltip>
</Button>
<Tooltip title={t('donations:cta:download') || ''}>
<DownloadFileIcon
sx={addIconStyles}
Expand Down

0 comments on commit 9506962

Please sign in to comment.