Öffne Katalog, Bibliothek und Testkauf für den MVP.
Deploy Test / test (push) Successful in 12s
Deploy Test / deploy (push) Successful in 21s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-11-15 09:04:08 +01:00
1 parent 463851d402
commit fd6860efda
51 files changed
+2331 -31

No files matched your search

+11 -3
View File
@@ -2,6 +2,7 @@
namespace App\Domain\Catalog;
use App\Jobs\StoreContentFile;
use App\Models\User;
use Illuminate\Support\Facades\DB;
@@ -29,10 +30,10 @@ public function publishElementVersion(
}
$number = ((int) $element->versions()->max('number')) + 1;
return $element->versions()->create([
$incoming = $metadata['incoming'] ?? null;
$version = $element->versions()->create([
'number' => $number,
'status' => ContentVersionStatus::Bereit,
'status' => is_string($incoming) && $incoming !== '' ? ContentVersionStatus::Entwurf : ContentVersionStatus::Bereit,
'content_hash' => hash('sha256', json_encode([
'body' => $body,
'metadata' => $metadata,
@@ -41,6 +42,13 @@ public function publishElementVersion(
'metadata' => $metadata === [] ? null : $metadata,
'change_note' => $changeNote,
]);
if (is_string($incoming) && $incoming !== '') {
StoreContentFile::dispatch($version->id, $incoming);
$version->refresh();
}
return $version;
}
/**