Skip to content

Commit bfbaedd

Browse files
authored
Remove id from notification (#168)
1 parent 98c42e0 commit bfbaedd

16 files changed

Lines changed: 38 additions & 37 deletions

File tree

‎app/Exceptions/Reporter/FilamentReporter.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function handle(Throwable $e): void
2828
->whereDoesntHave('roles')
2929
->get();
3030

31-
Notification::make('log')
31+
Notification::make()
3232
->title(__('setting.log.label'))
3333
->body($e->getMessage())
3434
->danger()

‎modules/Database/Panel/Clusters/Databases/Pages/AutoBackup.php‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ protected function getHeaderActions(): array
129129
UploadToCloud::dispatch($path);
130130
}
131131

132-
Notification::make('backup')
132+
Notification::make()
133133
->title(__('database::database.file_created'))
134134
->success()
135135
->send();
@@ -138,7 +138,7 @@ protected function getHeaderActions(): array
138138
} catch (Exception $e) {
139139
Log::error($e);
140140

141-
Notification::make('backup_failed')
141+
Notification::make()
142142
->title(__('database::database.file_not_created'))
143143
->body($e->getMessage())
144144
->warning()
@@ -231,14 +231,14 @@ public function update(): void
231231

232232
event(new SettingUpdated);
233233

234-
Notification::make('backup_updated')
234+
Notification::make()
235235
->title(__('database::database.backup_updated'))
236236
->success()
237237
->send();
238238
} catch (Exception $e) {
239239
Log::error($e);
240240

241-
Notification::make('backup_not_updated')
241+
Notification::make()
242242
->title(__('database::database.backup_not_updated'))
243243
->danger()
244244
->send();

‎modules/Database/Panel/Clusters/Databases/Pages/Backup.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function table(Table $table): Table
9999
return Download::run($storage, $record['path'], $record['name']);
100100
}
101101

102-
Notification::make('file_not_exists')
102+
Notification::make()
103103
->warning()
104104
->title(__('database::database.file_not_exist'))
105105
->send();
@@ -122,7 +122,7 @@ public function table(Table $table): Table
122122
$storage = Storage::disk('local');
123123
$storage->delete($record['path']);
124124

125-
Notification::make('database_file_deleted')
125+
Notification::make()
126126
->title(__('database::database.file_deleted'))
127127
->success()
128128
->send();
@@ -131,7 +131,7 @@ public function table(Table $table): Table
131131
} catch (Exception $e) {
132132
Log::error($e);
133133

134-
Notification::make('database_file_not_deleted')
134+
Notification::make()
135135
->title(__('database::database.file_not_deleted'))
136136
->body($e->getMessage())
137137
->warning()

‎modules/Job/Panel/Resources/FailedJobResource.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public static function table(Table $table): Table
9191
->action(function (FailedJob $record): void {
9292
Artisan::call('queue:retry', ['id' => $record->id]);
9393

94-
Notification::make('pushed_to_queue')
94+
Notification::make()
9595
->success()
9696
->title(__('job::job.pushed_to_queue'))
9797
->send();
@@ -112,7 +112,7 @@ public static function table(Table $table): Table
112112
->action(function (Collection $records): void {
113113
Artisan::call('queue:retry', ['id' => $records->pluck('id')->toArray()]);
114114

115-
Notification::make('pushed_to_queue')
115+
Notification::make()
116116
->success()
117117
->title(__('job::job.pushed_to_queue'))
118118
->send();

‎modules/Job/Panel/Resources/FailedJobResource/Pages/ListFailedJobs.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ protected function getHeaderActions(): array
2525
->action(function (): void {
2626
Artisan::call('queue:retry all');
2727

28-
Notification::make('pushed_to_queue')
28+
Notification::make()
2929
->success()
3030
->title(__('job::job.pushed_to_queue'))
3131
->send();

‎modules/Module/Panel/Resources/Resources/ModuleResource/Pages/ListModules.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ protected function getHeaderActions(): array
1919
Action::make('sync')
2020
->label(__('module::module.btn.sync'))
2121
->action(function (): void {
22-
Notification::make('synced')
22+
Notification::make()
2323
->title(__('module::module.notifications.synced'))
2424
->success()
2525
->send();

‎modules/Setting/Panel/Clusters/Settings/Pages/Cache.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ protected function getHeaderActions(): array
5151
try {
5252
\Illuminate\Support\Facades\Cache::put('test', 'test', now()->addMinute(5));
5353

54-
Notification::make('cache.test_success')
54+
Notification::make()
5555
->title(__('setting::setting.cache.test_success'))
5656
->success()
5757
->send();
5858
} catch (Exception $e) {
5959
Log::error($e);
6060

61-
Notification::make('cache.test_failed')
61+
Notification::make()
6262
->title(__('setting::setting.cache.test_failed'))
6363
->body($e->getMessage())
6464
->danger()
@@ -75,7 +75,7 @@ protected function getHeaderActions(): array
7575
try {
7676
\Illuminate\Support\Facades\Cache::flush();
7777

78-
Notification::make('cache.flushed')
78+
Notification::make()
7979
->title(__('setting::setting.cache.flushed'))
8080
->success()
8181
->send();

‎modules/Setting/Panel/Clusters/Settings/Pages/Custom.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,14 @@ public function update(): void
145145

146146
event(new SettingUpdated);
147147

148-
Notification::make('custom_setting_updated')
148+
Notification::make()
149149
->success()
150150
->title(__('setting::setting.notifications.updated.title'))
151151
->send();
152152
} catch (Exception $e) {
153153
Log::error($e);
154154

155-
Notification::make('setting.notifications.update_failed.title')
155+
Notification::make()
156156
->danger()
157157
->title(__('setting::setting.custom.updated'))
158158
->body($e->getMessage())

‎modules/Setting/Panel/Clusters/Settings/Pages/General.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@ protected function getHeaderActions(): array
7979
try {
8080
ImportAll::run($data['settings']);
8181

82-
Notification::make('setting_imported')
82+
Notification::make()
8383
->title(__('setting::setting.general.setting_imported'))
8484
->success()
8585
->send();
8686
} catch (Exception $e) {
8787
Logger::error($e);
8888

89-
Notification::make('setting_not_imported')
89+
Notification::make()
9090
->title(__('setting::setting.general.setting_not_imported'))
9191
->danger()
9292
->send();
@@ -195,7 +195,7 @@ public function update(): void
195195

196196
event(new SettingUpdated);
197197

198-
Notification::make('general_updated')
198+
Notification::make()
199199
->title(__('filament-actions::edit.single.notifications.saved.title'))
200200
->success()
201201
->send();

‎modules/Setting/Panel/Clusters/Settings/Pages/Log.php‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ protected function getHeaderActions(): array
7070
try {
7171
Logger::debug($data['message'] ?? 'Testing log');
7272

73-
Notification::make('log.test_sent')
73+
Notification::make()
7474
->title(__('setting::setting.log.test_sent'))
7575
->success()
7676
->send();
7777

7878
if ($data['notification'] ?? false) {
79-
Notification::make('log.notification')
79+
Notification::make()
8080
->title(__('setting::setting.log.label'))
8181
->body($data['message'])
8282
->danger()
@@ -242,14 +242,14 @@ public function update(): void
242242

243243
event(new SettingUpdated);
244244

245-
Notification::make('log.updated')
245+
Notification::make()
246246
->title(__('setting::setting.notifications.updated.title'))
247247
->success()
248248
->send();
249249
} catch (Exception $e) {
250250
Logger::error($e);
251251

252-
Notification::make('log.not_updated')
252+
Notification::make()
253253
->title(__('setting::setting.notifications.update_failed.title'))
254254
->body($e->getMessage())
255255
->danger()

0 commit comments

Comments
 (0)