Letzte TDR-Messung Button erstellen
This commit is contained in:
@@ -31,13 +31,26 @@ const TDRChartActionBar: React.FC = () => {
|
||||
if (!data) return;
|
||||
|
||||
dispatch(setTDRChartDataById({ id, data }));
|
||||
dispatch(setSelectedTDRId(id)); // 👉 wichtig!
|
||||
dispatch(setSelectedTDRId(id));
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setSelectedId(null);
|
||||
dispatch(setSelectedTDRId(null));
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="flex flex-wrap justify-end items-center p-2 bg-gray-100 rounded-lg space-x-2">
|
||||
{idsForSlot.length > 0 && (
|
||||
<>
|
||||
<div className="flex justify-between items-center p-2 bg-gray-100 rounded-lg space-x-4">
|
||||
{/* 🔵 Linke Seite: Reset-Button */}
|
||||
<button
|
||||
className="border border-gray-300 bg-white rounded px-3 py-1 text-sm hover:bg-gray-200"
|
||||
onClick={handleReset}
|
||||
>
|
||||
Letzte Messung
|
||||
</button>
|
||||
|
||||
{/* 🔵 Rechte Seite: Dropdown */}
|
||||
<div className="flex items-center space-x-2">
|
||||
<label htmlFor="tdrIdSelect" className="text-sm font-semibold">
|
||||
Messung ID
|
||||
</label>
|
||||
@@ -46,6 +59,7 @@ const TDRChartActionBar: React.FC = () => {
|
||||
value={selectedId ?? ""}
|
||||
onChange={handleSelectChange}
|
||||
className="border rounded px-2 py-1 text-sm"
|
||||
disabled={idsForSlot.length === 0}
|
||||
>
|
||||
<option value="">-- Wähle Messung --</option>
|
||||
{idsForSlot.map((entry) => (
|
||||
@@ -54,8 +68,7 @@ const TDRChartActionBar: React.FC = () => {
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -6,5 +6,5 @@
|
||||
2: Patch oder Hotfix (Bugfixes oder kleine Änderungen).
|
||||
|
||||
*/
|
||||
const webVersion = "1.6.153";
|
||||
const webVersion = "1.6.154";
|
||||
export default webVersion;
|
||||
|
||||
Reference in New Issue
Block a user