Daniel
Daniel
FFilament
Created by Daniel on 10/18/2024 in #❓┊help
Dynamically Populate Batch Number Select Based on Product Selection in Filament
5 replies
FFilament
Created by Daniel on 8/3/2024 in #❓┊help
the file does not appear in the repeater fileUpload (Custom Page)
OK, thank you very much for your help, I'll try my best to see what's going on
20 replies
FFilament
Created by Daniel on 8/3/2024 in #❓┊help
the file does not appear in the repeater fileUpload (Custom Page)
I understand, could you tell me if the filament FileUpload is capable of receiving a $set('name of repeater', ['photo' => 'image link']), and as soon as the set is executed it places the photo in the inside FileUpload?
20 replies
FFilament
Created by Daniel on 8/3/2024 in #❓┊help
the file does not appear in the repeater fileUpload (Custom Page)
No description
20 replies
FFilament
Created by Daniel on 8/3/2024 in #❓┊help
the file does not appear in the repeater fileUpload (Custom Page)
No description
20 replies
FFilament
Created by Daniel on 8/3/2024 in #❓┊help
the file does not appear in the repeater fileUpload (Custom Page)
these are the last 100 lines of my log
20 replies
FFilament
Created by Daniel on 8/3/2024 in #❓┊help
the file does not appear in the repeater fileUpload (Custom Page)
No description
20 replies
FFilament
Created by Daniel on 8/3/2024 in #❓┊help
the file does not appear in the repeater fileUpload (Custom Page)
No description
20 replies
FFilament
Created by Daniel on 8/3/2024 in #❓┊help
the file does not appear in the repeater fileUpload (Custom Page)
i understood
20 replies
FFilament
Created by Daniel on 8/3/2024 in #❓┊help
the file does not appear in the repeater fileUpload (Custom Page)
No description
20 replies
FFilament
Created by Daniel on 8/3/2024 in #❓┊help
the file does not appear in the repeater fileUpload (Custom Page)
Sorry for the delay, my model has the photo as fillable, the photo appears in the strage public
20 replies
FFilament
Created by Daniel on 7/29/2024 in #❓┊help
Repeater does not work on customized page
Very thanks
9 replies
FFilament
Created by Daniel on 7/29/2024 in #❓┊help
Repeater does not work on customized page
public function mount(): void
{
$this->form->fill([
'receiver' => []
]);
}
public function mount(): void
{
$this->form->fill([
'receiver' => []
]);
}
like this?
9 replies
FFilament
Created by jesus9314 on 5/29/2024 in #❓┊help
Can't login into panel when user model use uuid
you are a god man thanks
8 replies
FFilament
Created by vahnmarty on 8/3/2023 in #❓┊help
How to customize repeater delete Item?
managed to solve?
2 replies
FFilament
Created by Daniel on 4/9/2024 in #❓┊help
how to use set in a repeater
yes yes 😁
14 replies
FFilament
Created by Daniel on 4/9/2024 in #❓┊help
how to use set in a repeater
Hi, the documentation teaches how to get the value from inside the repeater, I needed the opposite (get the information from outside the repeater)
14 replies
FFilament
Created by Daniel on 4/9/2024 in #❓┊help
how to use set in a repeater
I solved it using
use Illuminate\Support\Arr;
Forms\Components\Select::make('hospital_id')
->live()
->afterStateUpdated(function (Set $set, Get $get, ?string $state, ?string $old) {
$procedures = $get('procedures');
[$keys , $values] = Arr::divide($procedures);

$set("procedures.{$keys[0]}.procedure_value",'2');

})
->label(__('Hospital'))
->relationship('hospital', 'name')
->required(),
use Illuminate\Support\Arr;
Forms\Components\Select::make('hospital_id')
->live()
->afterStateUpdated(function (Set $set, Get $get, ?string $state, ?string $old) {
$procedures = $get('procedures');
[$keys , $values] = Arr::divide($procedures);

$set("procedures.{$keys[0]}.procedure_value",'2');

})
->label(__('Hospital'))
->relationship('hospital', 'name')
->required(),
14 replies
FFilament
Created by Daniel on 4/9/2024 in #❓┊help
how to use set in a repeater
I'm using
$set('procedures/procedures/0/procedure value','2');
$set('procedures/procedures/0/procedure value','2');
inside the hospital select to try to get to the repeater, but I couldn't
14 replies
FFilament
Created by Daniel on 4/9/2024 in #❓┊help
how to use set in a repeater
and this is my tab with the repeater inside:
Tabs\Tab::make('Procedures')
->live()
->hidden(function(Get $get){
if(! empty($get('anesthetist_group_id')) && ! empty($get('hospital_id'))){
return false;
}
return true;
})
->schema([
Repeater::make('procedures')
->columns(3)
->schema([
Select::make('procedure_id')
->options(Procedure::all()->pluck('name','id'))
->live()
->afterStateUpdated(function (Set $set, Get $get, ?string $state, ?string $old) {
$hospital = Hospital::find($get('../../hospital_id'));
$anesthetistGroup = AnesthetistGroup::find($get('../../anesthetist_group_id'));

$procedureValue = ProcedureValue::where('hospital_id',$hospital->id)
->where('anesthetist_group_id',$anesthetistGroup->id)
->where('procedure_id',$state);

if($procedureValue->exists()){
$set('procedure_value',$procedureValue->first()->value);
}else{
Notification::make('')
->title('O procedimento não existe para esse grupo de anestesista neste hospital')

->warning()
->send()}})
Tabs\Tab::make('Procedures')
->live()
->hidden(function(Get $get){
if(! empty($get('anesthetist_group_id')) && ! empty($get('hospital_id'))){
return false;
}
return true;
})
->schema([
Repeater::make('procedures')
->columns(3)
->schema([
Select::make('procedure_id')
->options(Procedure::all()->pluck('name','id'))
->live()
->afterStateUpdated(function (Set $set, Get $get, ?string $state, ?string $old) {
$hospital = Hospital::find($get('../../hospital_id'));
$anesthetistGroup = AnesthetistGroup::find($get('../../anesthetist_group_id'));

$procedureValue = ProcedureValue::where('hospital_id',$hospital->id)
->where('anesthetist_group_id',$anesthetistGroup->id)
->where('procedure_id',$state);

if($procedureValue->exists()){
$set('procedure_value',$procedureValue->first()->value);
}else{
Notification::make('')
->title('O procedimento não existe para esse grupo de anestesista neste hospital')

->warning()
->send()}})
14 replies