mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-24 16:49:48 +00:00
20 lines
515 B
TypeScript
20 lines
515 B
TypeScript
import * as Yup from 'yup';
|
|
import intl from 'react-intl-universal';
|
|
import moment from 'moment';
|
|
|
|
export const getCustomersTransactionsQuerySchema = () => {
|
|
return Yup.object().shape({
|
|
fromDate: Yup.date().required().label(intl.get('fromDate')),
|
|
toDate: Yup.date()
|
|
.min(Yup.ref('fromDate'))
|
|
.required()
|
|
.label(intl.get('toDate')),
|
|
});
|
|
};
|
|
|
|
export const getCustomersTransactionsDefaultQuery = () => ({
|
|
fromDate: moment().toDate(),
|
|
toDate: moment().toDate(),
|
|
customersIds: [],
|
|
});
|