Deploy HickLab3D Dashboard / Deploy to production (push) Failing after 23s
Replace the old touchmark/PNG identity with the supplied lockup and monogram, segmented role-aware navigation, Live/Draft listing filters with generation-based cache invalidation, and admin Projects covering immutable file revisions, listing live pointers, and exact-decimal filament/packaging/shipping costing. Additive schema only; no Etsy publication. Isolated clone tests: 301 tests, 1162 assertions.
24 lines
762 B
PHP
24 lines
762 B
PHP
<?php
|
|
|
|
namespace App\Support;
|
|
|
|
use App\Models\Project;
|
|
|
|
/**
|
|
* Simple, reversible internal lifecycle: Design, Ready, Live, Retired. This is
|
|
* distinct from Etsy's own listing state; moving a project to Live never
|
|
* publishes or mutates anything upstream. The only guarded transition is into
|
|
* Live, which requires every relevant (non-detached) listing mapping to carry
|
|
* an active release — a single unreleased mapping blocks Live, not just the
|
|
* absence of all of them.
|
|
*/
|
|
class ProjectLifecycle
|
|
{
|
|
public static function canMoveToLive(Project $project): bool
|
|
{
|
|
$relevant = $project->listingLinks()->whereNull('detached_at');
|
|
|
|
return $relevant->exists() && $relevant->clone()->whereNull('live_release_id')->doesntExist();
|
|
}
|
|
}
|