65 lines
2.3 KiB
Plaintext
65 lines
2.3 KiB
Plaintext
<div class="flex flex-col h-full lg:rounded-lg">
|
|
<div class="flex flex-row items-center space-x-4 p-2">
|
|
<%= link_to environment_index_path(id: params[:id]), class: "flex items-center" do %>
|
|
<i class="fa-solid fa-angle-left text-2xl"></i>
|
|
<% end %>
|
|
<div class="text-2xl font-bold leading-10"><%= @controller.id %>동 온도 스케줄러</div>
|
|
</div>
|
|
<div class="flex flex-col flex-1 space-y-4 overflow-y-hidden content">
|
|
<div class="flex justify-between">
|
|
<%= link_to "수정", schedule_edit_schedule_path(@controller.id), class: "btn bg-default-slate" %>
|
|
</div>
|
|
<div class="lg:rounded-lg border border-base-border overflow-y-hidden">
|
|
<table class="base-table overflow-y-hidden">
|
|
<thead>
|
|
<tr>
|
|
<th>시간</th>
|
|
<th>온도</th>
|
|
<th>사용여부</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="overflow-y-auto">
|
|
<% if @schedule.present? %>
|
|
<% @schedule.each do |s| %>
|
|
<tr>
|
|
<!-- 시간 -->
|
|
<td>
|
|
<div class="text-2xl flex items-baseline space-x-1">
|
|
<div class="text-center w-[36px]"><%= s.hour.to_s.rjust(2, '0') %></div>
|
|
<div>:</div>
|
|
<div class="text-center w-[36px]"><%= s.minute.to_s.rjust(2, '0') %></div>
|
|
</div>
|
|
</td>
|
|
|
|
<!-- 온도 -->
|
|
<td>
|
|
<div class="text-2xl flex items-end space-x-2">
|
|
<div class="text-left w-[50px]"><%= s.temperature %></div>
|
|
<div class="text-base leading-7">°C</div>
|
|
</div>
|
|
</td>
|
|
|
|
<!-- 사용 여부 -->
|
|
<td>
|
|
<div class="text-2xl w-8 mr-0">
|
|
<%#= s.is_active %>
|
|
<% if s.is_active %>
|
|
<i class="fa-solid fa-check text-notice"></i>
|
|
<% else %>
|
|
<i class="fa-solid fa-xmark text-danger"></i>
|
|
<% end %>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
<% else %>
|
|
<tr>
|
|
<td colspan="3" class="text-center p-4 w-full">저장된 스케줄이 없습니다.</td>
|
|
</tr>
|
|
<% end %>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|