Merge pull request 'removed manual trigger of invoice data report button from alert mail resource' (#155) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
Reviewed-on: #155
This commit was merged in pull request #155.
This commit is contained in:
@@ -118,31 +118,31 @@ class AlertMailRuleResource extends Resource
|
||||
->label('All Plants Reports')
|
||||
->afterStateUpdated(fn ($state, callable $set) => $state ? $set('plant', null) : null)
|
||||
->reactive(),
|
||||
Forms\Components\Actions::make([
|
||||
Action::make('sendInvoiceData')
|
||||
->label('Invoice Data Report')
|
||||
->action(function ($get) {
|
||||
// Forms\Components\Actions::make([
|
||||
// Action::make('sendInvoiceData')
|
||||
// ->label('Invoice Data Report')
|
||||
// ->action(function ($get) {
|
||||
|
||||
$plantIds = AlertMailRule::where('module', 'InvoiceDataReport')
|
||||
->orderBy('plant')
|
||||
->pluck('plant')
|
||||
->toArray();
|
||||
// $plantIds = AlertMailRule::where('module', 'InvoiceDataReport')
|
||||
// ->orderBy('plant')
|
||||
// ->pluck('plant')
|
||||
// ->toArray();
|
||||
|
||||
foreach ($plantIds as $plantId) {
|
||||
Artisan::call('send:invoice-data-report', [
|
||||
'schedule_type' => 'Daily',
|
||||
'plant' => $plantId,
|
||||
]);
|
||||
}
|
||||
// foreach ($plantIds as $plantId) {
|
||||
// Artisan::call('send:invoice-data-report', [
|
||||
// 'schedule_type' => 'Daily',
|
||||
// 'plant' => $plantId,
|
||||
// ]);
|
||||
// }
|
||||
|
||||
// Notify user in Filament
|
||||
Notification::make()
|
||||
->title('Invoice data report sent successfully!')
|
||||
->success()
|
||||
->send();
|
||||
}),
|
||||
// // Notify user in Filament
|
||||
// Notification::make()
|
||||
// ->title('Invoice data report sent successfully!')
|
||||
// ->success()
|
||||
// ->send();
|
||||
// }),
|
||||
|
||||
]),
|
||||
// ]),
|
||||
Forms\Components\Hidden::make('created_by')
|
||||
->default(fn () => Filament::auth()->user()?->name),
|
||||
Forms\Components\Hidden::make('updated_by')
|
||||
|
||||
Reference in New Issue
Block a user