Skip to content

Commit

Permalink
Pre release/2024 r2.2 (#764)
Browse files Browse the repository at this point in the history
* LIMS-1201: Amend name of XPDF capillary crystal to use user acronym (#738)

Co-authored-by: Mark Williams <[email protected]>

* LIMS-1256: Remove validation from Local Contact field (#756)

Co-authored-by: Mark Williams <[email protected]>

* LIMS-667: Make the Requested Imager a required field if a plate is being created (#733)

Co-authored-by: Mark Williams <[email protected]>

* LIMS-1261: Fix the grid scan heat maps on the VMXi container view (#744)

Co-authored-by: Mark Williams <[email protected]>

* LIMS-1289: Fix sample and pdb count on protens page (#753)

Co-authored-by: Mark Williams <[email protected]>

---------

Co-authored-by: Mark W <[email protected]>
Co-authored-by: Mark Williams <[email protected]>
  • Loading branch information
3 people authored Apr 30, 2024
1 parent 153cef1 commit 7f425b2
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 27 deletions.
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

0 comments on commit 7f425b2

Please sign in to comment.