@@ -8,6 +8,8 @@ import { compose } from 'recompose';
8
8
import {
9
9
COUNTER ,
10
10
PIE ,
11
+ TEMPLATE_LAST_7_DAYS_STATEMENTS ,
12
+ TEMPLATE_CURATR_COMMENT_COUNT
11
13
} from 'lib/constants/visualise' ;
12
14
import { fetchModels } from 'ui/redux/modules/pagination' ;
13
15
import { updateModel , modelsSchemaIdSelector } from 'ui/redux/modules/models' ;
@@ -125,13 +127,17 @@ class Widget extends Component {
125
127
</ span >
126
128
) ;
127
129
130
+ isCounter = ( type ) => {
131
+ return type === COUNTER || type === TEMPLATE_LAST_7_DAYS_STATEMENTS || type === TEMPLATE_CURATR_COMMENT_COUNT ;
132
+ }
133
+
128
134
renderMenu = ( ) => {
129
135
const { model, organisationId, visualisation } = this . props ;
130
136
131
137
const shouldShowTableModeToggle = (
132
138
visualisation . size > 0 &&
133
139
visualisation . get ( 'type' ) &&
134
- visualisation . get ( 'type' ) !== COUNTER &&
140
+ ! this . isCounter ( visualisation . get ( 'type' ) ) &&
135
141
model . has ( 'visualisation' )
136
142
) ;
137
143
@@ -216,7 +222,7 @@ class Widget extends Component {
216
222
[ styles . draggableTitle ] : this . props . editable ,
217
223
} ) ;
218
224
return (
219
- < div className = { `panel panel-default animated fadeIn ${ styles . widget } ` } >
225
+ < div className = { `panel panel-default animated fadeIn ${ styles . widget } ` } >
220
226
< div className = { styles . widgetContent } >
221
227
< div
222
228
className = { `panel-heading ${ styles . heading } ` } >
0 commit comments