Add HL3D branding, Etsy Live/Draft paging and Projects lifecycle
Deploy HickLab3D Dashboard / Deploy to production (push) Failing after 23s
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.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user