refactor: Zeitraum-Dropdown in DetailModal auf Listbox mit Littwin-Design umgestellt
- <select> durch Headless UI Listbox ersetzt - Optionen DIA0, DIA1, DIA2 mit deutschem Label dargestellt - Einheitliches Styling mit littwin-blue wie in anderen Komponenten
This commit is contained in:
@@ -6,6 +6,6 @@ NEXT_PUBLIC_USE_MOCK_BACKEND_LOOP_START=false
|
|||||||
NEXT_PUBLIC_EXPORT_STATIC=false
|
NEXT_PUBLIC_EXPORT_STATIC=false
|
||||||
NEXT_PUBLIC_USE_CGI=false
|
NEXT_PUBLIC_USE_CGI=false
|
||||||
# App-Versionsnummer
|
# App-Versionsnummer
|
||||||
NEXT_PUBLIC_APP_VERSION=1.6.555
|
NEXT_PUBLIC_APP_VERSION=1.6.556
|
||||||
NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter)
|
NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter)
|
||||||
|
|
||||||
|
|||||||
@@ -5,5 +5,5 @@ NEXT_PUBLIC_CPL_API_PATH=/CPL
|
|||||||
NEXT_PUBLIC_EXPORT_STATIC=true
|
NEXT_PUBLIC_EXPORT_STATIC=true
|
||||||
NEXT_PUBLIC_USE_CGI=true
|
NEXT_PUBLIC_USE_CGI=true
|
||||||
# App-Versionsnummer
|
# App-Versionsnummer
|
||||||
NEXT_PUBLIC_APP_VERSION=1.6.555
|
NEXT_PUBLIC_APP_VERSION=1.6.556
|
||||||
NEXT_PUBLIC_CPL_MODE=production
|
NEXT_PUBLIC_CPL_MODE=production
|
||||||
10
CHANGELOG.md
10
CHANGELOG.md
@@ -1,3 +1,13 @@
|
|||||||
|
## [1.6.556] – 2025-07-08
|
||||||
|
|
||||||
|
- refactor: LoopChartActionBar Dropdowns auf Listbox mit Littwin-Design umgestellt
|
||||||
|
|
||||||
|
- selectedMode (DIA0/DIA1/DIA2) ersetzt durch Headless UI Listbox
|
||||||
|
- selectedSlotType (Schleifen-/Isolationswiderstand) ebenfalls als Listbox
|
||||||
|
- Einheitliches Dropdown-Design mit MeldungenView und TDRChartActionBar
|
||||||
|
- Littwin-blue Stil für ausgewählte Optionen integriert
|
||||||
|
|
||||||
|
---
|
||||||
## [1.6.555] – 2025-07-08
|
## [1.6.555] – 2025-07-08
|
||||||
|
|
||||||
- refactor: LoopChartActionBar Dropdowns auf Listbox mit Littwin-Design umgestellt
|
- refactor: LoopChartActionBar Dropdowns auf Listbox mit Littwin-Design umgestellt
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import React from "react";
|
|||||||
import { Line } from "react-chartjs-2";
|
import { Line } from "react-chartjs-2";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
import { RootState } from "@/redux/store";
|
import { RootState } from "@/redux/store";
|
||||||
|
import { Listbox } from "@headlessui/react";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
@@ -78,19 +79,59 @@ export const DetailModal = ({
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="mb-4">
|
<div className="flex items-center space-x-2 mb-4">
|
||||||
<label className="mr-2 font-medium">Zeitraum:</label>
|
<label className="font-medium">Zeitraum:</label>
|
||||||
<select
|
<Listbox value={zeitraum} onChange={setZeitraum}>
|
||||||
className="border px-2 py-1 rounded"
|
<div className="relative w-48">
|
||||||
value={zeitraum}
|
<Listbox.Button className="w-full border px-3 py-1 rounded text-left bg-white flex justify-between items-center text-sm">
|
||||||
onChange={(e) =>
|
<span>
|
||||||
setZeitraum(e.target.value as "DIA0" | "DIA1" | "DIA2")
|
{
|
||||||
}
|
{
|
||||||
>
|
DIA0: "Alle Messwerte",
|
||||||
<option value="DIA0">Alle Messwerte</option>
|
DIA1: "Stündlich",
|
||||||
<option value="DIA1">Stündlich</option>
|
DIA2: "Täglich",
|
||||||
<option value="DIA2">Täglich</option>
|
}[zeitraum]
|
||||||
</select>
|
}
|
||||||
|
</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">
|
||||||
|
{["DIA0", "DIA1", "DIA2"].map((option) => (
|
||||||
|
<Listbox.Option
|
||||||
|
key={option}
|
||||||
|
value={option}
|
||||||
|
className={({ selected, active }) =>
|
||||||
|
`px-4 py-1 cursor-pointer ${
|
||||||
|
selected
|
||||||
|
? "bg-littwin-blue text-white"
|
||||||
|
: active
|
||||||
|
? "bg-blue-100"
|
||||||
|
: ""
|
||||||
|
}`
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{
|
||||||
|
{
|
||||||
|
DIA0: "Alle Messwerte",
|
||||||
|
DIA1: "Stündlich",
|
||||||
|
DIA2: "Täglich",
|
||||||
|
}[option]
|
||||||
|
}
|
||||||
|
</Listbox.Option>
|
||||||
|
))}
|
||||||
|
</Listbox.Options>
|
||||||
|
</div>
|
||||||
|
</Listbox>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="h-[85%]">
|
<div className="h-[85%]">
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.555",
|
"version": "1.6.556",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.555",
|
"version": "1.6.556",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fontsource/roboto": "^5.1.0",
|
"@fontsource/roboto": "^5.1.0",
|
||||||
"@headlessui/react": "^2.2.4",
|
"@headlessui/react": "^2.2.4",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.555",
|
"version": "1.6.556",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|||||||
Reference in New Issue
Block a user