updated shift index template and implemented delete shift as modal instead of js alert

This commit is contained in:
Adam Piontek 2022-08-14 10:30:57 -04:00
commit a99c5eea35
5 changed files with 129 additions and 51 deletions
lib/shift73k

View file

@ -86,8 +86,12 @@ defmodule Shift73k.Shifts do
** (Ecto.NoResultsError)
"""
def get_shift!(nil), do: nil
def get_shift!(id), do: Repo.get!(Shift, id)
def get_shift(nil), do: nil
def get_shift(id), do: Repo.get(Shift, id)
@doc """
Creates a shift.