dyo
dyo
FFilament
Created by dyo on 7/10/2024 in #❓┊help
Problem with formatStateUsing in TextColumn of custom table attribute
I just upgrading filament v2 to v3, but I got issue in textcolumn class with formatStateUsing method..
Tables\Columns\TextColumn::make('qty')->formatStateUsing(function ($record) {
$qty = Konfirmasi::where('trans_ref', $record->id)->sukses()->count();
return number_format($qty, 0);
}),
Tables\Columns\TextColumn::make('qty')->formatStateUsing(function ($record) {
$qty = Konfirmasi::where('trans_ref', $record->id)->sukses()->count();
return number_format($qty, 0);
}),
The qty attribute is not in table schema.. I need extra column to show the custom query.. In v2, the code above is working, but in v3, the column is returned blank.. What should I do to make it work in v3?
9 replies
FFilament
Created by dyo on 7/9/2024 in #❓┊help
Using cached computed property as select options in resource class
How can I do that?
2 replies
FFilament
Created by dyo on 7/5/2024 in #❓┊help
Reset stat overview widget data in custom page
I'm using filament table in custom page, with stat overview above the table and using InteractsWithPageTable in the widget class. I also using a custom filter, not filament table filter. After submitting the filter, I called $this->resetTable() to apply the filter. My question is, how can I also reset the widget data?
3 replies
FFilament
Created by dyo on 7/4/2024 in #❓┊help
Problem with wire:init and $this->table in custom page
Why does wire:init prevent $this->table from appearing, while the method is being executed on the custom page? Even though the method called in wire:init has nothing to do with the table method in the component.
8 replies
FFilament
Created by dyo on 6/27/2024 in #❓┊help
formatStateUsing method in TextColumn is not working at the custom page
Why my formatStateUsing method in TextColumn is not working at the custom page. I try debugging the problem with simple formatState like
TextColumn::make('name')
->formatStateUsing(fn ($record) => $record->id)
TextColumn::make('name')
->formatStateUsing(fn ($record) => $record->id)
But it returns nothing.
2 replies
FFilament
Created by dyo on 6/27/2024 in #❓┊help
resetTable with table loading animation
How can I have a loading table animation when resetTable is triggered?
5 replies
FFilament
Created by dyo on 6/26/2024 in #❓┊help
Changing navigation color text.
How can I change the color of navigation item text to black?
10 replies
FFilament
Created by dyo on 6/24/2024 in #❓┊help
previous or next button for month in datepicker
How can I have a previous or next button for month navigation in filament datepicker?
5 replies
FFilament
Created by dyo on 6/22/2024 in #❓┊help
Make placeholder text black
How can I make my input placeholder text to be black?
7 replies
FFilament
Created by dyo on 6/13/2024 in #❓┊help
Problem in accessing widget current record
https://filamentphp.com/docs/3.x/panels/resources/widgets#accessing-the-current-record-in-the-widget Can someone help me explain more about accessing widget current record? My widget class:
public ?Model $record = null;

protected static ?string $pollingInterval = '30s';

public function mount($record)
{
$this->record = $record;
}

protected function getCards(): array
{
dd($this->record);
$total = max(Konfirmasi::where('campaigns_id', $this->record)->count(), 1);

$pending = Campaign::find($this->record)
->konfirmasi()->pending()->count();

return [
Stat::make('Completed', $sukses)
->color('success')
->description('Rp ' . number_format(Campaign::find($this->record)
->konfirmasi()->sukses()->sum('dana'))
. ' (' . number_format($sukses / $total * 100, 1) . '%)')
->descriptionIcon('heroicon-m-check-badge'),
public ?Model $record = null;

protected static ?string $pollingInterval = '30s';

public function mount($record)
{
$this->record = $record;
}

protected function getCards(): array
{
dd($this->record);
$total = max(Konfirmasi::where('campaigns_id', $this->record)->count(), 1);

$pending = Campaign::find($this->record)
->konfirmasi()->pending()->count();

return [
Stat::make('Completed', $sukses)
->color('success')
->description('Rp ' . number_format(Campaign::find($this->record)
->konfirmasi()->sukses()->sum('dana'))
. ' (' . number_format($sukses / $total * 100, 1) . '%)')
->descriptionIcon('heroicon-m-check-badge'),
I get error Unable to resolve dependency [Parameter #0 [ <required> $record ]] in class Widget What should I do?
8 replies
FFilament
Created by dyo on 6/12/2024 in #❓┊help
About stripCharacters in TextInput Custom Filter
How to use stripCharacters in TextInput at custom table filters, and ignoring the added character in search criteria? For example I have a filter to set minimum value of data, if the user typed 50,000, it become '50,000' in filter, where it should be 50000.
3 replies
FFilament
Created by dyo on 6/11/2024 in #❓┊help
Suggestion for dependant fields
Can someone suggest me what is the best approach for dependant fields.. In my case, I want my input total_price to be dependant to: 1. room_id, which is later will have to get a price attribute from room model, required 2. discount, numeric input, not required 3. additional_services (with repeater), has name and price attribute, can be 0 items or not required. So later, the input price will be a calculated data of those above 3 inputs. Currently the form is in resource class.. I'm using filament v2.
17 replies
FFilament
Created by dyo on 6/10/2024 in #❓┊help
Problem with afterStateUpdated in ViewField
Why after I upgraded my Filament to v3, the afterStateUpdated in ViewField is not working anymore? I want to fill other inputs based on data in ViewField.
25 replies
FFilament
Created by dyo on 6/6/2024 in #❓┊help
Missing filament primary color after version upgrade
No description
18 replies
FFilament
Created by dyo on 6/4/2024 in #❓┊help
Route [filament.pages.dashboard] not defined after filament upgrade
I just upgrading my filament version to v3. After running php artisan filament:install, i got error *Route [filament.pages.dashboard] not defined. * in /admin. I'm using custom Dashboard, and i've followed the steps from here https://filamentphp.com/docs/3.x/panels/dashboard#customizing-the-dashboard-page I've also tried running php artisan optimize. what am I missing?
20 replies
FFilament
Created by dyo on 5/24/2024 in #❓┊help
Problem in a stat overview in resource list
How can I have a stat overview widget in my resource list, that follows the query of table filters, when user filters the table and when user reset the filters in filament v2?
4 replies
FFilament
Created by dyo on 4/30/2024 in #❓┊help
Problem with updated data in form repeater
how to directly trigger a property in form repeater to be updated, when the repeater was cloned or deleted in filament v2? I want to live calculate other property based on data in the repeater. for example, a property in repeater is called 'list_data' and calculated property is called 'sum'.
4 replies
FFilament
Created by dyo on 4/30/2024 in #❓┊help
hide repeater item's header
No description
2 replies
FFilament
Created by dyo on 3/26/2024 in #❓┊help
Need help with how to create a loading modal
I have a page action to do some process for a bunch of data. Can someone give me suggestion how to show a loading bar while it processing in a modal with filament? So I can tell the user how many data will be processed and what is the progress.
3 replies
FFilament
Created by dyo on 3/14/2024 in #❓┊help
Porblem with resource link in multi tenancy
how can I create a list record resource link in <a href="">, if i'm using multi tenancy? I want to add the link in helperText in select form component.
->helperText(
new HtmlString(
'<a href="/admin/satuan" target="_blank">Ubah opsi satuan</a>'
)
),
->helperText(
new HtmlString(
'<a href="/admin/satuan" target="_blank">Ubah opsi satuan</a>'
)
),
What should I do?
2 replies