diff --git a/app/views/plans/show.html.erb b/app/views/plans/show.html.erb index b954c228..ab456994 100644 --- a/app/views/plans/show.html.erb +++ b/app/views/plans/show.html.erb @@ -98,9 +98,9 @@ <% else %>
-
+
<% @plans_table.keys.map do |k| %> - <% end %> @@ -109,7 +109,7 @@
<% @plans_table.each do |k, v| %> <% end %>
diff --git a/app/views/schedules/_card.html.erb b/app/views/schedules/_card.html.erb index 4fe6a5aa..20c83d67 100644 --- a/app/views/schedules/_card.html.erb +++ b/app/views/schedules/_card.html.erb @@ -50,7 +50,8 @@
<% if mode == :plan && @plan.schedules.include?(schedule) %> -
+ <% memo_dialog_element_id = SecureRandom.uuid %> +
- + <%= form_with(url: event_plan_path(@plan, event_name: @plan.event.name), method: :patch) do |f| %>
@@ -66,8 +67,8 @@
- <%= f.hidden_field :edit_memo_schedule_id, value: schedule.id %> - <%= f.text_area :memo, value: @plan.plan_schedules.find { _1.schedule == schedule }&.memo, class: "border opacity-100 rounded-md border border-[rgb(214,211,208)] bg-white p-2 text-[rgb(35,34,30)] w-full", data: { "word-counter-target": "source", action: "input->word-counter#calc" } %> + <%= f.hidden_field :edit_memo_schedule_id, value: schedule.id, id: "#{schedule.id}-#{memo_dialog_element_id}" %> + <%= f.text_area :memo, value: @plan.plan_schedules.find { _1.schedule == schedule }&.memo, id: SecureRandom.uuid, class: "border opacity-100 rounded-md border border-[rgb(214,211,208)] bg-white p-2 text-[rgb(35,34,30)] w-full", data: { "word-counter-target": "source", action: "input->word-counter#calc" } %>
/<%= plan_memo_max_length %>
@@ -89,8 +90,8 @@
<% if @plan.plan_schedules.map(&:schedule).include?(schedule) # to avoid n+1 %> <%= form_with(url: event_plan_url(@plan, event_name: @plan.event.name), method: 'PATCH' ) do |form| %> - <%= form.hidden_field :remove_schedule_id, value: schedule.id %> - <%= form.hidden_field :mode, value: mode %> + <%= form.hidden_field :remove_schedule_id, value: schedule.id, id: SecureRandom.uuid %> + <%= form.hidden_field :mode, value: mode, id: SecureRandom.uuid %> <%= form.submit I18n.t('card.remove'), class: "remove-plan-button p-2 text-sm font-bold min-h-5 normal-button", data: { turbo_frame: "event_#{@event.id}" } %> <% end %> <% elsif @plan.new_record? %> diff --git a/app/views/schedules/index.html.erb b/app/views/schedules/index.html.erb index c52b5278..12fb4a43 100644 --- a/app/views/schedules/index.html.erb +++ b/app/views/schedules/index.html.erb @@ -21,9 +21,9 @@
-
+
<% @schedule_table.days.each do |day| %> - <% end %> diff --git a/app/views/teams/show.html.erb b/app/views/teams/show.html.erb index 8421e536..570480c5 100644 --- a/app/views/teams/show.html.erb +++ b/app/views/teams/show.html.erb @@ -50,9 +50,9 @@
-
+
<% @schedule_table.days.each do |day| %> - <% end %>