<%= if @delete_shift do %> <%= live_modal @socket, Shift73kWeb.ShiftLive.DeleteComponent, id: @delete_shift.id, title: "Delete Shift Template", delete_shift: @delete_shift %> <% end %>

My Shifts

<%# month navigation %>

<%= Calendar.strftime(@cursor_date, "%B %Y") %>

<%= for day <- Enum.to_list(@date_range) do %> <%= if Date.day_of_week(day, @current_user.week_start_at) == 1 do %>
<% end %>

<%= Calendar.strftime(day, "%A, %b %-d") %>

<% day_shifts = Enum.filter(@shifts, fn s -> s.date == day end) %> <%= if !Enum.empty?(day_shifts) do %> <%= for shift <- day_shifts do %>
<%= shift.subject %>
Hours: <%= format_shift_time(shift.time_start) %> — <%= format_shift_time(shift.time_end) %> Shift length: (<%= format_shift_length(shift) %>) TZ: <%= shift.time_zone %>
Location: <%= if shift.location do %> <%= shift.location %> <% else %> none <% end %>
Description: <%= if shift.description do %> <%= text_to_html shift.description %> <% else %> none <% end %>
<% end %> <% else %>

Nothing scheduled

<% end %> <% end %>