Quellcode durchsuchen

Further Block Updates

Benjamin Harris vor 2 Monaten
Ursprung
Commit
afdc3dbeb7
2 geänderte Dateien mit 5 neuen und 2 gelöschten Zeilen
  1. 4 1
      dashboard/crop-cards/block-detail.php
  2. 1 1
      dashboard/crop-cards/index.php

+ 4 - 1
dashboard/crop-cards/block-detail.php

@@ -1,4 +1,6 @@
 <?php
+error_reporting(E_ALL);
+ini_set('display_errors', 1);
 /**
  * dashboard/crop-cards/block-detail.php
  *
@@ -58,10 +60,11 @@ $stmtCrops->execute([$userId, $block['block_id']]);
 $crops = $stmtCrops->fetchAll(PDO::FETCH_COLUMN);
 
 // ── Recent soil tests ─────────────────────────────────────────────────────────
+// Linked via site_id until migration 003 adds/confirms block_id column
 $stmtSoil = $pdo->prepare(
     'SELECT id, rand, date, site_id, analysis_type, crop_type, client_name
      FROM soil_records
-     WHERE modx_user_id = ? AND block_id = ?
+     WHERE modx_user_id = ? AND site_id = ?
      ORDER BY date DESC LIMIT 5'
 );
 $stmtSoil->execute([$userId, $block['block_id']]);

+ 1 - 1
dashboard/crop-cards/index.php

@@ -120,7 +120,7 @@ include __DIR__ . '/../../layouts/navbar.php';
                     </div><!-- /col: left panel -->
 
                     <!-- ── Block list ───────────────────────────────────────── -->
-                    <div class="col-12 col-md-9">
+                    <div class="col">
 
                         <div class="row mb-3">
                             <div class="col">