From 2a1e802ab29c776d8f1afba7cae334b89573e666 Mon Sep 17 00:00:00 2001 From: Aji Kamaludin Date: Tue, 27 Jun 2023 11:36:25 +0700 Subject: [PATCH] bit fix filter date --- resources/js/Customer/Components/HeaderTrx.jsx | 6 +++--- resources/js/Customer/Deposit/Index.jsx | 4 ++++ resources/js/Customer/Poin/Index.jsx | 3 +++ resources/js/Customer/Trx/Index.jsx | 3 +++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/resources/js/Customer/Components/HeaderTrx.jsx b/resources/js/Customer/Components/HeaderTrx.jsx index 0464bef..bc4d7ae 100644 --- a/resources/js/Customer/Components/HeaderTrx.jsx +++ b/resources/js/Customer/Components/HeaderTrx.jsx @@ -88,7 +88,7 @@ export default function HeaderTrx({ enable = 'deposit', dates, setDates }) {
{ return ( @@ -49,6 +50,9 @@ export default function Index(props) { useEffect(() => { if (preValue) { + if (isEmpty(dates.endDate)) { + return + } router.get( route(route().current()), { diff --git a/resources/js/Customer/Poin/Index.jsx b/resources/js/Customer/Poin/Index.jsx index 42a9fdb..4382e03 100644 --- a/resources/js/Customer/Poin/Index.jsx +++ b/resources/js/Customer/Poin/Index.jsx @@ -49,6 +49,9 @@ export default function Index(props) { useEffect(() => { if (preValue) { + if (isEmpty(dates.endDate)) { + return + } router.get( route(route().current()), { diff --git a/resources/js/Customer/Trx/Index.jsx b/resources/js/Customer/Trx/Index.jsx index db577b1..721b7fd 100644 --- a/resources/js/Customer/Trx/Index.jsx +++ b/resources/js/Customer/Trx/Index.jsx @@ -52,6 +52,9 @@ export default function Index(props) { useEffect(() => { if (preValue) { + if (isEmpty(dates.endDate)) { + return + } router.get( route(route().current()), {