From 8ba568ae0ebe715b5da453681eb141886f1977a8 Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Thu, 4 Sep 2025 20:55:03 +0200 Subject: Simpler, Better, Faster... Stronger Start small, address critical customer needs, /then/ scale. --- .../dashboard/_nutrient_profile_allocator.html.erb | 187 +++++++++++++++++++++ 1 file changed, 187 insertions(+) create mode 100644 app/views/dashboard/_nutrient_profile_allocator.html.erb (limited to 'app/views/dashboard/_nutrient_profile_allocator.html.erb') diff --git a/app/views/dashboard/_nutrient_profile_allocator.html.erb b/app/views/dashboard/_nutrient_profile_allocator.html.erb new file mode 100644 index 0000000..d402ace --- /dev/null +++ b/app/views/dashboard/_nutrient_profile_allocator.html.erb @@ -0,0 +1,187 @@ +<%# Props: nutrient_profiles: ActiveRecord::Relation %> +<%# Fallback if controller didn't set @nutrient_profiles yet %> +<% profiles = (local_assigns[:nutrient_profiles] || []).presence || [] %> + +<%# We'll render a form purely for structure (no real submit yet) %> +<%= form_with url: "#", method: :post, local: true, html: { id: "np-mix-form", "data-controller": "np-mix" } do %> +
+
+ +
+
+ Choisissez des profils de croissance et répartissez-les pour totaliser 100%. +
+
+ Somme : 0% +
+
+ +
+ <%# Rows are injected by JS from the template below, including defaults %> +
+ +
+ + + <%# Placeholder "save" button for later backend wiring; disabled until total == 100 %> + +
+
+
+ + <%# --- Hidden template for a single row --- %> + + + <%# --- Defaults to inject on load --- %> + + + <%# --- Tiny inline JS to keep this self-contained (no Stimulus required) --- %> + + + +<% end %> -- cgit v1.2.3