%= if @live_action in [:new, :edit] do %> <%= live_modal @socket, Shift73kWeb.ShiftTemplateLive.FormComponent, id: @shift_template.id || :new, title: @page_title, action: @live_action, shift_template: @shift_template, current_user: @current_user %> <% end %> <%= if @delete_shift_template do %> <%= live_modal @socket, Shift73kWeb.ShiftTemplateLive.DeleteComponent, id: @delete_shift_template.id, title: "Delete Shift Template", delete_shift_template: @delete_shift_template, current_user: @current_user %> <% end %>
<%= icon_div @socket, "bi-hourglass", [class: "icon baseline text-muted"] %> Hours: | <%= shift.time_start |> Calendar.strftime("%I:%M%P") %> — <%= shift.time_end |> Calendar.strftime("%I:%M%P") %> Shift length: <% shift_length = ShiftTemplate.shift_length_h_m_tuple(shift.time_start, shift.time_end) %> (<%= shift_length |> elem(0) %>h <%= shift_length |> elem(1) %>m) TZ: <%= shift.time_zone %> |
---|---|
<%= icon_div @socket, "bi-geo", [class: "icon baseline text-muted"] %> Location: | <%= if shift.location do %> <%= shift.location %> <% else %> none <% end %> |
<%= icon_div @socket, "bi-justify-left", [class: "icon baseline text-muted"] %> Description: | <%= if shift.description do %> <%= text_to_html shift.description %> <% else %> none <% end %> |