Ander
Ander
FFilament
Created by Ander on 2/1/2024 in #❓┊help
Does not install filament package
fixed it, just remove this in my composer.json "filament/upgrade": "^3.1",
3 replies
FFilament
Created by ByteXR on 1/4/2024 in #❓┊help
Wizard still showing "Next" when steps hidden dynamically
I have a same issue
protected function getSteps(): array
{
return
[
Step::make(__('bonuses.create.bonus_name'))
->schema(
BonusesResource::getFormSchema('0')
),
Step::make(__('bonuses.create.add_employees'))
->hidden(fn (Get $get) => empty($get('applies_to_all_employees')) ? false : true)
->schema([
]),
];
}
protected function getSteps(): array
{
return
[
Step::make(__('bonuses.create.bonus_name'))
->schema(
BonusesResource::getFormSchema('0')
),
Step::make(__('bonuses.create.add_employees'))
->hidden(fn (Get $get) => empty($get('applies_to_all_employees')) ? false : true)
->schema([
]),
];
}
5 replies
FFilament
Created by Naren on 7/2/2023 in #❓┊help
Hidden attribute not working as expected for Sections in Filament Form
don't worry, thanks for helping me
16 replies
FFilament
Created by Naren on 7/2/2023 in #❓┊help
Hidden attribute not working as expected for Sections in Filament Form
thanks, this worked!!!
16 replies
FFilament
Created by Naren on 7/2/2023 in #❓┊help
Hidden attribute not working as expected for Sections in Filament Form
Fieldset::make()
->schema([
Select::make('employee_type_id')->label('tipo de empleado')->options(EmployeeType::all()->pluck('name', 'id'))->required()->columnSpan('full')
->afterStateUpdated(function (Closure $set, $state){ $set('employeeJob.test', $state);})->reactive(),
Group::make()
->relationship('employeeJob')
->schema([
Grid::make(['sm' => 1, 'md' => 2, 'xl' => 2])
->schema([
Select::make('type')->label(__('employees.type_employee'))
->options([
'salary' => __('employees.salary'),
'salary_overtime' => __('employees.salary_overtime'),
'hourly' => __('employees.hourly'),
])->reactive()->required(),

TextInput::make('test'),
TextInput::make('payment_amount')->label(__('employees.amount'))
->mask(fn (TextInput\Mask $mask) => $mask->money(prefix: 'GTQ ', thousandsSeparator: ',', decimalPlaces: 2, isSigned: false))
->rules([
function (Closure $get)
{
\Log::alert($get('employee_type_id'));
}
])
->numeric()->required()

]),
Textarea::make('change_reason')->label(__('employees.change_reason'))->visibleOn('edit')->columnSpan('full'),
])->columnSpan('full'),
])
Fieldset::make()
->schema([
Select::make('employee_type_id')->label('tipo de empleado')->options(EmployeeType::all()->pluck('name', 'id'))->required()->columnSpan('full')
->afterStateUpdated(function (Closure $set, $state){ $set('employeeJob.test', $state);})->reactive(),
Group::make()
->relationship('employeeJob')
->schema([
Grid::make(['sm' => 1, 'md' => 2, 'xl' => 2])
->schema([
Select::make('type')->label(__('employees.type_employee'))
->options([
'salary' => __('employees.salary'),
'salary_overtime' => __('employees.salary_overtime'),
'hourly' => __('employees.hourly'),
])->reactive()->required(),

TextInput::make('test'),
TextInput::make('payment_amount')->label(__('employees.amount'))
->mask(fn (TextInput\Mask $mask) => $mask->money(prefix: 'GTQ ', thousandsSeparator: ',', decimalPlaces: 2, isSigned: false))
->rules([
function (Closure $get)
{
\Log::alert($get('employee_type_id'));
}
])
->numeric()->required()

]),
Textarea::make('change_reason')->label(__('employees.change_reason'))->visibleOn('edit')->columnSpan('full'),
])->columnSpan('full'),
])
16 replies
FFilament
Created by Naren on 7/2/2023 in #❓┊help
Hidden attribute not working as expected for Sections in Filament Form
I tried like this but it doesn't work, I thought there was a reverse way
16 replies
FFilament
Created by Naren on 7/2/2023 in #❓┊help
Hidden attribute not working as expected for Sections in Filament Form
And if it was the other way around? I am inside the relation and I want the value of a field outside of that relation
16 replies
FFilament
Created by Ander on 7/31/2023 in #❓┊help
hasone relations and belong to
the error was because in my migration I did not have the timestamps
3 replies
FFilament
Created by Ander on 7/25/2023 in #❓┊help
get element of array, not index
thanks you
4 replies
FFilament
Created by Ander on 7/25/2023 in #❓┊help
relationship on a resource
10 replies
FFilament
Created by Ander on 7/25/2023 in #❓┊help
relationship on a resource
thanks to all, i solved like this: Fieldset::make('') ->relationship('employeeJob') ->schema([...])
10 replies
FFilament
Created by Ander on 7/25/2023 in #❓┊help
relationship on a resource
and the textinput?
10 replies
FFilament
Created by Ander on 7/18/2023 in #❓┊help
select will not open createOptionForm modal
wow! yes it worked. in livewire view: <div> <form wire:submit.prevent="submit"> {{$this->form}} {{ $this->modal }} </form> </div>
5 replies
FFilament
Created by Ander on 7/17/2023 in #❓┊help
Default selection for radio element - not working!
thanks to all
6 replies
FFilament
Created by Ander on 7/17/2023 in #❓┊help
Default selection for radio element - not working!
thanks you
6 replies
FFilament
Created by Ander on 7/10/2023 in #❓┊help
Form Select - how can I interact with the newly created record after creation?
->createOptionAction(function (Forms\Components\Actions\Action $action) { return $action ->modalHeading('new pay shedule') ->modalButton('create') ->modalWidth('lg'); })->createOptionUsing(function ($data) { \Log::alert($data); // Customize create }),
3 replies
FFilament
Created by Ander on 7/10/2023 in #❓┊help
Form Select - how can I interact with the newly created record after creation?
i solved
3 replies
FFilament
Created by toeknee on 6/16/2023 in #❓┊help
Form Select - Relationship customise display?
5 replies
FFilament
Created by toeknee on 6/16/2023 in #❓┊help
Form Select - Relationship customise display?
@toeknee_iom
->getOptionLabelFromRecordUsing(fn (Model $record) => "{$record->name} - {$record->id}")
->getOptionLabelFromRecordUsing(fn (Model $record) => "{$record->name} - {$record->id}")
5 replies