Isolatioswiderstand Chart abhängig von dropdown menu select name und nicht von Titel

This commit is contained in:
ISA
2025-08-12 12:11:47 +02:00
parent 31a54deb2d
commit b8b5c36a60
7 changed files with 23 additions and 11 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.698
NEXT_PUBLIC_APP_VERSION=1.6.699
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.698
NEXT_PUBLIC_APP_VERSION=1.6.699
NEXT_PUBLIC_CPL_MODE=production

View File

@@ -1,3 +1,8 @@
## [1.6.699] 2025-08-12
- chore(eslint): ignore irregular whitespace in comments (keep rule strict for code)
---
## [1.6.698] 2025-08-12
- fetchCableData.mjs

View File

@@ -288,7 +288,11 @@ const IsoChartActionBar: React.FC = () => {
<div className="flex items-center space-x-2">
{/* DateRangePicker für beide Ansichten sichtbar, da Meldungen auch datumsabhängig sind */}
<div>
<div
style={{
visibility: chartTitle === "Messkurve" ? "visible" : "hidden",
}}
>
<DateRangePicker />
</div>
@@ -362,6 +366,9 @@ const IsoChartActionBar: React.FC = () => {
{/* Daten laden Button lädt je nach Ansicht Messkurve oder Meldungen */}
<button
style={{
visibility: chartTitle === "Messkurve" ? "visible" : "hidden",
}}
onClick={handleFetchData}
className="px-4 py-1 bg-littwin-blue text-white rounded text-sm"
>

View File

@@ -180,9 +180,7 @@ const IsoChartView: React.FC<IsoChartViewProps> = ({
}}
>
<div className="flex justify-between items-center mb-2 pr-24">
<h3 className="text-lg font-semibold">
{chartTitle === "Messkurve" ? "Isolationswiderstand" : "Meldungen"}
</h3>
<h3 className="text-lg font-semibold">Isolationswiderstand</h3>
<Listbox
value={chartTitle}
onChange={(value: "Messkurve" | "Meldungen") =>
@@ -191,7 +189,9 @@ const IsoChartView: React.FC<IsoChartViewProps> = ({
>
<div className="relative w-40">
<Listbox.Button className="w-full border px-3 py-1 rounded text-left bg-white flex justify-between items-center text-sm">
<span>{chartTitle}</span>
<span>
{chartTitle === "Meldungen" ? "Meldungen" : "Messkurve"}
</span>
<svg
className="w-5 h-5 text-gray-400"
viewBox="0 0 20 20"
@@ -225,7 +225,7 @@ const IsoChartView: React.FC<IsoChartViewProps> = ({
}`
}
>
{option}
{option === "Meldungen" ? "Meldungen" : "Messkurve"}
</Listbox.Option>
))}
</Listbox.Options>

4
package-lock.json generated
View File

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

View File

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