refactor: order Minimum, Messwert und Maximum, sowie Durchschnitt
This commit is contained in:
@@ -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.631
|
||||
NEXT_PUBLIC_APP_VERSION=1.6.632
|
||||
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_USE_CGI=true
|
||||
# App-Versionsnummer
|
||||
NEXT_PUBLIC_APP_VERSION=1.6.631
|
||||
NEXT_PUBLIC_APP_VERSION=1.6.632
|
||||
NEXT_PUBLIC_CPL_MODE=production
|
||||
@@ -1,3 +1,11 @@
|
||||
## [1.6.632] – 2025-07-23
|
||||
|
||||
- feat(analogInputs): auto-load chart data when table row is selected
|
||||
|
||||
- Added useEffect to AnalogInputsChart to automatically trigger "Daten laden" when a row is selected and selectedAnalogInput.id is not 0.
|
||||
- Improves UX by syncing table selection with chart data fetch, no manual
|
||||
|
||||
---
|
||||
## [1.6.631] – 2025-07-22
|
||||
|
||||
- Fix: Always show vonDatum and bisDatum in fetch URL for analog inputs chart
|
||||
|
||||
@@ -185,20 +185,7 @@ export default function AnalogInputsChart() {
|
||||
? zeitraum === "DIA0"
|
||||
? [
|
||||
{
|
||||
label: selectedAnalogInput?.label
|
||||
? `Messwert (m) ${selectedAnalogInput.label}`
|
||||
: "Messwert (m)",
|
||||
data: filteredData
|
||||
.filter((p) => typeof p.m === "number")
|
||||
.map((p) => ({ x: new Date(p.t), y: p.m })),
|
||||
borderColor: getColor("littwin-blue"),
|
||||
backgroundColor: "rgba(59,130,246,0.3)",
|
||||
borderWidth: 2,
|
||||
pointRadius: 0,
|
||||
tension: 0.1,
|
||||
},
|
||||
{
|
||||
label: "Minimum (i)",
|
||||
label: "Minimum ", // (i)
|
||||
data: filteredData
|
||||
.filter((p) => typeof p.i === "number")
|
||||
.map((p) => ({ x: new Date(p.t), y: p.i })),
|
||||
@@ -209,7 +196,21 @@ export default function AnalogInputsChart() {
|
||||
tension: 0.1,
|
||||
},
|
||||
{
|
||||
label: "Maximum (a)",
|
||||
label: selectedAnalogInput?.label
|
||||
? //? `Messwert ${selectedAnalogInput.label}` // (m)
|
||||
`Messwert ` // (m)
|
||||
: "Messwert ", // (m)
|
||||
data: filteredData
|
||||
.filter((p) => typeof p.m === "number")
|
||||
.map((p) => ({ x: new Date(p.t), y: p.m })),
|
||||
borderColor: getColor("littwin-blue"),
|
||||
backgroundColor: "rgba(59,130,246,0.3)",
|
||||
borderWidth: 2,
|
||||
pointRadius: 0,
|
||||
tension: 0.1,
|
||||
},
|
||||
{
|
||||
label: "Maximum ", // (a)
|
||||
data: filteredData
|
||||
.filter((p) => typeof p.a === "number")
|
||||
.map((p) => ({ x: new Date(p.t), y: p.a })),
|
||||
@@ -222,7 +223,7 @@ export default function AnalogInputsChart() {
|
||||
]
|
||||
: [
|
||||
{
|
||||
label: "Minimum (i)",
|
||||
label: "Minimum", // (i)
|
||||
data: filteredData
|
||||
.filter((p) => typeof p.i === "number")
|
||||
.map((p) => ({ x: new Date(p.t), y: p.i })),
|
||||
@@ -233,18 +234,7 @@ export default function AnalogInputsChart() {
|
||||
tension: 0.1,
|
||||
},
|
||||
{
|
||||
label: "Maximum (a)",
|
||||
data: filteredData
|
||||
.filter((p) => typeof p.a === "number")
|
||||
.map((p) => ({ x: new Date(p.t), y: p.a })),
|
||||
borderColor: "gray",
|
||||
borderDash: [4, 2],
|
||||
borderWidth: 1,
|
||||
pointRadius: 0,
|
||||
tension: 0.1,
|
||||
},
|
||||
{
|
||||
label: "Durchschnitt (g)",
|
||||
label: "Durchschnitt", // (g)
|
||||
data: filteredData
|
||||
.filter((p) => typeof p.g === "number")
|
||||
.map((p) => ({ x: new Date(p.t), y: p.g })),
|
||||
@@ -254,6 +244,17 @@ export default function AnalogInputsChart() {
|
||||
pointRadius: 0,
|
||||
tension: 0.1,
|
||||
},
|
||||
{
|
||||
label: "Maximum", // (a)
|
||||
data: filteredData
|
||||
.filter((p) => typeof p.a === "number")
|
||||
.map((p) => ({ x: new Date(p.t), y: p.a })),
|
||||
borderColor: "gray",
|
||||
borderDash: [4, 2],
|
||||
borderWidth: 1,
|
||||
pointRadius: 0,
|
||||
tension: 0.1,
|
||||
},
|
||||
]
|
||||
: [],
|
||||
};
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "cpl-v4",
|
||||
"version": "1.6.631",
|
||||
"version": "1.6.632",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "cpl-v4",
|
||||
"version": "1.6.631",
|
||||
"version": "1.6.632",
|
||||
"dependencies": {
|
||||
"@fontsource/roboto": "^5.1.0",
|
||||
"@headlessui/react": "^2.2.4",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cpl-v4",
|
||||
"version": "1.6.631",
|
||||
"version": "1.6.632",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
|
||||
Reference in New Issue
Block a user