Skip to content

Commit

Permalink
chore: cleanup and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
saeed-corals committed Aug 26, 2024
1 parent ecbbcec commit ec420bf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Corals/core/Foundation/Classes/CoralsForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public function input($key, $label = '', $required = false, $value = null, $attr

$input = '<div class="preDefinedDates row ">';
$input .= '<div class="col-md-4">';
$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 .= '</div>';
$input .= '<div class="col-md-8">';
$input .= $this->dateRange($key, '', false, [
Expand Down
8 changes: 6 additions & 2 deletions Corals/core/Settings/Classes/Modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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());
}
}

/**
Expand Down
9 changes: 0 additions & 9 deletions app/Console/Commands/LarashipDeployment.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit ec420bf

Please sign in to comment.