Merge remote-tracking branch 'origin/main' into develop_mh

# Conflicts:
#	app/views/modbus/index.html.erb
#	app/views/modbus/schedule_edit.html.erb
This commit is contained in:
2025-04-17 10:30:48 +09:00
7 changed files with 46 additions and 56 deletions

View File

@@ -8,26 +8,11 @@
</div>
<% end %>
<div class="flex flex-col h-full divide-y divide-border-table-border">
<div class="flex-1 overflow-y-auto p-4">
<table class="base-table">
<thead>
<tr>
<th>시간</th>
<th>온도</th>
</tr>
</thead>
<tbody>
<% @schedule.each do |s| %>
<tr>
<td><%= s.hour %>시</td>
<td><%= s.temperature %> °C</td>
</tr>
<% end %>
</tbody>
</table>
<% @schedule.each do |s| %>
<div class="flex justify-items-center gap-x-2">
<div><%= s.hour %>시</div>
<div><%= s.temperature %> °C</div>
</div>
<div class="flex p-4">
<%= link_to "수정", "/modbus/schedule_edit", class: "btn bg-default-slate" %>
</div>
</div>
<% end %>
<%= link_to "수정", "/modbus/schedule_edit", class: "btn btn-primary" %>

View File

@@ -1,24 +1,14 @@
<%= form_with url: "/modbus/schedule_edit_update", method: :post, class: 'flex flex-col h-full divide-y divide-border-table-border' do %>
<div class="flex-1 overflow-y-auto p-4">
<table class="base-table">
<thead>
<tr>
<th>시간</th>
<th>온도</th>
</tr>
</thead>
<tbody>
<% @schedule.each do |s| %>
<tr>
<td><%= s.hour %>시</td>
<td><%= number_field_tag "schedule[#{s.id}][temperature]", s.temperature, step: "0.1", inputmode: "decimal", class: "border px-2 py-1 rounded" %> °C</td>
</tr>
<% end %>
</tbody>
</table>
</div>
<%= form_with url: "/modbus/schedule_edit_update", method: :post do %>
<% @schedule.each do |s| %>
<div class="flex justify-items-center gap-x-2 pb-2">
<div><%= s.hour %>시</div>
<div>
<%= number_field_tag "schedule[#{s.id}][temperature]", s.temperature, step: "0.1", inputmode: "decimal", class: "border px-2 py-1 rounded" %> °C
</div>
</div>
<% end %>
<div class="flex p-4">
<%= submit_tag "업데이트", class: "btn bg-primary" %>
<div class="pt-4">
<%= submit_tag "업데이트", class: "bg-blue-500 text-white px-4 py-2 rounded" %>
</div>
<% end %>
<% end %>