Skip to content

Conversation

@binh-dam-ibigroup
Copy link
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

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
Contributor Author

cc. @miles-grant-ibigroup

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
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

@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

}, [auth0, currentlyDownloadingFile])

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

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
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.

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
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.

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
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


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

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)?


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

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.

5 participants