diff --git a/Layout/default/VueViews/WorkorderCompanyPWA.php b/Layout/default/VueViews/WorkorderCompanyPWA.php index 774a6ceea..acef402da 100644 --- a/Layout/default/VueViews/WorkorderCompanyPWA.php +++ b/Layout/default/VueViews/WorkorderCompanyPWA.php @@ -1,3 +1,5 @@ + @@ -7,9 +9,11 @@ + + @@ -19,12 +23,12 @@ window.TT_CONFIG = ; moment.locale('de'); tailwind.config = { - darkMode: 'class', + darkMode: 'class', // Enable dark mode based on a class theme: { extend: { colors: { - 'primary': '#005384', - 'secondary': '#fac41b', + 'primary': '#005384', // Dark Blue + 'secondary': '#fac41b', // Yellow/Gold }, } } @@ -32,28 +36,54 @@ - + -
+
- - + \ No newline at end of file diff --git a/application/WorkorderCompany/WorkorderCompanyController.php b/application/WorkorderCompany/WorkorderCompanyController.php index a7b6b36d5..879669f83 100644 --- a/application/WorkorderCompany/WorkorderCompanyController.php +++ b/application/WorkorderCompany/WorkorderCompanyController.php @@ -23,40 +23,6 @@ class WorkorderCompanyController extends WorkorderBaseController { ]; protected array $additionalJSVariables = ['COMPANY_ID' => '0']; - public function loginOverride() { - if (mfLoginController::isLoggedIn()) { - $this->needlogin = true; - return new User(); - } - - if ($_SERVER['REQUEST_METHOD'] !== 'POST') $this->redirect("/Dashboard"); - - $username = $_POST['Username'] ?? ''; - $password = $_POST['Password'] ?? ''; - $twoFactorCode = isset($_POST['TwofactorCode']) && is_numeric($_POST['TwofactorCode']) ? (int)$_POST['TwofactorCode'] : 'unset'; - $remember = ($_POST['Remember'] ?? null) === 'true'; - - $loginController = new PwaLoginController(); - $result = $loginController->apiLogin($username, $password, $twoFactorCode, $remember); - - switch ($result) { - case true: - $response = ['status' => 'success']; - break; - case '2fa': - $response = ['status' => '2fa_required']; - break; - case 'false2fa': - $response = ['status' => 'invalid_2fa', 'message' => 'Verifizierungscode falsch oder abgelaufen.']; - break; - default: - $response = ['status' => 'error', 'message' => 'Benutzername oder Passwort ist falsch.']; - } - - header('Content-Type: application/json'); - exit(json_encode($response)); - } - protected function prepareCrudConfig() { $preorderInfoColIdx = array_search('preorderInfo', array_column($this->columns, 'key')); array_splice($this->columns, $preorderInfoColIdx + 1, 0, [$this->statusColumn]);