HALIM
HALIM
FFilament
Created by HALIM on 2/26/2025 in #❓┊help
Wizard Trigger Next Steps From Notification.
So I checked the data after validation was carried out, and if the data is not similar then I will give the user a warning in the notification like the code below. This notification has actions to cancel and continue, but I'm confused about how to trigger the wizard next step from this notification. Can I get help here?
Wizard\Step::make('grading-insiden')
->label('Grading Insiden')
->afterValidation(function ($state, $set, $get, $livewire) {
if (Str::lower($state['auto_grading_color']) != Str::lower($state['grading_risiko'])) {
\Filament\Notifications\Notification::make()
->warning()
->title('Grading Risiko Tidak Sesuai')
->body('Grading Risiko yang diinput tidak sesuai dengan Grading Risiko yang dihasilkan')
->actions([
\Filament\Notifications\Actions\Action::make('continue')
->label('Lanjutkan')
->button()
->close()
->action(function () use ($livewire) {
// INFO : How to trigger next srteps ?
}),
\Filament\Notifications\Actions\Action::make('cancel')
->label('Batal')
->color('gray')
->close(),
])->persistent()->send();

throw new Halt();
}
})
Wizard\Step::make('grading-insiden')
->label('Grading Insiden')
->afterValidation(function ($state, $set, $get, $livewire) {
if (Str::lower($state['auto_grading_color']) != Str::lower($state['grading_risiko'])) {
\Filament\Notifications\Notification::make()
->warning()
->title('Grading Risiko Tidak Sesuai')
->body('Grading Risiko yang diinput tidak sesuai dengan Grading Risiko yang dihasilkan')
->actions([
\Filament\Notifications\Actions\Action::make('continue')
->label('Lanjutkan')
->button()
->close()
->action(function () use ($livewire) {
// INFO : How to trigger next srteps ?
}),
\Filament\Notifications\Actions\Action::make('cancel')
->label('Batal')
->color('gray')
->close(),
])->persistent()->send();

throw new Halt();
}
})
3 replies