]> _ Git - fluidbook-toolbox.git/commitdiff
wait #7513 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 9 May 2025 15:27:23 +0000 (17:27 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 9 May 2025 15:27:23 +0000 (17:27 +0200)
app/Http/Controllers/Admin/Operations/FluidbookPublication/Services/PumaOperation.php

index dda9e90152824f29cdbeeb807a4cf5047ebc193d..76a4fc260ecd6e7cc7c568a7ea5954c23f7ab06d 100644 (file)
@@ -33,7 +33,7 @@ trait PumaOperation
             return response()->download($tmp, $filename . '.pdf')->deleteFileAfterSend(true);
         }
 
-        $bottomStrings = ['shorts', 'pants'];
+        $bottomStrings = ['shorts', 'pants', 'tights'];
 
         $references = explode(',', $references);
         /** @var FluidbookPublication $book */
@@ -48,14 +48,14 @@ trait PumaOperation
 
             $r[$reference] = $data;
             $title = trim(trim($data['Catégorie'] ?? '') . ' ' . trim($data['RBU'] ?? ''));
-            $subtitle = trim(trim($data['Age Group'] ?? '') . ' - ' . $data['Gender'] . ' - ' . trim($data['Product Line'] ?? ''), '- ');
+            $subtitle = trim(trim($data['Age Group'] ?? '') . ' - ' . $data['Genre'] . ' - ' . trim($data['Product Line'] ?? ''), '- ');
             $key = md5($title . $subtitle);
             if (!isset($planches[$key])) {
                 $planches[$key] = ['class' => $data['Catégorie'], 'title' => $title, 'subtitle' => $subtitle, 'groups' => ['top' => [], 'bottom' => []]];
             }
             $group = 'top';
             foreach ($bottomStrings as $str) {
-                if (stristr($data['Article Type'], $str)) {
+                if (stristr($data['Article Type'], $str) !== false) {
                     $group = 'bottom';
                     break;
                 }
@@ -81,7 +81,7 @@ trait PumaOperation
                 if (!count($products)) {
                     continue;
                 }
-                $lines= array_merge($lines, array_chunk($products, $cols, true));;;
+                $lines = array_merge($lines, array_chunk($products, $cols, true));;;
             }
 
             $subs = array_chunk($lines, $rows, true);