Lucas de Mello
Lucas de Mello
FFilament
Created by Lucas de Mello on 12/22/2024 in #❓┊help
Print ChartWidget in PDF (DomPDF)
Uhmm Ok, I didn't really understand the solution, how it works to make my browser shot it? I'm thinking it will be easier to find a JS framework that creates this graph again.
9 replies
FFilament
Created by Lucas de Mello on 12/22/2024 in #❓┊help
Print ChartWidget in PDF (DomPDF)
No description
9 replies
FFilament
Created by Lucas de Mello on 12/15/2024 in #❓┊help
Get Index of Repeater
Using the $get('../') method inside the repeater works.
Forms\Components\Section::make('Divisões do Treino')
->icon('phosphor-list-bullets-bold')
->description('Organize o treino em sessões distintas para facilitar o planejamento e execução.')
->schema([
Forms\Components\Repeater::make('Divisões')
->schema([
Forms\Components\TextInput::make('name')->required()
->default(fn ($get) => 'Treino ' . chr(64 + (count($get('../')) ?? 0))),
])
->addActionLabel('Adicionar Divisão')
])
Forms\Components\Section::make('Divisões do Treino')
->icon('phosphor-list-bullets-bold')
->description('Organize o treino em sessões distintas para facilitar o planejamento e execução.')
->schema([
Forms\Components\Repeater::make('Divisões')
->schema([
Forms\Components\TextInput::make('name')->required()
->default(fn ($get) => 'Treino ' . chr(64 + (count($get('../')) ?? 0))),
])
->addActionLabel('Adicionar Divisão')
])
2 replies
FFilament
Created by Lucas de Mello on 12/11/2024 in #❓┊help
Widget emit table atualization
The resetTable does not work, because the Widget is separate from the Resource Table, but within this documentation that you send i found the poll() method that causes the table to be consulted from time to time. Thank you!
4 replies
FFilament
Created by Lucas de Mello on 12/3/2024 in #❓┊help
Custom Widget variable $state doesn't works
With out ->default() works! Thank you soo mutch guys!
13 replies
FFilament
Created by Lucas de Mello on 12/3/2024 in #❓┊help
Custom Widget variable $state doesn't works
No description
13 replies
FFilament
Created by Lucas de Mello on 12/3/2024 in #❓┊help
Custom Widget variable $state doesn't works
13 replies
FFilament
Created by Lucas de Mello on 12/3/2024 in #❓┊help
Custom Widget variable $state doesn't works
No description
13 replies
FFilament
Created by Lucas de Mello on 12/3/2024 in #❓┊help
Custom Widget variable $state doesn't works
Uhmm, I understand, we created the variable within Livewire to maintain the form data, but even when selecting the Element, the variables are not going into the data The browser console warning: Livewire: [wire:model="data.user_id"] property does not exist on component: [app.filament.widgets.attendance-search-widget] Livewire property ['data.student_id'] cannot be found on component:.... I tried to define student_id and user_id into the $data like this: public ?array $data = [ 'student_id'=> null, 'user_id'=> null ]; the errors and warnings disappear but the livewire doesn't read the values
13 replies
FFilament
Created by Lucas de Mello on 12/3/2024 in #❓┊help
Custom Widget variable $state doesn't works
With the form's $state I don't have access to its data? I imagined that with suffixAction I could have access to the form data and use it to create my presence Example:
->suffixAction(
Forms\Components\Actions\Action::make('save')
->icon('heroicon-m-clipboard')
->action(fn ($state) =>
Attendance::create([
'student_id' => $state['student_id'],
'user_id' => auth()->user()->id,
'attendance_date' => now(),
]))

)
->suffixAction(
Forms\Components\Actions\Action::make('save')
->icon('heroicon-m-clipboard')
->action(fn ($state) =>
Attendance::create([
'student_id' => $state['student_id'],
'user_id' => auth()->user()->id,
'attendance_date' => now(),
]))

)
13 replies