Kai Anforderung: TDR Chart keine Punkte auf 0 setzen, für bessere Darstellung
This commit is contained in:
@@ -83,13 +83,16 @@ const TDRChart: React.FC<{ isFullScreen: boolean }> = ({ isFullScreen }) => {
|
|||||||
data: {
|
data: {
|
||||||
datasets: [
|
datasets: [
|
||||||
{
|
{
|
||||||
label: `Modul ${
|
/* label: `Modul ${
|
||||||
selectedSlot !== null ? selectedSlot + 1 : "?"
|
selectedSlot !== null ? selectedSlot + 1 : "?"
|
||||||
}`,
|
}`, */
|
||||||
|
label: `TDR Kurve`,
|
||||||
data: tdrChartData,
|
data: tdrChartData,
|
||||||
borderColor: getColor("littwin-blue"),
|
borderColor: getColor("littwin-blue"),
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
tension: 0.1,
|
tension: 0.1,
|
||||||
|
pointRadius: 0,
|
||||||
|
pointHoverRadius: 5,
|
||||||
parsing: {
|
parsing: {
|
||||||
xAxisKey: "d",
|
xAxisKey: "d",
|
||||||
yAxisKey: "p",
|
yAxisKey: "p",
|
||||||
@@ -127,6 +130,7 @@ const TDRChart: React.FC<{ isFullScreen: boolean }> = ({ isFullScreen }) => {
|
|||||||
yAxisKey: "p",
|
yAxisKey: "p",
|
||||||
},
|
},
|
||||||
order: 9999,
|
order: 9999,
|
||||||
|
pointHoverRadius: 15,
|
||||||
// Hier die Reihenfolge der Marker bestimmen
|
// Hier die Reihenfolge der Marker bestimmen
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ const TDRChartActionBar: React.FC = () => {
|
|||||||
{selectedId !== null && (
|
{selectedId !== null && (
|
||||||
<button
|
<button
|
||||||
onClick={handleSetReference}
|
onClick={handleSetReference}
|
||||||
className="border border-blue-500 text-blue-600 bg-white rounded px-3 py-1 text-sm hover:bg-blue-100"
|
className="border border-littwin-blue text-littwin-blue bg-white rounded px-3 py-1 text-sm hover:bg-blue-100"
|
||||||
>
|
>
|
||||||
Als Referenzkurve setzen
|
Als Referenzkurve setzen
|
||||||
</button>
|
</button>
|
||||||
@@ -110,7 +110,7 @@ const TDRChartActionBar: React.FC = () => {
|
|||||||
{/* 🔽 Dropdown für Messungen */}
|
{/* 🔽 Dropdown für Messungen */}
|
||||||
<div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
<label htmlFor="tdrIdSelect" className="text-sm font-semibold">
|
<label htmlFor="tdrIdSelect" className="text-sm font-semibold">
|
||||||
Messung ID
|
TDR Messung
|
||||||
</label>
|
</label>
|
||||||
<select
|
<select
|
||||||
id="tdrIdSelect"
|
id="tdrIdSelect"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
"use client"; // /components/main/settingsPageComponents/GeneralSettings.tsx
|
"use client"; // /components/main/settingsPageComponents/GeneralSettings.tsx
|
||||||
import React, { useState } from "react";
|
import React, { useState, useEffect } from "react";
|
||||||
import { RootState } from "../../../redux/store";
|
import { RootState } from "../../../redux/store";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
import handleClearDatabase from "./handlers/handleClearDatabase";
|
import handleClearDatabase from "./handlers/handleClearDatabase";
|
||||||
@@ -8,8 +8,12 @@ import handleSetDateTime from "./handlers/handleSetDateTime";
|
|||||||
import handleSubmit from "./handlers/handleSubmit";
|
import handleSubmit from "./handlers/handleSubmit";
|
||||||
import { useAdminAuth } from "./hooks/useAdminAuth";
|
import { useAdminAuth } from "./hooks/useAdminAuth";
|
||||||
import handleAdminLogin from "./handlers/handleAdminLogin";
|
import handleAdminLogin from "./handlers/handleAdminLogin";
|
||||||
|
import { useDispatch } from "react-redux";
|
||||||
|
import { AppDispatch } from "../../../redux/store";
|
||||||
|
import { fetchSystemSettingsThunk } from "../../../redux/thunks/fetchSystemSettingsThunk";
|
||||||
|
|
||||||
const GeneralSettings = () => {
|
const GeneralSettings: React.FC = () => {
|
||||||
|
const dispatch = useDispatch<AppDispatch>();
|
||||||
const systemSettings = useSelector(
|
const systemSettings = useSelector(
|
||||||
(state: RootState) => state.systemSettings
|
(state: RootState) => state.systemSettings
|
||||||
);
|
);
|
||||||
@@ -50,6 +54,14 @@ const GeneralSettings = () => {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
//-------------------------------
|
||||||
|
useEffect(() => {
|
||||||
|
if (!systemSettings.deviceName) {
|
||||||
|
dispatch(fetchSystemSettingsThunk());
|
||||||
|
}
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
//-------------------------------
|
||||||
return (
|
return (
|
||||||
<div className="p-2 md:p-3 bg-gray-100 max-w-2xl mx-auto">
|
<div className="p-2 md:p-3 bg-gray-100 max-w-2xl mx-auto">
|
||||||
<h2 className="text-sm md:text-md font-bold mb-2">
|
<h2 className="text-sm md:text-md font-bold mb-2">
|
||||||
|
|||||||
@@ -6,5 +6,5 @@
|
|||||||
2: Patch oder Hotfix (Bugfixes oder kleine Änderungen).
|
2: Patch oder Hotfix (Bugfixes oder kleine Änderungen).
|
||||||
|
|
||||||
*/
|
*/
|
||||||
const webVersion = "1.6.194";
|
const webVersion = "1.6.195";
|
||||||
export default webVersion;
|
export default webVersion;
|
||||||
|
|||||||
Reference in New Issue
Block a user