diff --git a/app/Console/Commands/MigrateDepartmentCommand.php b/app/Console/Commands/MigrateDepartmentCommand.php index 01bcf78..127aced 100644 --- a/app/Console/Commands/MigrateDepartmentCommand.php +++ b/app/Console/Commands/MigrateDepartmentCommand.php @@ -43,7 +43,6 @@ public function handle() 'name' => $legacy->name, 'alias' => Str::limit($legacy->name, 20, ''), 'is_active' => IsActive::ACTIVE->value, - 'sort_order' => 0, 'created_at' => $legacy->created_at ?? now(), 'updated_at' => $legacy->updated_at ?? now(), 'deleted_at' => $legacy->deleted_at, diff --git a/app/Console/Commands/MigrateThemeCommand.php b/app/Console/Commands/MigrateThemeCommand.php index 4af2bfa..5f4fd58 100644 --- a/app/Console/Commands/MigrateThemeCommand.php +++ b/app/Console/Commands/MigrateThemeCommand.php @@ -46,7 +46,6 @@ public function handle() [ 'name' => $legacy->name, 'is_active' => IsActive::ACTIVE->value, - 'sort_order' => 0, 'created_at' => $legacy->created_at ?? now(), 'updated_at' => $legacy->updated_at ?? now(), 'deleted_at' => $legacy->deleted_at, diff --git a/app/Filament/Resources/Master/Categories/CategoryResource.php b/app/Filament/Resources/Master/Categories/CategoryResource.php index 44aed5f..fdb9f12 100644 --- a/app/Filament/Resources/Master/Categories/CategoryResource.php +++ b/app/Filament/Resources/Master/Categories/CategoryResource.php @@ -104,8 +104,7 @@ public static function table(Table $table): Table ->emptyStateIcon(Heroicon::ListBullet) ->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 diff --git a/app/Filament/Resources/Master/Departments/DepartmentResource.php b/app/Filament/Resources/Master/Departments/DepartmentResource.php index 1031b32..63c6414 100644 --- a/app/Filament/Resources/Master/Departments/DepartmentResource.php +++ b/app/Filament/Resources/Master/Departments/DepartmentResource.php @@ -114,8 +114,7 @@ public static function table(Table $table): Table ->emptyStateIcon(Heroicon::BuildingLibrary) ->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 diff --git a/app/Filament/Resources/Master/Themes/ThemeResource.php b/app/Filament/Resources/Master/Themes/ThemeResource.php index 0c1c038..33a3129 100644 --- a/app/Filament/Resources/Master/Themes/ThemeResource.php +++ b/app/Filament/Resources/Master/Themes/ThemeResource.php @@ -104,8 +104,7 @@ public static function table(Table $table): Table ->emptyStateIcon(Heroicon::PuzzlePiece) ->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 diff --git a/app/Livewire/Home/News/Index.php b/app/Livewire/Home/News/Index.php index 448e375..c210f19 100644 --- a/app/Livewire/Home/News/Index.php +++ b/app/Livewire/Home/News/Index.php @@ -71,7 +71,7 @@ public function render() ->withCount(['news' => function ($query) { $query->published(); }]) - ->orderBy('sort_order') + ->orderBy('name') ->get(); $popularPosts = News::published() diff --git a/app/Models/Category.php b/app/Models/Category.php index d868982..1c6944c 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -21,7 +21,6 @@ protected function casts(): array { return [ 'is_active' => IsActive::class, - 'sort_order' => 'integer', ]; } diff --git a/app/Models/Department.php b/app/Models/Department.php index 436bccf..f10f5e9 100644 --- a/app/Models/Department.php +++ b/app/Models/Department.php @@ -18,7 +18,6 @@ protected function casts(): array { return [ 'is_active' => IsActive::class, - 'sort_order' => 'integer', ]; } } diff --git a/app/Models/Theme.php b/app/Models/Theme.php index 53ea028..9648929 100644 --- a/app/Models/Theme.php +++ b/app/Models/Theme.php @@ -22,7 +22,6 @@ protected function casts(): array { return [ 'is_active' => IsActive::class, - 'sort_order' => 'integer', ]; } diff --git a/database/migrations/2025_11_19_085234_create_departments_table.php b/database/migrations/2025_11_19_085234_create_departments_table.php index a2c1add..8161a2d 100644 --- a/database/migrations/2025_11_19_085234_create_departments_table.php +++ b/database/migrations/2025_11_19_085234_create_departments_table.php @@ -17,7 +17,6 @@ public function up(): void $table->string('name', 100)->index(); $table->string('alias', 20)->index(); $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(); diff --git a/database/migrations/2025_11_19_092038_create_themes_table.php b/database/migrations/2025_11_19_092038_create_themes_table.php index e5adf63..915dc64 100644 --- a/database/migrations/2025_11_19_092038_create_themes_table.php +++ b/database/migrations/2025_11_19_092038_create_themes_table.php @@ -16,7 +16,6 @@ public function up(): void $table->id(); $table->string('name', 50)->index(); $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(); diff --git a/database/migrations/2025_12_11_155214_create_categories_table.php b/database/migrations/2025_12_11_155214_create_categories_table.php index 570a93c..f94785b 100644 --- a/database/migrations/2025_12_11_155214_create_categories_table.php +++ b/database/migrations/2025_12_11_155214_create_categories_table.php @@ -16,7 +16,6 @@ public function up(): void $table->id(); $table->string('name', 50); $table->enum('is_active', [IsActive::values()])->default(IsActive::ACTIVE->value)->comment(IsActive::comment()); - $table->integer('sort_order')->default(0); $table->timestamp('created_at')->useCurrent(); $table->timestamp('updated_at')->nullable()->useCurrentOnUpdate(); $table->softDeletes();