Hello Albert!

<%= if @live_action in [:new, :edit] do %> <.modal return_to={Routes.yield_index_path(@socket, :index)}> <.live_component module={OsuuspuutarhaWeb.YieldLive.FormComponent} id={@yield.id || :new} title={@page_title} action={@live_action} yield={@yield} return_to={Routes.yield_index_path(@socket, :index)} /> <% end %> <%= live_patch "New Yield", to: Routes.yield_index_path(@socket, :new) %> <%= link "Download as Excel", to: Routes.exports_yield_path(@socket, :index) %> <%= for yield <- @yields do %> <% end %>
Date Plant Amount
<%= yield.date.day %>.<%= yield.date.month %> <%= Osuuspuutarha.Harvest.Parser.parse_plant(yield.plant) %> <%= yield.amount %> <%= yield.unit %> <%= live_redirect "Show", to: Routes.yield_show_path(@socket, :show, yield) %> <%= live_patch "Edit", to: Routes.yield_index_path(@socket, :edit, yield) %> <%= link "Delete", to: "#", phx_click: "delete", phx_value_id: yield.id, data: [confirm: "Are you sure?"] %>