diff --git a/src/components/NoDataFound.res b/src/components/NoDataFound.res
index 44f2f3ac9..1b0d2b641 100644
--- a/src/components/NoDataFound.res
+++ b/src/components/NoDataFound.res
@@ -1,4 +1,36 @@
-type renderType = InfoBox | Painting | NotFound | Locked | LoadError
+type renderType = InfoBox | Painting | NotFound | Locked | LoadError | ExtendDateUI
+
+module ExtendDateComponent = {
+ open LogicUtils
+ @react.component
+ let make = () => {
+ let {filterValueJson, updateExistingKeys} = React.useContext(FilterContext.filterContext)
+ let startTime = filterValueJson->getString("start_time", "")
+
+ let handleClick = _ => {
+ let startDateObj = startTime->DayJs.getDayJsForString
+ let extendedStartDate = startDateObj.subtract(90, "day").toDate()->Date.toISOString
+ let extendedEndDate = startDateObj.subtract(1, "day").toDate()->Date.toISOString
+
+ updateExistingKeys(Dict.fromArray([("start_time", {extendedStartDate})]))
+ updateExistingKeys(Dict.fromArray([("end_time", {extendedEndDate})]))
+ }
+
+
+
+
+ {"Or try the following:"->React.string}
+
+ - {"Try a different search parameter"->React.string}
+ - {"Adjust or remove filters and search once more"->React.string}
+
+
+
+
+ }
+}
@react.component
let make = (
@@ -19,6 +51,7 @@ let make = (
| Locked => "mt-32 p-16"
| LoadError => "mt-32 p-16"
| InfoBox => ""
+ | ExtendDateUI => "mt-16 p-16"
}
isMobileView ? "" : marginPaddingClass
}
@@ -101,6 +134,11 @@ let make = (
}}
+ | ExtendDateUI =>
+
+
{message->React.string}
+
+
}}
}
diff --git a/src/screens/Payouts/PayoutsList.res b/src/screens/Payouts/PayoutsList.res
index 1d3c3efc2..efd413105 100644
--- a/src/screens/Payouts/PayoutsList.res
+++ b/src/screens/Payouts/PayoutsList.res
@@ -20,6 +20,10 @@ let make = () => {
UserInfoProvider.defaultContext,
)
+ let customUI = {
+
+ }
+
let fetchPayouts = () => {
switch filters {
| Some(dict) =>
diff --git a/src/screens/Payouts/PayoutsUtils.res b/src/screens/Payouts/PayoutsUtils.res
index db6d307f9..a5da6adb2 100644
--- a/src/screens/Payouts/PayoutsUtils.res
+++ b/src/screens/Payouts/PayoutsUtils.res
@@ -45,13 +45,6 @@ let getPayoutsList = async (
}
}
-let customUI =
-
-
let (startTimeFilterKey, endTimeFilterKey) = ("start_time", "end_time")
let filterByData = (txnArr, value) => {
diff --git a/src/screens/Transaction/Disputes/Disputes.res b/src/screens/Transaction/Disputes/Disputes.res
index 5dd79dc13..01597d938 100644
--- a/src/screens/Transaction/Disputes/Disputes.res
+++ b/src/screens/Transaction/Disputes/Disputes.res
@@ -3,6 +3,7 @@ let make = () => {
open APIUtils
open HSwitchRemoteFilter
open DisputesUtils
+ open LogicUtils
let getURL = useGetURL()
let fetchDetails = useGetMethod()
@@ -18,8 +19,8 @@ let make = () => {
let {userInfo: {transactionEntity}, checkUserEntity} = React.useContext(
UserInfoProvider.defaultContext,
)
+
let getDisputesList = async () => {
- open LogicUtils
try {
setScreenState(_ => Loading)
if searchText->isNonEmptyString {
@@ -73,9 +74,7 @@ let make = () => {
}, (filters, searchText))
let customUI =
-
+
let filtersUI =
{
let customTitleStyle = previewOnly ? "py-0 !pt-0" : ""
let customUI =
-
+
let filtersUI = React.useMemo(() => {
{
UserInfoProvider.defaultContext,
)
+ let customUI = {
+
+ }
let fetchRefunds = () => {
switch filters {
| Some(dict) =>
diff --git a/src/screens/Transaction/Refunds/RefundUtils.res b/src/screens/Transaction/Refunds/RefundUtils.res
index f661c02b4..e069dbf11 100644
--- a/src/screens/Transaction/Refunds/RefundUtils.res
+++ b/src/screens/Transaction/Refunds/RefundUtils.res
@@ -72,14 +72,6 @@ let getRefundsList = async (
}
}
-let customUI =
-
-
let (startTimeFilterKey, endTimeFilterKey) = ("start_time", "end_time")
let filterByData = (txnArr, value) => {