Dear <%= @visit.visitors.first.first_name %>, 

<% case @confirmation.outcome %>
<% when Confirmation::NO_SLOT_AVAILABLE %>
We’re sorry but none of the dates and times you chose to visit <%= @visit.prisoner.first_name %> <%= initial ? @visit.prisoner.last_initial : @visit.prisoner.last_name %> at <%= @visit.prisoner.prison_name %> were available. 

Please visit http://gov.uk/prison-visits/ to choose some alternative dates.
<% when Confirmation::NOT_ON_CONTACT_LIST %>
You have tried to book a visit but not all visitors are on the prisoner’s contact list.

You need to contact the prisoner to be added to the contact list.
<% when Confirmation::NO_VOS_LEFT %>
You have tried to book a visit but the prisoner you want to visit has not got any visiting allowance left. You need to contact the prisoner to find out more about their visiting allowance.
<% else %>
<% raise 'bad reason' %>
<% end %>

<%= @message_from_prison %>

If you have any questions, visit the prison website: <%= prison_url(@visit) %> or call the prison on <%= Rails.configuration.prison_data[@visit.prisoner.prison_name]['phone'] %>.

Dear <%= @visit.visitors.first.first_name %>, 

<% case @confirmation.outcome %>
<% when Confirmation::NO_SLOT_AVAILABLE %>
We’re sorry but none of the dates and times you chose to visit <%= @visit.prisoner.first_name %> <%= initial ? @visit.prisoner.last_initial : @visit.prisoner.last_name %> at <%= @visit.prisoner.prison_name %> were available. 
<% @visit.slots.each_with_index do |slot, index| %>
<% if slot.date.present? %>
<%= index + 1%>. <%= Date.parse(slot.date).strftime("%A %e %B") %>, <%= display_time_slot(slot.times) %>
<% end %>
<% end %>

Please visit http://gov.uk/prison-visits/ to choose some alternative dates.
<% when Confirmation::NOT_ON_CONTACT_LIST %>
You have tried to book a visit but not all visitors are on the prisoner’s contact list.

You need to contact the prisoner to be added to the contact list.
<% when Confirmation::NO_VOS_LEFT %>
You have tried to book a visit but the prisoner you want to visit has not got any visiting allowance left. You need to contact the prisoner to find out more about their visiting allowance.
<% else %>
<% raise 'bad reason' %>
<% end %>

<%= @message_from_prison %>

If you have any questions, visit the prison website: <%= prison_url(@visit) %> or call the prison on <%= Rails.configuration.prison_data[@visit.prisoner.prison_name]['phone'] %>.

Add requested time and alternatives to rejection email
Add requested time and alternatives to rejection email
