대시보드 카드 on/off 토글 추가, 페이지 추가

This commit is contained in:
2025-06-11 22:54:01 +09:00
parent d3c6deaf96
commit f4d12c87eb
14 changed files with 532 additions and 68 deletions

View File

@@ -3,7 +3,7 @@
<%= 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 class="text-2xl font-bold leading-10"><%= @controller.id %>동 CO</span><span class="text-sm">2</span> 스케줄러</div>
</div>
<div class="space-y-4 overflow-y-hidden divide-y divide-base-border bg-base-content rounded-lg p-4">
<%= form_with url: edit_temp_environment_path, method: :post, class: 'flex flex-col h-full' do %>

View File

@@ -3,7 +3,7 @@
<%= 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 class="text-2xl font-bold leading-10"><%= @controller.id %>동 습도 스케줄러</div>
</div>
<div class="space-y-4 overflow-y-hidden divide-y divide-base-border bg-base-content rounded-lg p-4">
<%= form_with url: edit_temp_environment_path, method: :post, class: 'flex flex-col h-full' do %>

View File

@@ -1,7 +1,7 @@
<div class="w-full h-full content overflow-y-auto">
<div class="flex-1 grid grid-cols-2 xl:grid-cols-4 gap-4">
<!-- 실내온도 -->
<%= link_to edit_temp_environment_path(id: params[:id]), class: "dashboard-group" do %>
<%= link_to edit_temp_environment_path(id: params[:id]), class: "dashboard-group bg-base-content" do %>
<div class="flex flex-col justify-between h-full space-y-2">
<div class="flex flex-row justify-between w-full">
<div class="flex flex-row space-x-4 items-center">
@@ -33,7 +33,7 @@
<% end %>
<!-- 실내습도 -->
<%= link_to edit_humidity_environment_path(id: params[:id]), class: "dashboard-group" do %>
<%= link_to edit_humidity_environment_path(id: params[:id]), class: "dashboard-group bg-base-content" do %>
<div class="flex flex-col justify-between h-full space-y-2">
<div class="flex flex-row justify-between w-full">
<div class="flex flex-row space-x-4 items-center">
@@ -65,7 +65,7 @@
<% end %>
<!-- CO2 -->
<%= link_to edit_co2_environment_path(id: params[:id]), class: "dashboard-group" do %>
<%= link_to edit_co2_environment_path(id: params[:id]), class: "dashboard-group bg-base-content" do %>
<div class="flex flex-col justify-between h-full space-y-2">
<div class="flex flex-row justify-between w-full">
<div class="flex flex-row space-x-4 items-center">
@@ -105,10 +105,13 @@
<% end %>
<!-- none -->
<div class="dashboard-group"></div>
<div class="dashboard-group bg-base-content"
data-controller="toggle"
data-action="click->toggle#toggle"
data-toggle-target="background"></div>
<!-- 랙 -->
<%= link_to rack_index_path, class: "dashboard-group" do %>
<%= link_to rack_index_path, class: "dashboard-group bg-base-content" do %>
<div class="flex flex-col justify-between h-full space-y-2">
<div class="flex flex-row justify-between w-full">
<div class="flex flex-row space-x-4 items-center">
@@ -133,7 +136,7 @@
<% end %>
<!-- 센서 구역 -->
<%= link_to edit_area_environment_path(id: params[:id]), class: "dashboard-group" do %>
<%= link_to edit_area_environment_path(id: params[:id]), class: "dashboard-group bg-base-content" do %>
<div class="flex flex-col justify-between h-full space-y-2">
<div class="flex flex-row justify-between w-full">
<div class="flex flex-row space-x-4 items-center">
@@ -158,7 +161,10 @@
<% end %>
<!-- LED -->
<div class="dashboard-group">
<div class="dashboard-group bg-base-content"
data-controller="toggle"
data-action="click->toggle#toggle"
data-toggle-target="background">
<div class="flex flex-col justify-between h-full space-y-2">
<div class="flex flex-row justify-between w-full">
<div class="flex flex-row space-x-4 items-center">
@@ -182,7 +188,10 @@
</div>
<!-- Fan -->
<div class="dashboard-group">
<div class="dashboard-group bg-base-content"
data-controller="toggle"
data-action="click->toggle#toggle"
data-toggle-target="background">
<div class="flex flex-col justify-between h-full space-y-2">
<div class="flex flex-row justify-between w-full">
<div class="flex flex-row space-x-4 items-center">