F alko
F alko
Explore posts from servers
FFilament
Created by F alko on 9/25/2024 in #❓┊help
Format state on empty column
Tables\Columns\TextColumn::make('width')
->label('Size')
->state(fn($record) => sprintf(
'%s x %s x %s mm',
$record->width ?? '?',
$record->height ?? '?',
$record->length ?? '?',
)),
Tables\Columns\TextColumn::make('width')
->label('Size')
->state(fn($record) => sprintf(
'%s x %s x %s mm',
$record->width ?? '?',
$record->height ?? '?',
$record->length ?? '?',
)),
5 replies
FFilament
Created by F alko on 9/25/2024 in #❓┊help
Format state on empty column
Nice! That's even cleaner.
5 replies
FFilament
Created by F alko on 9/25/2024 in #❓┊help
Format state on empty column
Ohhh, I can use the default like this:
Tables\Columns\TextColumn::make('width')
->label('Size')
->default(fn($record) => sprintf(
'%s x %s x %s mm',
$record->width ?? '?',
$record->height ?? '?',
$record->length ?? '?',
))
->formatStateUsing(fn($record) => sprintf(
'%s x %s x %s mm',
$record->width ?? '?',
$record->height ?? '?',
$record->length ?? '?',
))
Tables\Columns\TextColumn::make('width')
->label('Size')
->default(fn($record) => sprintf(
'%s x %s x %s mm',
$record->width ?? '?',
$record->height ?? '?',
$record->length ?? '?',
))
->formatStateUsing(fn($record) => sprintf(
'%s x %s x %s mm',
$record->width ?? '?',
$record->height ?? '?',
$record->length ?? '?',
))
5 replies
FFilament
Created by F alko on 9/6/2024 in #❓┊help
Format Pivot fields in Relation Manager
Anyone?
6 replies
FFilament
Created by F alko on 9/6/2024 in #❓┊help
Format Pivot fields in Relation Manager
Sadly it does not. That works for 1 column, but I want to concat multiple values of the pivot.
6 replies
FFilament
Created by F alko on 9/6/2024 in #❓┊help
Format Pivot fields in Relation Manager
Anyone? 🙂
6 replies
TTwenty
Created by F alko on 7/19/2024 in #❓︱help
Cannot find field metadata item for field name somethingDeleted on object person
Problem is here:
if (!fieldMetadataItem) {
throw new Error(
`Cannot find field metadata item for field name ${diffKey} on object ${mainObjectMetadataItem.nameSingular}`,
);
}
if (!fieldMetadataItem) {
throw new Error(
`Cannot find field metadata item for field name ${diffKey} on object ${mainObjectMetadataItem.nameSingular}`,
);
}
If we change it to return null; instead of throwing an error, it sort of works. Simple returning a EventFieldDiff doesn't work, fieldMetadataItem is required, eventho it is defined as fieldMetadataItem | undefined.
10 replies
TTwenty
Created by F alko on 7/19/2024 in #❓︱help
Cannot find field metadata item for field name somethingDeleted on object person
10 replies
TTwenty
Created by F alko on 7/19/2024 in #❓︱help
Confirm deletions / disable deletion for some users
I went ahead and made a PR to fix it: https://github.com/twentyhq/twenty/pull/6357 The functionality was already there, but blocked by a bug.
4 replies
TTwenty
Created by F alko on 7/19/2024 in #❓︱help
Cannot find field metadata item for field name somethingDeleted on object person
Self hosting. It happens on current main when a history record refers to a change in a deleted field
10 replies
FFilament
Created by F alko on 10/18/2023 in #❓┊help
Reusing actions
Thanks guys!
15 replies
FFilament
Created by F alko on 10/18/2023 in #❓┊help
Reusing actions
How do I include it then? Like this?
->actions([
Tables\Actions\ViewAction::make(),
Tables\Actions\EditAction::make(),
CustomAction::setUp(),
])
->actions([
Tables\Actions\ViewAction::make(),
Tables\Actions\EditAction::make(),
CustomAction::setUp(),
])
My question was if there is any documentation on creating reusable actions. Guessing the answer to that is no?
15 replies
FFilament
Created by F alko on 9/22/2023 in #❓┊help
Issue with money formatting
Yea, so 450 should become 4.50 not 4.00 right?
6 replies
FFilament
Created by Ashk on 8/18/2023 in #❓┊help
Global resources in tenant
We are abusing the multitenancy for tool environments. So for product data we need the resource to be global, but accessible from the tenant panel.
13 replies
FFilament
Created by Ashk on 8/18/2023 in #❓┊help
Global resources in tenant
For those who are trying this, just add this to your resource.
public static function scopeEloquentQueryToTenant(Builder $query, Model|null $tenant): Builder
{
return $query;
}
public static function scopeEloquentQueryToTenant(Builder $query, Model|null $tenant): Builder
{
return $query;
}
13 replies
FFilament
Created by F alko on 8/17/2023 in #❓┊help
Customize ImageEditor to allow drawing
Hope more documation becomes available in the near future 😁
29 replies
FFilament
Created by F alko on 8/17/2023 in #❓┊help
Customize ImageEditor to allow drawing
Throwing it into a js file thats always loaded does the trick for now
29 replies
FFilament
Created by F alko on 8/17/2023 in #❓┊help
Customize ImageEditor to allow drawing
Now it tries to load it, but it doesn't work with the vite hmr 🥲
29 replies
FFilament
Created by F alko on 8/17/2023 in #❓┊help
Customize ImageEditor to allow drawing
Ahh, I had to add the ax-load-src to the component!
29 replies
FFilament
Created by F alko on 8/17/2023 in #❓┊help
Customize ImageEditor to allow drawing
I hadn't found that documentation yet.
29 replies