tesse05
tesse05
FFilament
Created by tesse05 on 11/6/2024 in #❓┊help
SpatieMediaLibraryFileUpload dynamic MIME types?
hi guys! having a reactive field in a normal EditForm, its possible to set dynamically the ->acceptedFileTypes([]) depends on the field previous selected?? I'm trying to do with the $get but it doesn't update the accepted mime types...
2 replies
FFilament
Created by tesse05 on 10/15/2024 in #❓┊help
issue when having a form inside a livewire component
No description
3 replies
FFilament
Created by tesse05 on 8/6/2024 in #❓┊help
rich editor accept filetypes?
Its possible in a Rich Editor field to define accept file-types? I want users to upload only images
5 replies
FFilament
Created by tesse05 on 7/31/2024 in #❓┊help
calendar year view?
any idea of how to build a year view calendar combining this plugin? https://github.com/saade/filament-fullcalendar
6 replies
FFilament
Created by tesse05 on 7/29/2024 in #❓┊help
custom plugin, popup not opening when its inside a modal
i'm using this plugin https://github.com/nolanlawson/emoji-picker-element/tree/master to build a custom field called EmojiPicker. It's an input which only accepts ONE emoji, no text. when in EditForm it works fine, but not when the field is in a modal form... I'm not sure how to deal with it. No errors in the console, just the popup not opening. I'd opened a mini repo to test it. https://github.com/xiaoCreagia/emoji-picker-test credentials are: [email protected] admin please, any idea??
5 replies
FFilament
Created by tesse05 on 7/10/2024 in #❓┊help
repeatable entry edit modal
No description
7 replies
FFilament
Created by tesse05 on 5/27/2024 in #❓┊help
custom widgets
No description
6 replies
FFilament
Created by tesse05 on 5/9/2024 in #❓┊help
spatie media library file upload load file
No description
3 replies
FFilament
Created by tesse05 on 5/9/2024 in #❓┊help
Spatie Media Library overriding files
No description
2 replies
FFilament
Created by tesse05 on 4/29/2024 in #❓┊help
custom overview page with sidebar
No description
4 replies
FFilament
Created by tesse05 on 4/25/2024 in #❓┊help
render blade in subheading?
No description
5 replies
FFilament
Created by tesse05 on 2/14/2024 in #❓┊help
inputs style
Hi there! I want to style all the inputs (i'm using only form builder), how can I achieve this? Don't know which selectors I should use... What I want is to make inptus smaller and less padding
4 replies
FFilament
Created by tesse05 on 2/1/2024 in #❓┊help
BUG: ->multiple() in SpatieMediaLibraryFileUpload not working
No description
2 replies
FFilament
Created by tesse05 on 1/29/2024 in #❓┊help
Spatie preview image?
No description
14 replies
FFilament
Created by tesse05 on 1/29/2024 in #❓┊help
SpatieMediaLibraryFileUpload not showing
I'm using Form Builder in a Livewire normal component. I have this field:
SpatieMediaLibraryFileUpload::make('main_image')
->disk('media')
->acceptedFileTypes([
'image/png', 'image/jpeg'
])
->enableDownload()
->collection('main-image'),
SpatieMediaLibraryFileUpload::make('main_image')
->disk('media')
->acceptedFileTypes([
'image/png', 'image/jpeg'
])
->enableDownload()
->collection('main-image'),
firstly, when I do submit I save the media like this:
foreach($this->main_image as $image) {
$course->addMedia($image)
->toMediaCollection('main-image','media');
}
foreach($this->main_image as $image) {
$course->addMedia($image)
->toMediaCollection('main-image','media');
}
At that point, media is saved successfully in the database, and attached correctly to the model. When I refresh the page, the Spatie field looks like empty. I have tried to add
use WithMedia;
public $mediaComponentNames = ['main_image'];
public $main_image;
use WithMedia;
public $mediaComponentNames = ['main_image'];
public $main_image;
but no changes are. Any thought?
18 replies
FFilament
Created by tesse05 on 1/19/2024 in #❓┊help
currency mask?
I have an input like this:
TextInput::make('amount')
->label('Import')
->mask(fn(Mask $mask) => $mask
->patternBlocks([
'money' => fn(Mask $mask) => $mask
->numeric()
->decimalPlaces(2)
->thousandsSeparator('.')
->decimalSeparator(','),
])
->pattern('money€')),
TextInput::make('amount')
->label('Import')
->mask(fn(Mask $mask) => $mask
->patternBlocks([
'money' => fn(Mask $mask) => $mask
->numeric()
->decimalPlaces(2)
->thousandsSeparator('.')
->decimalSeparator(','),
])
->pattern('money€')),
At first it shows the '€' symbol, and after trying to add a prohibitted char(like space or a letter) it shows too. But I want to show the symbol always, I mean, while I was typing.
6 replies
FFilament
Created by tesse05 on 12/14/2023 in #❓┊help
locale switcher only with form builder
HI dudes! I have an app only with form builder installed. I need to implement a locale switcher. It's possible to do the trick? And how?
1 replies
FFilament
Created by tesse05 on 11/2/2023 in #❓┊help
Filter queries not override the eloquent query
Hi there! I have a FIlter in my Table Builder, in which I would like to filter by a computed property setted in resource main page, eloquent query method. I have check that the query works fine at SQL editor. When I apply the ->query() method from filter, it overrides the eloquent query and the field is not found. How to manage it??
Filter::make('available_slots')
->form([
TextInput::make('qtat')
->label('Aforament mínim')
->numeric()
])
->query(function (
Builder $query,
array $data
): Builder {
// it overrides $livewire->getTableQuery()
return $query
->when(
$data['qtat'],
function (
Builder $query,
$availableSlots,
): Builder {
return $query->having('available_slots',
'>=', $availableSlots);
});
})
Filter::make('available_slots')
->form([
TextInput::make('qtat')
->label('Aforament mínim')
->numeric()
])
->query(function (
Builder $query,
array $data
): Builder {
// it overrides $livewire->getTableQuery()
return $query
->when(
$data['qtat'],
function (
Builder $query,
$availableSlots,
): Builder {
return $query->having('available_slots',
'>=', $availableSlots);
});
})
9 replies
FFilament
Created by tesse05 on 10/19/2023 in #❓┊help
open modal from another modal
I follow the steps given but I don't really know how to follow... from a RelationManager where and how I attach the modal view? https://filamentphp.com/docs/2.x/admin/pages/actions#getting-started On my RelationTable:
->extraModalActions([
\Filament\Tables\Actions\Modal\Actions\Action::make('preview')
->button()
->label(__('filament-export::export_action.preview_action_label'))
->color('secondary')
->icon(config('filament-export.preview_icon'))
->action('openPreviewModal'),
])
->slideOver()
->extraModalActions([
\Filament\Tables\Actions\Modal\Actions\Action::make('preview')
->button()
->label(__('filament-export::export_action.preview_action_label'))
->color('secondary')
->icon(config('filament-export.preview_icon'))
->action('openPreviewModal'),
])
->slideOver()
On my RelationManager:
public function openPreviewModal(): void
{
$recordId = $this->mountedTableActionRecord;
$emailExtraInfo = $this->mountedTableActionData['email_extra_info'];
$this->dispatchBrowserEvent('open-preview-modal', ['id' =>$recordId,'field' => $emailExtraInfo]);
}
public function openPreviewModal(): void
{
$recordId = $this->mountedTableActionRecord;
$emailExtraInfo = $this->mountedTableActionData['email_extra_info'];
$this->dispatchBrowserEvent('open-preview-modal', ['id' =>$recordId,'field' => $emailExtraInfo]);
}
3 replies
FFilament
Created by tesse05 on 10/13/2023 in #❓┊help
datetimepicker enable specific dates
I have seen that its possible to disable specific dates. It's possible to enable only certain days? Or how I can disable all days from calendar except the desired days? Thanks!
2 replies