%= if @delete_days_shifts do %>
<%= live_modal @socket, Shift73kWeb.ShiftAssignLive.DeleteComponent,
id: "delete-days-shifts-#{@current_user.id}",
title: "Delete Shifts From Selected Days",
delete_days_shifts: @delete_days_shifts,
current_user: @current_user
%>
<% end %>
<%= form_for :template_select, "#", [phx_change: "change-selected-template"], fn sts -> %>
<%= label sts, :template, "Select shift template to assign to dates", class: "form-label" %>
<%= select sts, :template, @shift_templates,
value: @shift_template && @shift_template.id || (@shift_template_options |> hd() |> elem(1)),
class: "form-select"
%>
<% end %>
" id="#templateDetailsBtn" phx-click="toggle-template-details" phx-value-target_id="#templateDetailsCol">
<%= icon_div @socket, (@show_template_btn_active && "bi-binoculars-fill" || "bi-binoculars"), [class: "icon baseline"] %>
Details
" id="#templateDetailsCol" phx-hook="BsCollapse">
<%= form_for @shift_template_changeset, "#", [phx_change: "validate-shift-template"], fn stf -> %>
<%= label stf, :subject, "Subject/Title", class: "form-label" %>
<%= icon_div @socket, "bi-tag", [class: "icon is-left text-muted fs-5"] %>
<%= text_input stf, :subject,
value: input_value(stf, :subject),
class: input_class(stf, :subject, "form-control"),
phx_debounce: 250,
disabled: @shift_template.id != @custom_shift.id,
aria_describedby: error_ids(stf, :subject)
%>
<%= error_tag stf, :subject %>
<%= label stf, :time_start, "Start", class: "form-label" %>
<%= time_input stf, :time_start,
precision: :minute,
value: input_value(stf, :time_start),
class: input_class(stf, :time_start, "form-control"),
disabled: @shift_template.id != @custom_shift.id,
aria_describedby: error_ids(stf, :time_start)
%>
<%= label stf, :time_end, "End", class: "form-label" %>
<%= time_input stf, :time_end,
precision: :minute,
value: input_value(stf, :time_end),
class: input_class(stf, :time_end, "form-control"),
disabled: @shift_template.id != @custom_shift.id,
aria_describedby: error_ids(stf, :time_end)
%>
Shift length: <%= @shift_length %>
<%= error_tag stf, :time_start %>
<%= error_tag stf, :time_end %>
<%= label stf, :location, class: "form-label" %>
<%= icon_div @socket, "bi-geo", [class: "icon is-left text-muted fs-5"] %>
<%= text_input stf, :location,
value: input_value(stf, :location),
class: input_class(stf, :location, "form-control"),
phx_debounce: 250,
disabled: @shift_template.id != @custom_shift.id,
aria_describedby: error_ids(stf, :location)
%>
<%= error_tag stf, :location %>
<%= label stf, :time_zone, class: "form-label" %>
<%= icon_div @socket, "bi-map", [class: "icon is-left text-muted fs-5"] %>
<%= text_input stf, :time_zone,
value: input_value(stf, :time_zone),
class: input_class(stf, :time_zone, "form-control"),
disabled: @shift_template.id != @custom_shift.id,
phx_debounce: 250,
list: "tz_list"
%>
<%= for tz_name <- Timex.timezones() do %>
<% end %>
end
<%= if @shift_template.id == @custom_shift.id do %>
Type to search & select from list of known <%= link "IANA tz database", to: "https://en.wikipedia.org/wiki/List_of_tz_database_time_zones", target: "_blank" %> time zones
<% end %>
<%= error_tag stf, :time_zone %>
<%= label stf, :description, class: "form-label" %>
<%= textarea stf, :description,
value: input_value(stf, :description),
class: input_class(stf, :description, "form-control"),
disabled: @shift_template.id != @custom_shift.id,
phx_debounce: 250,
aria_describedby: error_ids(stf, :description)
%>
<%= error_tag stf, :description %>
<% end %>
<%# month navigation %>
<%= Timex.format!(@cursor_date, "{Mfull} {YYYY}") %>
>
<%= icon_div @socket, "bi-asterisk", [class: "icon baseline"] %>
Today
<%= icon_div @socket, "bi-chevron-left", [class: "icon baseline"] %>
Prev
Next
<%= icon_div @socket, "bi-chevron-right", [class: "icon baseline", style: "margin-left:0.125rem;"] %>
<%# calendar month table display %>
>
<%= icon_div @socket, "bi-trash", [class: "icon baseline"] %>
Delete shifts from selected days
>
<%= icon_div @socket, "bi-eraser", [class: "icon baseline"] %>
De-select all selected
>
<%= icon_div @socket, "bi-save", [class: "icon baseline"] %>
Assign shifts to selected days