feat: Speicherintervall-Feld als Zahleneingabe mit Einheit 'Minuten' angepasst

This commit is contained in:
ISA
2025-07-10 13:04:36 +02:00
parent fd42502d05
commit 0410e8c52d
6 changed files with 29 additions and 63 deletions

View File

@@ -6,6 +6,6 @@ NEXT_PUBLIC_USE_MOCK_BACKEND_LOOP_START=false
NEXT_PUBLIC_EXPORT_STATIC=false
NEXT_PUBLIC_USE_CGI=false
# App-Versionsnummer
NEXT_PUBLIC_APP_VERSION=1.6.569
NEXT_PUBLIC_APP_VERSION=1.6.571
NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter)

View File

@@ -5,5 +5,5 @@ NEXT_PUBLIC_CPL_API_PATH=/CPL
NEXT_PUBLIC_EXPORT_STATIC=true
NEXT_PUBLIC_USE_CGI=true
# App-Versionsnummer
NEXT_PUBLIC_APP_VERSION=1.6.569
NEXT_PUBLIC_APP_VERSION=1.6.571
NEXT_PUBLIC_CPL_MODE=production

View File

@@ -1,3 +1,13 @@
## [1.6.571] 2025-07-10
- fix: KÜ ISO Wert 200 in Display mit Einheit
---
## [1.6.570] 2025-07-10
- fix: KÜ ISO Wert 200 in Display mit Einheit
---
## [1.6.569] 2025-07-10
- WIP: JSON

View File

@@ -14,7 +14,6 @@ import {
closeConfirmModal,
} from "@/redux/slices/confirmModalSlice";
import { startFirmwareUpdateThunk } from "@/redux/thunks/startFirmwareUpdateThunk";
import { Listbox } from "@headlessui/react";
interface Props {
slot: number;
@@ -23,18 +22,6 @@ interface Props {
onModulNameChange?: (id: string) => void;
}
const memoryIntervalOptions = [
{ value: 0, label: "Kein" },
{ value: 1, label: "1 Minute" },
{ value: 5, label: "5 Minuten" },
{ value: 10, label: "10 Minuten" },
{ value: 15, label: "15 Minuten" },
{ value: 30, label: "30 Minuten" },
{ value: 60, label: "60 Minuten" },
{ value: 360, label: "6 Stunden" },
{ value: 720, label: "12 Stunden" },
];
export default function KueEinstellung({
slot,
onClose = () => {},
@@ -174,52 +161,21 @@ export default function KueEinstellung({
/>
</div>
{/* Speicherintervall */}
{/* Speicherintervall */}
{/* Speicherintervall */}
<div className="mb-4 grid grid-cols-3 items-center gap-2 w-full">
<label className="">Speicherintervall:</label>
<Listbox
value={formData.memoryInterval}
onChange={(value) => handleChange("memoryInterval", value)}
>
<div className="relative w-full">
<Listbox.Button className="w-full border px-3 py-1 rounded text-left bg-white flex justify-between items-center text-sm">
<span>
{memoryIntervalOptions.find(
(opt) => String(opt.value) === formData.memoryInterval
)?.label ?? "Speicherintervall wählen"}
</span>
<svg
className="w-5 h-5 text-gray-400"
viewBox="0 0 20 20"
fill="currentColor"
>
<path
fillRule="evenodd"
d="M5.23 7.21a.75.75 0 011.06.02L10 10.585l3.71-3.355a.75.75 0 111.02 1.1l-4.25 3.85a.75.75 0 01-1.02 0l-4.25-3.85a.75.75 0 01.02-1.06z"
clipRule="evenodd"
/>
</svg>
</Listbox.Button>
<Listbox.Options className="absolute z-50 mt-1 w-full border rounded bg-white shadow max-h-60 overflow-auto text-sm">
{memoryIntervalOptions.map((opt) => (
<Listbox.Option
key={opt.value}
value={String(opt.value)}
className={({ selected, active }) =>
`px-4 py-1 cursor-pointer ${
selected
? "bg-littwin-blue text-white font-medium"
: active
? "bg-gray-200"
: "text-gray-900"
}`
}
>
{opt.label}
</Listbox.Option>
))}
</Listbox.Options>
</div>
</Listbox>
<label className="w-48">Speicherintervall:</label>
<div className="relative w-36">
<input
type="number"
className="border rounded px-2 py-1 pr-20 w-full text-right"
value={formData.memoryInterval}
onChange={(e) => handleChange("memoryInterval", e.target.value)}
/>
<span className="absolute right-2 top-1/2 transform -translate-y-1/2 text-gray-500 text-sm">
Minuten
</span>
</div>
</div>
{/* Isolationsmessung */}

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "cpl-v4",
"version": "1.6.569",
"version": "1.6.571",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "cpl-v4",
"version": "1.6.569",
"version": "1.6.571",
"dependencies": {
"@fontsource/roboto": "^5.1.0",
"@headlessui/react": "^2.2.4",

View File

@@ -1,6 +1,6 @@
{
"name": "cpl-v4",
"version": "1.6.569",
"version": "1.6.571",
"private": true,
"scripts": {
"dev": "next dev",