Fix: SQL-Fehler in Artikelliste, Weiterleitungsfehler in Lagerorten und Header-Positionierung in Packlisten-Editor behoben
All checks were successful
Docker Build & Push / build-and-push (push) Successful in 34s

This commit is contained in:
Gemini
2026-05-15 15:28:08 +00:00
parent dcab9447d3
commit 7a7b2fe67e
3 changed files with 22 additions and 4 deletions

View File

@@ -121,8 +121,8 @@ $stmt_man_load->execute();
$manufacturers_for_filter = $stmt_man_load->get_result()->fetch_all(MYSQLI_ASSOC);
$stmt_man_load->close();
$stmt_loc_load = $conn->prepare("SELECT id, name FROM storage_locations WHERE user_id IN ($placeholders) OR household_id = ? ORDER BY name ASC");
$stmt_loc_load->bind_param($all_types, ...$all_params);
$stmt_loc_load = $conn->prepare("SELECT id, name FROM storage_locations WHERE user_id IN ($placeholders) ORDER BY name ASC");
$stmt_loc_load->bind_param($types, ...$household_member_ids);
$stmt_loc_load->execute();
$storage_locations_for_bulk = $stmt_loc_load->get_result()->fetch_all(MYSQLI_ASSOC);
$stmt_loc_load->close();

View File

@@ -10,7 +10,6 @@ if (!isset($_SESSION['user_id'])) {
exit;
}
require_once 'db_connect.php';
require_once 'header.php';
$current_user_id = $_SESSION['user_id'];
$packing_list_id = isset($_GET['id']) ? intval($_GET['id']) : 0;
@@ -49,6 +48,8 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['empty_table'])) {
exit;
}
require_once 'header.php';
$col_class_lager = ($phase == 1) ? 'col-phase1-lager' : (($phase == 2) ? 'd-none' : 'col-lg-4');
$col_class_table = ($phase == 1) ? 'col-phase1-table' : (($phase == 2) ? 'col-lg-6' : 'col-lg-4');
$col_class_rucksack = ($phase == 2) ? 'col-lg-6' : (($phase == 1) ? 'd-none' : 'col-lg-4');
@@ -279,8 +280,11 @@ $conn->close();
<!-- TISCH -->
<div class="<?php echo $col_class_table; ?> h-100" id="pane-table">
<div class="card h-100 border-info d-flex flex-column shadow-sm">
<div class="card-header bg-info text-white flex-shrink-0">
<div class="card-header bg-info text-white flex-shrink-0 d-flex justify-content-between align-items-center py-2">
<h5 class="mb-0"><i class="fas fa-table me-2"></i>Auf dem Tisch</h5>
<form method="post" onsubmit="return confirm('Möchtest du wirklich alle Artikel, die auf dem Tisch liegen, wieder ins Lager räumen?');" style="margin:0;">
<button type="submit" name="empty_table" class="btn btn-sm btn-outline-light" title="Tisch leeren"><i class="fas fa-broom"></i></button>
</form>
</div>
<div class="card-body pane-content table-nested-sortable flex-grow-1" id="table-container" data-carrier-id="null" style="overflow-y: auto;">
<!-- Items dropped here get carrier_id=null -->

View File

@@ -13,6 +13,20 @@ if (!isset($_SESSION['user_id'])) {
}
require_once 'db_connect.php';
// AKTION: BARCODE GENERIEREN
if (isset($_GET['action']) && $_GET['action'] == 'generate_barcode' && isset($_GET['id'])) {
$location_id = intval($_GET['id']);
$token = bin2hex(random_bytes(16));
$stmt_token = $conn->prepare("UPDATE storage_locations SET public_token = ? WHERE id = ? AND user_id IN ($placeholders)");
$all_params = array_merge([$token, $location_id], $household_member_ids);
$all_types = 'si' . $types;
$stmt_token->bind_param($all_types, ...$all_params);
$stmt_token->execute();
$stmt_token->close();
header("Location: storage_locations.php");
exit;
}
require_once 'header.php';
$current_user_id = $_SESSION['user_id'];