Messkurve Modal in Messwerteingänge
This commit is contained in:
@@ -9,6 +9,7 @@ import settingsIcon from "@iconify/icons-mdi/settings";
|
||||
import waveformIcon from "@iconify/icons-mdi/waveform";
|
||||
import { setSelectedAnalogInput } from "@/redux/slices/analogInputs/selectedAnalogInputSlice";
|
||||
import { setIsSettingsModalOpen } from "@/redux/slices/analogInputs/analogInputsUiSlice";
|
||||
import { setIsChartModalOpen } from "@/redux/slices/analogInputs/analogInputsUiSlice";
|
||||
import {
|
||||
setSelectedId,
|
||||
setAutoLoad,
|
||||
@@ -36,7 +37,7 @@ export default function AnalogInputsTable({ loading }: { loading: boolean }) {
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`bg-white shadow-md border border-gray-200 p-3 rounded-lg w-full laptop:p-1 xl:p-1 ${
|
||||
className={`bg-white shadow-md border border-gray-200 p-3 rounded-lg laptop:p-1 xl:p-1 ${
|
||||
loading ? "cursor-wait" : ""
|
||||
}`}
|
||||
>
|
||||
@@ -49,7 +50,7 @@ export default function AnalogInputsTable({ loading }: { loading: boolean }) {
|
||||
</h2>
|
||||
<div className="overflow-x-auto">
|
||||
<table
|
||||
className={`w-full text-xs laptop:text-[10px] xl:text-xs 2xl:text-sm border-collapse ${
|
||||
className={` text-xs laptop:text-[10px] xl:text-xs 2xl:text-sm border-collapse ${
|
||||
loading ? "cursor-wait" : ""
|
||||
}`}
|
||||
>
|
||||
@@ -59,7 +60,8 @@ export default function AnalogInputsTable({ loading }: { loading: boolean }) {
|
||||
<th className="border p-1 text-left">Messwert</th>
|
||||
<th className="border p-1 text-left">Einheit</th>
|
||||
<th className="border p-1 text-left">Bezeichnung</th>
|
||||
<th className="border p-1 text-left">Aktion</th>
|
||||
<th className="border p-1 text-left">Einstellungen</th>
|
||||
<th className="border p-1 text-left">Messkurve</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -127,6 +129,21 @@ export default function AnalogInputsTable({ loading }: { loading: boolean }) {
|
||||
<Icon icon={settingsIcon} className="text-xl" />
|
||||
</button>
|
||||
</td>
|
||||
<td className="border p-2 text-center">
|
||||
<button
|
||||
onClick={() => {
|
||||
handleSelect(analogInput.id!, analogInput);
|
||||
dispatch(setIsChartModalOpen(true));
|
||||
}}
|
||||
className="text-gray-500 hover:text-gray-700"
|
||||
title="Messkurve anzeigen"
|
||||
aria-label="Messkurve anzeigen"
|
||||
>
|
||||
<span role="img" aria-hidden="true" className="text-lg">
|
||||
📈
|
||||
</span>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user