fix tables unable to sort on nil dates

This commit is contained in:
2023-03-19 11:19:55 -04:00
parent f83fbc5d99
commit fd0bac3bbf
12 changed files with 138 additions and 109 deletions

View File

@ -6,7 +6,7 @@ defmodule CanneryWeb.AmmoGroupLive.Show do
use CanneryWeb, :live_view
alias Cannery.{ActivityLog, ActivityLog.ShotGroup}
alias Cannery.{Ammo, Ammo.AmmoGroup}
alias Cannery.Containers
alias Cannery.{ComparableDate, Containers}
alias CanneryWeb.Endpoint
alias Phoenix.LiveView.Socket
@ -90,7 +90,7 @@ defmodule CanneryWeb.AmmoGroupLive.Show do
columns = [
%{label: gettext("Rounds shot"), key: :count},
%{label: gettext("Notes"), key: :notes},
%{label: gettext("Date"), key: :date, type: Date},
%{label: gettext("Date"), key: :date, type: ComparableDate},
%{label: nil, key: :actions, sortable: false}
]