From fce260c0bf809674e3999d6c0b1bd8fcf12f9aa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sigurd=20Gr=C3=B8neng?= Date: Wed, 4 Oct 2023 12:47:26 +0200 Subject: [PATCH] =?UTF-8?q?Bare=20variant=20D=20p=C3=A5=20klarspr=C3=A5k?= =?UTF-8?q?=20amplitude=20(#1197)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/amplitude/amplitude.ts | 10 ++-------- .../samtalereferat/InnerSamtalereferatForm.tsx | 2 +- .../aktivitet/visning/referat/OppdaterReferatForm.tsx | 4 ++-- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/amplitude/amplitude.ts b/src/amplitude/amplitude.ts index 6adfdf474..a47411fa4 100644 --- a/src/amplitude/amplitude.ts +++ b/src/amplitude/amplitude.ts @@ -27,20 +27,14 @@ export function logToggleSpraksjekkToggle(enabled: boolean) { return logAmplitudeEvent({ name: 'toggle', data: { text: 'Slå på klarspråkhjelp', enabled: enabled } }); } -export function logReferatFullfort( - analysis: TextCheckerResult, - referatPublisert: boolean, - spraksjekkEnabled: boolean, - variant: 'A' | 'C' -) { +export function logReferatFullfort(analysis: TextCheckerResult, referatPublisert: boolean, spraksjekkEnabled: boolean) { const mappedAnalysis = mapSpraksjekkAnalysis(analysis); - return logAmplitudeEvent( { name: 'referat lagret', data: { analysis: mappedAnalysis, referatPublisert, spraksjekkEnabled }, }, - { variant } + { variant: 'D' }, ); } diff --git a/src/moduler/aktivitet/aktivitet-forms/samtalereferat/InnerSamtalereferatForm.tsx b/src/moduler/aktivitet/aktivitet-forms/samtalereferat/InnerSamtalereferatForm.tsx index 5619a4f57..5e48cfc8d 100644 --- a/src/moduler/aktivitet/aktivitet-forms/samtalereferat/InnerSamtalereferatForm.tsx +++ b/src/moduler/aktivitet/aktivitet-forms/samtalereferat/InnerSamtalereferatForm.tsx @@ -84,7 +84,7 @@ const InnerSamtalereferatForm = (props: Props) => { erReferatPublisert, }).then(() => { const analysis = checkText(data.referat); - logReferatFullfort(analysis, erReferatPublisert, open, visSpraksjekk ? 'C' : 'A'); + logReferatFullfort(analysis, erReferatPublisert, open); }); }); }; diff --git a/src/moduler/aktivitet/visning/referat/OppdaterReferatForm.tsx b/src/moduler/aktivitet/visning/referat/OppdaterReferatForm.tsx index e6935d931..0c723c5a7 100644 --- a/src/moduler/aktivitet/visning/referat/OppdaterReferatForm.tsx +++ b/src/moduler/aktivitet/visning/referat/OppdaterReferatForm.tsx @@ -74,7 +74,7 @@ const OppdaterReferatForm = (props: Props) => { return dispatch(oppdaterReferat(aktivitetMedOppdatertReferat)).then((action) => { if (log) { const analysis = checkText(referatData.referat); - logReferatFullfort(analysis, aktivitet.erReferatPublisert, open, visSpraksjekk ? 'C' : 'A'); + logReferatFullfort(analysis, aktivitet.erReferatPublisert, open); } if (isFulfilled(action)) { onFerdig(); @@ -88,7 +88,7 @@ const OppdaterReferatForm = (props: Props) => { if (action.payload) { dispatch(publiserReferat(action.payload)).then(() => { const analysis = checkText(values.referat); - logReferatFullfort(analysis, true, open, visSpraksjekk ? 'C' : 'A'); + logReferatFullfort(analysis, true, open); }); } });