Skip to content

MEP #305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
Jan 4, 2025
Merged

MEP #305

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
0f44358
feat:[lar-163] translate page and remove unused files
cybersoldattech Dec 27, 2024
10654ce
fix:[lar-163] restore feeds file
cybersoldattech Dec 27, 2024
6cec17e
feat:[lar-163] translate page and remove unused files (#282)
cybersoldattech Dec 27, 2024
c602a48
feat:[lar-156] Add lazy loading in img
cybersoldattech Dec 30, 2024
baa04d2
feat:[lar-156] Add lazy loading in img
cybersoldattech Dec 30, 2024
082a20b
fix: (LAR-154) fixing bug when displaying user thread suscription
StevyMarlino Dec 30, 2024
e74d1f4
chore(deps): bump stefanzweifel/git-auto-commit-action from 4 to 5 (#…
dependabot[bot] Dec 30, 2024
8086d59
chore(deps): bump actions/checkout from 3 to 4 (#284)
dependabot[bot] Dec 30, 2024
441ee73
feat:[lar-156] Add lazy loading in img (#286)
cybersoldattech Dec 30, 2024
aa3ab10
fix: (LAR-154) fixing bug when displaying user thread suscription (#287)
StevyMarlino Dec 30, 2024
56b789d
feat: (LAR-157) add bulk deletion for banned user
StevyMarlino Dec 31, 2024
d9074e8
feat: [LAR-164] add filament mails logger (#288)
mckenziearts Dec 31, 2024
87133d0
feat:[lar-158] add creation date in article resouce
cybersoldattech Jan 1, 2025
b45ebac
feat: [LAR-164] add filament mails logger (#288)
mckenziearts Dec 31, 2024
5d1f6b9
feat:[lar-158] add creation date in article resource (#290)
cybersoldattech Jan 1, 2025
abf60ae
feat: [LAR-150] add forum leaderboard page (#289)
mckenziearts Jan 1, 2025
4599c9a
chore: [LAR-168] fix layout of leaderboard when user is guest (#291)
mckenziearts Jan 1, 2025
16991c1
fix: (LAR-157) fixing lint
StevyMarlino Jan 2, 2025
0b8de84
Feature/lar 157 admin rajouter un bulk banned users (#294)
StevyMarlino Jan 2, 2025
53ff277
fix: [LAR-172] article and discussion single page preview for seo (#295)
mckenziearts Jan 2, 2025
e9b058f
fix: [LAR-177] current locale bug (#299)
mckenziearts Jan 3, 2025
a1e797b
feat: update composer.lock
mckenziearts Jan 3, 2025
17ee875
Merge branch 'main' into develop
mckenziearts Jan 3, 2025
2d9791f
chore: update composer lock file
mckenziearts Jan 3, 2025
36f1939
fix:[lar-179] hash password in register and add wire loading (#304)
cybersoldattech Jan 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: (LAR-157) add bulk deletion for banned user
  • Loading branch information
StevyMarlino committed Dec 31, 2024
commit 56b789d25e5fbad8c70891b4c4c5edfe1fac4204
30 changes: 30 additions & 0 deletions app/Filament/Resources/UserResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,36 @@ public static function table(Table $table): Table
])
->bulkActions([
Tables\Actions\DeleteBulkAction::make(),
Tables\Actions\BulkAction::make('delete_banned')
->label(__('Supprimer les utilisateurs bannis'))
->icon('heroicon-o-trash')
->color('danger')
->action(function ($records): void {

$bannedUsers = $records->whereNotNull('banned_at');

if ($bannedUsers->isEmpty()) {
Notification::make()
->warning()
->title(__('actions.delete_none'))
->body(__('actions.delete_none_description'))
->send();

return;
}

$bannedUsers->each(function (User $user): void {
$user->delete();
});

Notification::make()
->success()
->title(__('actions.delete_success'))
->body(__('actions.delete_success_description'))
->send();
})
->requiresConfirmation()
->deselectRecordsAfterCompletion(),
]);
}

Expand Down
2 changes: 0 additions & 2 deletions app/Filament/Resources/UserResource/Pages/ListUsers.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ public function getTabs(): array
'all' => Tab::make(__('global.all')),
'banned' => Tab::make(__('global.banned'))
->modifyQueryUsing(fn ($query) => $query->isBanned()),
'unbanned' => Tab::make(__('global.unbanned'))
->modifyQueryUsing(fn ($query) => $query->isNotBanned()),
];
}
}
5 changes: 4 additions & 1 deletion lang/en/actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@
'confirm' => 'Confirm',
'start' => 'Start',
'view' => 'View',

'delete_none' => 'No users to delete',
'delete_none_description' => 'No banned users were found in the selection.',
'delete_success' => 'Users successfully deleted.',
'delete_success_description' => 'Only banned users have been deleted.',
];
4 changes: 4 additions & 0 deletions lang/fr/actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@
'confirm' => 'Confirmer',
'start' => 'Démarrer',
'view' => 'Voir',
'delete_none' => 'Aucun utilisateur à supprimer',
'delete_none_description' => 'Aucun utilisateur banni n\'a été trouvé dans la sélection',
'delete_success' => 'Suppression effectuée',
'delete_success_description' => 'Seuls les utilisateurs bannis ont été supprimés.',
];