Skip to content

Commit bdc4f31

Browse files
ndg63276Mark Williams
andauthored
LIMS-995: Fix Shipment Stats page (#915)
* LIMS-995: Fix Shipment Stats page * LIMS-995: Remove non-functioning search boxes --------- Co-authored-by: Mark Williams <mark.williams@diamond.ac.uk>
1 parent b990e4b commit bdc4f31

File tree

3 files changed

+2
-27
lines changed

3 files changed

+2
-27
lines changed

api/src/Page/Vstat.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ class Vstat extends Page
3434
array('/overview', 'get', '_overview'),
3535
array('/runs', 'get', '_runs'),
3636
array('/histogram', 'get', '_parameter_histogram'),
37-
3837
array('/dewars', 'get', '_dewars_breakdown'),
39-
4038
);
4139

4240
var $dhl;
@@ -1074,10 +1072,6 @@ function _dewars_breakdown()
10741072
array_push($args, $this->proposalid);
10751073
}
10761074

1077-
if ($this->has_arg('data')) {
1078-
$having = 'HAVING count(dc.datacollectionid) > 0';
1079-
}
1080-
10811075
if ($this->has_arg('history')) {
10821076
$having = 'HAVING count(th.dewartransporthistoryid) > 1';
10831077
}
@@ -1135,7 +1129,6 @@ function _dewars_breakdown()
11351129
sum(shipments) as shipments,
11361130
sum(dewars) as dewars,
11371131
sum(history) as history,
1138-
sum(dcs) as dcs,
11391132
sum(containers) as containers,
11401133
sum(cta) as cta,
11411134
country
@@ -1145,7 +1138,6 @@ function _dewars_breakdown()
11451138
count(distinct d.dewarid) as dewars,
11461139
count(distinct th.dewartransporthistoryid) as history,
11471140
count(distinct c.containerid) as containers,
1148-
count(distinct dc.datacollectionid) as dcs,
11491141
count(distinct cta.couriertermsacceptedid) as cta,
11501142
YEAR(s.bltimestamp) as year,
11511143
l.country,
@@ -1163,9 +1155,6 @@ function _dewars_breakdown()
11631155
INNER JOIN laboratory l ON l.laboratoryid = pe.laboratoryid
11641156
11651157
LEFT OUTER JOIN container c ON c.dewarid = d.dewarid
1166-
LEFT OUTER JOIN blsample smp ON smp.containerid = c.containerid
1167-
LEFT OUTER JOIN datacollection dc ON dc.blsampleid = smp.blsampleid
1168-
11691158
LEFT OUTER JOIN blsession ses ON ses.sessionid = d.firstexperimentid
11701159
WHERE 1=1 $where
11711160
-- GROUP BY ses.startdate
@@ -1181,7 +1170,7 @@ function _dewars_breakdown()
11811170
if ($d['COUNTRY'] && !$d['CODE'])
11821171
print_r(array($d['COUNTRY']));
11831172

1184-
foreach (array('SHIPMENTS', 'DEWARS', 'HISTORY', 'DCS', 'CONTAINERS', 'CTA') as $k)
1173+
foreach (array('SHIPMENTS', 'DEWARS', 'HISTORY', 'CONTAINERS', 'CTA') as $k)
11851174
$d[$k] = intval($d[$k]);
11861175
}
11871176

client/src/js/modules/shipment/views/dewarstats.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,10 @@ define(['marionette',
3232
ui: {
3333
map: '.map',
3434
years: '.years',
35-
data: 'input[name=data]',
3635
hist: 'input[name=hist]',
3736
},
3837

3938
events: {
40-
'change @ui.data': 'refresh',
4139
'change @ui.hist': 'refresh',
4240
},
4341

@@ -48,11 +46,6 @@ define(['marionette',
4846
},
4947

5048

51-
getData: function() {
52-
return this.ui.data.is(':checked') ? 1 : ''
53-
},
54-
55-
5649
getHist: function() {
5750
return this.ui.hist.is(':checked') ? 1 : ''
5851
},
@@ -88,9 +81,6 @@ define(['marionette',
8881
this.listenTo(this.countries, 'sync', this.removeSpinnerCountry)
8982
this.listenTo(this.countries, 'error', this.removeSpinnerCountry)
9083

91-
this.run.queryParams.data = this.getData.bind(this)
92-
this.countries.queryParams.data = this.getData.bind(this)
93-
9484
this.run.queryParams.history = this.getHist.bind(this)
9585
this.countries.queryParams.history = this.getHist.bind(this)
9686

@@ -108,7 +98,6 @@ define(['marionette',
10898
{ name: 'CTA', label: 'Facility Shipping', cell: 'integer', editable: false },
10999
{ name: 'DEWARS', label: 'Dewars', cell: 'integer', editable: false },
110100
{ name: 'CONTAINERS', label: 'Containers', cell: 'integer', editable: false },
111-
// { name: 'DCS', label: '# DCs', cell: 'string', editable: false },
112101
]
113102

114103
if (app.mobile()) {
@@ -120,7 +109,6 @@ define(['marionette',
120109
this.rruns.show(new TableView({
121110
collection: this.run,
122111
columns: columns,
123-
filter: 's',
124112
tableClass: 'runs',
125113
loading: true,
126114
backgrid: { emptyText: 'No dewar stats found' }
@@ -130,7 +118,6 @@ define(['marionette',
130118
this.rcts.show(new TableView({
131119
collection: this.countries,
132120
columns: columns2,
133-
filter: 's',
134121
tableClass: 'countries',
135122
loading: true,
136123
backgrid: { emptyText: 'No dewar stats found' }
@@ -175,4 +162,4 @@ define(['marionette',
175162

176163
})
177164

178-
})
165+
})

client/src/js/templates/shipment/dewarstats.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
<div class="filter">
1010
<ul>
11-
<li><label><input type="checkbox" name="data" value="1" /> With Data</label></li>
1211
<li><label><input type="checkbox" name="hist" value="1" /> With Dewar History (>1)</label></li>
1312
</ul>
1413
</div>

0 commit comments

Comments
 (0)