Popup indicating waiting on process

Hi, I have a custom full page livewire where a filament form is loaded. On one of the steps the user fills in some date and a process is started where external api calls are made. The user must wait on this api call before continuing. I would like to show a non closable modal with the text: "please wait blabla..." See screenshot. Now my first instinct was to add a dispatch event at the start of my function opening the modal and at the end closing it when it was done:
$formObject->dispatch('open-modal', id: 'waiting-for-process-complete');

LongProcessFunctionHere()

$formObject->dispatch('close-modal', id: 'waiting-for-process-complete');
$formObject->dispatch('open-modal', id: 'waiting-for-process-complete');

LongProcessFunctionHere()

$formObject->dispatch('close-modal', id: 'waiting-for-process-complete');
I really need to wait on the process unfortunatly because it is a public form, the api calculates route distances for a transport order and its prices. Afterwards the user can order this transport directly. My solution above obviously does not work because it only sends the request back to the front end after the function is completed. Does anybody have a good idea how to let the user wait and where the user is informed that they are waiting on a process? Thanks!
No description
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server