Implement measurements create/destroy and display existing readouts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-02 16:20:59 +00:00
parent d893e59293
commit 5206323d06
6 changed files with 75 additions and 3 deletions

View File

@@ -0,0 +1,12 @@
<%= tag.tr id: dom_id(readout) do %>
<td><%= readout.quantity %></td>
<td class="ralign"><%= readout.value %></td>
<td><%= readout.unit %></td>
<td><%= l(readout.created_at) %></td>
<% if current_user.at_least(:active) %>
<td class="flex">
<%= image_button_to t('.destroy'), 'delete-outline', measurement_path(readout),
method: :delete, data: {turbo_stream: true} %>
</td>
<% end %>
<% end %>