summaryrefslogtreecommitdiff
path: root/app/views/characters/hearth/hearth_plantings
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/characters/hearth/hearth_plantings')
-rw-r--r--app/views/characters/hearth/hearth_plantings/index.html.erb14
1 files changed, 9 insertions, 5 deletions
diff --git a/app/views/characters/hearth/hearth_plantings/index.html.erb b/app/views/characters/hearth/hearth_plantings/index.html.erb
index d8e7f96..3f6964f 100644
--- a/app/views/characters/hearth/hearth_plantings/index.html.erb
+++ b/app/views/characters/hearth/hearth_plantings/index.html.erb
@@ -3,11 +3,15 @@
<p>You have <span class="font-bold"><%= @hearth.available_planting_spots %></span> available planting spots.</p>
<div class="my-4">
- <%= form_with url: start_activity_path, method: :post do |f| %>
- <%= f.select :id, @planting_activities.sort_by { |a| a.name }.map { |a| [a.name, a.id] } %>
- <%= f.number_field :actions, value: 1, size: 5, min: 1, max: 2_000_000_000 %>
- <%= f.submit "Plant" %>
- <% end %>
+ <div data-controller="activity-select">
+ <%= form_with url: start_activity_path, method: :post do |f| %>
+ <%= f.select :id, @planting_activities.sort_by { |a| a.name }.map { |a| [a.name, a.id] },
+ {}, { data: { activity_select_target: "select", action: "activity-select#load" } } %>
+ <%= f.number_field :actions, value: 1, size: 5, min: 1, max: 2_000_000_000 %>
+ <%= f.submit "Plant" %>
+ <% end %>
+ <div data-activity-select-target="output" class="my-1"></div>
+ </div>
</div>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-4">