Compare commits

..
Author SHA1 Message Date
Bruno Eckhardt 13a98f2880 Automated merge from dev to live 2026-07-13 13:33:27 +02:00
Bruno Eckhardt cba34c4329 Automated merge from main to dev 2026-07-13 13:33:18 +02:00
Bruno Eckhardt 1fba004b9b Merge branch 'auto-merge' 2026-07-13 13:32:11 +02:00
Bruno Eckhardt 9622e35ca3 fixes 2026-07-13 13:32:01 +02:00
Bruno Eckhardt c173ea0c18 Automated merge from dev to live 2026-07-13 13:06:52 +02:00
Bruno Eckhardt 82ac74a7ee Automated merge from main to dev 2026-07-13 13:06:43 +02:00
Bruno Eckhardt 2748349060 Merge branch 'auto-merge' 2026-07-13 13:02:52 +02:00
Bruno Eckhardt ebbb6551f7 delete comments 2026-07-13 13:02:40 +02:00
Bruno Eckhardt a0914b60a6 Automated merge from dev to live 2026-07-13 12:35:55 +02:00
Bruno Eckhardt 0541557ae9 Automated merge from main to dev 2026-07-13 12:35:47 +02:00
Bruno Eckhardt 992ac5eb6a Merge branch 'auto-merge' 2026-07-13 12:35:11 +02:00
Bruno Eckhardt d37937f4d8 add form fixes 2026-07-13 12:34:59 +02:00
Bruno Eckhardt e98dbdc77b Automated merge from dev to live 2026-07-13 12:32:44 +02:00
Bruno Eckhardt aa4829343e Automated merge from main to dev 2026-07-13 12:32:36 +02:00
Bruno Eckhardt 523400ac0e Merge branch 'auto-merge' 2026-07-13 12:31:02 +02:00
Bruno Eckhardt 2064546b19 add auto merge script 2026-07-13 12:30:48 +02:00
Bruno Eckhardt 7d8a891798 Merge branch 'dev' into live 2026-07-13 10:46:24 +02:00
Bruno Eckhardt ddbf5b697f Merge branch 'main' into dev 2026-07-13 10:46:18 +02:00
Bruno Eckhardt d71e2c1e2d api controller fixes 2026-07-13 10:45:32 +02:00
Bruno Eckhardt 643be91c57 Merge branch 'dev' into live 2026-07-08 09:41:07 +02:00
Bruno Eckhardt f1b58a3399 Merge branch 'main' into dev 2026-07-08 09:40:54 +02:00
Bruno Eckhardt 62dadd175c Merge branch 'vergabe-service' 2026-07-08 09:40:41 +02:00
Bruno Eckhardt 3c9eb7091f feat: search persons and onjects 2026-07-08 09:40:32 +02:00
Bruno Eckhardt 7abcac5f04 feat: autofill and archive deleted things 2026-07-08 09:31:20 +02:00
Bruno Eckhardt 61ada9f2e3 Merge branch 'dev' into live 2026-07-08 08:59:44 +02:00
Bruno Eckhardt 5759f999c5 Merge branch 'main' into dev 2026-07-08 08:59:32 +02:00
Bruno Eckhardt 7d03579d31 Merge branch 'vergabe-service' 2026-07-08 08:59:19 +02:00
Bruno Eckhardt 742c5d5b56 feat: autofill 2026-07-08 08:59:03 +02:00
Bruno Eckhardt 20e0e09305 Merge branch 'dev' into live 2026-07-08 08:16:57 +02:00
Bruno Eckhardt d8a0121ac2 Merge branch 'main' into dev 2026-07-08 08:16:50 +02:00
Bruno Eckhardt 0952d6de13 Merge branch 'berufsschulberichte' 2026-07-08 08:15:57 +02:00
Tower 733fc7dc12 Merge branch 'dev' into live 2026-07-07 19:20:36 +02:00
Tower 99f4f8a746 Merge branch 'main' into dev 2026-07-07 19:20:24 +02:00
Bruno Eckhardt 81ff082d71 Merge branch 'dev' into live 2026-07-07 14:28:05 +02:00
Bruno Eckhardt 3b7453563d Merge branch 'main' into dev 2026-07-07 14:27:52 +02:00
Bruno Eckhardt 9b1dfa8441 Merge branch 'dev' into live 2026-07-07 10:08:57 +02:00
Bruno Eckhardt 2f285f284b Merge branch 'main' into dev 2026-07-07 10:08:46 +02:00
Bruno Eckhardt fe5979d4d0 Merge branch 'dev' into live 2026-07-07 09:07:50 +02:00
Bruno Eckhardt 950fcd6f3b Merge branch 'main' into dev 2026-07-07 09:07:39 +02:00
Tower 3843677903 Merge branch 'dev' into live 2026-07-06 22:30:50 +02:00
Tower ca867e91d0 Merge branch 'main' into dev 2026-07-06 22:30:45 +02:00
Tower ad763caaf5 Merge branch 'dev' into live 2026-07-06 22:26:56 +02:00
Tower 9ca5e7617c Merge branch 'main' into dev 2026-07-06 22:26:50 +02:00
Tower 37871de69f Merge branch 'dev' into live 2026-07-06 21:52:19 +02:00
Tower 0431257a44 Merge branch 'main' into dev 2026-07-06 21:52:03 +02:00
Bruno Eckhardt 33e4388b20 Merge branch 'dev' into live 2026-07-06 15:51:42 +02:00
Bruno Eckhardt 5479d0e364 Merge branch 'main' into dev 2026-07-06 15:51:36 +02:00
Bruno Eckhardt 206d56b10c Merge branch 'dev' into live 2026-07-06 15:18:31 +02:00
Bruno Eckhardt f0f7c16abc Merge branch 'main' into dev 2026-07-06 15:18:25 +02:00
Bruno Eckhardt 859f67ca02 Merge branch 'dev' into live 2026-07-06 14:33:49 +02:00
Bruno Eckhardt 69199c78eb Merge branch 'main' into dev 2026-07-06 14:33:41 +02:00
Bruno Eckhardt e0e9bca81a Merge branch 'dev' into live 2026-07-06 14:25:43 +02:00
Bruno Eckhardt 232cc27ce3 Merge branch 'main' into dev 2026-07-06 14:25:25 +02:00
Bruno Eckhardt d727452dd8 Merge branch 'dev' into live 2026-07-06 14:22:17 +02:00
Bruno Eckhardt 636f6b5c37 Merge branch 'main' into dev 2026-07-06 14:22:06 +02:00
Bruno Eckhardt 62844653d2 Merge branch 'dev' into live 2026-07-06 14:13:54 +02:00
Bruno Eckhardt 88a95d28e3 Merge branch 'main' into dev 2026-07-06 14:13:46 +02:00
Bruno Eckhardt 14e01891a2 Merge branch 'dev' into live 2026-07-06 13:50:26 +02:00
Bruno Eckhardt 4cadcf263d Merge branch 'main' into dev 2026-07-06 13:50:21 +02:00
Bruno Eckhardt 1dfc6c9ac5 Merge branch 'dev' into live 2026-07-06 13:42:29 +02:00
Bruno Eckhardt 4e43f234c2 Merge branch 'main' into dev 2026-07-06 13:42:22 +02:00
Bruno Eckhardt 671688f37d Merge branch 'dev' into live 2026-07-06 08:47:47 +02:00
Bruno Eckhardt 1eff0a54a6 Merge branch 'main' into dev 2026-07-06 08:47:42 +02:00
Bruno Eckhardt 5ea0308b83 mobile optimizing 2026-07-06 08:46:30 +02:00
Bruno Eckhardt 859c1563fb Merge branch 'dev' into live 2026-07-06 08:41:00 +02:00
Bruno Eckhardt 9c1c86a7e7 Merge branch 'main' into dev 2026-07-06 08:40:53 +02:00
Tower d6232f6418 Merge branch 'DEV' into LIVE 2026-07-05 19:13:32 +02:00
Tower 878b691ab1 Merge branch 'main' into DEV 2026-07-05 19:13:20 +02:00
Tower a7368eb18f Merge branch 'DEV' into LIVE 2026-07-05 19:07:18 +02:00
Tower 38adea29cf Merge branch 'main' into DEV 2026-07-05 19:07:07 +02:00
Tower f6fbc8404c Merge branch 'DEV' into LIVE 2026-07-01 20:10:15 +02:00
Tower e45fecf6ff Merge branch 'main' into DEV 2026-07-01 20:09:58 +02:00
Bruno Eckhardt 5dce558640 Merge branch 'DEV' into LIVE 2026-05-20 12:33:38 +02:00
Bruno Eckhardt ffb6f38af0 Merge branch 'main' into DEV 2026-05-20 12:33:26 +02:00
Tower 3e54b917ca Merge branch 'DEV' into LIVE 2026-05-19 19:50:24 +02:00
Tower 4756d0586f Merge branch 'main' into DEV 2026-05-19 19:50:14 +02:00
Bruno Eckhardt 86a1eecd8d Merge branch 'DEV' into LIVE 2026-05-19 10:38:34 +02:00
Bruno Eckhardt 9dcf0ced19 Merge branch 'main' into DEV 2026-05-19 10:38:20 +02:00
Bruno Eckhardt c05f9f721c Merge branch 'DEV' into LIVE 2026-05-19 10:11:25 +02:00
Bruno Eckhardt 04c89fb676 Merge branch 'main' into DEV 2026-05-19 10:11:14 +02:00
Bruno Eckhardt 5160bbc5a5 Merge branch 'DEV' into LIVE 2026-05-19 07:17:41 +02:00
Bruno Eckhardt e9550b9a05 Merge branch 'main' into DEV 2026-05-19 07:17:31 +02:00
Bruno Eckhardt c5aabcf5d1 Merge branch 'DEV' into LIVE 2026-05-11 14:17:44 +02:00
Bruno Eckhardt e13ac6c503 Merge branch 'main' into DEV 2026-05-11 14:17:15 +02:00
Bruno Eckhardt bcaaac8a19 Merge branch 'DEV' into LIVE 2026-05-11 13:18:35 +02:00
Bruno Eckhardt e2ee377e35 Merge branch 'main' into DEV 2026-05-11 13:18:23 +02:00
Bruno Eckhardt 57813e3309 Merge branch 'DEV' into LIVE 2026-05-11 13:14:55 +02:00
Bruno Eckhardt 9eb06a3a16 Merge branch 'main' into DEV 2026-05-11 13:14:46 +02:00
Bruno Eckhardt a920fe99a8 Merge branch 'DEV' into LIVE 2026-05-11 13:09:39 +02:00
Bruno Eckhardt 0776ae8dd0 Merge branch 'main' into DEV 2026-05-11 13:09:30 +02:00
Bruno Eckhardt 21fa9145cb Merge branch 'DEV' into LIVE 2026-05-11 12:55:32 +02:00
Bruno Eckhardt c350f4c776 Merge branch 'main' into DEV 2026-05-11 12:55:21 +02:00
Tower fd5f3093c6 Merge branch 'DEV' into LIVE 2026-04-10 21:44:08 +02:00
Tower c47723ec00 Merge branch 'main' into DEV 2026-04-10 21:43:42 +02:00
Tower 737ea6e962 Merge branch 'DEV' into LIVE 2026-04-08 16:54:39 +02:00
Tower 0e5cdcd725 Merge branch 'main' into DEV 2026-04-08 16:54:24 +02:00
Bruno Eckhardt 739fda06e7 db fix 2026-04-08 16:36:53 +02:00
Bruno Eckhardt 3d170a38d8 Merge branch 'main' into DEV 2026-04-08 16:35:47 +02:00
Bruno Eckhardt 03febbc877 fix 2026-03-27 06:57:33 +01:00
Bruno Eckhardt bdc41bbd48 Merge branch 'main' into LIVE 2026-03-27 06:56:36 +01:00
Bruno Eckhardt 1f3e8228d1 fix 2026-03-26 08:13:59 +01:00
Bruno Eckhardt dccec7642b Merge branch 'DEV' into LIVE
# Conflicts:
#	WEBROOT/controller/DatabaseConnect.php
2026-03-26 08:13:20 +01:00
Bruno Eckhardt 6f74a11a79 Merge branch 'main' into DEV 2026-03-26 08:11:59 +01:00
Bruno Eckhardt ea51b1808a Merge branch 'main' into DEV 2026-03-25 08:47:16 +01:00
Bruno Eckhardt 2eacb68fd6 Merge branch 'main' into LIVE 2026-03-25 08:47:05 +01:00
Bruno Eckhardt 8c53e850c1 Merge branch 'main' into LIVE 2026-03-25 07:46:45 +01:00
Bruno Eckhardt 0d9b9e7b07 Merge branch 'main' into DEV 2026-03-25 07:46:23 +01:00
Bruno Eckhardt 9b6060d39f Merge branch 'main' into DEV 2026-03-23 15:45:43 +01:00
Bruno Eckhardt 01d6c69b3e Merge branch 'main' into LIVE 2026-03-23 15:45:26 +01:00
Bruno Eckhardt 7c94592b2c Merge branch 'main' into LIVE 2026-03-23 10:48:08 +01:00
Bruno Eckhardt 883a1fd76f Merge branch 'main' into DEV 2026-03-23 10:37:03 +01:00
Bruno Eckhardt dd08ec793a Merge branch 'main' into DEV 2026-03-23 08:58:33 +01:00
Bruno Eckhardt 24799dffbe Merge branch 'main' into LIVE 2026-03-23 08:58:26 +01:00
Bruno Eckhardt 34f464f442 dev db 2026-03-23 08:20:25 +01:00
Bruno Eckhardt d1464d874f Merge branch 'main' into LIVE 2026-03-23 08:19:28 +01:00
Bruno Eckhardt 8f5a616dd8 live db 2026-03-23 08:18:54 +01:00
5 changed files with 303 additions and 32 deletions

No files matched your search

+22 -14
View File
@@ -1,21 +1,23 @@
<?php
require(__DIR__ . '/DatabaseController.php');
include_once(__DIR__ . '/DatabaseController.php');
class ApiController
{
class ApiController {
/**
* method for pretty jsonsuccess output
*
* @param array $data
* @return string
*/
public function jsonSuccess($data) {
public function jsonSuccess($data)
{
return json_encode(
[
'status' => 'success',
'data' => $data,
],
],
JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE
);
}
@@ -26,13 +28,14 @@ class ApiController {
* @param array $error
* @return string
*/
public function jsonError ($error) {
public function jsonError($error)
{
echo json_encode(
[
'status' => 'failed',
'data' => 'none',
'error' => $error
],
],
JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE
);
}
@@ -42,7 +45,8 @@ class ApiController {
*
* @return array
*/
private function getAuthKey () {
private function getAuthKey()
{
$validTokens = DatabaseShow(
"API_Credentials",
"TOKEN"
@@ -58,7 +62,8 @@ class ApiController {
* @param string $function
* @return void
*/
public function urlAuth ($token, $function = '') {
public function urlAuth($token, $function = '')
{
$validTokens = $this->getAuthKey();
if (!in_array($token, $validTokens)) {
@@ -90,7 +95,8 @@ class ApiController {
return true;
}
public function requestSave($function = '') {
public function requestSave($function = '')
{
DatabaseInsert(
"API_LOGS",
"CLIENT_IP, TOKEN, API, FUNKTION, JSON",
@@ -106,7 +112,8 @@ class ApiController {
* create new api token
*
*/
private function createToken() {
private function createToken()
{
return bin2hex(random_bytes(32));
}
@@ -115,8 +122,9 @@ class ApiController {
*
* @return bool
*/
public function saveToken() {
try {
public function saveToken()
{
try {
DatabaseInsert(
"API_Credentials",
"TOKEN, BENUTZER",
@@ -128,4 +136,4 @@ class ApiController {
}
return true;
}
}
}
+1 -1
View File
@@ -44,7 +44,7 @@ function db_connect() {
]
];
$enviroment = 'vpn';
$enviroment = 'live';
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
+205 -17
View File
@@ -1,10 +1,15 @@
<?php
include_once __DIR__ . '/../controller/DatabaseController.php';
include_once __DIR__ . '/../controller/RoutesController.php';
include_once __DIR__ . '/../modules/ConsoleLog.php';
$conn = db_connect();
$view = $_GET['view'] ?? 'show';
$selectedService = $_GET['service'] ?? null;
$view = $_GET['view'] ?? 'show';
$selectedService = $_GET['service'] ?? null;
// --- Suchfilter auslesen ---
$searchWer = $_GET['search_wer'] ?? '';
$searchWas = $_GET['search_was'] ?? '';
// --- LOGIK: Überstunden-Eintrag (Abbau) speichern ---
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['add_entry'])) {
@@ -14,10 +19,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['add_entry'])) {
$rueckgabe = $_POST['rueckgabe'];
DatabaseInsert(
"Vergabe",
"WAS, WER, WANN, RUECKGABE",
$was,
$wer,
"Vergabe",
"WAS, WER, WANN, RUECKGABE",
$was,
$wer,
$wann,
$rueckgabe
);
@@ -29,16 +34,47 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['add_entry'])) {
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['delete_entry'])) {
$id = $_POST['id'];
DatabaseDelete("Vergabe", "ID = ?", $id);
ConsoleLog("$id");
DatabaseUpdate(
"Vergabe",
"STATUS = ?",
"ID = ?",
1,
$id
);
redirectToWebsite((new getSpecificData())->getReferer());
exit;
}
// --- Dynamic Query mit kombiniertem Suchfilter ---
$whereClause = "STATUS IS NULL";
if (!empty($searchWer)) {
$whereClause .= " AND WER LIKE '%" . $conn->real_escape_string($searchWer) . "%'";
}
if (!empty($searchWas)) {
$whereClause .= " AND WAS LIKE '%" . $conn->real_escape_string($searchWas) . "%'";
}
$entries = DatabaseShow(
"Vergabe"
"Vergabe",
"ID, WAS, WER, WANN, RUECKGABE",
$whereClause
);
$searchEntries = DatabaseShow(
"Vergabe",
);
$existingWas = [];
$existingWer = [];
foreach ($searchEntries as $entry) {
if (!empty($entry['WAS'])) $existingWas[$entry['WAS']] = true;
if (!empty($entry['WER'])) $existingWer[$entry['WER']] = true;
}
$existingWas = array_keys($existingWas);
$existingWer = array_keys($existingWer);
?>
<div class="arbeitsberichte-wrapper">
@@ -55,25 +91,73 @@ $entries = DatabaseShow(
<input type="date" name="rueckgabe" value="<?= date('Y-m-d') ?>" required>
</div>
<div class="form-group">
<div class="form-group autocomplete-wrapper">
<label>An wen</label>
<input type="text" name="wer" placeholder="Name eingeben" required>
<input type="text" name="wer" id="wer-input" placeholder="Name eingeben" required autocomplete="off">
<div class="autocomplete-suggestions" id="wer-suggestions"></div>
</div>
<div class="form-group">
<div class="form-group autocomplete-wrapper">
<label>Was</label>
<input type="text" name="was" placeholder="Gegenstand eingeben" required>
<input type="text" name="was" id="was-input" placeholder="Gegenstand eingeben" required autocomplete="off">
<div class="autocomplete-suggestions" id="was-suggestions"></div>
</div>
<button type="submit" name="add_entry" class="btn-submit-vergabe">
💾 Speichern
Speichern
</button>
</form>
</div>
<div class="vergabe-form" style="margin-top: 30px;">
<form method="GET" action="" class="vergabe-grid" id="search-form">
<input type="hidden" name="view" value="<?= htmlspecialchars($view) ?>">
<?php if ($selectedService): ?>
<input type="hidden" name="service" value="<?= htmlspecialchars($selectedService) ?>">
<?php endif; ?>
<div class="form-group autocomplete-wrapper">
<label for="search-wer-input">Nach Person filtern</label>
<input type="text" name="search_wer" id="search-wer-input" value="<?= htmlspecialchars($searchWer) ?>" placeholder="Name eingeben..." autocomplete="off">
<div class="autocomplete-suggestions" id="search-wer-suggestions"></div>
</div>
<div class="form-group autocomplete-wrapper">
<label for="search-was-input">Nach Gegenstand filtern</label>
<input type="text" name="search_was" id="search-was-input" value="<?= htmlspecialchars($searchWas) ?>" placeholder="Gegenstand eingeben..." autocomplete="off">
<div class="autocomplete-suggestions" id="search-was-suggestions"></div>
</div>
<div style="display: flex; gap: 10px; align-items: flex-end;">
<button type="submit" class="btn-submit-vergabe" style="margin: 0; flex-grow: 1;">
Suchen
</button>
<?php if (!empty($searchWer) || !empty($searchWas)): ?>
<a href="?view=<?= urlencode($view) ?><?= $selectedService ? '&service=' . urlencode($selectedService) : '' ?>" class="btn-delete" style="text-decoration: none; padding: 10px; display: inline-block; text-align: center; white-space: nowrap; margin: 0;">
Zurücksetzen
</a>
<?php endif; ?>
</div>
</form>
</div>
<div class="table-container" style="margin-top: 30px;">
<h3>Aktuelle Vergaben</h3>
<h3>
<?php
if (!empty($searchWer) && !empty($searchWas)) {
echo "Gefiltert nach: " . htmlspecialchars($searchWer) . " ➔ " . htmlspecialchars($searchWas);
} elseif (!empty($searchWer)) {
echo "Vergaben für: " . htmlspecialchars($searchWer);
} elseif (!empty($searchWas)) {
echo "Ausgeliehene Gegenstände: " . htmlspecialchars($searchWas);
} else {
echo "Aktuelle Vergaben";
}
?>
</h3>
<?php if (!empty($entries)): ?>
<table class="db-table mobile-responsive-table">
<thead>
@@ -96,7 +180,7 @@ $entries = DatabaseShow(
<form method="POST" onsubmit="return confirm('Möchtest du diesen Eintrag wirklich löschen?');" style="margin: 0;">
<input type="hidden" name="id" value="<?= $entry['ID'] ?? '' ?>">
<button type="submit" name="delete_entry" class="btn-delete">
🗑️ Löschen
Löschen
</button>
</form>
</td>
@@ -108,4 +192,108 @@ $entries = DatabaseShow(
<p>Keine Einträge vorhanden.</p>
<?php endif; ?>
</div>
</div>
</div>
<script>
// Parameter `submitOnSelect` hinzugefügt (Standard: false)
function setupAutocomplete(inputId, suggestionsId, data, submitOnSelect = false) {
const input = document.getElementById(inputId);
const box = document.getElementById(suggestionsId);
if (!input || !box) return;
let items = [];
let activeIndex = -1;
function render(list) {
box.innerHTML = '';
items = list;
activeIndex = -1;
if (list.length === 0) {
box.style.display = 'none';
return;
}
list.forEach((val, i) => {
const div = document.createElement('div');
div.textContent = val;
div.addEventListener('mousedown', (e) => {
e.preventDefault();
selectItem(i);
});
box.appendChild(div);
});
box.style.display = 'block';
}
function updateActive() {
[...box.children].forEach((el, i) => {
el.classList.toggle('active', i === activeIndex);
});
if (activeIndex >= 0) {
box.children[activeIndex].scrollIntoView({
block: 'nearest'
});
}
}
function selectItem(i) {
if (items[i] !== undefined) {
input.value = items[i];
}
box.style.display = 'none';
activeIndex = -1;
// NEU: Wenn gewünscht, schicke das übergeordnete Formular sofort ab
if (submitOnSelect) {
const form = input.closest('form');
if (form) form.submit();
}
}
input.addEventListener('input', () => {
const val = input.value.toLowerCase();
if (val.length === 0) {
box.style.display = 'none';
return;
}
const filtered = data.filter(d => d.toLowerCase().includes(val));
render(filtered);
});
input.addEventListener('keydown', (e) => {
if (box.style.display !== 'block') return;
if (e.key === 'ArrowDown') {
e.preventDefault();
activeIndex = Math.min(activeIndex + 1, items.length - 1);
updateActive();
} else if (e.key === 'ArrowUp') {
e.preventDefault();
activeIndex = Math.max(activeIndex - 1, 0);
updateActive();
} else if (e.key === 'Tab' || e.key === 'Enter') {
if (activeIndex >= 0) {
e.preventDefault();
selectItem(activeIndex);
} else {
box.style.display = 'none';
}
} else if (e.key === 'Escape') {
box.style.display = 'none';
}
});
document.addEventListener('click', (e) => {
if (e.target !== input) {
box.style.display = 'none';
}
});
}
// 1. Normales Autocomplete für das Eintragungs-Formular (schickt nicht automatisch ab)
setupAutocomplete('was-input', 'was-suggestions', <?= json_encode($existingWas) ?>);
setupAutocomplete('wer-input', 'wer-suggestions', <?= json_encode($existingWer) ?>);
// 2. Such-Autocomplete: Hier wird als 4. Parameter `true` übergeben, damit sofort abgesendet wird!
setupAutocomplete('search-wer-input', 'search-wer-suggestions', <?= json_encode($existingWer) ?>, true);
setupAutocomplete('search-was-input', 'search-was-suggestions', <?= json_encode($existingWas) ?>, true);
</script>
+35
View File
@@ -1401,4 +1401,39 @@ body.dark-mode .berichte-form input:focus {
margin: 15px;
padding: 20px;
}
}
.autocomplete-wrapper {
position: relative;
}
.autocomplete-suggestions {
display: none;
position: absolute;
top: 100%;
left: 0;
right: 0;
background: var(--card-bg);
color: var(--text);
border: 1px solid var(--input-border);
border-top: none;
max-height: 180px;
overflow-y: auto;
z-index: 1000;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.autocomplete-suggestions div {
padding: 8px 10px;
cursor: pointer;
}
.autocomplete-suggestions div:hover,
.autocomplete-suggestions div.active {
background: rgba(0, 123, 255, 0.15);
}
body.dark-mode .autocomplete-suggestions div:hover,
body.dark-mode .autocomplete-suggestions div.active {
background: rgba(0, 123, 255, 0.25);
}
+40
View File
@@ -0,0 +1,40 @@
#!/bin/bash
set -e
echo "Starte automatischen Merge- und Tag-Prozess..."
git config core.filemode false
echo "Aktualisiere lokale Branches vom Remote..."
git fetch --all --quiet
echo "Wechsle zu main..."
git checkout main --quiet
git pull origin main --quiet
echo "Merge: main -> dev..."
git checkout dev --quiet
git pull origin dev --quiet || true
git merge main --no-ff -m "Automated merge from main to dev" --quiet
git push origin dev --quiet
echo "Merge: dev -> live..."
git checkout live --quiet
git pull origin live --quiet || true
git merge dev --no-ff -m "Automated merge from dev to live" --quiet
git push origin live --quiet
TAG_NAME="v$(date +'%Y.%m.%d-%H%M')"
echo " Erstelle Tag: $TAG_NAME..."
git tag -a "$TAG_NAME" -m "Automated release tag $TAG_NAME"
git push origin "$TAG_NAME" --quiet
git checkout main --quiet
echo ""
echo "========================================================"
echo "✅ FERTIG! Alles sauber durchgelaufen."
echo "📦 Neuer Release-Tag gepusht: $TAG_NAME"
echo "========================================================"