Arghyaashu
Arghyaashu
FFilament
Created by Arghyaashu on 8/23/2024 in #❓┊help
Close action modal with event
I have a table action which open a livewire component, I that livewire there is one more table action which open a modal(blade file) I want to close the livewire component when blade modal is open or close both blade modal and livewire component when blade modal is close
Action::make('link payment')
->disabled(fn ()=>$this->policies())
->label('Link Payment')
->extraModalWindowAttributes(['id' => 'orphan-payment-modal'])
->form([
Grid::make(6)
->schema([
])
->extraAttributes(['class' => 'orphan-payment-details']),
View::make("livewire.payment-search-render-helper")
->extraAttributes(['class' => 'contact-search-table'])
])
Action::make('link payment')
->disabled(fn ()=>$this->policies())
->label('Link Payment')
->extraModalWindowAttributes(['id' => 'orphan-payment-modal'])
->form([
Grid::make(6)
->schema([
])
->extraAttributes(['class' => 'orphan-payment-details']),
View::make("livewire.payment-search-render-helper")
->extraAttributes(['class' => 'contact-search-table'])
])
I tried giving id to livewire modal and dispatch close-modal event from second table action but it didn't worked
Action::make("Link Payment")
->label('')
->form(
function ($record) {
$this->contact = $record;
$this->invoiceGeneration();
$this->dispatchFormEvent('close-modal', ['id' => 'orphan-payment-modal']);
$this->dispatch('link-payment');
info('dispatch');
return [
$this->orphanPaymentDetails(),
$this->status ? View::make('filament.pages.payment-link-success-modal') : View::make('filament.pages.payment-link-failed-modal')
];
}
)
Action::make("Link Payment")
->label('')
->form(
function ($record) {
$this->contact = $record;
$this->invoiceGeneration();
$this->dispatchFormEvent('close-modal', ['id' => 'orphan-payment-modal']);
$this->dispatch('link-payment');
info('dispatch');
return [
$this->orphanPaymentDetails(),
$this->status ? View::make('filament.pages.payment-link-success-modal') : View::make('filament.pages.payment-link-failed-modal')
];
}
)
16 replies
FFilament
Created by Arghyaashu on 7/12/2024 in #❓┊help
Modal on action
Action::make('refund') ->label(' Refund') ->requiresConfirmation() ->action(function ($record) { if ($paymentGateway == 'Payment Terminals') { $response = json_decode(ValorVirtualTerminal::issueRefundAPI($record->id),true); // dd($response); Notification::make() ->title('Refunded Successfully.') ->body($response['msg']) ->persistent() ->send(); } I want to open a modal and show the response in the modal not in notification, I have no clue how to do this can someone help.
6 replies
FFilament
Created by Arghyaashu on 6/29/2024 in #❓┊help
Multiple Joins and filter with QueryBuilder
No description
18 replies
FFilament
Created by Arghyaashu on 6/1/2024 in #❓┊help
Trying to mount an stripe element in the last step of wizard
No description
1 replies