diff --git a/api/src/Page/Contact.php b/api/src/Page/Contact.php index 2136b5f00..3b1159550 100644 --- a/api/src/Page/Contact.php +++ b/api/src/Page/Contact.php @@ -9,8 +9,8 @@ class Contact extends Page { public static $arg_list = array('CARDNAME' => '([\w\s\-])+', - 'FAMILYNAME' => '([\w\-])+', - 'GIVENNAME' => '([\w\-])+', + 'FAMILYNAME' => '([\w\s\-])+', + 'GIVENNAME' => '([\w\s\-])+', 'PHONENUMBER' => '.*', 'EMAILADDRESS' => '.*', 'LABNAME' => '([\w\s\-])+', diff --git a/api/src/Page/DC.php b/api/src/Page/DC.php index c18d0dacd..34e59f5f2 100644 --- a/api/src/Page/DC.php +++ b/api/src/Page/DC.php @@ -121,11 +121,11 @@ function _data_collections($single = null) $where = ''; if ($this->arg('t') == 'sc') - $where = ' AND (dc.overlap != 0 OR ifnull(et.name, dcg.experimenttype) = "Screening")'; + $where = ' AND (dc.overlap != 0 OR ifnull(et.name, dcg.experimenttype) in ("Screening", "Characterization"))'; else if ($this->arg('t') == 'gr') $where = ' AND dc.axisrange = 0'; else if ($this->arg('t') == 'fc') - $where = ' AND dc.overlap = 0 AND dc.axisrange > 0 AND dc.numberOfImages > 1 AND ifnull(et.name, dcg.experimenttype) != "Screening"'; + $where = ' AND dc.overlap = 0 AND dc.axisrange > 0 AND dc.numberOfImages > 1 AND ifnull(et.name, dcg.experimenttype) not in ("Screening", "Characterization")'; } else if ($this->arg('t') == 'edge') { $where2 = ''; } else if ($this->arg('t') == 'mca') { @@ -139,11 +139,11 @@ function _data_collections($single = null) $where2 = " AND es.comments LIKE '%_FLAG_%'"; $where4 = " AND xrf.comments LIKE '%_FLAG_%'"; } else if ($this->arg('t') == 'ap') { - $where = ' AND app.processingstatus = 1'; + $where = " AND ifnull(et.name, dcg.experimenttype) not in ('Screening', 'Characterization') AND app.processingstatus = 1"; $extj[0] .= "INNER JOIN autoprocintegration ap ON dc.datacollectionid = ap.datacollectionid INNER JOIN autoprocprogram app ON app.autoprocprogramid = ap.autoprocprogramid"; } else if ($this->arg('t') == 'ph') { - $where = " AND app.processingstatus = 1 AND app.processingprograms in ('big_ep', 'fast_ep')"; + $where = " AND ifnull(et.name, dcg.experimenttype) not in ('Screening', 'Characterization') AND app.processingstatus = 1 AND app.processingprograms in ('big_ep', 'fast_ep')"; $extj[0] .= "INNER JOIN processingjob pj ON dc.datacollectionid = pj.datacollectionid INNER JOIN autoprocprogram app ON app.processingjobid = pj.processingjobid"; } else if ($this->arg('t') == 'err') { diff --git a/api/src/Page/Processing.php b/api/src/Page/Processing.php index 20546718c..098d77b26 100644 --- a/api/src/Page/Processing.php +++ b/api/src/Page/Processing.php @@ -141,7 +141,7 @@ function _autoproc_status($where, $ids) { INNER JOIN processingjob pj ON pj.datacollectionid = dc.datacollectionid INNER JOIN autoprocprogram app ON pj.processingjobid = app.processingjobid LEFT OUTER JOIN autoprocintegration api ON api.autoprocprogramid = app.autoprocprogramid - WHERE $where AND api.autoprocintegrationid IS NULL AND pj.automatic = 1 + WHERE $where AND api.autoprocintegrationid IS NULL AND app.processingprograms NOT IN ('$filter')", ), $ids @@ -697,11 +697,17 @@ private function _autoprocessing_query_builder($where, $group, $order = '') { ap.refinedcell_alpha as cell_al, ap.refinedcell_beta as cell_be, ap.refinedcell_gamma as cell_ga, - (SELECT COUNT(api1.autoprocintegrationid) FROM autoprocintegration api1 WHERE api1.autoprocprogramid = app.autoprocprogramid) as imagesweepcount, + (SELECT COUNT(api1.autoprocintegrationid) FROM autoprocintegration api1 WHERE api1.autoprocprogramid = app.autoprocprogramid) as imagesweepcount, app.processingstatus, app.processingmessage, count(distinct pjis.datacollectionid) as dccount, max(pjis.processingjobid) as processingjobid, + (SELECT IFNULL(blsg.name, bls.name) FROM processingjobparameter pjp + LEFT OUTER JOIN blsample bls ON pjp.parametervalue = bls.blsampleid + LEFT OUTER JOIN blsamplegroup blsg ON pjp.parametervalue = blsg.blsamplegroupid + WHERE pjp.processingjobid = pj.processingjobid + AND pjp.parameterkey in ('sample_id', 'sample_group_id') + ) as groupname, pj.automatic"; $from = "FROM autoprocintegration api"; @@ -751,7 +757,7 @@ private function _format_auto_processing_result($table_rows, $messages_result) { 'cell_ga', ); $resolution_data = array('rlow', 'rhigh'); - $returned_keys = array('PROCESSINGJOBID', 'IMAGESWEEPCOUNT', 'DCCOUNT', 'TYPE', 'PROCESSINGSTATUS', 'PROCESSINGMESSAGE'); + $returned_keys = array('PROCESSINGJOBID', 'IMAGESWEEPCOUNT', 'DCCOUNT', 'TYPE', 'PROCESSINGSTATUS', 'PROCESSINGMESSAGE', 'GROUPNAME'); foreach($table_rows as &$row) { if (!array_key_exists($row['AUTOPROCPROGRAMID'], $formatted_result)) { @@ -772,6 +778,9 @@ private function _format_auto_processing_result($table_rows, $messages_result) { $prefix = preg_match('/multi/', $value) ? '' : 'multi-'; $value = $row['DCCOUNT'] . 'x ' . $prefix . $value; } + if ($row['GROUPNAME']) { + $value .= ' ('.$row['GROUPNAME'].')'; + } } diff --git a/client/src/js/models/labcontact.js b/client/src/js/models/labcontact.js index b2eff310d..9a56f9923 100644 --- a/client/src/js/models/labcontact.js +++ b/client/src/js/models/labcontact.js @@ -14,11 +14,11 @@ define(['backbone'], function(Backbone) { }, FAMILYNAME: { required: true, - pattern: 'wwdash', + pattern: 'wwsdash', }, GIVENNAME: { required: true, - pattern: 'wwdash', + pattern: 'wwsdash', }, PHONENUMBER: { required: true, diff --git a/client/src/js/modules/shipment/models/dispatch.js b/client/src/js/modules/shipment/models/dispatch.js index 195045bf3..bfbc37c60 100644 --- a/client/src/js/modules/shipment/models/dispatch.js +++ b/client/src/js/modules/shipment/models/dispatch.js @@ -24,12 +24,12 @@ define(['backbone'], function(Backbone) { GIVENNAME: { required: function () {return this.dispatchDetailsRequired}, - pattern: 'wwdash', + pattern: 'wwsdash', }, FAMILYNAME: { required: function () {return this.dispatchDetailsRequired}, - pattern: 'wwdash', + pattern: 'wwsdash', }, PHONENUMBER: { diff --git a/client/src/js/modules/shipment/views/dispatch.js b/client/src/js/modules/shipment/views/dispatch.js index 113415195..416375168 100644 --- a/client/src/js/modules/shipment/views/dispatch.js +++ b/client/src/js/modules/shipment/views/dispatch.js @@ -276,6 +276,7 @@ define(['marionette', 'views/form', this.dispatchCountry = this.ui.country.val() this.ui.courierSection.show(); this.ui.dispatchDetails.show(); + this.model.visitRequired = true this.model.dispatchDetailsRequired = true this.ui.submit.show(); if ( @@ -334,6 +335,7 @@ define(['marionette', 'views/form', ){ this.model.visitRequired = false this.ui.dispatchDetails.hide() + this.model.dispatchDetailsRequired = false this.ui.submit.text("Proceed") this.ui.shippingadvice.html("On clicking 'Proceed' you will be redirected to the new Diamond shipping service to book the shipment. Please ensure all stages of the form are completed.

") } diff --git a/client/src/js/modules/types/mx/shipment/views/mx-container-add.vue b/client/src/js/modules/types/mx/shipment/views/mx-container-add.vue index 9f2e59ee1..865384a38 100644 --- a/client/src/js/modules/types/mx/shipment/views/mx-container-add.vue +++ b/client/src/js/modules/types/mx/shipment/views/mx-container-add.vue @@ -94,6 +94,9 @@ v-model="QUEUEFORUDC" name="Queue For UDC" /> + + Cannot queue container until shipment safety level is set + Cannot queue containers in {{ shippingSafetyLevel }} shipments @@ -663,7 +666,7 @@ export default { await this.$store.dispatch('samples/save', containerId) this.$store.commit('notifications/addNotification', { - message: `New Container created, click here to view it`, + message: `New Container created, click here to view it. Remember to add sequences and PDBs if needed.`, level: 'info', persist: true }) diff --git a/client/src/js/modules/types/mx/shipment/views/mx-container-view.vue b/client/src/js/modules/types/mx/shipment/views/mx-container-view.vue index 9de2394dc..fcd97ec9a 100644 --- a/client/src/js/modules/types/mx/shipment/views/mx-container-view.vue +++ b/client/src/js/modules/types/mx/shipment/views/mx-container-view.vue @@ -106,6 +106,9 @@ @click="onUnQueueContainer" > Unqueue + + Cannot queue container until shipment safety level is set + Cannot queue containers in {{ shippingSafetyLevel }} shipments