신규 추가 작업 중

This commit is contained in:
2025-05-29 08:46:12 +09:00
parent a117d417f4
commit 2d174d4fd0
34 changed files with 892 additions and 175 deletions

View File

@@ -0,0 +1,100 @@
<div class="w-full h-full content">
<div class="flex-1 grid grid-cols-2 lg:grid-cols-4 gap-4">
<!-- 실내온도 -->
<%= link_to view_temp_environment_path(id: params[:id]), class: "dashboard-group" do %>
<div class="flex flex-col justify-between h-full">
<div class="text-xl">실내온도</div>
<div class="flex flex-row justify-between items-baseline w-full">
<i class="fa-solid fa-temperature-quarter text-base-text/80 text-4xl text-left w-full"></i>
<div class="items-baseline text-right w-full">
<span class="text-4xl font-['Chakra_Petch'] font-light">15.5</span>
<span class="text-2xl">°C</span>
</div>
</div>
</div>
<% end %>
<!-- 실내습도 -->
<%= link_to view_humidity_environment_path(id: params[:id]), class: "dashboard-group" do %>
<div class="flex flex-col justify-between h-full">
<div class="text-xl">실내습도</div>
<div class="flex flex-row justify-between items-baseline w-full">
<i class="fa-solid fa-droplet text-base-text/80 text-4xl text-left w-full"></i>
<div class="items-baseline text-right w-full"><span class="text-4xl font-['Chakra_Petch']">60</span>
<span class="text-2xl">%</span>
</div>
</div>
</div>
<% end %>
<!-- CO2 -->
<%= link_to view_co2_environment_path(id: params[:id]), class: "dashboard-group" do %>
<div class="flex flex-col justify-between h-full">
<div><span class="text-xl">CO</span><span class="text-sm">2</span></div>
<div class="flex flex-row justify-between items-baseline w-full">
<div class="size-10 bg-base-text/80 rounded-full text-base-background flex flex-col justify-center">
<div class="flex flex-row justify-center items-baseline">
<span class="text-xl">CO</span><span class="text-sm">2</span>
</div>
</div>
<div class="items-baseline text-right"><span class="text-4xl font-['Chakra_Petch']">60</span>
<span class="text-2xl">%</span></div>
</div>
</div>
<% end %>
<!-- none -->
<div class="dashboard-group"></div>
<!-- 랙 -->
<%= link_to rack_index_path, class: "dashboard-group" do %>
<div class="flex flex-col justify-between h-full">
<div class="text-xl">랙 정보</div>
<div class="flex flex-row justify-between items-baseline w-full">
<i class="fa-solid fa-lightbulb text-base-text/80 text-4xl text-left w-full"></i>
<div class="items-baseline text-right w-full"><span class="text-4xl font-['Chakra_Petch']">5</span>
<span class="text-2xl">라인</span>
</div>
</div>
</div>
<% end %>
<!-- 센서 구역 -->
<%= link_to view_area_environment_path(id: params[:id]), class: "dashboard-group" do %>
<div class="flex flex-col justify-between h-full">
<div class="text-xl">센서구역 정보</div>
<div class="flex flex-row justify-between items-baseline w-full">
<i class="fa-solid fa-fan text-base-text/80 text-4xl text-left w-full"></i>
<div class="items-baseline text-right w-full"><span class="text-4xl font-['Chakra_Petch']">6</span>
<span class="text-2xl">구역</span>
</div>
</div>
</div>
<% end %>
<!-- LED -->
<div class="dashboard-group">
<div class="flex flex-col justify-between h-full">
<div class="text-xl">LED</div>
<div class="flex flex-row justify-between items-baseline w-full">
<i class="fa-solid fa-lightbulb text-base-text/80 text-4xl text-left w-full"></i>
<div class="items-baseline text-right w-full"><span class="text-4xl font-['Chakra_Petch']"><div class="btn-toggle-text">AUTO</div></span>
</div>
</div>
</div>
</div>
<!-- Fan -->
<div class="dashboard-group">
<div class="flex flex-col justify-between h-full">
<div class="text-xl">FAN</div>
<div class="flex flex-row justify-between items-baseline w-full">
<i class="fa-solid fa-fan text-base-text/80 text-4xl text-left w-full"></i>
<div class="items-baseline text-right w-full"><span class="text-4xl font-['Chakra_Petch']"><div class="btn-toggle-text">AUTO</div></span>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,79 @@
<div class="flex flex-col h-full divide-y divide-base-border lg:rounded-lg">
<div class="flex flex-col flex-1 space-y-4 overflow-y-hidden">
<div class="flex justify-between">
<div class="flex flex-row items-center space-x-4">
<%= link_to environment_index_path(id: params[:id]), class: "flex items-center" do %>
<i class="fa-solid fa-angle-left text-3xl"></i>
<% end %>
<div class="text-2xl font-bold leading-10"><%= @controller.id %>동 센서구역 정보</div>
</div>
<%= link_to "수정", schedule_edit_schedule_path(@controller.id), class: "btn bg-default-slate" %>
</div>
<div class="base-list">
<ul>
<% if @schedule.present? %>
<% @schedule.each do |s| %>
<li>
<div class="flex items-center space-x-6">
<!-- 시간 -->
<div class="flex flex-col lg:flex-row items-baseline space-x-2">
<div>시간</div>
<div class="text-3xl 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>
</div>
<!-- 온도 -->
<div class="flex flex-col lg:flex-row items-baseline space-x-4">
<div>온도</div>
<div class="text-3xl flex items-end space-x-2">
<div class="text-left w-[50px]"><%= s.temperature %></div>
<div class="text-base leading-7">°C</div>
</div>
</div>
</div>
<!-- 사용 여부 -->
<div class="flex flex-col lg:flex-row items-baseline space-x-0 lg:space-x-4 items-end">
<div class="mb-1">ON/OFF</div>
<div class="text-3xl 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>
</div>
</li>
<% end %>
<% else %>
<li class="text-center p-4 w-full">저장된 스케줄이 없습니다.</li>
<% end %>
</ul>
<!-- <table class="base-table">-->
<!-- <thead>-->
<!-- <tr>-->
<!-- <th>시간</th>-->
<!-- <th>분</th>-->
<!-- <th>사용여부</th>-->
<!-- <th>온도</th>-->
<!-- </tr>-->
<!-- </thead>-->
<!-- <tbody>-->
<%# @schedule.each do |s| %>
<!-- <tr>-->
<!-- <td><%#= s.hour %>시</td>-->
<!-- <td><%#= s.minute %>분</td>-->
<!-- <td><%#= s.is_active %></td>-->
<!-- <td><%#= s.temperature %> °C</td>-->
<!-- </tr>-->
<%# end %>
<!-- </tbody>-->
<!-- </table>-->
</div>
</div>
</div>

View File

@@ -0,0 +1,58 @@
<div class="flex flex-col h-full divide-y divide-base-border lg:rounded-lg">
<div class="flex flex-col flex-1 space-y-4 overflow-y-hidden">
<div class="flex justify-between">
<div class="flex flex-row items-center space-x-4">
<%= link_to environment_index_path(id: params[:id]), class: "flex items-center" do %>
<i class="fa-solid fa-angle-left text-3xl"></i>
<% end %>
<div class="text-2xl font-bold leading-10"><%= @controller.id %>동 CO2 스케줄러</div>
</div>
<%= link_to "수정", schedule_edit_schedule_path(@controller.id), class: "btn bg-default-slate" %>
</div>
<div class="base-list">
<ul>
<% if @schedule.present? %>
<% @schedule.each do |s| %>
<li>
<div class="flex items-center space-x-6">
<!-- 시간 -->
<div class="flex flex-col lg:flex-row items-baseline space-x-2">
<div>시간</div>
<div class="text-3xl 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>
</div>
<!-- 농도 -->
<div class="flex flex-col lg:flex-row items-baseline space-x-4">
<div>농도</div>
<div class="text-3xl flex items-end space-x-2">
<div class="text-left w-[50px]"><%= s.temperature %></div>
<div class="text-base leading-7">%</div>
</div>
</div>
</div>
<!-- 사용 여부 -->
<div class="flex flex-col lg:flex-row items-baseline space-x-0 lg:space-x-4 items-end">
<div class="mb-1">ON/OFF</div>
<div class="text-3xl 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>
</div>
</li>
<% end %>
<% else %>
<li class="text-center p-4 w-full">저장된 스케줄이 없습니다.</li>
<% end %>
</ul>
</div>
</div>
</div>

View File

@@ -0,0 +1,58 @@
<div class="flex flex-col h-full divide-y divide-base-border lg:rounded-lg">
<div class="flex flex-col flex-1 space-y-4 overflow-y-hidden">
<div class="flex justify-between">
<div class="flex flex-row items-center space-x-4">
<%= link_to environment_index_path(id: params[:id]), class: "flex items-center" do %>
<i class="fa-solid fa-angle-left text-3xl"></i>
<% end %>
<div class="text-2xl font-bold leading-10"><%= @controller.id %>동 습도 스케줄러</div>
</div>
<%= link_to "수정", schedule_edit_schedule_path(@controller.id), class: "btn bg-default-slate" %>
</div>
<div class="base-list">
<ul>
<% if @schedule.present? %>
<% @schedule.each do |s| %>
<li>
<div class="flex items-center space-x-6">
<!-- 시간 -->
<div class="flex flex-col lg:flex-row items-baseline space-x-2">
<div>시간</div>
<div class="text-3xl 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>
</div>
<!-- 습도 -->
<div class="flex flex-col lg:flex-row items-baseline space-x-4">
<div>습도</div>
<div class="text-3xl flex items-end space-x-2">
<div class="text-left w-[50px]"><%= s.temperature %></div>
<div class="text-base leading-7">%</div>
</div>
</div>
</div>
<!-- 사용 여부 -->
<div class="flex flex-col lg:flex-row items-baseline space-x-0 lg:space-x-4 items-end">
<div class="mb-1">ON/OFF</div>
<div class="text-3xl 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>
</div>
</li>
<% end %>
<% else %>
<li class="text-center p-4 w-full">저장된 스케줄이 없습니다.</li>
<% end %>
</ul>
</div>
</div>
</div>

View File

@@ -0,0 +1,64 @@
<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>