Add project listing selector, confirmed revision and private 3MF renders

This commit is contained in:
2026-11-08 18:49:32 +00:00
parent e62b6800a6
commit 4e675510fd
29 changed files with 3394 additions and 14 deletions
@@ -36,6 +36,13 @@ class ProjectListingLinkController extends Controller
return back()->withErrors(['listing_id' => $exception->getMessage()]);
}
// Re-checked against a fresh (non-cached) fetch above, so this also catches
// a listing that was active/draft when the dropdown was rendered but has
// since gone inactive, expired or sold out.
if (! in_array($listing['state'] ?? null, ['active', 'draft'], true)) {
return back()->withErrors(['listing_id' => 'That listing is no longer Live or Draft and cannot be linked.']);
}
try {
$link = DB::transaction(function () use ($request, $project, $connection, $data, $listing, $variationKey): ProjectListingLink {
$locked = Project::query()->whereKey($project->id)->lockForUpdate()->firstOrFail();