@@ -19,7 +19,7 @@ import _ from 'lodash';
19
19
import moment from 'moment' ;
20
20
import i18next from 'i18next' ;
21
21
22
- import { getPumpVocabulary , getUppercasedManufacturer , isLoop } from '../device' ;
22
+ import { getPumpVocabulary , getUppercasedManufacturer , isLoop , isTwiistLoop } from '../device' ;
23
23
import {
24
24
generateBgRangeLabels ,
25
25
reshapeBgClassesToBgBounds ,
@@ -87,6 +87,9 @@ export function defineBasicsAggregations(bgPrefs, manufacturer, pumpUpload = {})
87
87
let summaryTitle ;
88
88
let perRow = 3 ;
89
89
90
+ // TODO: Remove this once we have twiist bolus and wizards linked
91
+ const hideEmptyWizardDimensions = isTwiistLoop ( pumpUpload . settings ) ;
92
+
90
93
switch ( section ) {
91
94
case 'basals' :
92
95
title = 'Basals' ;
@@ -119,12 +122,12 @@ export function defineBasicsAggregations(bgPrefs, manufacturer, pumpUpload = {})
119
122
summaryTitle = t ( 'Avg boluses / day' ) ;
120
123
dimensions = [
121
124
{ path : 'summary' , key : 'total' , label : t ( 'Avg per day' ) , average : true , primary : true } ,
122
- { path : 'summary.subtotals' , key : 'wizard' , label : t ( 'Calculator' ) , percentage : true , selectorIndex : 0 } ,
123
- { path : 'summary.subtotals' , key : 'correction' , label : t ( 'Correction' ) , percentage : true , selectorIndex : 1 } ,
125
+ { path : 'summary.subtotals' , key : 'wizard' , label : t ( 'Calculator' ) , percentage : true , selectorIndex : 0 , hideEmpty : hideEmptyWizardDimensions } ,
126
+ { path : 'summary.subtotals' , key : 'correction' , label : t ( 'Correction' ) , percentage : true , selectorIndex : 1 , hideEmpty : hideEmptyWizardDimensions } ,
124
127
{ path : 'summary.subtotals' , key : 'extended' , label : t ( 'Extended' ) , percentage : true , selectorIndex : 4 } ,
125
128
{ path : 'summary.subtotals' , key : 'interrupted' , label : t ( 'Interrupted' ) , percentage : true , selectorIndex : 5 } ,
126
- { path : 'summary.subtotals' , key : 'override' , label : t ( 'Override' ) , percentage : true , selectorIndex : 2 } ,
127
- { path : 'summary.subtotals' , key : 'underride' , label : t ( 'Underride' ) , percentage : true , selectorIndex : 6 } ,
129
+ { path : 'summary.subtotals' , key : 'override' , label : t ( 'Override' ) , percentage : true , selectorIndex : 2 , hideEmpty : hideEmptyWizardDimensions } ,
130
+ { path : 'summary.subtotals' , key : 'underride' , label : t ( 'Underride' ) , percentage : true , selectorIndex : 6 , hideEmpty : hideEmptyWizardDimensions } ,
128
131
] ;
129
132
130
133
if ( isLoop ( pumpUpload . settings ) ) {
0 commit comments