신규 추가 작업 중
This commit is contained in:
@@ -1 +0,0 @@
|
||||
<div class="p-4">DEVICE</div>
|
||||
100
app/views/environment/index.html.erb
Normal file
100
app/views/environment/index.html.erb
Normal 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>
|
||||
79
app/views/environment/view_area.html.erb
Normal file
79
app/views/environment/view_area.html.erb
Normal 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>
|
||||
58
app/views/environment/view_co2.html.erb
Normal file
58
app/views/environment/view_co2.html.erb
Normal 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>
|
||||
58
app/views/environment/view_humidity.html.erb
Normal file
58
app/views/environment/view_humidity.html.erb
Normal 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>
|
||||
64
app/views/environment/view_temp.html.erb
Normal file
64
app/views/environment/view_temp.html.erb
Normal 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>
|
||||
@@ -21,16 +21,17 @@
|
||||
<%= stylesheet_link_tag :app, "data-turbo-track": "reload" %>
|
||||
<%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Chakra+Petch:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body class="background-pattern min-h-screen min-w-full overflow-x-auto h-full whitespace-nowrap">
|
||||
<body class="min-h-screen min-w-full overflow-x-auto h-full whitespace-nowrap">
|
||||
<%= turbo_frame_tag :modals %>
|
||||
<main class="flex flex-col h-full" data-controller="sidebar">
|
||||
<%= render "partials/header" %>
|
||||
<div class="flex flex-row flex-1 w-full">
|
||||
<%= render "partials/sidebar" %>
|
||||
<div class="flex-1 h-full pb-0 px-0 lg:pb-4 lg:px-4">
|
||||
<div class="flex-1 h-full content">
|
||||
<main class="flex flex-row h-full min-h-screen" data-controller="sidebar">
|
||||
<%= render "partials/sidebar" %>
|
||||
<div class="flex flex-col flex-1 w-full h-[100vh]">
|
||||
<%= render "partials/header" %>
|
||||
<div class="flex-1 h-full pb-0 px-0 lg:pb-4 lg:px-4 lg:overflow-y-auto">
|
||||
<div class="flex-1 h-full min-h-full">
|
||||
<% if flash[:notice] %>
|
||||
<div class="rounded-tl-md rounded-tr-md px-4 py-2 bg-accept text-white">
|
||||
<%= raw flash[:notice] %>
|
||||
@@ -43,6 +44,7 @@
|
||||
<%= yield %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="h-10 text-md text-center opacity-60">© 2024 FARMITRY All Rights Reserved.</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
212
app/views/nutrient/index.html.erb
Normal file
212
app/views/nutrient/index.html.erb
Normal file
@@ -0,0 +1,212 @@
|
||||
<div class="w-full h-full content">
|
||||
<div class="flex-1 grid grid-cols-2 lg:grid-cols-4 gap-4">
|
||||
<!-- pH -->
|
||||
<div class="dashboard-group">
|
||||
<div class="flex justify-between items-baseline">
|
||||
<div class="text-4xl">pH</div>
|
||||
<div class="text-3xl font-['Chakra_Petch']">7.1</div>
|
||||
</div>
|
||||
<div class="flex justify-between items-baseline">
|
||||
<div class="text-2xl">
|
||||
6.0 ~ 6.0
|
||||
</div>
|
||||
<div><i class="fa-solid fa-gear text-base-text/30 text-2xl"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- EC -->
|
||||
<div class="dashboard-group">
|
||||
<div class="flex justify-between items-baseline">
|
||||
<div class="text-4xl">EC</div>
|
||||
<div class="text-3xl font-['Chakra_Petch']">0.1</div>
|
||||
</div>
|
||||
<div class="flex justify-between items-baseline">
|
||||
<div class="text-2xl">
|
||||
0 ~ 1
|
||||
</div>
|
||||
<div><i class="fa-solid fa-gear text-base-text/30 text-2xl"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 양액 온도 -->
|
||||
<div class="dashboard-group">
|
||||
<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']">20.96</span>
|
||||
<span class="text-2xl">°C</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 수위 정보 -->
|
||||
<div class="dashboard-group">
|
||||
<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']">20.96</span>-->
|
||||
<!-- <span class="text-2xl">°C</span></div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 원수 탱크 -->
|
||||
<div class="dashboard-group">
|
||||
<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"><div class="btn-toggle-text">ON</div></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 원수 펌프 -->
|
||||
<div class="dashboard-group">
|
||||
<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"><div class="btn-toggle-text">ON</div></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 교반기A -->
|
||||
<div class="dashboard-group">
|
||||
<div class="flex flex-col justify-between h-full">
|
||||
<div class="text-xl">교반기A</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"><div class="btn-toggle-text">ON</div></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 교반기B -->
|
||||
<div class="dashboard-group">
|
||||
<div class="flex flex-col justify-between h-full">
|
||||
<div class="text-xl">교반기B</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"><div class="btn-toggle-text">ON</div></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 급수/공급 펌프 -->
|
||||
<div class="dashboard-group">
|
||||
<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"><div class="btn-toggle-text">ON</div></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 1번급수 솔벨브 -->
|
||||
<div class="dashboard-group">
|
||||
<div class="flex flex-col justify-between h-full">
|
||||
<div class="text-xl">1번급수 솔벨브</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"><div class="btn-toggle-text">ON</div></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 2번급수 솔벨브 -->
|
||||
<div class="dashboard-group">
|
||||
<div class="flex flex-col justify-between h-full">
|
||||
<div class="text-xl">2번급수 솔벨브</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"><div class="btn-toggle-text">ON</div></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 퇴수 솔벨브 -->
|
||||
<div class="dashboard-group">
|
||||
<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"><div class="btn-toggle-text">ON</div></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 솔레노이드 벨브A -->
|
||||
<div class="dashboard-group">
|
||||
<div class="flex flex-col justify-between h-full">
|
||||
<div class="text-xl">솔레노이드 벨브A</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"><div class="btn-toggle-text">ON</div></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 솔레노이드 벨브B -->
|
||||
<div class="dashboard-group">
|
||||
<div class="flex flex-col justify-between h-full">
|
||||
<div class="text-xl">솔레노이드 벨브B</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"><div class="btn-toggle-text">ON</div></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 솔레노이드 벨브C -->
|
||||
<div class="dashboard-group">
|
||||
<div class="flex flex-col justify-between h-full">
|
||||
<div class="text-xl">솔레노이드 벨브C</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"><div class="btn-toggle-text">ON</div></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 긴급 정지 -->
|
||||
<div class="dashboard-group">
|
||||
<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"><div class="btn-toggle-text">ON</div></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,13 +1,5 @@
|
||||
<header class="flex header justify-between items-center" data-controller="timer">
|
||||
<div class="flex flex-row h-full items-center">
|
||||
<%= image_tag "svg/svg_logo.svg", class: "w-auto h-8 mr-4" %>
|
||||
<%= link_to root_path do %>
|
||||
<div class="flex h-full items-center tracking-[0.5rem]"><span class="text-logo-color">FARM</span>ITRY</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div data-timer-target="output" class="hidden lg:block"></div>
|
||||
|
||||
<button data-action="click->sidebar#toggle" class="block lg:hidden p-2 cursor-pointer">
|
||||
<i class="fa-solid fa-bars text-2xl"></i>
|
||||
</button>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
From: "opacity-100 translate-y-0 sm:scale-100"
|
||||
To: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
||||
-->
|
||||
<div id="modals-panel" class="p-4 space-y-4 z-50 relative transform overflow-hidden rounded-md bg-base-secondary text-left shadow-xl transition-all w-full max-w-full mx-2 sm:mx-10 opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95 ease-out duration-500" data-controller="modals" data-action="modals:click:outside->modals#close">
|
||||
<div id="modals-panel" class="p-4 space-y-4 z-50 relative transform overflow-hidden rounded-md bg-base-sidebar text-left shadow-xl transition-all w-full max-w-full mx-2 sm:mx-10 opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95 ease-out duration-500" data-controller="modals" data-action="modals:click:outside->modals#close">
|
||||
<div>
|
||||
<%= render "partials/modals/#{type}" %>
|
||||
</div>
|
||||
|
||||
@@ -1,31 +1,66 @@
|
||||
<div data-sidebar-target="overlay" data-action="click->sidebar#close" class="fixed inset-0 bg-black/50 z-40 hidden lg:hidden"></div>
|
||||
<nav class="side-bar overflow-y-auto transition-transform lg:translate-x-0 -translate-x-full bg-base-background lg:bg-transparent fixed lg:relative top-0 left-0 h-full z-40" data-sidebar-target="menu">
|
||||
<%= link_to root_path, class: "menu-group #{'menu-group-active' if current_page?(root_path)}" do %>
|
||||
<div class="menu-group-icon">
|
||||
<i class="fa-solid fa-chart-line text-base-text text-4xl"></i>
|
||||
</div>
|
||||
<div class="menu-group-name">
|
||||
현황
|
||||
</div>
|
||||
<% end %>
|
||||
<hr >
|
||||
<% @controllers.each do |c| %>
|
||||
<%= link_to view_schedule_path(c.id), class: "menu-group #{'menu-group-active' if current_page?(view_schedule_path(c.id))}" do %>
|
||||
<div data-sidebar-target="overlay" data-action="click->sidebar#close" class="fixed inset-0 bg-black/50 z-40 hidden h-full"></div>
|
||||
<nav class="side-bar overflow-y-auto transition-transform lg:translate-x-0 -translate-x-full bg-base-sidebar lg:bg-base-sidebar fixed lg:relative top-0 left-0 h-full lg:h-[100vh] z-40" data-sidebar-target="menu">
|
||||
<div class="flex flex-row items-center justify-center">
|
||||
<%= image_tag "svg/svg_logo.svg", class: "w-auto h-8 mr-4" %>
|
||||
<%= link_to root_path do %>
|
||||
<div class="flex h-full items-center text-center tracking-[0.5rem]"><span class="text-logo-color">FARM</span>ITRY</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="mt-8">
|
||||
<%= link_to environment_index_path(id: 1), class: "menu-group #{'menu-group-active' if current_page?(environment_index_path(id: 1))}" do %>
|
||||
<div class="menu-group-icon">
|
||||
<i class="fa-solid fa-temperature-high text-base-text text-4xl"></i>
|
||||
<i class="fa-solid fa-chart-line text-2xl"></i>
|
||||
</div>
|
||||
<div class="menu-group-name">
|
||||
<%= c.name %>
|
||||
1동 환경부
|
||||
</div>
|
||||
<% end %>
|
||||
<hr>
|
||||
<%= link_to nutrient_index_path(id: 1), class: "menu-group #{'menu-group-active' if current_page?(nutrient_index_path(id: 1))}" do %>
|
||||
<div class="menu-group-icon">
|
||||
<i class="fa-solid fa-chart-line text-2xl"></i>
|
||||
</div>
|
||||
<div class="menu-group-name">
|
||||
1동 양액부
|
||||
</div>
|
||||
<% end %>
|
||||
<hr>
|
||||
<%= link_to environment_index_path(id: 2), class: "menu-group #{'menu-group-active' if current_page?(environment_index_path(id: 2))}" do %>
|
||||
<div class="menu-group-icon">
|
||||
<i class="fa-solid fa-chart-line text-2xl"></i>
|
||||
</div>
|
||||
<div class="menu-group-name">
|
||||
2동 환경부
|
||||
</div>
|
||||
<% end %>
|
||||
<hr>
|
||||
<%= link_to nutrient_index_path(id: 2), class: "menu-group #{'menu-group-active' if current_page?(nutrient_index_path(id: 2))}" do %>
|
||||
<div class="menu-group-icon">
|
||||
<i class="fa-solid fa-chart-line text-2xl"></i>
|
||||
</div>
|
||||
<div class="menu-group-name">
|
||||
2동 양액부
|
||||
</div>
|
||||
<% end %>
|
||||
<hr>
|
||||
<%= link_to rack_index_path, class: "menu-group #{'menu-group-active' if current_page?(rack_index_path)}" do %>
|
||||
<div class="menu-group-icon">
|
||||
<i class="fa-solid fa-chart-line text-2xl"></i>
|
||||
</div>
|
||||
<div class="menu-group-name">
|
||||
통합 랙 정보
|
||||
</div>
|
||||
<% end %>
|
||||
<hr >
|
||||
<% end %>
|
||||
<div class="menu-group">
|
||||
<div class="menu-group-icon">
|
||||
<i class="fa-solid fa-gear text-base-text text-4xl"></i>
|
||||
</div>
|
||||
<div class="menu-group-name">
|
||||
설청
|
||||
</div>
|
||||
</div>
|
||||
<%# @controllers.each do |c| %>
|
||||
<%#= link_to view_schedule_path(c.id), class: "menu-group #{'menu-group-active' if current_page?(view_schedule_path(c.id))}" do %>
|
||||
<!-- <div class="menu-group-icon">-->
|
||||
<!-- <i class="fa-solid fa-temperature-high text-2xl"></i>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="menu-group-name">-->
|
||||
<%#= c.name %>
|
||||
<!-- </div>-->
|
||||
<%# end %>
|
||||
<!-- <hr>-->
|
||||
<%# end %>
|
||||
</nav>
|
||||
|
||||
38
app/views/rack/index.html.erb
Normal file
38
app/views/rack/index.html.erb
Normal file
@@ -0,0 +1,38 @@
|
||||
<div class="flex flex-col h-full divide-y divide-base-border lg:rounded-lg bg-base-third border border-table-border">
|
||||
<div class="flex flex-col flex-1 space-y-4 overflow-y-hidden">
|
||||
<div class="base-list">
|
||||
<div class="flex justify-between p-4">
|
||||
<div class="flex flex-row items-center space-x-4">
|
||||
<%= link_to environment_index_path(id: 1), class: "flex items-center" do %>
|
||||
<i class="fa-solid fa-angle-left text-3xl"></i>
|
||||
<% end %>
|
||||
<div class="text-2xl font-bold leading-10">통합 랙 정보</div>
|
||||
</div>
|
||||
</div>
|
||||
<ul>
|
||||
<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]">00</div>
|
||||
<div>:</div>
|
||||
<div class="text-center w-[36px]">00</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]">00</div>
|
||||
<div class="text-base leading-7">°C</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -6,7 +6,7 @@
|
||||
<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-['GongGothicMedium'] font-light">15.5</span>
|
||||
<span class="text-4xl font-['Chakra_Petch'] font-light">15.5</span>
|
||||
<span class="text-2xl">°C</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -19,7 +19,7 @@
|
||||
<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-['GongGothicMedium']">60</span> <span class="text-2xl">%</span>
|
||||
<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>
|
||||
@@ -35,7 +35,7 @@
|
||||
<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-['GongGothicMedium']">60</span> <span class="text-2xl">%</span></div>
|
||||
<div class="items-baseline text-right"><span class="text-4xl font-['Chakra_Petch']">60</span> <span class="text-2xl">%</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -49,7 +49,7 @@
|
||||
<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-['GongGothicMedium']">60</span> <span class="text-2xl">%</span>
|
||||
<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>
|
||||
@@ -61,7 +61,7 @@
|
||||
<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-['GongGothicMedium']">15.5</span>
|
||||
<div class="items-baseline text-right w-full"><span class="text-4xl font-['Chakra_Petch']">15.5</span>
|
||||
<span class="text-2xl">°C</span></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -73,7 +73,7 @@
|
||||
<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-['GongGothicMedium']">60</span> <span class="text-2xl">%</span>
|
||||
<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>
|
||||
@@ -86,7 +86,7 @@
|
||||
<div class="dashboard-group">
|
||||
<div class="flex justify-between items-baseline">
|
||||
<div class="text-4xl">pH</div>
|
||||
<div class="text-3xl font-['GongGothicMedium']">7.1</div>
|
||||
<div class="text-3xl font-['Chakra_Petch']">7.1</div>
|
||||
</div>
|
||||
<div class="flex justify-between items-baseline">
|
||||
<div class="text-2xl">
|
||||
@@ -100,7 +100,7 @@
|
||||
<div class="dashboard-group">
|
||||
<div class="flex justify-between items-baseline">
|
||||
<div class="text-4xl">EC</div>
|
||||
<div class="text-3xl font-['GongGothicMedium']">0.1</div>
|
||||
<div class="text-3xl font-['Chakra_Petch']">0.1</div>
|
||||
</div>
|
||||
<div class="flex justify-between items-baseline">
|
||||
<div class="text-2xl">
|
||||
@@ -116,7 +116,7 @@
|
||||
<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-['GongGothicMedium']">20.96</span>
|
||||
<div class="items-baseline text-right w-full"><span class="text-4xl font-['Chakra_Petch']">20.96</span>
|
||||
<span class="text-2xl">°C</span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,81 +1,83 @@
|
||||
<div class="flex flex-col h-full text-white overflow-y-auto">
|
||||
<div class="flex flex-col flex-1 divide-y divide-base-border">
|
||||
<%= form_with url: schedule_edit_update_schedules_path, method: :post, class: 'flex flex-col h-full' do %>
|
||||
<%= hidden_field_tag :controller_id, params[:id] %>
|
||||
<div class="divide-y divide-base-border">
|
||||
<div class="flex justify-between p-4">
|
||||
<div class="text-2xl font-bold leading-10"><%= @controller.name %> 컨트롤러</div>
|
||||
<%= submit_tag "업데이트", class: "btn bg-primary" %>
|
||||
</div>
|
||||
<ul class="divide-y divide-base-border whitespace-nowrap h-full relative">
|
||||
<% if @schedule.present? %>
|
||||
<% @schedule.each do |s| %>
|
||||
<li class="flex justify-between items-center px-4 py-2 space-x-4 h-full relative">
|
||||
<div class="flex items-center space-x-4 basis-3/5 h-full">
|
||||
<!-- 시간 -->
|
||||
<div class="flex flex-col lg:flex-row h-full items-center space-x-0 space-y-2 lg:space-x-4 lg:space-y-0">
|
||||
<div class="text-white text-left w-full lg:w-auto">시간</div>
|
||||
<div class="text-xl flex items-center space-x-1 w-full h-full">
|
||||
<%= select_tag "schedule[#{s.id}][hour]",
|
||||
options_for_select((0..23).map { |h| [h.to_s.rjust(2, '0'), h] }, s.hour),
|
||||
class: "select-style text-white min-w-[60px]" %>
|
||||
<div>:</div>
|
||||
<%= number_field_tag "schedule[#{s.id}][minute]",
|
||||
s.minute, min: 0, max: 59, step: 1, inputmode: "decimal",
|
||||
class: "input-style min-w-[60px]" %>
|
||||
<div class="flex flex-col h-full divide-y divide-base-border lg:rounded-lg bg-base-third border border-table-border">
|
||||
<div class="flex flex-col flex-1 space-y-4 overflow-y-hidden">
|
||||
<div class="overflow-y-auto divide-y divide-base-border">
|
||||
<%= form_with url: schedule_edit_update_schedules_path, method: :post, class: 'flex flex-col' do %>
|
||||
<%= hidden_field_tag :controller_id, params[:id] %>
|
||||
<div class="divide-y divide-base-border">
|
||||
<div class="flex justify-between p-4">
|
||||
<div class="text-2xl font-bold leading-10"><%= @controller.name %> 컨트롤러</div>
|
||||
<%= submit_tag "업데이트", class: "btn bg-primary" %>
|
||||
</div>
|
||||
<ul class="divide-y divide-table-border bg-table-background whitespace-nowrap h-full relative">
|
||||
<% if @schedule.present? %>
|
||||
<% @schedule.each do |s| %>
|
||||
<li class="flex justify-between items-center px-4 py-2 space-x-4 h-full relative">
|
||||
<div class="flex items-center space-x-4 basis-3/5 h-full">
|
||||
<!-- 시간 -->
|
||||
<div class="flex flex-col lg:flex-row h-full items-center space-x-0 space-y-2 lg:space-x-4 lg:space-y-0">
|
||||
<div class=" text-left w-full lg:w-auto">시간</div>
|
||||
<div class="text-xl flex items-center space-x-1 w-full h-full">
|
||||
<%= select_tag "schedule[#{s.id}][hour]",
|
||||
options_for_select((0..23).map { |h| [h.to_s.rjust(2, '0'), h] }, s.hour),
|
||||
class: "select-style min-w-[60px]" %>
|
||||
<div>:</div>
|
||||
<%= number_field_tag "schedule[#{s.id}][minute]",
|
||||
s.minute, min: 0, max: 59, step: 1, inputmode: "decimal",
|
||||
class: "input-style min-w-[60px]" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 온도 -->
|
||||
<div class="flex flex-col lg:flex-row h-full items-center space-x-0 space-y-2 lg:space-x-4 lg:space-y-0">
|
||||
<div class=" text-left w-full lg:w-auto">온도 (°C)</div>
|
||||
<div class="text-xl flex items-center">
|
||||
<%= number_field_tag "schedule[#{s.id}][temperature]", s.temperature, min: -99, max: 99, step: "0.1", inputmode: "decimal", class: "input-style min-w-[68px]" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 온도 -->
|
||||
<div class="flex flex-col lg:flex-row h-full items-center space-x-0 space-y-2 lg:space-x-4 lg:space-y-0">
|
||||
<div class="text-white text-left w-full lg:w-auto">온도 (°C)</div>
|
||||
<div class="text-xl flex items-center">
|
||||
<%= number_field_tag "schedule[#{s.id}][temperature]", s.temperature, min: -99, max: 99, step: "0.1", inputmode: "decimal", class: "input-style min-w-[68px]" %>
|
||||
<div class="flex items-center space-x-4 basis-2/5 justify-end h-full">
|
||||
<!-- 사용 여부 -->
|
||||
<div class="flex flex-col lg:flex-row items-center space-x-0 space-y-2 lg:space-x-4 lg:space-y-0 h-full">
|
||||
<div class="">ON/OFF</div>
|
||||
<label class="relative inline-flex items-center cursor-pointer h-full">
|
||||
<%= check_box_tag "schedule[#{s.id}][is_active]", "1", s.is_active == true || s.is_active == 1, class: "sr-only peer" %>
|
||||
<div class="toggle_style"></div>
|
||||
<div class="btn-toggle-round"></div>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- 삭제 -->
|
||||
<div class="flex flex-col lg:flex-row items-center space-x-0 space-y-2 lg:space-x-4 lg:space-y-0 h-full relative">
|
||||
<div class=""> </div>
|
||||
<%= link_to schedule_path(s),
|
||||
data: { turbo_method: :delete, turbo_confirm: "정말 삭제하시겠습니까?" },
|
||||
class: "btn bg-danger text-sm flex items-center px-2 py-0 my-1.5 lg:px-4 lg:py-1.5 lg:my-0" do %>
|
||||
<div class="hidden lg:block">삭제</div>
|
||||
<div class="block lg:hidden"><i class="fa-solid fa-xmark"></i></div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center space-x-4 basis-2/5 justify-end h-full">
|
||||
<!-- 사용 여부 -->
|
||||
<div class="flex flex-col lg:flex-row items-center space-x-0 space-y-2 lg:space-x-4 lg:space-y-0 h-full">
|
||||
<div class="text-white">ON/OFF</div>
|
||||
<label class="relative inline-flex items-center cursor-pointer h-full">
|
||||
<%= check_box_tag "schedule[#{s.id}][is_active]", "1", s.is_active == true || s.is_active == 1, class: "sr-only peer" %>
|
||||
<div class="toggle_style"></div>
|
||||
<div class="toggle_btn"></div>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- 삭제 -->
|
||||
<div class="flex flex-col lg:flex-row items-center space-x-0 space-y-2 lg:space-x-4 lg:space-y-0 h-full relative">
|
||||
<div class="text-white"> </div>
|
||||
<%= link_to schedule_path(s),
|
||||
data: { turbo_method: :delete, turbo_confirm: "정말 삭제하시겠습니까?" },
|
||||
class: "btn bg-danger text-sm flex items-center px-2 py-0 my-1.5 lg:px-4 lg:py-1.5 lg:my-0" do %>
|
||||
<div class="hidden lg:block">삭제</div>
|
||||
<div class="block lg:hidden"><i class="fa-solid fa-xmark"></i></div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</li>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<li class="text-center p-4 w-full">저장된 스케줄이 없습니다.</li>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<li class="text-center p-4 w-full">저장된 스케줄이 없습니다.</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="flex p-4 space-x-4">
|
||||
<%= button_to "초기화", reset_schedule_path(params[:id]),
|
||||
method: :post,
|
||||
data: { turbo_confirm: "정말 초기화하시겠습니까? 모든 스케줄 데이터가 삭제됩니다." },
|
||||
class: "btn bg-danger" %>
|
||||
<%= button_to "추가하기", open_modals_path(type: "add_schedule", id: params[:id]),
|
||||
class: "btn bg-default-slate",
|
||||
data: {
|
||||
turbo_method: :post,
|
||||
turbo_frame: "modals"
|
||||
} %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="flex p-4 space-x-4">
|
||||
<%= button_to "초기화", reset_schedule_path(params[:id]),
|
||||
method: :post,
|
||||
data: { turbo_confirm: "정말 초기화하시겠습니까? 모든 스케줄 데이터가 삭제됩니다." },
|
||||
class: "btn bg-danger" %>
|
||||
<%= button_to "추가하기", open_modals_path(type: "add_schedule", id: params[:id]),
|
||||
class: "btn bg-default-slate",
|
||||
data: {
|
||||
turbo_method: :post,
|
||||
turbo_frame: "modals"
|
||||
} %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<div class="flex flex-col h-full divide-y divide-base-border text-white">
|
||||
<div class="flex flex-col h-full divide-y divide-base-border lg:rounded-lg bg-base-third border border-table-border">
|
||||
<div class="flex flex-col flex-1 space-y-4 overflow-y-hidden">
|
||||
<div class="overflow-y-auto divide-y divide-base-border">
|
||||
<div class="base-list">
|
||||
<div class="flex justify-between p-4">
|
||||
<div class="text-2xl font-bold leading-10"><%= @controller.name %> 컨트롤러</div>
|
||||
<%= link_to "수정", schedule_edit_schedule_path(@controller.id), class: "btn bg-default-slate" %>
|
||||
</div>
|
||||
<ul class="divide-y divide-base-border">
|
||||
<ul>
|
||||
<% if @schedule.present? %>
|
||||
<% @schedule.each do |s| %>
|
||||
<li class="flex justify-between items-center px-4 py-2 space-x-4">
|
||||
<li>
|
||||
<div class="flex items-center space-x-6">
|
||||
<!-- 시간 -->
|
||||
<div class="flex flex-col lg:flex-row items-baseline space-x-2">
|
||||
<div class="text-white">시간</div>
|
||||
<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>
|
||||
@@ -22,17 +22,17 @@
|
||||
|
||||
<!-- 온도 -->
|
||||
<div class="flex flex-col lg:flex-row items-baseline space-x-4">
|
||||
<div class="text-white">온도</div>
|
||||
<div>온도</div>
|
||||
<div class="text-3xl flex items-end space-x-2">
|
||||
<div class="text-left w-[50px]"><%= s.temperature %></div>
|
||||
<div class="text-white text-base leading-7">°C</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="text-white mb-1">ON/OFF</div>
|
||||
<div class="mb-1">ON/OFF</div>
|
||||
<div class="text-3xl w-8 mr-0">
|
||||
<%#= s.is_active %>
|
||||
<% if s.is_active %>
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
<div>WEB</div>
|
||||
Reference in New Issue
Block a user