This commit is contained in:
Ismail Ali
2025-06-26 22:56:20 +02:00
parent 137839da98
commit b9651a53a9
82 changed files with 7476 additions and 4171 deletions

View File

@@ -2,14 +2,15 @@
import bcrypt from "bcryptjs";
import { generateToken } from "../utils/cryptoUtils";
import USERS from "../config/users";
import { setAdminLoggedIn } from "../../../../redux/slices/authSlice"; // ✅ Wichtig
import { setAdminLoggedIn } from "@/redux/slices/authSlice"; // ✅ Wichtig
import { AppDispatch } from "@/redux/store"; // Import your AppDispatch type
const handleAdminLogin = (
username: string,
password: string,
onSuccess: () => void,
onError: (errorMsg: string) => void,
dispatch: any // ✅ neu
onError: (message: string) => void,
dispatch: AppDispatch // Use the correct dispatch type
) => {
const user = USERS.Admin;
bcrypt.compare(password, user.password, (err, isMatch) => {

View File

@@ -16,7 +16,6 @@ const handleGeneralSubmit = (
) => {
const changes: { [key: string]: string } = {};
let networkChanges = false;
let newIp: string | null = null;
if (current.name !== original.name) {
changes.SNNA = current.name;
@@ -24,7 +23,6 @@ const handleGeneralSubmit = (
}
if (current.ip !== original.ip) {
changes.SEI01 = current.ip;
newIp = current.ip;
networkChanges = true;
}
if (current.subnet !== original.subnet) {