mirror of
https://fast.feibisi.com/https://github.com/parcelvoy/platform.git
synced 2025-09-12 14:08:50 +08:00
Minor fixes to journey stats (#208)
This commit is contained in:
parent
928b83802b
commit
22bd7d8fbf
2 changed files with 3 additions and 3 deletions
|
@ -274,7 +274,7 @@ export const getJourneyStepStats = async (journeyId: number) => {
|
|||
|
||||
return steps.reduce<JourneyStepStats>((a, { external_id, id }) => {
|
||||
a[external_id] = {
|
||||
completions: completions.find(uc => uc.step_id)?.users ?? 0,
|
||||
completions: completions.find(uc => uc.step_id === id)?.users ?? 0,
|
||||
waiting: waiting.find(uc => uc.step_id === id)?.users ?? 0,
|
||||
}
|
||||
return a
|
||||
|
|
|
@ -111,8 +111,8 @@ function JourneyStepNode({
|
|||
</span>
|
||||
<h4 className="step-header-title">{type.name}</h4>
|
||||
<div className="step-header-stats">
|
||||
<span className="stat">{stats.waiting}<TimeIcon /></span>
|
||||
<span className="stat">{stats.completions}<CheckCircleIcon /></span>
|
||||
{typeName === 'delay' && <span className="stat">{(stats?.waiting ?? 0).toLocaleString()}<TimeIcon /></span>}
|
||||
<span className="stat">{(stats?.completions ?? 0).toLocaleString()}<CheckCircleIcon /></span>
|
||||
</div>
|
||||
</div>
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue