스케쥴 추가 기능 구현
This commit is contained in:
@@ -1 +1,39 @@
|
||||
스케쥴 추가
|
||||
<%= form_with model: @schedule, method: :post, data: { turbo: false }, class: 'flex flex-col h-full divide-y divide-border-table-border' do |form| %>
|
||||
<div class="flex-1 p-4">
|
||||
<table class="base-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>시간</th>
|
||||
<th>분</th>
|
||||
<th>사용여부</th>
|
||||
<th>온도</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<%= form.select :hour,
|
||||
options_for_select((0..23).map { |h| [h.to_s.rjust(2, '0'), h] }, @schedule.hour),
|
||||
{},
|
||||
class: "input-style" %>
|
||||
</td>
|
||||
<td>
|
||||
<%= form.number_field :minute,
|
||||
min: 0, max: 59, step: 1, inputmode: "decimal", class: "input-style" %>
|
||||
</td>
|
||||
<td>
|
||||
<%= check_box_tag "schedule[is_active]", "1", true %>
|
||||
</td>
|
||||
<td>
|
||||
<%= form.number_field :temperature,
|
||||
step: "0.1", inputmode: "decimal", class: "input-style" %>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="flex p-4">
|
||||
<%= submit_tag "추가", class: "btn bg-primary" %>
|
||||
</div>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user