fix: Meldungen werden wieder angezeigt in KÜ Charts

This commit is contained in:
ISA
2025-08-12 13:09:16 +02:00
parent 2765d06836
commit bb662bf856
7 changed files with 26 additions and 8 deletions

View File

@@ -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.700 NEXT_PUBLIC_APP_VERSION=1.6.701
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)

View File

@@ -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.700 NEXT_PUBLIC_APP_VERSION=1.6.701
NEXT_PUBLIC_CPL_MODE=production NEXT_PUBLIC_CPL_MODE=production

View File

@@ -1,3 +1,8 @@
## [1.6.701] 2025-08-12
- WIP: Meldungen
---
## [1.6.700] 2025-08-12 ## [1.6.700] 2025-08-12
- Isolatioswiderstand Chart abhängig von dropdown menu select name und nicht von Titel - Isolatioswiderstand Chart abhängig von dropdown menu select name und nicht von Titel

View File

@@ -237,7 +237,7 @@ const IsoChartView: React.FC<IsoChartViewProps> = ({
{chartTitle === "Messkurve" ? ( {chartTitle === "Messkurve" ? (
<IsoMeasurementChart /> <IsoMeasurementChart />
) : ( ) : (
<Report moduleType="ISO" autoLoad={false} /> <Report moduleType="ISO" autoLoad={chartTitle === "Meldungen"} />
)} )}
</div> </div>
</div> </div>

View File

@@ -119,7 +119,17 @@ const Report: React.FC<ReportProps> = ({ moduleType, autoLoad = true }) => {
// Modul-spezifische Schlüsselwörter (alle lowercase, ö => oe normalisiert) // Modul-spezifische Schlüsselwörter (alle lowercase, ö => oe normalisiert)
const moduleKeywordMap = useMemo<Record<ModuleType, string[]>>( const moduleKeywordMap = useMemo<Record<ModuleType, string[]>>(
() => ({ () => ({
ISO: ["modul online", "aderbruch", "erdschluss", "isofehler"], ISO: [
"modul online",
"aderbruch",
"erdschluss",
"isofehler",
"iso fehler",
"iso-fehler",
"isolationsfehler",
"isolationfehler",
"isolation fehler",
],
TDR: ["modul online", "tdr aktiv", "tdr entfernung"], TDR: ["modul online", "tdr aktiv", "tdr entfernung"],
RSL: ["modul online", "aderbruch", "schleifenfehler"], RSL: ["modul online", "aderbruch", "schleifenfehler"],
KVZ: ["modul online", "aderbruch", "kvz störung", "kvz stoerung"], KVZ: ["modul online", "aderbruch", "kvz störung", "kvz stoerung"],
@@ -167,7 +177,10 @@ const Report: React.FC<ReportProps> = ({ moduleType, autoLoad = true }) => {
const msgNorm = normalize(m.m); const msgNorm = normalize(m.m);
return keywords.some((kw) => msgNorm.includes(kw)); return keywords.some((kw) => msgNorm.includes(kw));
}); });
setFilteredMessages(moduleFiltered); // Fallback: Wenn keine Keyword-Treffer, zeige Slot-Filter-Ergebnis
setFilteredMessages(
moduleFiltered.length > 0 ? moduleFiltered : slotFiltered
);
} else { } else {
setFilteredMessages([]); setFilteredMessages([]);
} }

4
package-lock.json generated
View File

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

View File

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