Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion api/src/Page/DC.php
Original file line number Diff line number Diff line change
Expand Up @@ -1106,8 +1106,13 @@ function _chk_image()
return;
}

if (!$this->has_arg('pjid')) {
array_push($ids, $this->proposalid);
$where .= ' AND p.proposalid=:'.sizeof($ids);
}

$dct = $this->db->pq("SELECT CONCAT(p.proposalcode, p.proposalnumber, '-', s.visit_number) as vis, dc.datacollectionid as id, dc.startimagenumber, dc.filetemplate, dc.xtalsnapshotfullpath1 as x1, dc.xtalsnapshotfullpath2 as x2, dc.xtalsnapshotfullpath3 as x3, dc.xtalsnapshotfullpath4 as x4,dc.imageprefix as imp, dc.datacollectionnumber as run, dc.imagedirectory as dir, s.visit_number
FROM datacollection dc
FROM datacollection dc
INNER JOIN datacollectiongroup dcg ON dcg.datacollectiongroupid = dc.datacollectiongroupid
INNER JOIN blsession s ON s.sessionid = dcg.sessionid
INNER JOIN proposal p ON p.proposalid = s.proposalid WHERE $where", $ids);
Expand Down
14 changes: 10 additions & 4 deletions client/src/js/modules/dc/dclist.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
define(['marionette',
//'modules/dc/views/imagestatuscollection',
//'modules/dc/views/apstatuscollection',
'modules/dc/collections/imagestatuses',
'modules/dc/collections/apstatuses',
'modules/dc/collections/apmessagestatuses',
Expand Down Expand Up @@ -68,8 +66,16 @@ function(Marionette,
},

_onSync: function() {
var ids = this.collection.pluck('ID')
this.imagestatuses.fetch({ data: { ids: ids }, type: 'POST' })
var ids = this.collection
.filter(m => m.get('TYPE') === 'data' || m.get('TYPE') === 'grid')
.map(m => m.get('ID'));
var data = { ids: ids }
var params = this.getOption('params') || {};
if (params.pjid != null) {
data.pjid = params.pjid
}
if (!ids.length) return
this.imagestatuses.fetch({ data: data, type: 'POST' })
if (this.getOption('apStatus')) this.apstatuses.fetch({ data: { ids: ids }, type: 'POST' })
if (this.getOption('apMessageStatus')) this.apmessagestatuses.fetch({ data: { ids: ids }, type: 'POST' })
},
Expand Down
2 changes: 1 addition & 1 deletion client/src/js/modules/projects/views/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ define(['marionette',
edit.create('ACRONYM', 'text')
}

this.dc.show(new DCView({ model: this.model, collection: this.dcs, params: { visit: null }, noPageUrl: true, noFilterUrl: true, noSearchUrl: true }))
this.dc.show(new DCView({ model: this.model, collection: this.dcs, params: { visit: null, pjid: this.model.get('PROJECTID') }, noPageUrl: true, noFilterUrl: true, noSearchUrl: true }))
this.smp.show(new SampleList({ collection: this.samples, noPageUrl: true, noFilterUrl: true, noSearchUrl: true }))
this.prt.show(new ProteinList({ collection: this.proteins, noPageUrl: true, noSearchUrl: true }))

Expand Down
Loading