Refactored Filament Livewire components and views. Introduced separate CreateFilament component with route-based navigation. Simplified and cleaned up code by removing legacy modals and unused properties. Updated migrations, table layouts, and styles for consistency.

This commit is contained in:
2025-12-15 01:20:04 +01:00
parent 4759df9077
commit c7671b93b1
15 changed files with 461 additions and 645 deletions
@@ -15,20 +15,14 @@ return new class extends Migration
$table->id();
$table->string('name');
$table->string('description')->nullable();
// 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();
$table->integer('stock')->default(0);
$table->integer('temp_min')->nullable();
$table->integer('temp_max')->nullable();
$table->integer('buildplate_id')->nullable();
$table->integer('extruder_id')->nullable();
$table->timestamps();
});
}
@@ -17,7 +17,7 @@ return new class extends Migration
$table->string('description')->nullable();
$table->foreignId('manufacturer_id')->constrained();
$table->string('diameter')->required();
$table->string('temp_max')->required();
$table->integer('temp_max')->required();
$table->timestamps();
});
}
@@ -16,7 +16,7 @@ return new class extends Migration
$table->string('name');
$table->string('description');
$table->foreignId('manufacturer_id')->constrained('manufacturers');
$table->string('temp_max');
$table->integer('temp_max');
$table->timestamps();
});
}