feat(usermanagement): fix permission seeder structure and ensure module column populated correctly

- Updated PermissionGroupSeeder to seed consistent permission group definitions
- Updated PermissionsSeeder to generate proper permission records with correct module mapping
- Ensured permission creation uses dynamically generated module value based on group name
- Fixed undefined array key "module" issue by restructuring data() output
- Applied permission assignment to all roles for each generated permission
- Improved overall seeder stability and idempotency

To apply the updates, run the following commands:

php artisan module:seed Usermanagement --class="PermissionGroupSeeder"
php artisan module:seed Usermanagement --class="PermissionsSeeder"
This commit is contained in:
Sholahuddin Al Ayubi
2025-12-03 18:28:51 +07:00
parent 4270f152d2
commit f3872e0665
2 changed files with 56 additions and 54 deletions

View File

@@ -28,6 +28,10 @@
public function data()
{
return [
['name' => 'adk'],
['name' => 'basicdata'],
['name' => 'location'],
['name' => 'logs'],
['name' => 'usermanagement']
];
}