refactor: Remove sort_order column and related functionality from classification and sub-classification models, migrations, and Filament resources.
This commit is contained in:
parent
bdd508220b
commit
1885b2c7a3
@ -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,
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -21,7 +21,6 @@ protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'is_active' => IsActive::class,
|
||||
'sort_order' => 'integer',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -22,7 +22,6 @@ protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'is_active' => IsActive::class,
|
||||
'sort_order' => 'integer',
|
||||
'classification_id' => 'integer',
|
||||
];
|
||||
}
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user