Dewar Label: affix this label to your dewar which ensures it can be identified at all times at the facility
Outbound Address label: To be attached to the outside of your transport container for shipment to facility
-
Return Address Label: The return address for your shipment (Please include this in your shipment, e.g. put it behind the outward bound address or in the transport container)
+
Return Address Label: The return address for your shipment (Please include this in your shipment, e.g. put it behind the outbound label or in the transport container)
+ Please remove old paperwork immediately after you receive your dewar back from Diamond.
-
-
@@ -267,4 +274,4 @@
-
\ No newline at end of file
+
diff --git a/api/assets/pdf/styles.css b/api/assets/pdf/styles.css
index cd539c4a6..77b999a51 100644
--- a/api/assets/pdf/styles.css
+++ b/api/assets/pdf/styles.css
@@ -123,7 +123,7 @@ table {
}
ol {
- margin-left: 25px;
+ margin-left: 10px;
}
.bold {
@@ -185,4 +185,4 @@ ol {
.float-left {
float: left;
-}
\ No newline at end of file
+}
diff --git a/api/src/Page/PDF.php b/api/src/Page/PDF.php
index 48d6944d3..19d70b90f 100644
--- a/api/src/Page/PDF.php
+++ b/api/src/Page/PDF.php
@@ -159,7 +159,7 @@ function _shipment_label()
$this->ship = $ship;
- $this->dewars = $this->db->pq("SELECT bl.beamlinename, bl.beamlineoperator, TO_CHAR(bl.startdate, 'DD-MM-YYYY') as st, d.transportvalue, d.customsvalue, d.code, d.barcode, count(cq.containerqueueid) as auto, count(c.containerid) as containers, GROUP_CONCAT(COALESCE(cr.barCode, c.code) LIMIT 10) as containersBarCode
+ $this->dewars = $this->db->pq("SELECT bl.beamlinename, bl.beamlineoperator, TO_CHAR(bl.startdate, 'DD-MM-YYYY') as st, d.transportvalue, d.customsvalue, d.code, d.barcode, count(cq.containerqueueid) as auto, count(c.containerid) as containers, GROUP_CONCAT(COALESCE(cr.barCode, c.code) LIMIT 8) as containersBarCode
FROM dewar d
LEFT OUTER JOIN blsession bl ON d.firstexperimentid = bl.sessionid
LEFT OUTER JOIN container c ON c.dewarid = d.dewarid
diff --git a/api/src/Page/Sample.php b/api/src/Page/Sample.php
index 059eeb03b..946461582 100644
--- a/api/src/Page/Sample.php
+++ b/api/src/Page/Sample.php
@@ -116,6 +116,7 @@ class Sample extends Page
'MONOCHROMATOR' => '\w+',
'PRESET' => '\d',
'BEAMLINENAME' => '[\w\-]+',
+ 'SOURCE' => '[\w\-]+',
'queued' => '\d',
'UNQUEUE' => '\d',
@@ -1342,8 +1343,10 @@ function _update_sample_components($initial, $final, $amounts, $crystalid)
function _add_sample()
{
- if (!$this->has_arg('prop'))
- $this->_error('No proposal specified');
+ if (!$this->has_arg('prop')) {
+ $this->_output(array());
+ return;
+ }
// Register entire container
if ($this->has_arg('collection')) {
@@ -1465,7 +1468,8 @@ function _prepare_sample_args($s = null)
'SAMPLEGROUP',
'STRATEGYOPTION',
'MINIMUMRESOLUTION',
- 'INITIALSAMPLEGROUP'
+ 'INITIALSAMPLEGROUP',
+ 'SOURCE'
) as $f) {
if ($s)
$a[$f] = array_key_exists($f, $s) ? $s[$f] : null;
@@ -1516,8 +1520,8 @@ function _do_add_sample($s)
}
$this->db->pq(
- "INSERT INTO blsample (blsampleid,crystalid,diffractionplanid,containerid,location,comments,name,code,blsubsampleid,screencomponentgroupid,volume,packingfraction,dimension1,dimension2,dimension3,shape,looptype) VALUES (s_blsample.nextval,:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16) RETURNING blsampleid INTO :id",
- array($crysid, $did, $a['CONTAINERID'], $a['LOCATION'], $a['COMMENTS'], $a['NAME'], $a['CODE'], $a['BLSUBSAMPLEID'], $a['SCREENCOMPONENTGROUPID'], $a['VOLUME'], $a['PACKINGFRACTION'], $a['DIMENSION1'], $a['DIMENSION2'], $a['DIMENSION3'], $a['SHAPE'], $a['LOOPTYPE'])
+ "INSERT INTO blsample (blsampleid,crystalid,diffractionplanid,containerid,location,comments,name,code,blsubsampleid,screencomponentgroupid,volume,packingfraction,dimension1,dimension2,dimension3,shape,looptype,source) VALUES (s_blsample.nextval,:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16,IFNULL(:17,CURRENT_USER)) RETURNING blsampleid INTO :id",
+ array($crysid, $did, $a['CONTAINERID'], $a['LOCATION'], $a['COMMENTS'], $a['NAME'], $a['CODE'], $a['BLSUBSAMPLEID'], $a['SCREENCOMPONENTGROUPID'], $a['VOLUME'], $a['PACKINGFRACTION'], $a['DIMENSION1'], $a['DIMENSION2'], $a['DIMENSION3'], $a['SHAPE'], $a['LOOPTYPE'], $a['SOURCE'])
);
$sid = $this->db->id();
diff --git a/api/src/Page/Shipment.php b/api/src/Page/Shipment.php
index 1b069a851..fd1b24b41 100644
--- a/api/src/Page/Shipment.php
+++ b/api/src/Page/Shipment.php
@@ -53,6 +53,7 @@ class Shipment extends Page
'STATUS' => '[\w|\s|\-]+',
'PURCHASEDATE' => '\d+-\d+-\d+',
+ 'MANUFACTURERSERIALNUMBER' => '.*',
'LABCONTACTID' => '\d+',
'REPORT' => '.*',
@@ -126,6 +127,7 @@ class Shipment extends Page
'PUCK' => '\d',
'PROCESSINGPIPELINEID' => '\d+',
'OWNERID' => '\d+',
+ 'SOURCE' => '[\w\-]+',
'CONTAINERREGISTRYID' => '\d+',
'PROPOSALID' => '\d+',
@@ -620,7 +622,7 @@ function _dewar_registry()
$args = array($this->proposalid);
$where = 'p.proposalid=:1';
- $fields = "r.dewarregistryid, max(CONCAT(p.proposalcode, p.proposalnumber)) as prop, r.facilitycode, TO_CHAR(r.purchasedate, 'DD-MM-YYYY') as purchasedate, ROUND(TIMESTAMPDIFF('DAY',r.purchasedate, CURRENT_TIMESTAMP)/30.42,1) as age, r.labcontactid, count(distinct d.dewarid) as dewars, GROUP_CONCAT(distinct CONCAT(p.proposalcode,p.proposalnumber) SEPARATOR ', ') as proposals, r.bltimestamp, TO_CHAR(max(d.bltimestamp),'DD-MM-YYYY') as lastuse, count(dr.dewarreportid) as reports";
+ $fields = "r.dewarregistryid, max(CONCAT(p.proposalcode, p.proposalnumber)) as prop, r.facilitycode, TO_CHAR(r.purchasedate, 'DD-MM-YYYY') as purchasedate, ROUND(TIMESTAMPDIFF('DAY',r.purchasedate, CURRENT_TIMESTAMP)/30.42,1) as age, r.labcontactid, count(distinct d.dewarid) as dewars, GROUP_CONCAT(distinct CONCAT(p.proposalcode,p.proposalnumber) SEPARATOR ', ') as proposals, r.bltimestamp, TO_CHAR(max(d.bltimestamp),'DD-MM-YYYY') as lastuse, count(dr.dewarreportid) as reports, r.manufacturerserialnumber";
$group = "r.facilitycode";
if ($this->has_arg('all') && $this->staff) {
@@ -712,7 +714,8 @@ function _add_dewar_registry()
}
$purchase = $this->has_arg('PURCHASEDATE') ? $this->arg('PURCHASEDATE') : '';
- $this->db->pq("INSERT INTO dewarregistry (facilitycode, purchasedate, bltimestamp) VALUES (:1, TO_DATE(:2, 'DD-MM-YYYY'), SYSDATE)", array($fc, $purchase));
+ $serial = $this->has_arg('MANUFACTURERSERIALNUMBER') ? $this->arg('MANUFACTURERSERIALNUMBER') : '';
+ $this->db->pq("INSERT INTO dewarregistry (facilitycode, purchasedate, bltimestamp, manufacturerserialnumber) VALUES (:1, TO_DATE(:2, 'DD-MM-YYYY'), SYSDATE, :3)", array($fc, $purchase, $serial));
$this->_output(array('FACILITYCODE' => $fc, 'DEWARREGISTRYID' => $this->db->id()));
}
@@ -734,7 +737,7 @@ function _update_dewar_registry()
else
$dew = $dew[0];
- $fields = array('PURCHASEDATE');
+ $fields = array('PURCHASEDATE', 'MANUFACTURERSERIALNUMBER');
if ($this->staff)
array_push($fields, 'NEWFACILITYCODE');
foreach ($fields as $f) {
@@ -915,26 +918,25 @@ function _transfer_dewar()
if (!$this->has_arg('LOCATION'))
$this->_error('No location specified');
- $dew = $this->db->pq("SELECT d.dewarid,s.shippingid
+ $dew = $this->db->pq("SELECT d.dewarid,s.shippingid,c.containerid
FROM dewar d
INNER JOIN shipping s ON s.shippingid = d.shippingid
INNER JOIN proposal p ON p.proposalid = s.proposalid
+ LEFT JOIN container c ON d.dewarid = c.dewarid
WHERE d.dewarid=:1 and p.proposalid=:2", array($this->arg('DEWARID'), $this->proposalid));
if (!sizeof($dew))
$this->_error('No such dewar');
- else
- $dew = $dew[0];
$this->db->pq(
"INSERT INTO dewartransporthistory (dewartransporthistoryid,dewarid,dewarstatus,storagelocation,arrivaldate)
VALUES (s_dewartransporthistory.nextval,:1,'transfer-requested',:2,CURRENT_TIMESTAMP) RETURNING dewartransporthistoryid INTO :id",
- array($dew['DEWARID'], $this->arg('LOCATION'))
+ array($this->arg('DEWARID'), $this->arg('LOCATION'))
);
// Update dewar status to transfer-requested to keep consistent with history
- $this->db->pq("UPDATE dewar set dewarstatus='transfer-requested' WHERE dewarid=:1", array($dew['DEWARID']));
+ $this->db->pq("UPDATE dewar set dewarstatus='transfer-requested' WHERE dewarid=:1", array($this->arg('DEWARID')));
if ($this->has_arg('NEXTVISIT')) {
$sessions = $this->db->pq(
@@ -947,7 +949,13 @@ function _transfer_dewar()
$sessionId = !empty($sessions) ? $sessions[0]['SESSIONID'] : NULL;
- $this->db->pq("UPDATE dewar SET firstexperimentid=:1 WHERE dewarid=:2", array($sessionId, $dew['DEWARID']));
+ $this->db->pq("UPDATE dewar SET firstexperimentid=:1 WHERE dewarid=:2", array($sessionId, $this->arg('DEWARID')));
+
+ if (is_null($sessionId)) {
+ foreach ($dew as $container) {
+ $this->db->pq("UPDATE container SET sessionid=:1 WHERE containerid=:2", array($sessionId, $container['CONTAINERID']));
+ }
+ }
}
$email = new Email('dewar-transfer', '*** Dewar ready for internal transfer ***');
@@ -1550,6 +1558,7 @@ function _add_dewar()
$fc = $this->has_arg('FACILITYCODE') ? $this->arg('FACILITYCODE') : '';
$wg = $this->has_arg('WEIGHT') ? $this->arg('WEIGHT') : $dewar_weight;
$exp = null;
+ $source = $this->has_arg('SOURCE') ? $this->arg('SOURCE') : null;
if ($this->has_arg('FIRSTEXPERIMENTID')) {
$experimentId = $this->arg('FIRSTEXPERIMENTID');
@@ -1557,9 +1566,9 @@ function _add_dewar()
}
$this->db->pq(
- "INSERT INTO dewar (dewarid,code,trackingnumbertosynchrotron,trackingnumberfromsynchrotron,shippingid,bltimestamp,dewarstatus,firstexperimentid,facilitycode,weight)
- VALUES (s_dewar.nextval,:1,:2,:3,:4,CURRENT_TIMESTAMP,'opened',:5,:6,:7) RETURNING dewarid INTO :id",
- array($this->arg('CODE'), $to, $from, $this->arg('SHIPPINGID'), $exp, $fc, $wg)
+ "INSERT INTO dewar (dewarid,code,trackingnumbertosynchrotron,trackingnumberfromsynchrotron,shippingid,bltimestamp,dewarstatus,firstexperimentid,facilitycode,weight,source)
+ VALUES (s_dewar.nextval,:1,:2,:3,:4,CURRENT_TIMESTAMP,'opened',:5,:6,:7,IFNULL(:8,CURRENT_USER)) RETURNING dewarid INTO :id",
+ array($this->arg('CODE'), $to, $from, $this->arg('SHIPPINGID'), $exp, $fc, $wg, $source)
);
$id = $this->db->id();
@@ -2185,11 +2194,12 @@ function _add_container()
$crid = $this->has_arg('CONTAINERREGISTRYID') ? $this->arg('CONTAINERREGISTRYID') : null;
$pipeline = $this->has_arg('PROCESSINGPIPELINEID') ? $this->arg('PROCESSINGPIPELINEID') : null;
+ $source = $this->has_arg('SOURCE') ? $this->arg('SOURCE') : null;
$this->db->pq(
- "INSERT INTO container (containerid,dewarid,code,bltimestamp,capacity,containertype,scheduleid,screenid,ownerid,requestedimagerid,comments,barcode,experimenttype,storagetemperature,containerregistryid,prioritypipelineid)
- VALUES (s_container.nextval,:1,:2,CURRENT_TIMESTAMP,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14) RETURNING containerid INTO :id",
- array($this->arg('DEWARID'), $this->arg('NAME'), $cap, $this->arg('CONTAINERTYPE'), $sch, $scr, $own, $rid, $com, $bar, $ext, $tem, $crid, $pipeline)
+ "INSERT INTO container (containerid,dewarid,code,bltimestamp,capacity,containertype,scheduleid,screenid,ownerid,requestedimagerid,comments,barcode,experimenttype,storagetemperature,containerregistryid,prioritypipelineid,source)
+ VALUES (s_container.nextval,:1,:2,CURRENT_TIMESTAMP,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,IFNULL(:15,CURRENT_USER)) RETURNING containerid INTO :id",
+ array($this->arg('DEWARID'), $this->arg('NAME'), $cap, $this->arg('CONTAINERTYPE'), $sch, $scr, $own, $rid, $com, $bar, $ext, $tem, $crid, $pipeline, $source)
);
$cid = $this->db->id();
@@ -2665,6 +2675,7 @@ function _add_shipment()
$rt = $this->has_arg('READYBYTIME') ? $this->arg('READYBYTIME') : null;
$ct = $this->has_arg('CLOSETIME') ? $this->arg('CLOSETIME') : null;
$loc = $this->has_arg('PHYSICALLOCATION') ? $this->arg('PHYSICALLOCATION') : null;
+ $source = $this->has_arg('SOURCE') ? $this->arg('SOURCE') : null;
$hard_drive_enclosed = null;
if ($this->has_arg('ENCLOSEDHARDDRIVE')) {
@@ -2727,9 +2738,9 @@ function _add_shipment()
$extra = json_encode($extra_array);
$this->db->pq(
- "INSERT INTO shipping (shippingid, proposalid, shippingname, deliveryagent_agentname, deliveryagent_agentcode, deliveryagent_shippingdate, deliveryagent_deliverydate, bltimestamp, creationdate, comments, sendinglabcontactid, returnlabcontactid, shippingstatus, safetylevel, readybytime, closetime, physicallocation)
- VALUES (s_shipping.nextval,:1,:2,:3,:4,TO_DATE(:5,'DD-MM-YYYY'), TO_DATE(:6,'DD-MM-YYYY'),CURRENT_TIMESTAMP,CURRENT_TIMESTAMP,:7,:8,:9,'opened',:10, :11, :12, :13) RETURNING shippingid INTO :id",
- array($this->proposalid, $this->arg('SHIPPINGNAME'), $an, $ac, $sd, $dd, $com, $this->arg('SENDINGLABCONTACTID'), $this->arg('RETURNLABCONTACTID'), $this->arg('SAFETYLEVEL'), $rt, $ct, $loc)
+ "INSERT INTO shipping (shippingid, proposalid, shippingname, deliveryagent_agentname, deliveryagent_agentcode, deliveryagent_shippingdate, deliveryagent_deliverydate, bltimestamp, creationdate, comments, sendinglabcontactid, returnlabcontactid, shippingstatus, safetylevel, readybytime, closetime, physicallocation, source)
+ VALUES (s_shipping.nextval,:1,:2,:3,:4,TO_DATE(:5,'DD-MM-YYYY'), TO_DATE(:6,'DD-MM-YYYY'),CURRENT_TIMESTAMP,CURRENT_TIMESTAMP,:7,:8,:9,'opened',:10, :11, :12, :13, IFNULL(:14,CURRENT_USER)) RETURNING shippingid INTO :id",
+ array($this->proposalid, $this->arg('SHIPPINGNAME'), $an, $ac, $sd, $dd, $com, $this->arg('SENDINGLABCONTACTID'), $this->arg('RETURNLABCONTACTID'), $this->arg('SAFETYLEVEL'), $rt, $ct, $loc, $source)
);
$sid = $this->db->id();
@@ -2756,9 +2767,9 @@ function _add_shipment()
$n = $fc ? $fc : ('Dewar' . ($i + 1));
$this->db->pq(
- "INSERT INTO dewar (dewarid,code,shippingid,bltimestamp,dewarstatus,firstexperimentid,facilitycode,weight)
- VALUES (s_dewar.nextval,:1,:2,CURRENT_TIMESTAMP,'opened',:3,:4,$dewar_weight) RETURNING dewarid INTO :id",
- array($n, $sid, $exp, $fc)
+ "INSERT INTO dewar (dewarid,code,shippingid,bltimestamp,dewarstatus,firstexperimentid,facilitycode,weight,source)
+ VALUES (s_dewar.nextval,:1,:2,CURRENT_TIMESTAMP,'opened',:3,:4,:5,IFNULL(:6,CURRENT_USER)) RETURNING dewarid INTO :id",
+ array($n, $sid, $exp, $fc, $dewar_weight, $source)
);
$id = $this->db->id();
diff --git a/client/src/images/block-4_no_labels_470x470.png b/client/src/images/block-4_no_labels_470x470.png
new file mode 100644
index 000000000..0fe5a381f
Binary files /dev/null and b/client/src/images/block-4_no_labels_470x470.png differ
diff --git a/client/src/images/cartridge_no_labels_470x470.png b/client/src/images/cartridge_no_labels_470x470.png
new file mode 100755
index 000000000..90fd93df4
Binary files /dev/null and b/client/src/images/cartridge_no_labels_470x470.png differ
diff --git a/client/src/images/gridbox_no_labels_470x470.png b/client/src/images/gridbox_no_labels_470x470.png
new file mode 100755
index 000000000..ac8e4385b
Binary files /dev/null and b/client/src/images/gridbox_no_labels_470x470.png differ
diff --git a/client/src/js/modules/dc/views/samplechanger.js b/client/src/js/modules/dc/views/samplechanger.js
index 961451f98..a76a7c267 100644
--- a/client/src/js/modules/dc/views/samplechanger.js
+++ b/client/src/js/modules/dc/views/samplechanger.js
@@ -69,7 +69,7 @@ define(['marionette', 'utils/canvas', 'utils',
this.rpad = 0 //pad - 25
var sw = 18
- this.aspectratio = (sw/this.positions) - (this.positions <= 10 ? 0.3 : 0)
+ this.aspectratio = (this.positions <= 10 ? 1.5 : 0.4)
this.contwidth = (this.positions * sw) + this.pad + this.rpad + 15
console.log('sc width', this.contwidth, this.aspectratio)
if (!this.getOption('fullScreen')) {
@@ -230,4 +230,4 @@ define(['marionette', 'utils/canvas', 'utils',
})
-})
\ No newline at end of file
+})
diff --git a/client/src/js/modules/shipment/components/container-view-wrapper.vue b/client/src/js/modules/shipment/components/container-view-wrapper.vue
index 0261f6e38..3f3424d07 100644
--- a/client/src/js/modules/shipment/components/container-view-wrapper.vue
+++ b/client/src/js/modules/shipment/components/container-view-wrapper.vue
@@ -123,7 +123,8 @@ export default {
// This is the current logic to determine the plate type
// Anything other than Box, Puck or PCRStrip
// TODO - get container types from data base
- let is_plate = ['box', 'puck', 'pcrstrip', 'block-4', null].indexOf(containerType) == -1 && containerType.indexOf('puck') == -1
+ let puckTypes = ['cartridge', 'box', 'puck', 'pcrstrip', 'block-4']
+ let is_plate = containerType !== null && (!puckTypes.some(v => containerType.includes(v)))
return is_plate
},
diff --git a/client/src/js/modules/shipment/components/puck-view.vue b/client/src/js/modules/shipment/components/puck-view.vue
index c6b201ba9..c78a8ad86 100644
--- a/client/src/js/modules/shipment/components/puck-view.vue
+++ b/client/src/js/modules/shipment/components/puck-view.vue
@@ -50,16 +50,38 @@ export default {
}
},
data() {
- let sampleCentres, sampleRadius, sampleHighlightRadius
- if (this.container.capacity === "4") {
+ let sampleCentres, sampleRadius, sampleHighlightRadius, containerImage
+ if (this.container.containerType === "VMXm-Cartridge") {
sampleCentres = [
- [200, 150],
- [320, 150],
- [200, 270],
- [320, 270],
+ [235, 75],
+ [235, 155],
+ [235, 235],
+ [235, 315],
+ [235, 395],
+ ]
+ sampleRadius = 35
+ sampleHighlightRadius = 30
+ containerImage = '/assets/images/cartridge_no_labels_470x470.png'
+ } else if (this.container.containerType === "VMXm-GridBox") {
+ sampleCentres = [
+ [315, 310],
+ [315, 160],
+ [155, 160],
+ [155, 310],
]
sampleRadius = 50
+ sampleHighlightRadius = 19
+ containerImage = '/assets/images/gridbox_no_labels_470x470.png'
+ } else if (this.container.capacity === "4") {
+ sampleCentres = [
+ [152.5, 152.5],
+ [317.5, 152.5],
+ [152.5, 317.5],
+ [317.5, 317.5],
+ ]
+ sampleRadius = 75
sampleHighlightRadius = 60
+ containerImage = '/assets/images/block-4_no_labels_470x470.png'
} else {
sampleCentres = [
[235, 157],
@@ -81,6 +103,7 @@ export default {
]
sampleRadius = 44
sampleHighlightRadius = 35
+ containerImage = '/assets/images/puck_no_labels_470x470.png'
}
return {
// Define geometry of puck locations
@@ -91,7 +114,7 @@ export default {
// Centre coordinates of puck 470x470 pixels
// Changing the background image would require changing the centres
centres: sampleCentres,
- puckImage: '/assets/images/puck_no_labels_470x470.png',
+ puckImage: containerImage,
// Holders for svg elements used in updates
graphic: null, // Holder for svg puck graphic
labels: null, // Holder for text labels
@@ -147,6 +170,11 @@ export default {
.append('svg')
.attr('viewBox', viewBox.join(','))
.attr('preserveAspectRatio', 'xMaxYMax meet')
+ // Add the background image
+ svg.append('image')
+ .attr('href', this.puckImage)
+ .attr('width', 470)
+ .attr('height', 470)
// Chart area
this.graphic = svg.append('g')
this.labels = svg.append('g')
diff --git a/client/src/js/modules/shipment/models/dewarregistry.js b/client/src/js/modules/shipment/models/dewarregistry.js
index c95bd02b5..e7e92285c 100644
--- a/client/src/js/modules/shipment/models/dewarregistry.js
+++ b/client/src/js/modules/shipment/models/dewarregistry.js
@@ -23,6 +23,9 @@ define(['backbone'], function(Backbone) {
required: false,
pattern: 'edate'
},
+ MANUFACTURERSERIALNUMBER: {
+ required: false,
+ },
},
validateFacilityCode: function(value, attr, state) {
@@ -59,4 +62,4 @@ define(['backbone'], function(Backbone) {
// Model.prototype.validation.NEWFACILITYCODE = Model.prototype.validation.FACILITYCODE
return Model
-})
\ No newline at end of file
+})
diff --git a/client/src/js/modules/shipment/views/dewarregistry.js b/client/src/js/modules/shipment/views/dewarregistry.js
index 29355a334..a6bc25b77 100644
--- a/client/src/js/modules/shipment/views/dewarregistry.js
+++ b/client/src/js/modules/shipment/views/dewarregistry.js
@@ -33,6 +33,7 @@ define(['marionette', 'backgrid',
ui: {
fc: 'input[name=FACILITYCODE]',
date: 'input[name=PURCHASEDATE]',
+ serial: 'input[name=MANUFACTURERSERIALNUMBER]',
},
onRender: function() {
@@ -47,6 +48,7 @@ define(['marionette', 'backgrid',
app.alert({message: 'New dewar registered ' + this.model.get('FACILITYCODE'), notify: true})
this.ui.fc.val('')
this.ui.date.val('')
+ this.ui.serial.val('')
this.model.set({ DEWARS: 0, REPORTS: 0, BLTIMESTAMP: formatDate.default(new Date(), 'yyyy-MM-dd HH:mm:ss') })
this.trigger('model:saved', this.model)
this.setupValidation()
diff --git a/client/src/js/modules/shipment/views/dispatch.js b/client/src/js/modules/shipment/views/dispatch.js
index 6e1d48f93..113415195 100644
--- a/client/src/js/modules/shipment/views/dispatch.js
+++ b/client/src/js/modules/shipment/views/dispatch.js
@@ -81,6 +81,7 @@ define(['marionette', 'views/form',
lab: 'input[name=LABNAME]',
submit: 'button[name=submit]',
+ shippingadvice: '.shippingadvice',
facc: 'a.facc',
accountNumber: 'input[NAME=DELIVERYAGENT_AGENTCODE]',
@@ -294,8 +295,10 @@ define(['marionette', 'views/form',
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.
")
} else {
this.ui.submit.text("Request Dewar Dispatch")
+ this.ui.shippingadvice.html("")
}
},
@@ -332,6 +335,7 @@ define(['marionette', 'views/form',
this.model.visitRequired = false
this.ui.dispatchDetails.hide()
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.