From da31fd8a19b8f71075cb403e70c6ce81a560fe99 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Wed, 1 Feb 2023 11:30:41 +0100 Subject: [PATCH] fix(ui) - funnel - issues filter --- .../components/Funnels/FunnelIssues/FunnelIssues.tsx | 2 +- frontend/app/mstore/types/widget.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/app/components/Dashboard/components/Funnels/FunnelIssues/FunnelIssues.tsx b/frontend/app/components/Dashboard/components/Funnels/FunnelIssues/FunnelIssues.tsx index 5e3564911..6c636f901 100644 --- a/frontend/app/components/Dashboard/components/Funnels/FunnelIssues/FunnelIssues.tsx +++ b/frontend/app/components/Dashboard/components/Funnels/FunnelIssues/FunnelIssues.tsx @@ -31,7 +31,7 @@ function FunnelIssues() { filters: item.filter.filters.filter((filter: any, index: any) => { const stage = widget.data.funnel.stages[index]; return stage &&stage.isActive - }) + }).map((f: any) => f.toJson()) } } }), diff --git a/frontend/app/mstore/types/widget.ts b/frontend/app/mstore/types/widget.ts index ab7444438..a39ba4ce2 100644 --- a/frontend/app/mstore/types/widget.ts +++ b/frontend/app/mstore/types/widget.ts @@ -6,8 +6,9 @@ import Funnelissue from 'App/mstore/types/funnelIssue'; import { issueOptions, issueCategories, issueCategoriesMap } from 'App/constants/filterOptions'; import { FilterKey } from 'Types/filter/filterType'; import Period, { LAST_24_HOURS } from 'Types/app/period'; +import Funnel from "../types/funnel"; import { metricService } from 'App/services'; -import { INSIGHTS, TABLE, WEB_VITALS } from 'App/constants/card'; +import { FUNNEL, INSIGHTS, TABLE, WEB_VITALS } from 'App/constants/card'; import Error from '../types/error'; import { getChartFormatter } from 'Types/dashboard/helper'; @@ -210,6 +211,8 @@ export default class Widget { (i: any) => new InishtIssue(i.category, i.name, i.ratio, i.oldValue, i.value, i.change, i.isNew) ); + } else if (this.metricType === FUNNEL) { + _data.funnel = new Funnel().fromJSON(_data); } else { if (data.hasOwnProperty('chart')) { _data['value'] = data.value;