Skip to content

Commit e522f01

Browse files
ndg63276Mark Williams
andauthored
LIMS-167: Dont default to mx type for calendar/logistics views (#942)
Co-authored-by: Mark Williams <mark.williams@diamond.ac.uk>
1 parent 1343bff commit e522f01

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

api/src/Page/Proposal.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,11 @@ function _get_visits($visit = null, $output = true)
389389
}
390390

391391
if ($this->has_arg('ty')) {
392-
$beamlines = $this->_get_beamlines_from_type($this->arg('ty'));
392+
if ($this->arg('ty') == 'calendar') {
393+
$beamlines = $this->_get_beamlines_from_type($this->ty);
394+
} else {
395+
$beamlines = $this->_get_beamlines_from_type($this->arg('ty'));
396+
}
393397

394398
if (!empty($beamlines)) {
395399
$bls = implode("', '", $beamlines);

api/src/Page/Shipment.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1677,7 +1677,11 @@ function _get_dewars()
16771677
}
16781678

16791679
if ($this->has_arg('ty')) {
1680-
$bls_tmp = $this->_get_beamlines_from_type($this->arg('ty'));
1680+
if ($this->arg('ty') == 'overview') {
1681+
$bls_tmp = $this->_get_beamlines_from_type($this->ty);
1682+
} else {
1683+
$bls_tmp = $this->_get_beamlines_from_type($this->arg('ty'));
1684+
}
16811685
if (!empty($bls_tmp)) {
16821686
$bls = implode("', '", $bls_tmp);
16831687
$where .= " AND se.beamlinename IN ('$bls')";

client/src/js/modules/calendar/views/calendar-view.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ export default {
244244
all: 1,
245245
}
246246
247-
if (app.staff) queryParams.ty = this.proposalType
247+
if (app.staff) queryParams.ty = 'calendar'
248248
if (this.selectedBeamline !== 'all') queryParams.bl = this.selectedBeamline
249249
250250
const visitsCollection = new Visits(null, {

client/src/js/modules/shipment/components/dewars-overview-wrapper.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export default {
5454
}
5555
},
5656
proposalType : function() {
57-
return this.$store.state.proposal.proposalType
57+
return 'overview'
5858
}
5959
},
6060
created: function() {
@@ -95,4 +95,4 @@ export default {
9595
},
9696
},
9797
}
98-
</script>
98+
</script>

0 commit comments

Comments
 (0)