refactor: Remove sort_order column and related functionality from classification and sub-classification models, migrations, and Filament resources.

This commit is contained in:
Yoga Pangestu 2026-03-13 09:02:19 +07:00
parent bdd508220b
commit 1885b2c7a3
7 changed files with 2 additions and 10 deletions

View File

@ -42,7 +42,6 @@ public function handle()
[
'name' => $legacy->name,
'is_active' => $legacy->status == '1' ? IsActive::ACTIVE->value : IsActive::INACTIVE->value,
'sort_order' => $legacy->enhancer ?? 0,
'created_at' => $legacy->created_at,
'updated_at' => $legacy->updated_at,
'deleted_at' => $legacy->deleted_at,
@ -62,7 +61,6 @@ public function handle()
'classification_id' => $legacy->classification,
'name' => $legacy->name,
'is_active' => $legacy->status == '1' ? IsActive::ACTIVE->value : IsActive::INACTIVE->value,
'sort_order' => $legacy->enhancer ?? 0,
'created_at' => $legacy->created_at,
'updated_at' => $legacy->updated_at,
'deleted_at' => $legacy->deleted_at,

View File

@ -104,8 +104,7 @@ public static function table(Table $table): Table
->emptyStateIcon(Heroicon::BookOpen)
->emptyStateDescription('Setelah Anda membubat data pertama, maka akan muncul disini.')
->defaultSort('created_at', 'desc')
->deferFilters(false)
->reorderable('sort_order');
->deferFilters(false);
}
public static function getPages(): array

View File

@ -123,8 +123,7 @@ public static function table(Table $table): Table
->emptyStateIcon(Heroicon::QueueList)
->emptyStateDescription('Setelah Anda membubat data pertama, maka akan muncul disini.')
->defaultSort('created_at', 'desc')
->deferFilters(false)
->reorderable('sort_order');
->deferFilters(false);
}
public static function getPages(): array

View File

@ -21,7 +21,6 @@ protected function casts(): array
{
return [
'is_active' => IsActive::class,
'sort_order' => 'integer',
];
}

View File

@ -22,7 +22,6 @@ protected function casts(): array
{
return [
'is_active' => IsActive::class,
'sort_order' => 'integer',
'classification_id' => 'integer',
];
}

View File

@ -17,7 +17,6 @@ public function up(): void
$table->string('name', 50)->index();
$table->text('description')->nullable();
$table->enum('is_active', IsActive::values())->default(IsActive::ACTIVE->value)->comment(IsActive::comment())->index();
$table->integer('sort_order')->default(0)->index();
$table->timestamp('created_at')->useCurrent();
$table->timestamp('updated_at')->nullable()->useCurrentOnUpdate();
$table->softDeletes();

View File

@ -18,7 +18,6 @@ public function up(): void
$table->string('name', 50)->index();
$table->text('description')->nullable();
$table->enum('is_active', IsActive::values())->default(IsActive::ACTIVE->value)->comment(IsActive::comment());
$table->integer('sort_order')->default(0)->index();
$table->timestamp('created_at')->useCurrent();
$table->timestamp('updated_at')->nullable()->useCurrentOnUpdate();
$table->softDeletes();