From 5ef0cff56a40ed12fe7b885b47ae75e4b886ccf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Veikko=20Lintuj=C3=A4rvi?= Date: Sat, 20 May 2023 18:29:16 +0300 Subject: [PATCH] Add inserted and updated dates to list and show --- lib/osuuspuutarha_web/live/order_live/index.html.heex | 4 ++++ lib/osuuspuutarha_web/live/order_live/show.html.heex | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/lib/osuuspuutarha_web/live/order_live/index.html.heex b/lib/osuuspuutarha_web/live/order_live/index.html.heex index 873d15f..817bad0 100644 --- a/lib/osuuspuutarha_web/live/order_live/index.html.heex +++ b/lib/osuuspuutarha_web/live/order_live/index.html.heex @@ -30,6 +30,8 @@ Jäsen? Kaksi laskua? Parilliset viikot + Lisätty + Viimeisin muutos @@ -49,6 +51,8 @@ <%= order.is_member %> <%= order.split_invoice %> <%= order.even_weeks %> + <%= order.inserted_at.day %>.<%= order.inserted_at.month %>.<%= order.inserted_at.year %> + <%= order.updated_at.day %>.<%= order.updated_at.month %>.<%= order.updated_at.year %> <%= live_redirect "Näytä", to: Routes.order_show_path(@socket, :show, order) %> diff --git a/lib/osuuspuutarha_web/live/order_live/show.html.heex b/lib/osuuspuutarha_web/live/order_live/show.html.heex index 0db9e16..7f74cc7 100644 --- a/lib/osuuspuutarha_web/live/order_live/show.html.heex +++ b/lib/osuuspuutarha_web/live/order_live/show.html.heex @@ -77,6 +77,16 @@ <%= @order.even_weeks %> +
  • + Lisätty: + <%= @order.inserted_at.day %>.<%= @order.inserted_at.month %>.<%= @order.inserted_at.year %> +
  • + +
  • + Viimeisin muutos: + <%= @order.updated_at.day %>.<%= @order.updated_at.month %>.<%= @order.updated_at.year %> +
  • + <%= live_patch "Muokkaa", to: Routes.order_show_path(@socket, :edit, @order), class: "button" %> |