Refactored Color Livewire components, added CreateColor, EditColor, and ShowColor components. Updated views, navigation, and Tailwind color schemes. Adjusted database migrations for consistency.

This commit is contained in:
2025-12-14 01:39:16 +01:00
parent 7e79d1d034
commit ac812ed142
32 changed files with 496 additions and 353 deletions
@@ -13,13 +13,14 @@ return new class extends Migration
{
Schema::create('filaments', function (Blueprint $table) {
$table->id();
$table->string('name')->required();
$table->string('name');
$table->string('description')->nullable();
$table->foreignId('color_id')->constrained()->onUpdate('cascade')->onDelete('cascade');
$table->foreignId('manufacturer_id')->constrained()->onUpdate('cascade')->onDelete('cascade');;
$table->foreignId('filament_type_id')->constrained()->onUpdate('cascade')->onDelete('cascade');;
$table->integer('weight')->required();
$table->decimal('diameter', 10, 2)->required();
// Foreign keys pointing to existing tables with non-standard names
$table->foreignId('color_id')->constrained('colors')->onUpdate('cascade')->onDelete('cascade');
$table->foreignId('manufacturer_id')->constrained('manufacturers')->onUpdate('cascade')->onDelete('cascade');
$table->foreignId('filament_type_id')->constrained('filament_types')->onUpdate('cascade')->onDelete('cascade');
$table->integer('weight');
$table->decimal('diameter', 10, 2);
$table->decimal('price', 10, 2)->nullable();
$table->string('finish')->nullable();
$table->string('image')->nullable();