diff --git a/app/Http/Controllers/CardController.php b/app/Http/Controllers/CardController.php index 2986514..4551922 100644 --- a/app/Http/Controllers/CardController.php +++ b/app/Http/Controllers/CardController.php @@ -57,11 +57,14 @@ class CardController extends Controller ]); } - public function cartResult() + public function freeCartResult($id) { - return Inertia::render('cards/resultat', [ + $card = $this->cardRepository->find($id); - ]); + return response()->json([ + 'success' => true, + 'cards' => $card, + ]); } } diff --git a/app/Http/Controllers/CardImportController.php b/app/Http/Controllers/CardImportController.php new file mode 100644 index 0000000..d2a13f0 --- /dev/null +++ b/app/Http/Controllers/CardImportController.php @@ -0,0 +1,37 @@ +validate([ +'csv' => 'required|file|mimetypes:text/plain,text/csv,application/vnd.ms-excel,application/csv,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'delimiter' => 'nullable|string|in:;,|,', + 'dry_run' => 'nullable|boolean', + ]); + + $delimiter = $request->input('delimiter', ','); + $dryRun = $request->boolean('dry_run', false); + + $path = $request->file('csv')->store('imports'); + $fullPath = Storage::path($path); + + $importer = new CardCsvImporter(); + [$inserted, $updated, $skipped] = $importer->import($fullPath, $delimiter, $dryRun); + + return response()->json([ + 'inserted' => $inserted, + 'updated' => $updated, + 'skipped' => $skipped, + 'dry_run' => $dryRun, + 'path' => $path, + ]); + } +} + diff --git a/app/Support/CardCsvImporter.php b/app/Support/CardCsvImporter.php new file mode 100644 index 0000000..d5762fa --- /dev/null +++ b/app/Support/CardCsvImporter.php @@ -0,0 +1,151 @@ +readRows($file, $delimiter); + if (empty($headers)) { + return [0, 0, 0]; + } + + // Normalize headers (lowercase, trimmed, remove BOM) + $headers = array_map(function ($h) { + $h = (string) ($h ?? ''); + $h = preg_replace('/^\xEF\xBB\xBF/', '', $h); // strip UTF-8 BOM + return strtolower(trim($h)); + }, $headers); + + $idx = array_flip($headers); + + $nameKey = array_key_exists('name', $idx) ? 'name' : (array_key_exists('title', $idx) ? 'title' : null); + if (!$nameKey) { + throw new \RuntimeException('CSV must contain a "name" or "title" header.'); + } + + $get = function (array $row, string $key) use ($idx): ?string { + if (!array_key_exists($key, $idx)) return null; + $value = $row[$idx[$key]] ?? null; + return is_string($value) ? trim($value) : (is_null($value) ? null : trim((string) $value)); + }; + + $inserted = 0; + $updated = 0; + $skipped = 0; + + foreach ($rows as $row) { + if (!is_array($row)) continue; + if (count(array_filter($row, fn($v) => $v !== null && $v !== '')) === 0) continue; + + $name = $get($row, $nameKey); + if (!$name) { $skipped++; continue; } + + $payload = [ + 'description_upright' => (string) ($get($row, 'description_upright') ?? ''), + 'description_reversed' => (string) ($get($row, 'description_reversed') ?? ''), + 'image_url' => $get($row, 'image_url') ?: null, + 'symbolism' => $this->parseSymbolism($get($row, 'symbolism')), + ]; + + if ($dryRun) { + continue; + } + + $existing = Card::where('name', $name)->first(); + if ($existing) { + $existing->fill($payload)->save(); + $updated++; + } else { + Card::create(array_merge(['name' => $name], $payload)); + $inserted++; + } + } + + return [$inserted, $updated, $skipped]; + } + + /** + * Read headers and rows from CSV or XLSX. + * @return array{0: array, 1: array>>} + */ + private function readRows(string $file, string $delimiter): array + { + $ext = strtolower(pathinfo($file, PATHINFO_EXTENSION)); + if (in_array($ext, ['xlsx', 'xls', 'ods'])) { + if (!class_exists('PhpOffice\\PhpSpreadsheet\\IOFactory')) { + throw new \RuntimeException('XLSX import requires phpoffice/phpspreadsheet. Run: composer require phpoffice/phpspreadsheet'); + } + /** @var \PhpOffice\PhpSpreadsheet\Spreadsheet $spreadsheet */ + $spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load($file); + $sheet = $spreadsheet->getActiveSheet(); + $data = $sheet->toArray(null, true, true, false); // rows of arrays + if (empty($data)) return [[], []]; + $headers = array_map(fn($v) => is_string($v) ? $v : (is_null($v) ? '' : (string) $v), array_shift($data)); + $rows = array_map(function ($row) use ($headers) { + // Normalize row length to headers length + $row = array_map(fn($v) => is_string($v) ? $v : (is_null($v) ? null : (string) $v), $row); + if (count($row) < count($headers)) { + $row = array_pad($row, count($headers), null); + } elseif (count($row) > count($headers)) { + $row = array_slice($row, 0, count($headers)); + } + return $row; + }, $data); + return [$headers, $rows]; + } + + // Default: treat as CSV/TSV/plain text + $csv = new \SplFileObject($file, 'r'); + $csv->setFlags(\SplFileObject::READ_CSV | \SplFileObject::SKIP_EMPTY | \SplFileObject::DROP_NEW_LINE); + $csv->setCsvControl($delimiter); + + if ($csv->eof()) return [[], []]; + $headers = $csv->fgetcsv(); + if (!$headers || !is_array($headers)) return [[], []]; + $headers = array_map(fn($h) => is_string($h) ? $h : (is_null($h) ? '' : (string) $h), $headers); + + $rows = []; + foreach ($csv as $row) { + if (!is_array($row)) continue; + $rows[] = $row; + } + return [$headers, $rows]; + } + + /** + * Parse symbolism string into an array suitable for the Card::casts ['symbolism' => 'array']. + * Accepts JSON arrays or delimited strings (separated by ;, |, •, or ,). + */ + public function parseSymbolism(?string $raw): array + { + $raw = trim((string) $raw); + if ($raw === '') return []; + + // Try JSON first + if (str_starts_with($raw, '[') || str_starts_with($raw, '{')) { + $decoded = json_decode($raw, true); + if (json_last_error() === JSON_ERROR_NONE) { + if (is_array($decoded)) return array_values($decoded); + return []; + } + } + + $parts = preg_split('/[;|•,]+/u', $raw); + $parts = array_map(fn($s) => trim($s), $parts); + $parts = array_filter($parts, fn($s) => $s !== ''); + return array_values($parts); + } +} + diff --git a/composer.json b/composer.json index f5fa78e..b305086 100644 --- a/composer.json +++ b/composer.json @@ -16,6 +16,7 @@ "laravel/sanctum": "^4.0", "laravel/tinker": "^2.10.1", "laravel/wayfinder": "^0.1.9", + "phpoffice/phpspreadsheet": "^5.1", "stripe/stripe-php": "^17.6" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 8df39ca..a43d723 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "748c4d7177ae376a830b7c336264affd", + "content-hash": "1d6b8072efd73299b27b98a022bb547d", "packages": [ { "name": "brick/math", @@ -135,6 +135,85 @@ ], "time": "2024-02-09T16:56:22+00:00" }, + { + "name": "composer/pcre", + "version": "3.3.2", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e", + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<1.11.10" + }, + "require-dev": { + "phpstan/phpstan": "^1.12 || ^2", + "phpstan/phpstan-strict-rules": "^1 || ^2", + "phpunit/phpunit": "^8 || ^9" + }, + "type": "library", + "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] + }, + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.3.2" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-11-12T16:29:46+00:00" + }, { "name": "dflydev/dot-access-data", "version": "v3.0.3", @@ -2203,6 +2282,191 @@ ], "time": "2024-12-08T08:18:47+00:00" }, + { + "name": "maennchen/zipstream-php", + "version": "3.2.0", + "source": { + "type": "git", + "url": "https://github.com/maennchen/ZipStream-PHP.git", + "reference": "9712d8fa4cdf9240380b01eb4be55ad8dcf71416" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/9712d8fa4cdf9240380b01eb4be55ad8dcf71416", + "reference": "9712d8fa4cdf9240380b01eb4be55ad8dcf71416", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "ext-zlib": "*", + "php-64bit": "^8.3" + }, + "require-dev": { + "brianium/paratest": "^7.7", + "ext-zip": "*", + "friendsofphp/php-cs-fixer": "^3.16", + "guzzlehttp/guzzle": "^7.5", + "mikey179/vfsstream": "^1.6", + "php-coveralls/php-coveralls": "^2.5", + "phpunit/phpunit": "^12.0", + "vimeo/psalm": "^6.0" + }, + "suggest": { + "guzzlehttp/psr7": "^2.4", + "psr/http-message": "^2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "ZipStream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paul Duncan", + "email": "pabs@pablotron.org" + }, + { + "name": "Jonatan Männchen", + "email": "jonatan@maennchen.ch" + }, + { + "name": "Jesse Donat", + "email": "donatj@gmail.com" + }, + { + "name": "András Kolesár", + "email": "kolesar@kolesar.hu" + } + ], + "description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.", + "keywords": [ + "stream", + "zip" + ], + "support": { + "issues": "https://github.com/maennchen/ZipStream-PHP/issues", + "source": "https://github.com/maennchen/ZipStream-PHP/tree/3.2.0" + }, + "funding": [ + { + "url": "https://github.com/maennchen", + "type": "github" + } + ], + "time": "2025-07-17T11:15:13+00:00" + }, + { + "name": "markbaker/complex", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPComplex.git", + "reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/95c56caa1cf5c766ad6d65b6344b807c1e8405b9", + "reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "phpcompatibility/php-compatibility": "^9.3", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "squizlabs/php_codesniffer": "^3.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Complex\\": "classes/src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with complex numbers", + "homepage": "https://github.com/MarkBaker/PHPComplex", + "keywords": [ + "complex", + "mathematics" + ], + "support": { + "issues": "https://github.com/MarkBaker/PHPComplex/issues", + "source": "https://github.com/MarkBaker/PHPComplex/tree/3.0.2" + }, + "time": "2022-12-06T16:21:08+00:00" + }, + { + "name": "markbaker/matrix", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPMatrix.git", + "reference": "728434227fe21be27ff6d86621a1b13107a2562c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/728434227fe21be27ff6d86621a1b13107a2562c", + "reference": "728434227fe21be27ff6d86621a1b13107a2562c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "phpcompatibility/php-compatibility": "^9.3", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "^4.0", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "sebastian/phpcpd": "^4.0", + "squizlabs/php_codesniffer": "^3.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Matrix\\": "classes/src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@demon-angel.eu" + } + ], + "description": "PHP Class for working with matrices", + "homepage": "https://github.com/MarkBaker/PHPMatrix", + "keywords": [ + "mathematics", + "matrix", + "vector" + ], + "support": { + "issues": "https://github.com/MarkBaker/PHPMatrix/issues", + "source": "https://github.com/MarkBaker/PHPMatrix/tree/3.0.1" + }, + "time": "2022-12-02T22:17:43+00:00" + }, { "name": "monolog/monolog", "version": "3.9.0", @@ -2707,6 +2971,112 @@ ], "time": "2025-05-08T08:14:37+00:00" }, + { + "name": "phpoffice/phpspreadsheet", + "version": "5.1.0", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", + "reference": "fd26e45a814e94ae2aad0df757d9d1739c4bf2e0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/fd26e45a814e94ae2aad0df757d9d1739c4bf2e0", + "reference": "fd26e45a814e94ae2aad0df757d9d1739c4bf2e0", + "shasum": "" + }, + "require": { + "composer/pcre": "^1||^2||^3", + "ext-ctype": "*", + "ext-dom": "*", + "ext-fileinfo": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-xml": "*", + "ext-xmlreader": "*", + "ext-xmlwriter": "*", + "ext-zip": "*", + "ext-zlib": "*", + "maennchen/zipstream-php": "^2.1 || ^3.0", + "markbaker/complex": "^3.0", + "markbaker/matrix": "^3.0", + "php": "^8.1", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0", + "psr/simple-cache": "^1.0 || ^2.0 || ^3.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-main", + "dompdf/dompdf": "^2.0 || ^3.0", + "friendsofphp/php-cs-fixer": "^3.2", + "mitoteam/jpgraph": "^10.3", + "mpdf/mpdf": "^8.1.1", + "phpcompatibility/php-compatibility": "^9.3", + "phpstan/phpstan": "^1.1 || ^2.0", + "phpstan/phpstan-deprecation-rules": "^1.0 || ^2.0", + "phpstan/phpstan-phpunit": "^1.0 || ^2.0", + "phpunit/phpunit": "^10.5", + "squizlabs/php_codesniffer": "^3.7", + "tecnickcom/tcpdf": "^6.5" + }, + "suggest": { + "dompdf/dompdf": "Option for rendering PDF with PDF Writer", + "ext-intl": "PHP Internationalization Functions", + "mitoteam/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers", + "mpdf/mpdf": "Option for rendering PDF with PDF Writer", + "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer" + }, + "type": "library", + "autoload": { + "psr-4": { + "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maarten Balliauw", + "homepage": "https://blog.maartenballiauw.be" + }, + { + "name": "Mark Baker", + "homepage": "https://markbakeruk.net" + }, + { + "name": "Franck Lefevre", + "homepage": "https://rootslabs.net" + }, + { + "name": "Erik Tilt" + }, + { + "name": "Adrien Crivelli" + } + ], + "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "homepage": "https://github.com/PHPOffice/PhpSpreadsheet", + "keywords": [ + "OpenXML", + "excel", + "gnumeric", + "ods", + "php", + "spreadsheet", + "xls", + "xlsx" + ], + "support": { + "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/5.1.0" + }, + "time": "2025-09-04T05:34:49+00:00" + }, { "name": "phpoption/phpoption", "version": "1.9.4", diff --git a/database/migrations/2025_09_15_160509_add_column_description_cards.php b/database/migrations/2025_09_15_160509_add_column_description_cards.php new file mode 100644 index 0000000..1df0f61 --- /dev/null +++ b/database/migrations/2025_09_15_160509_add_column_description_cards.php @@ -0,0 +1,29 @@ +string('description')->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('cards', function (Blueprint $table) { + // Remove the cards column + $table->dropColumn('description'); + }); + } +}; diff --git a/public/cards/10.png b/public/cards/10.png new file mode 100644 index 0000000..f104d5d Binary files /dev/null and b/public/cards/10.png differ diff --git a/public/cards/11.png b/public/cards/11.png new file mode 100644 index 0000000..f5d0e5f Binary files /dev/null and b/public/cards/11.png differ diff --git a/public/cards/12.png b/public/cards/12.png new file mode 100644 index 0000000..8d1ae6c Binary files /dev/null and b/public/cards/12.png differ diff --git a/public/cards/13.png b/public/cards/13.png new file mode 100644 index 0000000..89f332a Binary files /dev/null and b/public/cards/13.png differ diff --git a/public/cards/14.png b/public/cards/14.png new file mode 100644 index 0000000..2926a62 Binary files /dev/null and b/public/cards/14.png differ diff --git a/public/cards/15.png b/public/cards/15.png new file mode 100644 index 0000000..d765b68 Binary files /dev/null and b/public/cards/15.png differ diff --git a/public/cards/16.png b/public/cards/16.png new file mode 100644 index 0000000..39a34e7 Binary files /dev/null and b/public/cards/16.png differ diff --git a/public/cards/17.png b/public/cards/17.png new file mode 100644 index 0000000..dfdf505 Binary files /dev/null and b/public/cards/17.png differ diff --git a/public/cards/18.png b/public/cards/18.png new file mode 100644 index 0000000..ede11f2 Binary files /dev/null and b/public/cards/18.png differ diff --git a/public/cards/19.png b/public/cards/19.png new file mode 100644 index 0000000..9049a5f Binary files /dev/null and b/public/cards/19.png differ diff --git a/public/cards/20.png b/public/cards/20.png new file mode 100644 index 0000000..6a2f2c8 Binary files /dev/null and b/public/cards/20.png differ diff --git a/public/cards/21.png b/public/cards/21.png new file mode 100644 index 0000000..b8e3b88 Binary files /dev/null and b/public/cards/21.png differ diff --git a/public/cards/22.png b/public/cards/22.png new file mode 100644 index 0000000..ade3297 Binary files /dev/null and b/public/cards/22.png differ diff --git a/public/cards/23.png b/public/cards/23.png new file mode 100644 index 0000000..d9c83ad Binary files /dev/null and b/public/cards/23.png differ diff --git a/public/cards/24.png b/public/cards/24.png new file mode 100644 index 0000000..2a0792c Binary files /dev/null and b/public/cards/24.png differ diff --git a/public/cards/25.png b/public/cards/25.png new file mode 100644 index 0000000..77c2fb0 Binary files /dev/null and b/public/cards/25.png differ diff --git a/public/cards/26.png b/public/cards/26.png new file mode 100644 index 0000000..1fd28cc Binary files /dev/null and b/public/cards/26.png differ diff --git a/public/cards/27.png b/public/cards/27.png new file mode 100644 index 0000000..79c943f Binary files /dev/null and b/public/cards/27.png differ diff --git a/public/cards/28.png b/public/cards/28.png new file mode 100644 index 0000000..8926fb4 Binary files /dev/null and b/public/cards/28.png differ diff --git a/public/cards/29.png b/public/cards/29.png new file mode 100644 index 0000000..c206032 Binary files /dev/null and b/public/cards/29.png differ diff --git a/public/cards/30.png b/public/cards/30.png new file mode 100644 index 0000000..98b9c4d Binary files /dev/null and b/public/cards/30.png differ diff --git a/public/cards/31.png b/public/cards/31.png new file mode 100644 index 0000000..2cc70b7 Binary files /dev/null and b/public/cards/31.png differ diff --git a/public/cards/32.png b/public/cards/32.png new file mode 100644 index 0000000..292e02a Binary files /dev/null and b/public/cards/32.png differ diff --git a/public/cards/33.png b/public/cards/33.png new file mode 100644 index 0000000..a28eb15 Binary files /dev/null and b/public/cards/33.png differ diff --git a/public/cards/34.png b/public/cards/34.png new file mode 100644 index 0000000..be3e0ad Binary files /dev/null and b/public/cards/34.png differ diff --git a/public/cards/35.png b/public/cards/35.png new file mode 100644 index 0000000..35692e6 Binary files /dev/null and b/public/cards/35.png differ diff --git a/public/cards/36.png b/public/cards/36.png new file mode 100644 index 0000000..5ca27ab Binary files /dev/null and b/public/cards/36.png differ diff --git a/public/cards/37.png b/public/cards/37.png new file mode 100644 index 0000000..660a0c0 Binary files /dev/null and b/public/cards/37.png differ diff --git a/public/cards/38.png b/public/cards/38.png new file mode 100644 index 0000000..4b12165 Binary files /dev/null and b/public/cards/38.png differ diff --git a/public/cards/39.png b/public/cards/39.png new file mode 100644 index 0000000..84c8140 Binary files /dev/null and b/public/cards/39.png differ diff --git a/public/cards/40.png b/public/cards/40.png new file mode 100644 index 0000000..b7096ec Binary files /dev/null and b/public/cards/40.png differ diff --git a/public/cards/41.png b/public/cards/41.png new file mode 100644 index 0000000..2360ce5 Binary files /dev/null and b/public/cards/41.png differ diff --git a/public/cards/42.png b/public/cards/42.png new file mode 100644 index 0000000..ed0cf2d Binary files /dev/null and b/public/cards/42.png differ diff --git a/public/cards/43.png b/public/cards/43.png new file mode 100644 index 0000000..10200e8 Binary files /dev/null and b/public/cards/43.png differ diff --git a/public/cards/44.png b/public/cards/44.png new file mode 100644 index 0000000..5b8f42f Binary files /dev/null and b/public/cards/44.png differ diff --git a/public/cards/45.png b/public/cards/45.png new file mode 100644 index 0000000..efce8d4 Binary files /dev/null and b/public/cards/45.png differ diff --git a/public/cards/46.png b/public/cards/46.png new file mode 100644 index 0000000..c677286 Binary files /dev/null and b/public/cards/46.png differ diff --git a/public/cards/47.png b/public/cards/47.png new file mode 100644 index 0000000..168caee Binary files /dev/null and b/public/cards/47.png differ diff --git a/public/cards/48.png b/public/cards/48.png new file mode 100644 index 0000000..6efe399 Binary files /dev/null and b/public/cards/48.png differ diff --git a/public/cards/49.png b/public/cards/49.png new file mode 100644 index 0000000..4801755 Binary files /dev/null and b/public/cards/49.png differ diff --git a/public/cards/5.png b/public/cards/5.png new file mode 100644 index 0000000..6e06d1c Binary files /dev/null and b/public/cards/5.png differ diff --git a/public/cards/50.png b/public/cards/50.png new file mode 100644 index 0000000..1b11845 Binary files /dev/null and b/public/cards/50.png differ diff --git a/public/cards/51.png b/public/cards/51.png new file mode 100644 index 0000000..01b0deb Binary files /dev/null and b/public/cards/51.png differ diff --git a/public/cards/52.png b/public/cards/52.png new file mode 100644 index 0000000..81badd9 Binary files /dev/null and b/public/cards/52.png differ diff --git a/public/cards/53.png b/public/cards/53.png new file mode 100644 index 0000000..f3decdb Binary files /dev/null and b/public/cards/53.png differ diff --git a/public/cards/54.png b/public/cards/54.png new file mode 100644 index 0000000..18fb34f Binary files /dev/null and b/public/cards/54.png differ diff --git a/public/cards/55.png b/public/cards/55.png new file mode 100644 index 0000000..25d797e Binary files /dev/null and b/public/cards/55.png differ diff --git a/public/cards/56.png b/public/cards/56.png new file mode 100644 index 0000000..957f6ed Binary files /dev/null and b/public/cards/56.png differ diff --git a/public/cards/57.png b/public/cards/57.png new file mode 100644 index 0000000..9d41458 Binary files /dev/null and b/public/cards/57.png differ diff --git a/public/cards/58.png b/public/cards/58.png new file mode 100644 index 0000000..9ef3749 Binary files /dev/null and b/public/cards/58.png differ diff --git a/public/cards/59.png b/public/cards/59.png new file mode 100644 index 0000000..455e6fa Binary files /dev/null and b/public/cards/59.png differ diff --git a/public/cards/6.png b/public/cards/6.png new file mode 100644 index 0000000..244466a Binary files /dev/null and b/public/cards/6.png differ diff --git a/public/cards/60.png b/public/cards/60.png new file mode 100644 index 0000000..d26c29c Binary files /dev/null and b/public/cards/60.png differ diff --git a/public/cards/61.png b/public/cards/61.png new file mode 100644 index 0000000..c9052dd Binary files /dev/null and b/public/cards/61.png differ diff --git a/public/cards/62.png b/public/cards/62.png new file mode 100644 index 0000000..776775e Binary files /dev/null and b/public/cards/62.png differ diff --git a/public/cards/63.png b/public/cards/63.png new file mode 100644 index 0000000..2f0bc5a Binary files /dev/null and b/public/cards/63.png differ diff --git a/public/cards/64.png b/public/cards/64.png new file mode 100644 index 0000000..fe2040f Binary files /dev/null and b/public/cards/64.png differ diff --git a/public/cards/65.png b/public/cards/65.png new file mode 100644 index 0000000..dcc20b2 Binary files /dev/null and b/public/cards/65.png differ diff --git a/public/cards/66.png b/public/cards/66.png new file mode 100644 index 0000000..06f4071 Binary files /dev/null and b/public/cards/66.png differ diff --git a/public/cards/67.png b/public/cards/67.png new file mode 100644 index 0000000..5477b5d Binary files /dev/null and b/public/cards/67.png differ diff --git a/public/cards/68.png b/public/cards/68.png new file mode 100644 index 0000000..3585b2b Binary files /dev/null and b/public/cards/68.png differ diff --git a/public/cards/69.png b/public/cards/69.png new file mode 100644 index 0000000..d95deec Binary files /dev/null and b/public/cards/69.png differ diff --git a/public/cards/7.png b/public/cards/7.png new file mode 100644 index 0000000..d6be315 Binary files /dev/null and b/public/cards/7.png differ diff --git a/public/cards/70.png b/public/cards/70.png new file mode 100644 index 0000000..78a31f8 Binary files /dev/null and b/public/cards/70.png differ diff --git a/public/cards/71.png b/public/cards/71.png new file mode 100644 index 0000000..b27dd52 Binary files /dev/null and b/public/cards/71.png differ diff --git a/public/cards/72.png b/public/cards/72.png new file mode 100644 index 0000000..68b114d Binary files /dev/null and b/public/cards/72.png differ diff --git a/public/cards/73.png b/public/cards/73.png new file mode 100644 index 0000000..f759f25 Binary files /dev/null and b/public/cards/73.png differ diff --git a/public/cards/74.png b/public/cards/74.png new file mode 100644 index 0000000..0f08dec Binary files /dev/null and b/public/cards/74.png differ diff --git a/public/cards/75.png b/public/cards/75.png new file mode 100644 index 0000000..cd840e5 Binary files /dev/null and b/public/cards/75.png differ diff --git a/public/cards/76.png b/public/cards/76.png new file mode 100644 index 0000000..a72f142 Binary files /dev/null and b/public/cards/76.png differ diff --git a/public/cards/77.png b/public/cards/77.png new file mode 100644 index 0000000..486da6e Binary files /dev/null and b/public/cards/77.png differ diff --git a/public/cards/78.png b/public/cards/78.png new file mode 100644 index 0000000..eba2dfb Binary files /dev/null and b/public/cards/78.png differ diff --git a/public/cards/79.png b/public/cards/79.png new file mode 100644 index 0000000..20755c9 Binary files /dev/null and b/public/cards/79.png differ diff --git a/public/cards/8.png b/public/cards/8.png new file mode 100644 index 0000000..f9f661a Binary files /dev/null and b/public/cards/8.png differ diff --git a/public/cards/80.png b/public/cards/80.png new file mode 100644 index 0000000..3e3d991 Binary files /dev/null and b/public/cards/80.png differ diff --git a/public/cards/81.png b/public/cards/81.png new file mode 100644 index 0000000..a8fbe7d Binary files /dev/null and b/public/cards/81.png differ diff --git a/public/cards/9.png b/public/cards/9.png new file mode 100644 index 0000000..8a6176d Binary files /dev/null and b/public/cards/9.png differ diff --git a/public/cards/Une Clé en Or.zip b/public/cards/Une Clé en Or.zip new file mode 100644 index 0000000..ea7e328 Binary files /dev/null and b/public/cards/Une Clé en Or.zip differ diff --git a/resources/js/components/organism/ShuffleCard/ShuffleCardPresentation.vue b/resources/js/components/organism/ShuffleCard/ShuffleCardPresentation.vue index 30d82dc..694010b 100644 --- a/resources/js/components/organism/ShuffleCard/ShuffleCardPresentation.vue +++ b/resources/js/components/organism/ShuffleCard/ShuffleCardPresentation.vue @@ -55,7 +55,11 @@ const goToSelection = () => { }; const goToResult = () => { - router.visit(`/resultat?client_session_id=${props.clientSessionId}`); + if (props.clientSessionId) { + router.visit(`/resultat?client_session_id=${props.clientSessionId}`); + } else { + router.visit(`/resultat-gratuit?id=${props.drawnCards ? props.drawnCards[0].id : ''}`); + } }; defineExpose({ setDrawnCards }); @@ -93,7 +97,7 @@ defineExpose({ setDrawnCards });
- +

{{ card.name }}

@@ -109,7 +113,6 @@ defineExpose({ setDrawnCards }); Retourner à la sélection des cartes