@@ -19,7 +19,7 @@ import _ from "lodash";
1919import moment from "moment" ;
2020import { notEmpty } from "../../common" ;
2121import { mkEntityLinkGridCell , mkLinkGridCell } from "../../common/grid-utils" ;
22- import template from ' ./entity-statistic-detail-table.html' ;
22+ import template from " ./entity-statistic-detail-table.html" ;
2323
2424
2525/**
@@ -32,47 +32,47 @@ import template from './entity-statistic-detail-table.html';
3232 **/
3333
3434const bindings = {
35- applications : '<' ,
36- filterOutcome : '<' ,
37- lastUpdatedAt : '<' ,
38- orgUnits : '<' ,
39- statisticDefinition : '<' ,
40- statisticValues : '<'
35+ applications : "<" ,
36+ filterOutcome : "<" ,
37+ lastUpdatedAt : "<" ,
38+ orgUnits : "<" ,
39+ statisticDefinition : "<" ,
40+ statisticValues : "<"
4141} ;
4242
4343
44- const exportTimestampFormat = ' YYYY-MM-DD_HHmmss' ;
44+ const exportTimestampFormat = " YYYY-MM-DD_HHmmss" ;
4545
4646
4747const appNameCell = Object . assign (
48- mkEntityLinkGridCell ( ' Application' , ' entity' , ' none' ) ,
49- { sort : { direction : ' asc' } }
48+ mkEntityLinkGridCell ( " Application" , " entity" , " none" ) ,
49+ { sort : { direction : " asc" } }
5050) ;
5151
5252
5353const outcomeCell = ( uiGridConstants ) => {
5454 return {
55- field : ' outcome' ,
55+ field : " outcome" ,
5656 filter : {
5757 term : null ,
5858 condition : uiGridConstants . filter . EXACT
5959 }
60- }
60+ } ;
6161} ;
6262
6363
6464const assetCodeCell = {
65- field : ' application.assetCode' ,
66- displayName : ' Asset Code'
65+ field : " application.assetCode" ,
66+ displayName : " Asset Code"
6767} ;
6868
6969
7070const valueCell = ( uiGridConstants , statisticDefinition ) => {
7171 return {
72- field : ' value' ,
73- type : ( statisticDefinition && statisticDefinition . type === ' NUMERIC' )
74- ? ' number'
75- : ' string' ,
72+ field : " value" ,
73+ type : ( statisticDefinition && statisticDefinition . type === " NUMERIC" )
74+ ? " number"
75+ : " string" ,
7676 filter : {
7777 term : null ,
7878 condition : uiGridConstants . filter . EXACT
@@ -82,31 +82,31 @@ const valueCell = (uiGridConstants, statisticDefinition) => {
8282
8383
8484const reasonCell = {
85- field : ' reason'
85+ field : " reason"
8686} ;
8787
8888
8989const orgUnitCell = mkLinkGridCell (
90- ' Org Unit' ,
91- ' orgUnit.name' ,
92- ' orgUnit.id' ,
93- ' main.org-unit.view' ) ;
90+ "Owning Org Unit" ,
91+ " orgUnit.name" ,
92+ " orgUnit.id" ,
93+ " main.org-unit.view" ) ;
9494
9595
9696const dateCell = {
97- field : ' createdAt' ,
98- displayName : ' Last Updated' ,
97+ field : " createdAt" ,
98+ displayName : " Last Updated" ,
9999 enableFiltering : false ,
100100 visible : false ,
101- cellTemplate : ' <div class="ui-grid-cell-contents">\n <waltz-from-now timestamp="COL_FIELD"></waltz-from-now>\n</div>'
101+ cellTemplate : " <div class=\ "ui-grid-cell-contents\ ">\n <waltz-from-now timestamp=\ "COL_FIELD\ "></waltz-from-now>\n</div>"
102102} ;
103103
104104
105105function mkGridData ( statisticValues = [ ] ,
106106 applications = [ ] ,
107107 orgUnits = [ ] ) {
108- const appsById = _ . keyBy ( applications , 'id' ) ;
109- const orgUnitsById = _ . keyBy ( orgUnits , 'id' ) ;
108+ const appsById = _ . keyBy ( applications , "id" ) ;
109+ const orgUnitsById = _ . keyBy ( orgUnits , "id" ) ;
110110
111111 return _ . map ( statisticValues , sv => {
112112 const app = appsById [ sv . entity . id ] ;
@@ -175,7 +175,7 @@ function controller($animate,
175175 const grid = vm . gridApi . grid ;
176176 const rowVisibility = uiGridExporterConstants . ALL ;
177177 const colVisibility = uiGridExporterConstants . ALL ;
178- const exportDataSeparator = ',' ;
178+ const exportDataSeparator = "," ;
179179 const statName = vm . statisticDefinition . name ;
180180 const timestamp = moment ( ) . format ( exportTimestampFormat ) ;
181181 const fileName = `${ statName } _${ timestamp } .csv` ;
@@ -206,10 +206,10 @@ function controller($animate,
206206
207207
208208controller . $inject = [
209- ' $animate' ,
210- ' uiGridConstants' ,
211- ' uiGridExporterConstants' ,
212- ' uiGridExporterService'
209+ " $animate" ,
210+ " uiGridConstants" ,
211+ " uiGridExporterConstants" ,
212+ " uiGridExporterService"
213213] ;
214214
215215
0 commit comments