month & shift navigation progress
This commit is contained in:
parent
b352416366
commit
4276399c20
20 changed files with 597 additions and 98 deletions
lib/shift73k/shifts
|
@ -40,8 +40,10 @@ defmodule Shift73k.Shifts.Templates do
|
|||
** (Ecto.NoResultsError)
|
||||
|
||||
"""
|
||||
def get_shift_template!(nil), do: nil
|
||||
def get_shift_template!(id), do: Repo.get!(ShiftTemplate, id)
|
||||
|
||||
def get_shift_template(nil), do: nil
|
||||
def get_shift_template(id), do: Repo.get(ShiftTemplate, id)
|
||||
|
||||
@doc """
|
||||
|
|
|
@ -58,7 +58,7 @@ defmodule Shift73k.Shifts.Templates.ShiftTemplate do
|
|||
[]
|
||||
end
|
||||
end)
|
||||
|> validate_inclusion(:time_zone, Timex.timezones())
|
||||
|> validate_inclusion(:time_zone, Timex.timezones(), message: "must be a valid IANA tz database time zone")
|
||||
end
|
||||
|
||||
defp time_start_from_attrs(%{"time_start" => time_start}), do: time_start
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue