From 50378a2ee272684f2214a59d63faa77bdeca831a Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Wed, 6 May 2026 09:49:13 +0700 Subject: [PATCH] fix: remote realization_date validation --- .../pages/expense/filter/ExpensesFilter.ts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/components/pages/expense/filter/ExpensesFilter.ts b/src/components/pages/expense/filter/ExpensesFilter.ts index 7c833f2a..b520a49f 100644 --- a/src/components/pages/expense/filter/ExpensesFilter.ts +++ b/src/components/pages/expense/filter/ExpensesFilter.ts @@ -14,18 +14,7 @@ export type ExpensesFilterType = { export const ExpensesFilterSchema = yup.object({ transaction_date: yup.string().nullable(), - realization_date: yup - .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); - } - ), + realization_date: yup.string().nullable(), location: yup .object({ value: yup.number().required(),