Completed Wizard step

We are are building a very custom import of an XLSX file which is not possible with a pre-built Import action.

In the first step, the file gets selected and uploaded.

In the second step, the file gets imported.

As a result in the 3rd step, I want to show a last step with the output of the import. E.g. how many rows have been imported, how many have some data missing, etc. Any idea on how I could achieve that "completed" step in the Wizard?
Solution
Here's my final schema. I used afterValidation in the end.

->schema([
                 Wizard::make([
                      Wizard\Step::make('Datei importieren')
                          ->afterValidation(function () {
                              $this->import();
                          })
                          ->schema([
                               FileUpload::make('file')
                                   ->disk('local')
                                   ->label('')
                                   ->directory('credit-imports')
                                   ->visibility('private')
                                   ->required(),
                           ]),
                      Wizard\Step::make('Status')
                          ->schema([
                               ViewField::make('status')->view(
                                   'filament.pages.upload-credits-status'
                               )->viewData([
                                       'importOutcome' => $this->importOutcome,
                               ]),
                          ])
                  ])
             ])
Was this page helpful?