Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre release/2024 r2.2 #770

Merged
merged 5 commits into from
May 14, 2024
Merged
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
4 changes: 3 additions & 1 deletion api/src/Page/Download.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,13 +355,15 @@ function _get_attachments()
array_push($args, $this->arg('blsampleid'));
}

$rows = $this->db->pq("SELECT dca.filefullpath, dca.filetype, dca.datacollectionfileattachmentid, dca.datacollectionid, CONCAT(p.proposalcode, p.proposalnumber, '-', s.visit_number) as visit, dc.blsampleid, dc.blsubsampleid, g.dx_mm, g.dy_mm, g.steps_x, g.steps_y, g.orientation, g.snaked
$rows = $this->db->pq("SELECT dca.filefullpath, dca.filetype, dca.datacollectionfileattachmentid, dca.datacollectionid, CONCAT(p.proposalcode, p.proposalnumber, '-', s.visit_number) as visit, dc.blsampleid, dc.blsubsampleid,
IFNULL(g.dx_mm, g2.dx_mm) as dx_mm, IFNULL(g.dy_mm, g2.dy_mm) as dy_mm, IFNULL(g.steps_x, g2.steps_x) as steps_x, IFNULL(g.steps_y, g2.steps_y) as steps_y, IFNULL(g.orientation, g2.orientation) as orientation, IFNULL(g.snaked, g2.snaked) as snaked
FROM datacollectionfileattachment dca
INNER JOIN datacollection dc ON dc.datacollectionid = dca.datacollectionid
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
LEFT OUTER JOIN gridinfo g ON g.datacollectiongroupid = dc.datacollectiongroupid
LEFT OUTER JOIN gridinfo g2 ON g2.datacollectionid = dc.datacollectionid
WHERE $where", $args);

foreach ($rows as &$r) {
Expand Down
10 changes: 5 additions & 5 deletions api/src/Page/Sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class Sample extends Page
array('/proteins(/:pid)', 'get', '_proteins'),
array('/proteins', 'post', '_add_protein'),
array('/proteins/:pid', 'patch', '_update_protein'),
array('/proteins/distinct', 'get', '_disinct_proteins'),
array('/proteins/distinct', 'get', '_distinct_proteins'),

array('/proteins/lattice(/:lid)', 'get', '_protein_lattices'),
array('/proteins/lattice', 'post', '_add_protein_lattice'),
Expand Down Expand Up @@ -1759,10 +1759,10 @@ function _proteins()
IF(pr.externalid IS NOT NULL, 1, 0) as external,
HEX(pr.externalid) as externalid,
pr.density,
count(php.proteinid) as pdbs,
count(distinct php.pdbid) as pdbs,
pr.safetylevel,
count(dc.datacollectionid) as dcount,
count(b.blsampleid) as scount
count(distinct dc.datacollectionid) as dcount,
count(distinct b.blsampleid) as scount

FROM protein pr
LEFT OUTER JOIN concentrationtype ct ON ct.concentrationtypeid = pr.concentrationtypeid
Expand Down Expand Up @@ -1792,7 +1792,7 @@ function _proteins()

# ------------------------------------------------------------------------
# Return distinct proteins for a proposal
function _disinct_proteins()
function _distinct_proteins()
{
if (!$this->has_arg('prop'))
$this->_error('No proposal specified');
Expand Down
7 changes: 0 additions & 7 deletions client/src/js/modules/shipment/models/dispatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@ define(['backbone'], function(Backbone) {
pattern: 'visit',
},

LOCALCONTACT: {
required: false,
pattern: 'wwsddash'
},



GIVENNAME: {
required: true,
pattern: 'wwdash',
Expand Down
31 changes: 21 additions & 10 deletions client/src/js/modules/types/mx/shipment/views/mx-container-add.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,16 +125,27 @@
/>
</validation-provider>

<base-input-select
v-model="REQUESTEDIMAGERID"
outer-class="tw-mb-2 tw-py-2"
label="Requested Imager"
description="Imager this container should go into"
name="REQUESTERIMAGER"
:options="imagingImagers"
option-value-key="IMAGERID"
option-text-key="NAME"
/>
<validation-provider
v-if="plateType === 'plate'"
v-slot="{ errors }"
tag="div"
class="tw-mb-2 tw-py-2"
rules="required"
name="Requested Imager"
>

<base-input-select
v-model="REQUESTEDIMAGERID"
outer-class="tw-mb-2 tw-py-2"
label="Requested Imager"
description="Imager this container should go into"
name="REQUESTERIMAGER"
:options="imagingImagers"
option-value-key="IMAGERID"
option-text-key="NAME"
:error-message="errors[0]"
/>
</validation-provider>

<base-input-select
v-model="SCHEDULEID"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@

let capillaryCrystal = new Crystal({
CRYSTALID: self.existingCapillaryID,
NAME: self.name + shortName + '_CP',
NAME: item.acronym + shortName + '_CP',
THEORETICALDENSITY: self.getCapillaryInfo('density') != null ? self.getCapillaryInfo('density') : null,
ABUNDANCE: 1,
CONTAINERLESS: self.containerless,
Expand Down Expand Up @@ -591,7 +591,7 @@

let capillaryCrystal = new Crystal({
CRYSTALID: this.existingCapillaryID,
NAME: this.name + shortName + '_CP',
NAME: this.acronym + shortName + '_CP',
THEORETICALDENSITY: this.getCapillaryInfo('density') != null ? this.getCapillaryInfo('density') : null,
ABUNDANCE: 1,
CONTAINERLESS: this.containerless,
Expand Down
2 changes: 0 additions & 2 deletions client/src/js/utils/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ define(['backbone', 'backbone-validation'], function(Backbone) {

_.extend(Backbone.Validation.patterns, {
wwsdash: /^(\w|\s|\-)+$/,
wwsddash: /^(\w|\s|\-|\.)+$/,
wwsldash: /^(\w|\s|\-|\/)+$/,
wwsbdash: /^(\w|\s|\-|\(|\))+$/,
wwsbddash: /^(\w|\s|\-|\.|\(|\))+$/,
Expand All @@ -26,7 +25,6 @@ define(['backbone', 'backbone-validation'], function(Backbone) {
_.extend(Backbone.Validation.messages, {
required: 'This field is required',
wwsdash: 'This field must contain only letters, numbers, spaces, underscores, and dashes',
wwsddash: 'This field must contain only letters, numbers, spaces, underscores, dots, and dashes',
wwsldash: 'This field must contain only letters, numbers, spaces, underscores, slashes, and dashes',
wwsbdash: 'This field must contain only letters, numbers, spaces, underscores, brackets, and dashes',
wwsbddash: 'This field must contain only letters, numbers, spaces, underscores, dots, brackets, and dashes',
Expand Down
Loading