shift template display progress

This commit is contained in:
Adam Piontek 2021-03-07 11:06:55 -05:00
parent 66471c2931
commit 74678bd3ad

View file

@ -11,7 +11,7 @@
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-12 col-lg-10 col-xl-9 "> <div class="col-md-12 col-lg-10 col-xl-9 ">
<div class="d-flex justify-content-between d-flex align-items-center mb-3"> <div class="d-flex justify-content-between d-flex align-items-center mb-4">
<h2> <h2>
<%= icon_div @socket, "bi-clock-history", [class: "icon baseline"] %> <%= icon_div @socket, "bi-clock-history", [class: "icon baseline"] %>
My Shift Templates My Shift Templates
@ -21,15 +21,49 @@
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-12 col-sm-10 col-md-9 col-lg-7 col-xl-6 "> <div class="col-12 col-sm-11 col-md-10 col-lg-8 col-xl-7 ">
<%= for shift <- @shift_templates do %> <%= for shift <- @shift_templates do %>
<div class="card"> <div class="card mt-4">
<div class="card-body"> <div class="card-body">
<h5 class="card-title"><%= shift.subject %></h5> <h4 class="card-title"><%= shift.subject %></h4>
<h6 class="card-subtitle mb-2 text-muted"><%= shift.description %></h6> <h5 class="card-subtitle mb-2 text-muted">
<p class="card-text">huh ok</p> <%= shift.start_time |> Calendar.strftime("%I:%M %p") %>
&mdash;
<%=
shift.start_time
|> Time.add((60 * 60 * shift.length_hours) + ((shift.length_minutes || 0) * 60))
|> Calendar.strftime("%I:%M %p")
%>
<span class="fs-6">[<%= shift.timezone %>]</span>
</h5>
<p class="card-text">
<table class="table table-borderless table-nonfluid">
<tbody>
<tr>
<th scope="row" class="text-end">Description</th>
<td>
<%= if shift.description do %>
<%= shift.description %>
<% else %>
<span class="text-muted fst-italic">empty</span>
<% end %>
</td>
</tr>
<tr>
<th scope="row" class="text-end">Location</th>
<td>
<%= if shift.location do %>
<%= shift.location %>
<% else %>
<span class="text-muted fst-italic">empty</span>
<% end %>
</td>
</tr>
</tbody>
</table>
</p>
<a href="#" class="card-link">Card link</a> <a href="#" class="card-link">Card link</a>
<a href="#" class="card-link">Another link</a> <a href="#" class="card-link">Another link</a>
</div> </div>
@ -43,7 +77,6 @@
<div class="table-responsive"> <div class="table-responsive">
<table class="table"> <table class="table">
<thead> <thead>