From 7116826b854188604e21e2a613ac6672b6fd81f3 Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Mon, 8 Sep 2025 21:21:56 +0200 Subject: Create Target and nutrient target table on dashboard. --- app/views/nutrient_measurements/index.html.erb | 41 ++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 app/views/nutrient_measurements/index.html.erb (limited to 'app/views/nutrient_measurements/index.html.erb') diff --git a/app/views/nutrient_measurements/index.html.erb b/app/views/nutrient_measurements/index.html.erb new file mode 100644 index 0000000..c01d0cc --- /dev/null +++ b/app/views/nutrient_measurements/index.html.erb @@ -0,0 +1,41 @@ +<% content_for :title, "Liste des Relevé" %> + +

Liste des Relevés

+ +
+
+ <%= link_to "Nouvelle mesure", new_nutrient_measurement_path, class: "btn btn-primary" %> + <%= link_to "Retour", root_path, class: "btn btn-outline-secondary" %> +
+
+ +
+ + + + + + + + + + + + <% @nutrient_measurements.each do |m| %> + + + + + + + + <% end %> + +
DateN (total)PKNH₄-N
<%= l(m.measured_on) %> + <%= number_with_precision(m.nno3.to_f + m.nnh4.to_f, precision: 2) if m.nno3 || m.nnh4 %> + <%= number_with_precision(m.p, precision: 2) if m.p %><%= number_with_precision(m.k, precision: 2) if m.k %><%= number_with_precision(m.nnh4, precision: 2) if m.nnh4 %>
+
+ +<%= line_chart @npk_measurement_data, + title: "NPK", + ytitle: "Concentration (mg/L)" %> -- cgit v1.2.3