How to Open Another Modal from Action Modal?

Hello!
So I want to build an import excel with Actions. After the user successfully imported the file, I want to automatically close the import modal and open another modal to display the result of the import. How to do that?

If it is not possible, how to put some text under the form to display the result?

Here is my current code of the import action.
Actions\Action::make('import')
  ->icon('heroicon-m-arrow-up-tray')
  ->label('Import')
  ->color('info')
  ->form([
    Forms\Components\FileUpload::make('file')
      ->label('Excel file')
      // ->...
      ->required()
  ])
  ->action(function ($data) {
    // Do the import thing

    // Close this modal and open another modal for displaying the import result
  })
Was this page helpful?