Skip to content

Commit

Permalink
Format date if it exists in show
Browse files Browse the repository at this point in the history
  • Loading branch information
jgreben committed May 22, 2018
1 parent facc5c9 commit 9faf78a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/views/sal3_batch_requests_batches/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@
<dt><strong>Items to pull per day</strong></dt>
<dd><%= @sal3_batch_requests_batch.batch_numpullperday %></dd>
<dt><strong>Delivery start date</strong></dt>
<dd><%= @sal3_batch_requests_batch.batch_startdate.strftime('%d-%^b-%y') %></dd>
<% startdate = @sal3_batch_requests_batch.batch_startdate %>
<dd><%= startdate ? startdate.strftime('%d-%^b-%y') : 'no date given' %></dd>
<dt><strong>All items deliverd by</strong></dt>
<dd><%= @sal3_batch_requests_batch.batch_needbydate.strftime('%d-%^b-%y') %></dd>
<% needbydate = @sal3_batch_requests_batch.batch_needbydate %>
<dd><%= needbydate ? needbydate.strftime('%d-%^b-%y') : 'no date given' %></dd>
<dt><strong>Delivery days</strong></dt>
<dd>Mon: <%= @sal3_batch_requests_batch.batch_pullmon %></dd>
<dd>Tues: <%= @sal3_batch_requests_batch.batch_pulltues %></dd>
Expand Down

0 comments on commit 9faf78a

Please sign in to comment.