fix(webapp): filter by customers, vendors and items in reports do not work

This commit is contained in:
Ahmed Bouhuolia
2023-08-20 01:59:44 +02:00
parent 5bf8a9e0ff
commit fbeb489128
41 changed files with 733 additions and 584 deletions

View File

@@ -0,0 +1,19 @@
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: [],
});