feat: Schließen Button in Kabelüberwachung Modal Einstellungen eingefügt
This commit is contained in:
@@ -13,9 +13,10 @@ declare global {
|
||||
|
||||
interface Props {
|
||||
slot: number;
|
||||
onClose?: () => void;
|
||||
}
|
||||
|
||||
export default function Knotenpunkte({ slot }: Props) {
|
||||
export default function Knotenpunkte({ slot, onClose }: Props) {
|
||||
const [knotenNamen, setKnotenNamen] = useState<string[]>(Array(10).fill(""));
|
||||
const [linienNamen, setLinienNamen] = useState<string[]>(Array(10).fill(""));
|
||||
const [linienLaenge, setLinienLaenge] = useState<number[]>(Array(10).fill(0));
|
||||
@@ -113,6 +114,14 @@ export default function Knotenpunkte({ slot }: Props) {
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
<div className="flex justify-end pt-4">
|
||||
<button
|
||||
onClick={onClose}
|
||||
className="bg-littwin-blue text-white px-4 py-2 rounded "
|
||||
>
|
||||
Schließen
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -224,6 +224,12 @@ export default function KueEinstellung({
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex justify-end gap-2 p-3 rounded">
|
||||
<button
|
||||
onClick={onClose}
|
||||
className="bg-littwin-blue text-white px-4 py-2 rounded flex items-center"
|
||||
>
|
||||
Schließen
|
||||
</button>
|
||||
{isAdminLoggedIn && (
|
||||
<button
|
||||
onClick={() => firmwareUpdate(slot)}
|
||||
|
||||
@@ -61,9 +61,6 @@ export default function KueModal({ showModal, onClose, slot }: KueModalProps) {
|
||||
<h2 className="text-base font-bold">
|
||||
Einstellungen Steckplatz {slot + 1}
|
||||
</h2>
|
||||
<button onClick={onClose} className="text-2xl hover:text-gray-200">
|
||||
<i className="bi bi-x-circle-fill"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div className="flex justify-start bg-gray-100 space-x-2 p-2">
|
||||
@@ -98,7 +95,9 @@ export default function KueModal({ showModal, onClose, slot }: KueModalProps) {
|
||||
{activeTab === "tdr" && (
|
||||
<TdrEinstellung slot={slot} onClose={onClose} />
|
||||
)}
|
||||
{activeTab === "knoten" && <Knotenpunkte slot={slot} />}
|
||||
{activeTab === "knoten" && (
|
||||
<Knotenpunkte slot={slot} onClose={onClose} />
|
||||
)}
|
||||
</div>
|
||||
</ReactModal>
|
||||
);
|
||||
|
||||
@@ -240,6 +240,12 @@ export default function TdrEinstellung({ slot, onClose }: Props) {
|
||||
</div>
|
||||
<div className="mt-36">
|
||||
<div className="flex justify-end gap-2 p-3 rounded ">
|
||||
<button
|
||||
onClick={onClose}
|
||||
className="bg-littwin-blue text-white px-4 py-2 rounded flex items-center"
|
||||
>
|
||||
Schließen
|
||||
</button>
|
||||
<button
|
||||
onClick={handleSave}
|
||||
className="bg-littwin-blue text-white px-4 py-2 rounded flex items-center"
|
||||
|
||||
Reference in New Issue
Block a user