Csinesz
Csinesz
FFilament
Created by Csinesz on 3/7/2025 in #❓┊help
ModalContent inputs pass to action()
Thank you @Leandro Ferreira you saved my day. Everíthing working now.
->mountUsing(function (BulkAction $action, ListAdminInvoices $livewire) {
foreach ($action->getModalContent()->getData()['records'] as $value) {
$livewire->notes[] = $value['notes'];
}
})
->mountUsing(function (BulkAction $action, ListAdminInvoices $livewire) {
foreach ($action->getModalContent()->getData()['records'] as $value) {
$livewire->notes[] = $value['notes'];
}
})
12 replies
FFilament
Created by Csinesz on 3/7/2025 in #❓┊help
ModalContent inputs pass to action()
Thank you it works! Only one thing - the values dont be filled in this step:
<input class="..." wire:model.defer="notes.{{ $key }}" type="text" value="{{ $record['notes'] }}">
<input class="..." wire:model.defer="notes.{{ $key }}" type="text" value="{{ $record['notes'] }}">
livewire and value dont love each other 🙂
12 replies
FFilament
Created by Csinesz on 3/7/2025 in #❓┊help
ModalContent inputs pass to action()
Can I use it in Resource file?
12 replies
FFilament
Created by Csinesz on 3/7/2025 in #❓┊help
ModalContent inputs pass to action()
BulkAction::make('group_wise_transfer')
->action(function (BulkAction $action, Collection $records, array $data) {
dump($action->getModalContent()->getData());
dump($data);

Notification::make()
->title("Utalás elindítva: " . count($records) . " db számla")
->duration(5000)
->success()
->send();
})
->label('Csoportos utalás')
->requiresConfirmation()
->modalWidth('5xl') // Set custom modal width

->modalContent(function (Collection $records): View {

// CUSTOM LOGIC GOES HERE


return view('filament.pages.wise-group-modal', ['all_fee' => $allTransferFee, 'all_gross' => $allGross, 'records' => $toFunding, 'existing' => null]);
})
->color('primary')
->icon('heroicon-s-arrow-right'),
BulkAction::make('group_wise_transfer')
->action(function (BulkAction $action, Collection $records, array $data) {
dump($action->getModalContent()->getData());
dump($data);

Notification::make()
->title("Utalás elindítva: " . count($records) . " db számla")
->duration(5000)
->success()
->send();
})
->label('Csoportos utalás')
->requiresConfirmation()
->modalWidth('5xl') // Set custom modal width

->modalContent(function (Collection $records): View {

// CUSTOM LOGIC GOES HERE


return view('filament.pages.wise-group-modal', ['all_fee' => $allTransferFee, 'all_gross' => $allGross, 'records' => $toFunding, 'existing' => null]);
})
->color('primary')
->icon('heroicon-s-arrow-right'),
12 replies
FFilament
Created by Csinesz on 3/7/2025 in #❓┊help
ModalContent inputs pass to action()
I've tried wire:model etc. but dont work
12 replies
FFilament
Created by Csinesz on 3/7/2025 in #❓┊help
ModalContent inputs pass to action()
12 replies
FFilament
Created by Csinesz on 8/7/2023 in #❓┊help
CheckboxList options set some value to checked
Sadly no 😦
67 replies
FFilament
Created by Csinesz on 8/7/2023 in #❓┊help
CheckboxList options set some value to checked
so i cannot able to set the CheckBoxList values? 😦
67 replies
FFilament
Created by Csinesz on 8/7/2023 in #❓┊help
CheckboxList options set some value to checked
in the select list there are companyies and avery companies has a different nofifications - which I tried to set with a Checkbox list
67 replies
FFilament
Created by Csinesz on 8/7/2023 in #❓┊help
CheckboxList options set some value to checked
I have a select which is reactive - if the user change the select values in the checkbox list de values need to be checked or not depend on the selected values
67 replies
FFilament
Created by Csinesz on 8/7/2023 in #❓┊help
CheckboxList options set some value to checked
in a resource table function
67 replies
FFilament
Created by Csinesz on 8/7/2023 in #❓┊help
CheckboxList options set some value to checked
These components working only with the Model Value?
67 replies
FFilament
Created by Csinesz on 8/7/2023 in #❓┊help
CheckboxList options set some value to checked
Checkbox::make('active')->default(true),
Checkbox::make('active')->default(true),
67 replies
FFilament
Created by Csinesz on 8/7/2023 in #❓┊help
CheckboxList options set some value to checked
Even if I put a dummy checbox - default vallue true dont work
67 replies
FFilament
Created by Csinesz on 8/7/2023 in #❓┊help
CheckboxList options set some value to checked
Forms\Components\Section::make(__('gui.notifications.title'))
->schema([
Select::make('power_plant_id')
->default(now()->format('Y'))
->options(fn (User $record): ?array => $record->powerPlants->pluck('name', 'power_plant_id')->toArray())
->label(__('gui.powerplants.title'))
->reactive(),
Checkbox::make('active')->default(true),
CheckboxList::make('notifications')
->options(function (callable $get) {
$userId = $get('UserId');
$powerPlantId = $get('power_plant_id');
$notifications = UserPowerPlant::where('user_id', $userId)->where('power_plant_id', $powerPlantId)->get();
return [
'not_1' => 'All notification',
'not_2' => 'Some notification',
'not_e' => 'No notification',
];
}),
])
->columns(2)
->columnSpan(
['lg' => 3]
),
Forms\Components\Section::make(__('gui.notifications.title'))
->schema([
Select::make('power_plant_id')
->default(now()->format('Y'))
->options(fn (User $record): ?array => $record->powerPlants->pluck('name', 'power_plant_id')->toArray())
->label(__('gui.powerplants.title'))
->reactive(),
Checkbox::make('active')->default(true),
CheckboxList::make('notifications')
->options(function (callable $get) {
$userId = $get('UserId');
$powerPlantId = $get('power_plant_id');
$notifications = UserPowerPlant::where('user_id', $userId)->where('power_plant_id', $powerPlantId)->get();
return [
'not_1' => 'All notification',
'not_2' => 'Some notification',
'not_e' => 'No notification',
];
}),
])
->columns(2)
->columnSpan(
['lg' => 3]
),
67 replies
FFilament
Created by Csinesz on 8/7/2023 in #❓┊help
CheckboxList options set some value to checked
could you give me an example? here is my code:
67 replies
FFilament
Created by Csinesz on 8/7/2023 in #❓┊help
CheckboxList options set some value to checked
default(true) isnt work too
67 replies
FFilament
Created by Csinesz on 8/7/2023 in #❓┊help
CheckboxList options set some value to checked
hm - is it impossible? hmmm why? I think is not a big thing ...but yeah - I can't find anything 😦
67 replies
FFilament
Created by Csinesz on 8/7/2023 in #❓┊help
CheckboxList options set some value to checked
67 replies
FFilament
Created by Csinesz on 8/7/2023 in #❓┊help
CheckboxList options set some value to checked
It's not working - and only in options (callable) I know which should checked
67 replies