mile4841
mile4841
FFilament
Created by mile4841 on 9/18/2024 in #❓┊help
How to re render the table
$this->resetTable(); is the solution
4 replies
FFilament
Created by mile4841 on 9/18/2024 in #❓┊help
How to re render the table
Radio::make("type_report")
->label(__("inputs.statistics-report-type"))
->options([
"found" => __("inputs.statistics-report-success"),
"not_found" => __("inputs.statistics-report-unsuccess"),
"all" => __("inputs.statistics-report-all"),
])
->inline()
->inlineLabel(false)
->default("found")
->rules(['required', "in:all,found,not_found"])
->live()
->afterStateUpdated(function(Get $get){
$this->formData['type_report'] = $get("type_report");
// i would like here to tell mine table re render
})
->columnSpan(1),
Radio::make("type_report")
->label(__("inputs.statistics-report-type"))
->options([
"found" => __("inputs.statistics-report-success"),
"not_found" => __("inputs.statistics-report-unsuccess"),
"all" => __("inputs.statistics-report-all"),
])
->inline()
->inlineLabel(false)
->default("found")
->rules(['required', "in:all,found,not_found"])
->live()
->afterStateUpdated(function(Get $get){
$this->formData['type_report'] = $get("type_report");
// i would like here to tell mine table re render
})
->columnSpan(1),
4 replies
FFilament
Created by mile4841 on 9/17/2024 in #❓┊help
live method is rendering mine table
The form data in component to the table component
11 replies
FFilament
Created by mile4841 on 9/17/2024 in #❓┊help
live method is rendering mine table
Thanks, but how i will send
11 replies
FFilament
Created by mile4841 on 9/17/2024 in #❓┊help
live method is rendering mine table
Do you know something that could help me?
11 replies
FFilament
Created by mile4841 on 9/17/2024 in #❓┊help
live method is rendering mine table
Yes that is true i am using live but not in the table i am using in the form, is somehow need to stop re render from the form inputs button should do re render
11 replies
FFilament
Created by mile4841 on 9/17/2024 in #❓┊help
live method is rendering mine table
Sorry i forgot to close past post, it is solved but now this problem happens
11 replies
FFilament
Created by mile4841 on 9/17/2024 in #❓┊help
Live method is calling mine action
Solve it but with work around
@if (static::$isRender)
<div wire:ignore>
@if ($this->displayTable)
<h1>{{ $this->outputText }}</h1>
{{ $this->table }}
@endif
</div>
@else
<div>
@if ($this->displayTable)
<h1>{{ $this->outputText }}</h1>
{{ $this->table }}
@endif
</div>
@endif
@if (static::$isRender)
<div wire:ignore>
@if ($this->displayTable)
<h1>{{ $this->outputText }}</h1>
{{ $this->table }}
@endif
</div>
@else
<div>
@if ($this->displayTable)
<h1>{{ $this->outputText }}</h1>
{{ $this->table }}
@endif
</div>
@endif
6 replies
FFilament
Created by mile4841 on 9/17/2024 in #❓┊help
Live method is calling mine action
mine blade view
<x-filament-panels::page>
<x-filament-panels::form wire:submit="save">
{{ $this->form }}
<x-filament-panels::form.actions :actions="$this->getFormActions()" />
@if ($this->displayTable)
<h1>{{ $this->outputText }}</h1>
{{ $this->table }}
@endif
</x-filament-panels::form >
</x-filament-panels::page>
<x-filament-panels::page>
<x-filament-panels::form wire:submit="save">
{{ $this->form }}
<x-filament-panels::form.actions :actions="$this->getFormActions()" />
@if ($this->displayTable)
<h1>{{ $this->outputText }}</h1>
{{ $this->table }}
@endif
</x-filament-panels::form >
</x-filament-panels::page>
6 replies
FFilament
Created by mile4841 on 9/17/2024 in #❓┊help
Live method is calling mine action
6 replies
FFilament
Created by mile4841 on 9/16/2024 in #❓┊help
Validation for custom page
DatePicker::make("start_date")
->label(__("inputs.statistics-start-date"))
->hidden(function(Get $get){
if($get("time") === "all") return true;
})
->native(false)
->live()
->required(function(Get $get){
if($get("time") === "interval") return true;
})
->maxDate(function(Get $get, Set $set){
$endDate = $get('end_date');
if ($endDate) {
return Carbon::parse($endDate)->subDay();
}
return now();
})
,
DatePicker::make("end_date")
->label(__("inputs.statistics-end-date"))
->hidden(function(Get $get){
if($get("time") === "all") return true;
})
->required(function(Get $get){
if($get("time") === "interval") return true;
})
->live()
->minDate(function(Get $get, Set $set){
$startDate = $get('start_date');
if ($startDate) {
return Carbon::parse($startDate)->addDay();
}
return now();
})
->native(false)
DatePicker::make("start_date")
->label(__("inputs.statistics-start-date"))
->hidden(function(Get $get){
if($get("time") === "all") return true;
})
->native(false)
->live()
->required(function(Get $get){
if($get("time") === "interval") return true;
})
->maxDate(function(Get $get, Set $set){
$endDate = $get('end_date');
if ($endDate) {
return Carbon::parse($endDate)->subDay();
}
return now();
})
,
DatePicker::make("end_date")
->label(__("inputs.statistics-end-date"))
->hidden(function(Get $get){
if($get("time") === "all") return true;
})
->required(function(Get $get){
if($get("time") === "interval") return true;
})
->live()
->minDate(function(Get $get, Set $set){
$startDate = $get('start_date');
if ($startDate) {
return Carbon::parse($startDate)->addDay();
}
return now();
})
->native(false)
14 replies
FFilament
Created by mile4841 on 9/16/2024 in #❓┊help
Validation for custom page
code that works for me
14 replies
FFilament
Created by mile4841 on 9/16/2024 in #❓┊help
Validation for custom page
thanks
14 replies
FFilament
Created by mile4841 on 9/16/2024 in #❓┊help
Validation for custom page
thanks bro i will try
14 replies
FFilament
Created by mile4841 on 9/16/2024 in #❓┊help
Validation for custom page
yeah but i also need to check is start_date > end_date
14 replies
FFilament
Created by mile4841 on 9/16/2024 in #❓┊help
Validation for custom page
the error i am getting for An attempt was made to evaluate a closure for [Filament\Forms\Components\DatePicker], but [$attribute] was unresolvable. for this part of the code

DatePicker::make("start_date")
->label(__("inputs.statistics-start-date"))
->hidden(function(Get $get){
if($get("time") === "all") return true;
})
->native(false)
->rules([
function($attribute, $value, $fail){
dd($value); // i here get an error fot the $attribute
}
]),

DatePicker::make("start_date")
->label(__("inputs.statistics-start-date"))
->hidden(function(Get $get){
if($get("time") === "all") return true;
})
->native(false)
->rules([
function($attribute, $value, $fail){
dd($value); // i here get an error fot the $attribute
}
]),
14 replies
FFilament
Created by mile4841 on 9/16/2024 in #❓┊help
Validation for custom page
14 replies
FFilament
Created by mile4841 on 9/16/2024 in #❓┊help
I am getting an error for the custom filament page
okay thanks
10 replies
FFilament
Created by mile4841 on 9/16/2024 in #❓┊help
I am getting an error for the custom filament page
Is that in the docs?
10 replies
FFilament
Created by mile4841 on 9/16/2024 in #❓┊help
I am getting an error for the custom filament page
thanks bro it is working
10 replies