feat Schleifeund TDR in sepaterate Bereiche in KÜ
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.641
|
NEXT_PUBLIC_APP_VERSION=1.6.642
|
||||||
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.641
|
NEXT_PUBLIC_APP_VERSION=1.6.642
|
||||||
NEXT_PUBLIC_CPL_MODE=production
|
NEXT_PUBLIC_CPL_MODE=production
|
||||||
@@ -1,3 +1,8 @@
|
|||||||
|
## [1.6.642] – 2025-07-24
|
||||||
|
|
||||||
|
- feat: Isowert und Schleifenwiderstanf in schwarzen Display zusammen
|
||||||
|
|
||||||
|
---
|
||||||
## [1.6.641] – 2025-07-24
|
## [1.6.641] – 2025-07-24
|
||||||
|
|
||||||
- Hide fallsensors
|
- Hide fallsensors
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="relative bg-gray-300 w-[7.25rem] h-[24.375rem] border border-gray-400 transform laptop:-translate-y-12 2xl:-translate-y-0
|
className="relative bg-gray-300 w-[7.25rem] h-[30.375rem] border border-gray-400 transform laptop:-translate-y-12 2xl:-translate-y-0
|
||||||
scale-100 sm:scale-95 md:scale-100 lg:scale-105 xl:scale-90 2xl:scale-125 top-3 qhd:scale-150 qhd:-translate-y-0"
|
scale-100 sm:scale-95 md:scale-100 lg:scale-105 xl:scale-90 2xl:scale-125 top-3 qhd:scale-150 qhd:-translate-y-0"
|
||||||
>
|
>
|
||||||
{kueOnline === 1 ? (
|
{kueOnline === 1 ? (
|
||||||
@@ -295,96 +295,60 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
|
|||||||
{kueVersion}
|
{kueVersion}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex mt-3 space-x-[0.063rem] ">
|
|
||||||
<button
|
|
||||||
onClick={() =>
|
|
||||||
handleButtonClick(
|
|
||||||
"Schleife",
|
|
||||||
setActiveButton,
|
|
||||||
setloopTitleText,
|
|
||||||
(value) =>
|
|
||||||
setLoopDisplayValue(
|
|
||||||
typeof value === "number" ? value : Number(value)
|
|
||||||
), // Hier sicherstellen, dass nur number übergeben wird
|
|
||||||
Number(schleifenwiderstand), // <- Stelle sicher, dass es eine Zahl ist
|
|
||||||
tdrLocation,
|
|
||||||
dispatch,
|
|
||||||
slotIndex
|
|
||||||
)
|
|
||||||
}
|
|
||||||
className={`w-[50%] h-[1.563rem] text-white text-[0.625rem] flex items-center justify-center ${
|
|
||||||
activeButton === "Schleife" ? "bg-littwin-blue" : "bg-gray-400"
|
|
||||||
}`}
|
|
||||||
>
|
|
||||||
Schleife
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
onClick={() => {
|
|
||||||
setActiveButton("TDR");
|
|
||||||
setloopTitleText("Entfernung [km]");
|
|
||||||
|
|
||||||
const latestTdrDistanceMeters =
|
{/* Schleifenwiderstand Bereich */}
|
||||||
Array.isArray(tdmChartData?.[slotIndex]) &&
|
<div className="absolute bottom-[5.963rem] left-[0.068rem] w-[7.074rem] h-[4.1rem] bg-gray-300 border-[0.094rem] border-gray-400 p-[0.063rem]">
|
||||||
tdmChartData[slotIndex].length > 0 &&
|
|
||||||
typeof tdmChartData[slotIndex][0].d === "number"
|
|
||||||
? tdmChartData[slotIndex][0].d
|
|
||||||
: 0;
|
|
||||||
|
|
||||||
const latestTdrDistance = Number(
|
|
||||||
(latestTdrDistanceMeters / 1000).toFixed(3)
|
|
||||||
);
|
|
||||||
setLoopDisplayValue(latestTdrDistance);
|
|
||||||
}}
|
|
||||||
className={`w-[50%] h-[1.563rem] text-white text-[0.625rem] flex items-center justify-center ${
|
|
||||||
Array.isArray(tdrActive) && tdrActive[slotIndex] === 0
|
|
||||||
? "bg-gray-200 cursor-not-allowed" // Deaktiviert: Hellgrau
|
|
||||||
: activeButton === "TDR"
|
|
||||||
? "bg-littwin-blue" // Aktiviert: Littwin Blau
|
|
||||||
: "bg-gray-400" // Nicht geklickt: Dunkelgrau
|
|
||||||
}`}
|
|
||||||
disabled={Array.isArray(tdrActive) && tdrActive[slotIndex] === 0} // Button deaktiviert, wenn TDR für diesen Slot nicht aktiv ist
|
|
||||||
>
|
|
||||||
TDR
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* loopDisplay: Zeigt Schleifenwiderstand oder TDR-Distanz an, je nach Modus */}
|
|
||||||
<div className="absolute bottom-[0.063rem] left-[0.068rem] w-[7.074rem] h-[4.1rem] bg-gray-300 border-[0.094rem] border-gray-400 p-[0.063rem]">
|
|
||||||
<span className="text-black text-[0.438rem] absolute top-[0.125rem] left-[0.063rem] mt-1">
|
<span className="text-black text-[0.438rem] absolute top-[0.125rem] left-[0.063rem] mt-1">
|
||||||
{loopTitleText}
|
Schleifenwiderstand [kOhm]
|
||||||
</span>
|
</span>
|
||||||
|
<div className="relative w-full h-[2.813rem] bg-gray-100 border border-gray-400 flex items-center justify-center mt-4">
|
||||||
<div className="relative w-full h-[2.813rem] bg-gray-100 border border-gray-400 flex items-center justify-center mt-4">
|
|
||||||
<button
|
<button
|
||||||
onClick={refreshClick} // Dynamische Funktion basierend auf aktivem Button
|
onClick={() =>
|
||||||
|
handleRefreshClick("Schleife", slotIndex, setLoading)
|
||||||
|
}
|
||||||
className="absolute -top-[0.063rem] -right-[0.063rem] w-[1.25rem] h-[1.25rem] bg-gray-400 flex items-center justify-center"
|
className="absolute -top-[0.063rem] -right-[0.063rem] w-[1.25rem] h-[1.25rem] bg-gray-400 flex items-center justify-center"
|
||||||
disabled={loading} // Disable button while loading
|
disabled={loading}
|
||||||
>
|
>
|
||||||
<span className="text-white text-[1.125rem]">⟳</span>
|
<span className="text-white text-[1.125rem]">⟳</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div className="absolute bottom-[0.313rem] left-1/2 transform -translate-x-1/2 w-[6.25rem] flex justify-center items-center">
|
<div className="absolute bottom-[0.313rem] left-1/2 transform -translate-x-1/2 w-[6.25rem] flex justify-center items-center">
|
||||||
<div className="text-center text-black text-[0.625rem]">
|
<div className="text-center text-black text-[0.625rem]">
|
||||||
<p>
|
<p>
|
||||||
{loopDisplayValue +
|
{typeof schleifenwiderstand === "number"
|
||||||
(activeButton === "Schleife" ? " kOhm" : " km")}
|
? schleifenwiderstand
|
||||||
|
: Number(schleifenwiderstand)}{" "}
|
||||||
|
kOhm
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Messkurven-Button moved below the module */}
|
|
||||||
{/* Sensoren anzeigen */}
|
|
||||||
{
|
|
||||||
/* if Kabelüberwachungsmodul online (kue_online ) */
|
|
||||||
kueOnline === 1 && win_fallSensorsActive === 1 && false && (
|
|
||||||
<div className="mt-4 w-full flex justify-center">
|
|
||||||
<FallSensors />
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* TDR Bereich */}
|
||||||
|
{Array.isArray(tdrActive) && tdrActive[slotIndex] === 1 && (
|
||||||
|
<div className="absolute bottom-[0.063rem] left-[0.068rem] w-[7.074rem] h-[4.1rem] bg-gray-300 border-[0.094rem] border-gray-400 p-[0.063rem]">
|
||||||
|
<span className="text-black text-[0.438rem] absolute top-[0.125rem] left-[0.063rem] mt-1">
|
||||||
|
TDR Entfernung [km]
|
||||||
|
</span>
|
||||||
|
<div className="relative w-full h-[2.813rem] bg-gray-100 border border-gray-400 flex items-center justify-center mt-4">
|
||||||
|
<button
|
||||||
|
onClick={() =>
|
||||||
|
handleRefreshClick("TDR", slotIndex, setLoading)
|
||||||
|
}
|
||||||
|
className="absolute -top-[0.063rem] -right-[0.063rem] w-[1.25rem] h-[1.25rem] bg-gray-400 flex items-center justify-center"
|
||||||
|
disabled={loading}
|
||||||
|
>
|
||||||
|
<span className="text-white text-[1.125rem]">⟳</span>
|
||||||
|
</button>
|
||||||
|
<div className="absolute bottom-[0.313rem] left-1/2 transform -translate-x-1/2 w-[6.25rem] flex justify-center items-center">
|
||||||
|
<div className="text-center text-black text-[0.625rem]">
|
||||||
|
<p>{latestTdrDistance} km</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* Modal für Einstellungen */}
|
{/* Modal für Einstellungen */}
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ var win_kueName = [
|
|||||||
|
|
||||||
//-------------TDR---------------------------------------------------
|
//-------------TDR---------------------------------------------------
|
||||||
var win_tdrActive = [
|
var win_tdrActive = [
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1,
|
||||||
];
|
];
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.641",
|
"version": "1.6.642",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.641",
|
"version": "1.6.642",
|
||||||
"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.641",
|
"version": "1.6.642",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|||||||
Reference in New Issue
Block a user