Sjoerd24
Sjoerd24
FFilament
Created by Sjoerd24 on 11/14/2024 in #❓┊help
[Importer] Only update values that are empty/null
Now did it like this, seems to be working:
protected function beforeFill(): void
{
if(isset($this->record) && $this->record->exists) {
// Cycle through the columns and only leave the ones that are not empty
foreach ($this->record->getAttributes() as $key => $value) {
if (!empty($value)) {
unset($this->data[$key]);
}
}
}

}
protected function beforeFill(): void
{
if(isset($this->record) && $this->record->exists) {
// Cycle through the columns and only leave the ones that are not empty
foreach ($this->record->getAttributes() as $key => $value) {
if (!empty($value)) {
unset($this->data[$key]);
}
}
}

}
4 replies
FFilament
Created by Raziul Islam on 9/1/2024 in #❓┊help
Adding demo mode in filament application
I would just set up a seperate demo enviroment and reset the database every 10 of 15 min. This looks like a very complicated problem, also if you want to give user a "taste" of how it works. This is the same as the official filament demo website, you can find the code in Github if you need an example.
12 replies
FFilament
Created by Garadit on 8/5/2024 in #❓┊help
How is demo.filamentphp.com deployed?
Caching filament components and icons helps a lot. Just follow all the tips mentioned above. 👆
9 replies
FFilament
Created by Steve_OH on 6/29/2024 in #❓┊help
Unique record within tenancy rather than across the board?
Maybe use for helping the impersonate plugin or something?
6 replies
FFilament
Created by Juampi on 6/28/2024 in #❓┊help
Is it possible to make clusters side navbar collapsible?
I've talked about this with Zep, but sadly not possible right now. I would also think this is an handy addition, maybe possible to add it too Polar for funding? (dont think users can add stuff to there right?)
3 replies
FFilament
Created by Steve_OH on 6/29/2024 in #❓┊help
Unique record within tenancy rather than across the board?
If you are using tenants, this is a better solution:
Forms\Components\TextInput::make('slug')
->required()
->unique(
ignoreRecord: true,
modifyRuleUsing: function (Unique $rule) {
return $rule->where('organizations_id', Filament::getTenant()->id);
}),
Forms\Components\TextInput::make('slug')
->required()
->unique(
ignoreRecord: true,
modifyRuleUsing: function (Unique $rule) {
return $rule->where('organizations_id', Filament::getTenant()->id);
}),
6 replies
FFilament
Created by Davide Cariola on 6/14/2024 in #❓┊help
Customize Filter style
the location of the label you can change with ->inline(false), the rest should be doable with adjusting the CSS. Not my area of expertise though.
5 replies
FFilament
Created by rabol on 6/14/2024 in #❓┊help
Is it possible to make the toggle column dropdown scrollable?
Why not make it a multiple select field? If it is anyways just on or off that is logic you can handle in the code somewhere..
7 replies
FFilament
Created by Guariero on 6/7/2024 in #❓┊help
ToolTip with FullCalendar
You can better post this in #saade-fullcalendar . That said what code are you now using for your tooltip? I have created pretty long onces but necer tried a whole list.
3 replies
FFilament
Created by TheNastyPasty on 6/7/2024 in #❓┊help
Only show label in a infolist
Something like ->formatStateUsing(fn() => ‘’) ?
16 replies
FFilament
Created by Sjoerd24 on 6/2/2024 in #❓┊help
extraModalFooterActions, retrieving post $data?
ugh relationships are not save like this of course, anyone a better solution?
7 replies
FFilament
Created by Sjoerd24 on 6/2/2024 in #❓┊help
extraModalFooterActions, retrieving post $data?
Ok so this works, but it feels very dirty:
->action(function (Schedule $record, Component $livewire) {
dd($livewire->mountedActionsData[0]);
// this outputs the correct form data
})
->action(function (Schedule $record, Component $livewire) {
dd($livewire->mountedActionsData[0]);
// this outputs the correct form data
})
Hope this helps someone else, but I hope there is a better way of doing this.
7 replies
FFilament
Created by Sjoerd24 on 6/2/2024 in #❓┊help
extraModalFooterActions, retrieving post $data?
I tried adding something like a mix between the two:
->extraModalFooterActions([
Action::make('editAll')
->label(__('Edit all future shifts'))
->color('warning')
//->requiresConfirmation()
//->cancelParentActions()
->makeModalSubmitAction(name: 'editAllFutureOccurrences', arguments: ['action' => 'editAll' ])
->extraModalFooterActions([
Action::make('editAll')
->label(__('Edit all future shifts'))
->color('warning')
//->requiresConfirmation()
//->cancelParentActions()
->makeModalSubmitAction(name: 'editAllFutureOccurrences', arguments: ['action' => 'editAll' ])
But using ->makeModalSubmitActionmakes the Action static..? I would also think that adding a second button to update all events (with requiresConfirmation) wouldn't be this hard. 😅
7 replies
FFilament
Created by Sjoerd24 on 6/2/2024 in #❓┊help
extraModalFooterActions, retrieving post $data?
Yeah I now better understand the problem, that makes sense. If I dd($action) i dont see any form data in there. How can I solve this problem though? Or I have to just revert to something like:
->extraModalFooterActions(fn (Action $action): array => [
// but without the requiresConfirmation() method
$action->makeModalSubmitAction('editAllFutureOccurrences', arguments: ['action' => 'editAll' ])
->color('warning')
->label(__('Edit all future shifts')),
->extraModalFooterActions(fn (Action $action): array => [
// but without the requiresConfirmation() method
$action->makeModalSubmitAction('editAllFutureOccurrences', arguments: ['action' => 'editAll' ])
->color('warning')
->label(__('Edit all future shifts')),
7 replies
FFilament
Created by rddev.088 on 5/21/2024 in #❓┊help
multitenancy
Yeah that should be possible. You could check if a user has a team role and then display things that it needs. You can do that in an applyTenantScopes middleware like defined in the docs.
6 replies
FFilament
Created by rddev.088 on 5/21/2024 in #❓┊help
multitenancy
You can make almost everything with filament! 🙂 I don't get exactly what you want but I think it should be possible.
6 replies
FFilament
Created by nighty on 5/19/2024 in #❓┊help
JsTree integration to Filament
I dont know exactly what your use case is, but i use the selecttree plugin. That is working very good in my project.
5 replies
FFilament
Created by Arshavir on 5/15/2024 in #❓┊help
Many-to-Many relationship - get name from third table
how does your model looks? Subject (model)?
49 replies
FFilament
Created by Tjiel on 5/13/2024 in #❓┊help
Looking for an openinghours form field in filament
Love that plug-in. 👌
8 replies
FFilament
Created by alonemz on 5/2/2024 in #❓┊help
Resource page that can share the same Model
I dont understand your question, could you reformulate?
30 replies