DONE: fix error on pagination where it cannot redirect to next pages, add onboarding_completed_at for new registered user, move dashboard page design into modules folder

This commit is contained in:
ISMAIL MASSERAN
2026-07-06 11:08:32 +08:00
parent ac8f00175a
commit cc2492c3fc
23 changed files with 421 additions and 78 deletions
+11
View File
@@ -121,6 +121,17 @@ class UserService
/**
* @return array{}|array{error: string}
*/
public function completeOnboarding(User $user): User
{
if ($user->onboarding_completed_at === null) {
$user->update(['onboarding_completed_at' => now()]);
}
$user->load(['roles.permissions']);
return $user;
}
public function updatePassword(User $user, string $currentPassword, string $newPassword): array
{
if (! Hash::check($currentPassword, $user->password)) {