From 3cd9a87174c28d2e4249ac34420c2964f0ff6a5f Mon Sep 17 00:00:00 2001 From: Ash Monsh Date: Thu, 17 Aug 2023 00:46:59 +0300 Subject: [PATCH] fix is active for departments --- src/Filament/Resources/DepartmentResource.php | 2 +- src/Models/Department.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Filament/Resources/DepartmentResource.php b/src/Filament/Resources/DepartmentResource.php index d3a1000..3775d7a 100644 --- a/src/Filament/Resources/DepartmentResource.php +++ b/src/Filament/Resources/DepartmentResource.php @@ -67,7 +67,7 @@ public static function form(Form $form): Form TextInput::make('slug')->required()->maxLength(255)->label(__('slug')), TextInput::make('ordering')->required()->numeric()->label(__('ordering')), - Toggle::make('is_active')->label(__('is active')), + Toggle::make('is_active')->label(__('is active'))->inline(false), Textarea::make('desc')->maxLength(65535)->columnSpan(['sm' => 2])->label(__('desc')), FileUpload::make('logo') diff --git a/src/Models/Department.php b/src/Models/Department.php index 1ea1116..edea046 100644 --- a/src/Models/Department.php +++ b/src/Models/Department.php @@ -36,6 +36,7 @@ class Department extends Model 'start_date' => 'datetime', 'end_date' => 'datetime', 'options' => 'array', + 'is_active' => 'boolean', ]; public function getRouteKeyName(): string