How do I display my employee nonavailability table in my schedule view?
As I am creating a schedule for my employees I would like to see my employee nonavailability table in the view of my schedule model.
<div class="col-lg-6 col-sm-12 right">
<% @non_availabilities = NonAvailability.all %>
<table class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th class="col-md-2">Employee</th>
<th class="col-md-2">Date</th>
<th class="col-md-2">Time</th>
<th class="col-md-2">Reason</th>
</tr>
</thead>
<tbody>
<% @non_availabilities.each do |non_availability| %>
<tr>
<td class="col-md-2"><%= non_availability.employee.full_name %></td>
<td class="col-md-2"><%= non_availability.date %></td>
<td class="col-md-2"><%= non_availability.time %></td>
<td class="col-md-2"><%= non_availability.reason %></td></tr>
<% end %>
</tbody>
</table>
</div>