diff --git a/Corals/core/Foundation/Classes/CoralsForm.php b/Corals/core/Foundation/Classes/CoralsForm.php index 0d6f98a2..feebeedd 100644 --- a/Corals/core/Foundation/Classes/CoralsForm.php +++ b/Corals/core/Foundation/Classes/CoralsForm.php @@ -239,7 +239,7 @@ public function input($key, $label = '', $required = false, $value = null, $attr $input = '
'; $input .= '
'; - $input .= $this->select('', '', $allowedPredefinedDates, false, $value['pre_defined_date'] ?? null, $predefinedDateAttributes, 'select2'); + $input .= $this->select($key . '_key', '', $allowedPredefinedDates, false, $value['pre_defined_date'] ?? null, $predefinedDateAttributes, 'select2'); $input .= '
'; $input .= '
'; $input .= $this->dateRange($key, '', false, [ diff --git a/Corals/core/Settings/Classes/Modules.php b/Corals/core/Settings/Classes/Modules.php index a998881d..be91b088 100644 --- a/Corals/core/Settings/Classes/Modules.php +++ b/Corals/core/Settings/Classes/Modules.php @@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\File; +use Spatie\Permission\Models\Role; /** * Class Modules @@ -556,8 +557,11 @@ public function update($module) public function grantSuperuserRoleFullAccess() { - $role = \Corals\User\Models\Role::findByName('superuser'); - $role->syncPermissions(\Spatie\Permission\Models\Permission::all()); + $superuserRole = Role::query()->where('name', 'superuser')->first(); + + if ($superuserRole) { + $superuserRole->syncPermissions(\Spatie\Permission\Models\Permission::all()); + } } /** diff --git a/app/Console/Commands/LarashipDeployment.php b/app/Console/Commands/LarashipDeployment.php index b2511e2f..1d289053 100644 --- a/app/Console/Commands/LarashipDeployment.php +++ b/app/Console/Commands/LarashipDeployment.php @@ -55,15 +55,6 @@ public function handle() }); $sortedModules = [ - 'corals-activity', - 'corals-file-manager', - 'corals-foundation', - 'corals-media', - 'corals-menu', - 'corals-settings', - 'corals-theme', - 'corals-user', - 'corals-utility', ]; $this->line('Update or install required modules');