implemented shift template delete modal

This commit is contained in:
Adam Piontek 2021-03-09 20:55:59 -05:00
commit 5c4a4ea793
7 changed files with 102 additions and 61 deletions
lib/shift73k

View file

@ -22,7 +22,7 @@ defmodule Shift73k.ShiftTemplates do
end
def list_shift_templates_by_user_id(user_id) do
(from s in ShiftTemplate, where: s.user_id == ^user_id)
from(s in ShiftTemplate, where: s.user_id == ^user_id)
|> Repo.all()
end
@ -42,6 +42,8 @@ defmodule Shift73k.ShiftTemplates do
"""
def get_shift_template!(id), do: Repo.get!(ShiftTemplate, id)
def get_shift_template(id), do: Repo.get(ShiftTemplate, id)
@doc """
Creates a shift_template.