fix: Spaltenhöhe Titelzeile unterschiedlich in digitale Eingänge/Meldungseingänge , Digitale Ausgänge/Schaltausgänge und Analoge Eingänge/Messwerteingänge

This commit is contained in:
ISA
2025-05-07 14:12:56 +02:00
parent 40953b9feb
commit 300318cae7
4 changed files with 67 additions and 70 deletions

View File

@@ -33,81 +33,78 @@ export default function AnalogeEingaengeTable({
}; };
return ( return (
<div className="w-full"> <div className="bg-white shadow-md border border-gray-200 p-3 rounded-lg w-full laptop:p-1 xl:p-1">
<h2 className="text-sm laptop:text-xs font-bold mb-3 flex items-center"> <h2 className="laptop:text-sm md:text-base 2xl:text-lg font-bold mb-3 flex items-center">
<Icon <Icon
icon={waveformIcon} icon={waveformIcon}
className="text-littwin-blue mr-2 text-xl laptop:text-lg xl:text-xl 2xl:text-2xl border border-littwin-blue" className="text-littwin-blue mr-2 text-2xl laptop:text-lg xl:text-xl 2xl:text-2xl border-2 border-littwin-blue rounded-md"
/> />
Messwerteingänge Messwerteingänge
</h2> </h2>
<div className="overflow-x-auto">
<div className="bg-white shadow-lg rounded-lg p-4 border border-gray-200"> <table className="w-full text-xs laptop:text-[10px] xl:text-xs 2xl:text-sm border-collapse">
<div className="overflow-x-auto"> <thead className="bg-gray-100 border-b">
<table className="w-full border-collapse border border-gray-300 text-sm md:text-base"> <tr>
<thead> <th className="border p-1 text-left">Eingang</th>
<tr className="bg-gray-100 text-gray-700"> <th className="border p-1 text-left">Messwert</th>
<th className="border p-1 text-left">Eingang</th> <th className="border p-1 text-left">Einheit</th>
<th className="border p-3 text-left">Messwert</th> <th className="border p-1 text-left">Bezeichnung</th>
<th className="border p-3 text-left">Einheit</th> <th className="border p-1 text-left">Aktion</th>
<th className="border p-3 text-left">Bezeichnung</th> </tr>
<th className="border p-3 text-left">Aktion</th> </thead>
</tr> <tbody>
</thead> {Object.values(analogeEingaenge)
<tbody> .filter((e) => e?.id !== null && e?.id !== undefined)
{Object.values(analogeEingaenge) .map((e, index) => (
.filter((e) => e?.id !== null && e?.id !== undefined) <tr
.map((e, index) => ( key={index}
<tr className={`transition cursor-pointer ${
key={index} e.id === activeId ? "bg-blue-100" : "hover:bg-gray-100"
className={`transition cursor-pointer ${ }`}
e.id === activeId ? "bg-blue-100" : "hover:bg-gray-100" >
}`} <td
className="border p-2"
onClick={() => handleSelect(e.id!)}
> >
<td <div className="flex items-center gap-1 ">
className="border p-3" <Icon
onClick={() => handleSelect(e.id!)} icon={waveformIcon}
> className="text-gray-600 text-base laptop:text-sm xl:text-sm 2xl:text-lg"
<div className="flex items-center gap-1 "> />
<Icon {e.id ?? "-"}
icon={waveformIcon} </div>
className="text-gray-600 text-base laptop:text-sm xl:text-sm 2xl:text-lg" </td>
/> <td
{e.id ?? "-"} className="border p-2 text-right"
</div> onClick={() => handleSelect(e.id!)}
</td> >
<td {typeof e.value === "number" ? e.value.toFixed(2) : "-"}
className="border p-3 text-right" </td>
onClick={() => handleSelect(e.id!)}
>
{typeof e.value === "number" ? e.value.toFixed(2) : "-"}
</td>
<td className="border p-3">{e.unit || "-"}</td> <td className="border p-2">{e.unit || "-"}</td>
<td <td
className="border p-3" className="border p-2"
onClick={() => handleSelect(e.id!)} onClick={() => handleSelect(e.id!)}
> >
{e.name || "----"} {e.name || "----"}
</td> </td>
<td className="border p-3 text-center"> <td className="border p-2 text-center">
<button <button
onClick={() => { onClick={() => {
handleSelect(e.id!); handleSelect(e.id!);
setSelectedInput(e); setSelectedInput(e);
setIsSettingsModalOpen(true); setIsSettingsModalOpen(true);
}} }}
className="text-gray-400 hover:text-gray-500" className="text-gray-400 hover:text-gray-500"
> >
<Icon icon={settingsIcon} className="text-xl" /> <Icon icon={settingsIcon} className="text-xl" />
</button> </button>
</td> </td>
</tr> </tr>
))} ))}
</tbody> </tbody>
</table> </table>
</div>
</div> </div>
</div> </div>
); );

View File

@@ -22,7 +22,7 @@ export default function DigitalInputs({ openInputModal, inputRange }: Props) {
return ( return (
<div className="bg-white shadow-md border border-gray-200 p-3 rounded-lg w-full laptop:p-1 xl:p-1"> <div className="bg-white shadow-md border border-gray-200 p-3 rounded-lg w-full laptop:p-1 xl:p-1">
<h2 className="text-sm laptop:text-xs font-bold mb-3 flex items-center"> <h2 className="laptop:text-sm md:text-base 2xl:text-lg font-bold mb-3 flex items-center">
<Icon <Icon
icon={inputIcon} icon={inputIcon}
className="text-littwin-blue mr-2 text-xl laptop:text-lg xl:text-xl 2xl:text-2xl" className="text-littwin-blue mr-2 text-xl laptop:text-lg xl:text-xl 2xl:text-2xl"

View File

@@ -36,7 +36,7 @@ export default function DigitalOutputsWidget({ openOutputModal }) {
return ( return (
<div className="bg-white shadow-md border border-gray-200 p-3 rounded-lg w-full h-fit max-h-[400px] overflow-auto"> <div className="bg-white shadow-md border border-gray-200 p-3 rounded-lg w-full h-fit max-h-[400px] overflow-auto">
<h2 className="text-sm laptop:text-xs font-bold mb-3 flex items-center"> <h2 className="laptop:text-sm md:text-base 2xl:text-lg font-bold mb-3 flex items-center">
<Icon <Icon
icon={outputIcon} icon={outputIcon}
className="text-littwin-blue mr-2 text-xl laptop:text-lg xl:text-xl 2xl:text-2xl" className="text-littwin-blue mr-2 text-xl laptop:text-lg xl:text-xl 2xl:text-2xl"

View File

@@ -6,5 +6,5 @@
2: Patch oder Hotfix (Bugfixes oder kleine Änderungen). 2: Patch oder Hotfix (Bugfixes oder kleine Änderungen).
*/ */
const webVersion = "1.6.389"; const webVersion = "1.6.390";
export default webVersion; export default webVersion;