mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
fix: remove realization_date validation
This commit is contained in:
@@ -14,18 +14,7 @@ export type ExpensesFilterType = {
|
|||||||
|
|
||||||
export const ExpensesFilterSchema = yup.object({
|
export const ExpensesFilterSchema = yup.object({
|
||||||
transaction_date: yup.string().nullable(),
|
transaction_date: yup.string().nullable(),
|
||||||
realization_date: yup
|
realization_date: yup.string().nullable(),
|
||||||
.string()
|
|
||||||
.nullable()
|
|
||||||
.test(
|
|
||||||
'is-greater-or-equal-transaction',
|
|
||||||
'Tanggal realisasi tidak boleh sebelum tanggal transaksi',
|
|
||||||
function (value) {
|
|
||||||
const { transaction_date } = this.parent;
|
|
||||||
if (!transaction_date || !value) return true;
|
|
||||||
return new Date(value) >= new Date(transaction_date);
|
|
||||||
}
|
|
||||||
),
|
|
||||||
location: yup
|
location: yup
|
||||||
.object({
|
.object({
|
||||||
value: yup.number().required(),
|
value: yup.number().required(),
|
||||||
|
|||||||
Reference in New Issue
Block a user