Skip to content

Daily Stats#88

Merged
binh-dam-ibigroup merged 34 commits intodevfrom
daily-stats
Nov 19, 2025
Merged

Daily Stats#88
binh-dam-ibigroup merged 34 commits intodevfrom
daily-stats

Conversation

@binh-dam-ibigroup
Copy link
Copy Markdown
Contributor

@binh-dam-ibigroup binh-dam-ibigroup commented Nov 11, 2025

This PR adds a tab page with charts for daily number of trip requests, and OTP users with trip requests, and total number of OTP users. Daily stats are populated only for OTP-middleware deployments that include ibi-group/otp-middleware#349.

image

@vercel
Copy link
Copy Markdown

vercel Bot commented Nov 11, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
arc-otp-admin-ui Ready Ready Preview Comment Nov 19, 2025 3:32pm
atlrides-otp-admin-ui Ready Ready Preview Comment Nov 19, 2025 3:32pm
otp-admin-ui Ready Ready Preview Comment Nov 19, 2025 3:32pm
st-otp-admin-ui Ready Ready Preview Comment Nov 19, 2025 3:32pm

@binh-dam-ibigroup
Copy link
Copy Markdown
Contributor Author

cc. @miles-grant-ibigroup

Comment thread components/DailyStatsDashboard.tsx Outdated
import DailyStatsChart from './DailyStatsChart'
import FetchMessage from './FetchMessage'

const DAILY_STATS_URL = `${process.env.API_BASE_URL}/api/secure/dailystats?fromDate=2025-01-01`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const DAILY_STATS_URL = `${process.env.API_BASE_URL}/api/secure/dailystats?fromDate=2025-01-01`
const DAILY_STATS_URL = `${process.env.API_BASE_URL}/api/secure/dailystats?fromDate=${someGeneratedData}`

Not a formal review but this jumped out to me! Overall this looks exciting thanks for your work

Copy link
Copy Markdown

@amy-corson-ibigroup amy-corson-ibigroup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking really good! Just a few nitpicks and questions

Comment thread components/CDPUserDashboard.tsx Outdated
}, [auth0, currentlyDownloadingFile])

let files = Object.keys(swrData).length > 0 ? swrData?.data?.data : []
let files = Object.keys(swrData).length > 0 ? swrData?.data?.data || [] : []
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this just be let files = swrData?.data?.data || []

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, updated in fad9c36.

Comment thread components/Chart.tsx
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few functions getting flagged for missing return types here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in 40c0caf.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing here, a few missing return types

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in 3cc834e

Comment thread components/DailyStatsChart.tsx Outdated

render() {
const { entityType, records, series } = this.props
if (records.length === 0) return null
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this just be if (!records.length)?

Comment thread components/Chart.tsx Outdated

render() {
const { data, entityType, title } = this.props
if (data.length === 0) return null
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, could it just be if (!data.length)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants