From f73a5b7798522e1ca6233be0d6daeed5d8314a4d Mon Sep 17 00:00:00 2001 From: Jeeva Ramachandran <120017870+JeevaRamu0104@users.noreply.github.com> Date: Mon, 4 Nov 2024 16:18:57 +0530 Subject: [PATCH] fix: analytics sessionizer bugs (#1671) --- .../Analytics/PaymentsAnalytics/PaymentAnalytics.res | 2 +- .../Analytics/PaymentsAnalytics/SmartRetryAnalytics.res | 8 ++++---- src/screens/NewAnalytics/NewAnalyticsUtils.res | 2 +- .../PaymentsSuccessRate/PaymentsSuccessRate.res | 4 +++- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/screens/Analytics/PaymentsAnalytics/PaymentAnalytics.res b/src/screens/Analytics/PaymentsAnalytics/PaymentAnalytics.res index e8031b940..d1f335767 100644 --- a/src/screens/Analytics/PaymentsAnalytics/PaymentAnalytics.res +++ b/src/screens/Analytics/PaymentsAnalytics/PaymentAnalytics.res @@ -273,7 +273,7 @@ let make = () => { moduleName="payments_analytics_amount" formaPayload /> - + > = [ ] @react.component -let make = (~filterKeys, ~moduleName) => { +let make = (~moduleName) => { open APIUtils let getURL = useGetURL() let smartRetryAnalyticsUrl = getURL( @@ -251,7 +251,7 @@ let make = (~filterKeys, ~moduleName) => { let formaPayload = (singleStatBodyEntity: DynamicSingleStat.singleStatBodyEntity) => { [ AnalyticsUtils.getFilterRequestBody( - ~filter=singleStatBodyEntity.filter, + ~filter=None, ~metrics=singleStatBodyEntity.metrics, ~delta=?singleStatBodyEntity.delta, ~startDateTime=singleStatBodyEntity.startDateTime, @@ -280,7 +280,7 @@ let make = (~filterKeys, ~moduleName) => { entity={singleStatEntity} startTimeFilterKey endTimeFilterKey - filterKeys + filterKeys=[] moduleName showPercentage=false statSentiment={singleStatEntity.statSentiment->Option.getOr(Dict.make())} @@ -293,7 +293,7 @@ let make = (~filterKeys, ~moduleName) => { entity=singleStatAMountEntity startTimeFilterKey endTimeFilterKey - filterKeys + filterKeys=[] moduleName showPercentage=false statSentiment={singleStatAMountEntity.statSentiment->Option.getOr(Dict.make())} diff --git a/src/screens/NewAnalytics/NewAnalyticsUtils.res b/src/screens/NewAnalytics/NewAnalyticsUtils.res index 2d1814d74..422d37e17 100644 --- a/src/screens/NewAnalytics/NewAnalyticsUtils.res +++ b/src/screens/NewAnalytics/NewAnalyticsUtils.res @@ -141,7 +141,7 @@ let getLabelName = (~key, ~index, ~points) => { if key === "time_bucket" { let pointsArray = points->getArrayFromJson([]) let startPoint = pointsArray->getDateObject(0) - let endPoint = pointsArray->getDateObject(1) + let endPoint = pointsArray->getDateObject(pointsArray->Array.length - 1) let startDate = startPoint->formatDateValue let endDate = endPoint->formatDateValue diff --git a/src/screens/NewAnalytics/PaymentAnalytics/PaymentsSuccessRate/PaymentsSuccessRate.res b/src/screens/NewAnalytics/PaymentAnalytics/PaymentsSuccessRate/PaymentsSuccessRate.res index db4b310a7..7f53ce58c 100644 --- a/src/screens/NewAnalytics/PaymentAnalytics/PaymentsSuccessRate/PaymentsSuccessRate.res +++ b/src/screens/NewAnalytics/PaymentAnalytics/PaymentsSuccessRate/PaymentsSuccessRate.res @@ -35,7 +35,9 @@ module PaymentsSuccessRateHeader = {
// will enable it in future
-
{primaryValue->Float.toString->React.string}
+
+ {primaryValue->valueFormatter(Rate)->React.string} +