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

LIMS-903: Update email on dewar transfer #649

Merged
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
20 changes: 4 additions & 16 deletions api/assets/emails/dewar-transfer.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,7 @@

Dear local contact: <?php echo $data['LOCALCONTACT'] ?> <?php echo $data['LCEMAIL'] ?>,

Your user: <?php echo $data['GIVENNAME'] ?> <?php echo $data['FAMILYNAME'] ?> requested an internal transfer for his/her dewar(s). Please print this e-mail and affix it on the shipping case and put the dewar for the visit <?php echo $data['VISIT'] ?> on the rack outside the beamline: "to be Stored at Diamond" by the <?php echo $data['DELIVERYAGENT_SHIPPINGDATE'] ?>.

Local contact for next visit: <?php echo $data['NEXTLOCALCONTACT'] ?> <?php echo $data['LCNEXTEMAIL'] ?>


Dear EHC,

Please collect the dewar from visit <?php echo $data['VISIT'] ?> <?php if($data['FACILITYCODE']): ?>(Dewar Code: <?php echo $data['FACILITYCODE'] ?>)<?php endif; ?> currently stored on the rack outside <?php echo $data['LOCATION'] ?> and transfer it to the <?php echo $data['NEXTLOCATION'] ?> rack in the MX storage room
The dewar should be ready for internal transfer by the <?php echo $data['DELIVERYAGENT_SHIPPINGDATE'] ?>

Your user: <?php echo $data['GIVENNAME'] ?> <?php echo $data['FAMILYNAME'] ?> from visit <?php echo $data['VISIT'] ?> requested an internal transfer for his/her dewar(s). Please print this e-mail and affix it on the shipping case.

Information for the transfer:

Expand Down Expand Up @@ -42,14 +33,11 @@
Current dewar location
<?php echo $data['LOCATION'] ?>

New Location in storage room
<?php echo $data['NEXTLOCATION'] ?>

Pickup date:
<?php echo $data['DELIVERYAGENT_SHIPPINGDATE'] ?>

Local contact email (in case of problems finding the dewar):
<?php echo $data['LOCALCONTACT'] ?> <?php echo $data['LCEMAIL'] ?>

Local contact for next visit:
<?php echo $data['NEXTLOCALCONTACT'] ?> <?php echo $data['LCNEXTEMAIL'] ?>

Comments:
<?php echo $data['COMMENTS'] ?>
21 changes: 4 additions & 17 deletions api/assets/emails/html/dewar-transfer.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,9 @@ <h1 style="font-size: 16px; font-weight: normal; border-bottom: 1px solid #000;

<div class="inset" style="margin: 1%; padding: 1%; margin-bottom: 2%; border-radius: 5px; background: #82d180">
<h2>Local Contact: <?php echo $data['LOCALCONTACT'] ?> <?php echo $data['LCEMAIL'] ?></h2>
<p><?php echo $data['GIVENNAME'] ?> <?php echo $data['FAMILYNAME'] ?> requested an internal transfer for his/her dewar(s). Please print this e-mail and affix it on the shipping case and put the dewar for the visit <?php echo $data['VISIT'] ?> on the rack outside the beamline: "to be Stored at Diamond" by the <?php echo $data['DELIVERYAGENT_SHIPPINGDATE'] ?></p>
<p>Local contact for next visit: <?php echo $data['NEXTLOCALCONTACT'] ?> <?php echo $data['LCNEXTEMAIL'] ?></p>
<p><?php echo $data['GIVENNAME'] ?> <?php echo $data['FAMILYNAME'] ?> from visit <?php echo $data['VISIT'] ?> requested an internal transfer for his/her dewar(s). Please print this e-mail and affix it on the shipping case.</p>
</div>

<div class="inset" style="margin: 1%; padding: 1%; margin-bottom: 2%; border-radius: 5px; background: #82d180">
<h2>EHCs</h2>
<p>Please collect the dewar from visit <?php echo $data['VISIT'] ?> <?php if($data['FACILITYCODE']): ?>(Dewar Code: <?php echo $data['FACILITYCODE'] ?>)<?php endif; ?> currently stored on the rack outside <?php echo $data['LOCATION'] ?> and transfer it to the <?php echo $data['NEXTLOCATION'] ?> rack in the MX storage room</p>
<p>The dewar should be ready for internal transfer by the <?php echo $data['DELIVERYAGENT_SHIPPINGDATE'] ?></p>
</div>

<table class="details" style="background: #f4f4f4; margin: 1%">
<tbody>
<?php if ($data['FACILITYCODE']): ?>
Expand Down Expand Up @@ -40,11 +33,10 @@ <h2>EHCs</h2>
<td><?php echo $data['NEXTVISIT'] ?></td>
</tr>
<tr>
<td style="padding: 1.5%; font-weight: bold">New Location</td>
<td><?php echo $data['NEXTLOCATION'] ?></td>
<td style="padding: 1.5%; font-weight: bold">New Local Contact</td>
<td><?php echo $data['NEXTLOCALCONTACT'] ?></td>
</tr>


<tr>
<td style="padding: 1.5%; font-weight: bold">Full Name</td>
<td><?php echo $data['GIVENNAME'] ?> <?php echo $data['FAMILYNAME'] ?></td>
Expand All @@ -61,12 +53,7 @@ <h2>EHCs</h2>
<td style="padding: 1.5%; font-weight: bold">Lab / Company Name</td>
<td><?php echo $data['LABNAME'] ?></td>
</tr>

<tr>
<td style="padding: 1.5%; font-weight: bold">Pickup Date</td>
<td><?php echo $data['DELIVERYAGENT_SHIPPINGDATE'] ?></td>
</tr>


<tr>
<td style="padding: 1.5%; font-weight: bold">Comments</td>
<td><?php echo nl2br($data['COMMENTS']) ?></td>
Expand Down
5 changes: 0 additions & 5 deletions client/src/js/modules/shipment/models/transfer.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ define(['backbone'], function(Backbone) {
}
},

DELIVERYAGENT_SHIPPINGDATE: {
pattern: 'edate',
required: true,
},

},

})
Expand Down
8 changes: 1 addition & 7 deletions client/src/js/modules/shipment/views/transfer.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,6 @@ define(['marionette', 'views/form',
},

onRender: function() {
this.date('input[name=DELIVERYAGENT_SHIPPINGDATE]')

var d = new Date()
var today = (d.getDate() < 10 ? '0'+d.getDate() : d.getDate()) + '-' + (d.getMonth() < 9 ? '0'+(d.getMonth()+1) : d.getMonth()+1) + '-' + d.getFullYear()
this.$el.find('input[name=DELIVERYAGENT_SHIPPINGDATE]').val(today)

var self = this
this.ready.done(function() {
self.ui.exp.html(self.visits.opts()).val(self.model.get('VISIT'))
Expand Down Expand Up @@ -156,4 +150,4 @@ define(['marionette', 'views/form',
},
})

})
})
8 changes: 0 additions & 8 deletions client/src/js/templates/shipment/transfer.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,6 @@ <h1>Request Internal Dewar Transfer</h1>
</li>


<li>
<label>Pickup Date
<span class="small">Date dewar will be ready for transfer</span>
</label>
<input class="half" type="text" name="DELIVERYAGENT_SHIPPINGDATE" />
</li>


<li>
<label>Comments
<span class="small">Comment for the shipment</span>
Expand Down
Loading