Add HL3D branding, Etsy Live/Draft paging and Projects lifecycle
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:
2026-11-08 12:50:56 +00:00
parent c8c5822166
commit d4928789c4
83 changed files with 5808 additions and 84 deletions
@@ -0,0 +1,30 @@
<?php
namespace Database\Factories;
use App\Models\ProjectCostLine;
use App\Models\ProjectCostSnapshot;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<ProjectCostLine>
*/
class ProjectCostLineFactory extends Factory
{
/**
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'cost_snapshot_id' => ProjectCostSnapshot::factory(),
'category' => ProjectCostLine::CATEGORY_FILAMENT,
'description' => 'PLA black',
'quantity' => '100.000',
'quantity_unit' => 'g',
'unit_rate' => '20.000000',
'waste_quantity' => '0.000',
'line_total' => '2.0000',
];
}
}
@@ -0,0 +1,35 @@
<?php
namespace Database\Factories;
use App\Models\Project;
use App\Models\ProjectCostSnapshot;
use App\Models\ProjectRevision;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<ProjectCostSnapshot>
*/
class ProjectCostSnapshotFactory extends Factory
{
/**
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'project_id' => Project::factory(),
'revision_id' => ProjectRevision::factory(),
'currency' => 'GBP',
'basis' => ProjectCostSnapshot::BASIS_ESTIMATE,
'batch_units' => 1,
'filament_total' => null,
'packaging_total' => null,
'shipping_total' => null,
'grand_total' => null,
'recorded_by' => User::factory()->create(['role' => 'admin'])->id,
'recorded_at' => now(),
];
}
}
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace Database\Factories;
use App\Models\Project;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<Project>
*/
class ProjectFactory extends Factory
{
/**
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'reference' => 'PRJ-'.fake()->unique()->numerify('####'),
'title' => fake()->words(3, true),
'notes' => null,
'stage' => 'design',
'currency' => 'GBP',
'created_by' => User::factory()->create(['role' => 'admin'])->id,
];
}
}
+32
View File
@@ -0,0 +1,32 @@
<?php
namespace Database\Factories;
use App\Models\ProjectFile;
use App\Models\ProjectRevision;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<ProjectFile>
*/
class ProjectFileFactory extends Factory
{
/**
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'revision_id' => ProjectRevision::factory(),
'role' => 'body',
'original_filename' => 'body.stl',
'storage_key' => fake()->unique()->uuid().'.stl',
'extension' => 'stl',
'media_type' => 'model/stl',
'byte_size' => 1024,
'sha256' => hash('sha256', fake()->unique()->uuid()),
'uploaded_by' => User::factory()->create(['role' => 'admin'])->id,
];
}
}
@@ -0,0 +1,31 @@
<?php
namespace Database\Factories;
use App\Models\Project;
use App\Models\ProjectListingLink;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<ProjectListingLink>
*/
class ProjectListingLinkFactory extends Factory
{
/**
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'project_id' => Project::factory(),
'shop_id' => 42,
'listing_id' => fake()->unique()->numberBetween(1000, 999999),
'variation_key' => ProjectListingLink::ALL_VARIATIONS,
'title_snapshot' => fake()->words(3, true),
'state_snapshot' => 'active',
'synced_at' => now(),
'created_by' => User::factory()->create(['role' => 'admin'])->id,
];
}
}
@@ -0,0 +1,30 @@
<?php
namespace Database\Factories;
use App\Models\Project;
use App\Models\ProjectRelease;
use App\Models\ProjectRevision;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<ProjectRelease>
*/
class ProjectReleaseFactory extends Factory
{
/**
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'project_id' => Project::factory(),
'revision_id' => ProjectRevision::factory(),
'cost_snapshot_id' => null,
'action' => ProjectRelease::ACTION_RELEASE,
'released_by' => User::factory()->create(['role' => 'admin'])->id,
'released_at' => now(),
];
}
}
@@ -0,0 +1,37 @@
<?php
namespace Database\Factories;
use App\Models\Project;
use App\Models\ProjectRevision;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<ProjectRevision>
*/
class ProjectRevisionFactory extends Factory
{
/**
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'project_id' => Project::factory(),
'revision_number' => 1,
'change_notes' => 'Initial revision.',
'status' => ProjectRevision::STATUS_DRAFT,
'created_by' => User::factory()->create(['role' => 'admin'])->id,
];
}
public function approved(): static
{
return $this->state(fn (): array => [
'status' => ProjectRevision::STATUS_APPROVED,
'approved_by' => User::factory()->create(['role' => 'admin'])->id,
'approved_at' => now(),
]);
}
}