BATMAN
BATMAN
FFilament
Created by BATMAN on 9/25/2023 in #❓┊help
call close function in js
just wanna close the notification when i click any background
7 replies
FFilament
Created by BATMAN on 9/25/2023 in #❓┊help
call close function in js
document.addEventListener('click', (e) => {

// if(e.target !== modal[0] && e.target !== modal[0].children){
// console.log('true', e.target, e.childElementCount);
// }

if (e.target === modal[0] || modal[0].contains(e.target)) {
return;
}


// console.log(e.target, modal);
$(document).ready(function() {
$('a').on("click", function(e) {
return true;
});
});

});
document.addEventListener('click', (e) => {

// if(e.target !== modal[0] && e.target !== modal[0].children){
// console.log('true', e.target, e.childElementCount);
// }

if (e.target === modal[0] || modal[0].contains(e.target)) {
return;
}


// console.log(e.target, modal);
$(document).ready(function() {
$('a').on("click", function(e) {
return true;
});
});

});
7 replies
FFilament
Created by BATMAN on 8/23/2023 in #❓┊help
Custom saving for Checkbox column
i wanna update another column or another table when it is toggled
5 replies
FFilament
Created by BATMAN on 7/19/2023 in #❓┊help
Different forms for create and edit
thx alot
7 replies
FFilament
Created by BATMAN on 3/20/2023 in #❓┊help
insert default value into form with custom action in create
lol didnt know it was that simple thx alot
11 replies
FFilament
Created by BATMAN on 3/20/2023 in #❓┊help
insert default value into form with custom action in create
public static function form(Form $form): Form
{
return $form
->schema([
Card::make()
->schema([
Select::make('nomination_ids')
->label('Nominations')
->options(Nomination::pluck('name','id'))
->multiple()
->required(),

Select::make('nomination_stages')
->label('Nomination Stages')
->options(Application::STATUS)->multiple()
->required(),
])

//
]);
}
public static function form(Form $form): Form
{
return $form
->schema([
Card::make()
->schema([
Select::make('nomination_ids')
->label('Nominations')
->options(Nomination::pluck('name','id'))
->multiple()
->required(),

Select::make('nomination_stages')
->label('Nomination Stages')
->options(Application::STATUS)->multiple()
->required(),
])

//
]);
}
this form is in the StatisticReportResource
11 replies
FFilament
Created by BATMAN on 3/20/2023 in #❓┊help
insert default value into form with custom action in create
this code is in the 'CreateStatisticReportResource' not in the 'StatisticReportResource'
11 replies
FFilament
Created by BATMAN on 3/20/2023 in #❓┊help
insert default value into form with custom action in create
but it says Target [Closure] is not instantiable.
11 replies
FFilament
Created by BATMAN on 3/20/2023 in #❓┊help
insert default value into form with custom action in create
yes
11 replies
FFilament
Created by BATMAN on 3/8/2023 in #❓┊help
Test custom filter
thanks a lot
6 replies
FFilament
Created by BATMAN on 3/8/2023 in #❓┊help
Test custom filter
I think i've solved it, since i have this following custom filter form added to the filter table,
$this->form([
Grid::make(2)->schema([
DateTimePicker::make('from')
->label($fromLabel),
DateTimePicker::make('to')
->disabled()
->label($toLabel),
]),

]);
$this->form([
Grid::make(2)->schema([
DateTimePicker::make('from')
->label($fromLabel),
DateTimePicker::make('to')
->disabled()
->label($toLabel),
]),

]);
in my testing case, i just added array to the
->filterTable("date_time", [
'from' => $alert->first()->date_time,
'to' => $alert->first()->date_to
])
->filterTable("date_time", [
'from' => $alert->first()->date_time,
'to' => $alert->first()->date_to
])
6 replies
FFilament
Created by BATMAN on 3/8/2023 in #❓┊help
how to activate filter dropdown when user clicks into a resource
i just attached the whole filter search on top of the table
3 replies
FFilament
Created by BATMAN on 3/6/2023 in #❓┊help
How to set table default empty, until user has filtered
ok thx alot
6 replies
FFilament
Created by BATMAN on 3/6/2023 in #❓┊help
How to set table default empty, until user has filtered
i know, but it take too long to load, wanna let the user to filter first
6 replies