Alvaro Leon
Alvaro Leon
FFilament
Created by Miyatake on 1/10/2024 in #❓┊help
How to create a resource record from another resource?
You can use a relation manager (https://filamentphp.com/docs/3.x/panels/resources/relation-managers) for a UXed solution, or you can use the method after() into the Action to trigger the Notification.
4 replies
FFilament
Created by Quin. on 12/5/2023 in #❓┊help
FileUpload directly in to the field
Exactly how does not work?
9 replies
FFilament
Created by Quin. on 12/5/2023 in #❓┊help
FileUpload directly in to the field
Have you tried to use
afterStateUpdated()
afterStateUpdated()
method?
9 replies
FFilament
Created by Alvaro Leon on 10/19/2023 in #❓┊help
Troubles changing title name of a RelationshipManager to a __('lang') tag
public static function getTitle(Model $ownerRecord, string $pageClass): string
{
return __('abc');
}
public static function getTitle(Model $ownerRecord, string $pageClass): string
{
return __('abc');
}
Thank you @Vp
5 replies
FFilament
Created by Jordy on 7/19/2023 in #❓┊help
Select Table record for bulk action on click
Yeah but
php
$this->selectedTableRecords[] = getAllSelectableTableRecordKeys();
php
$this->selectedTableRecords[] = getAllSelectableTableRecordKeys();
should work?
17 replies
FFilament
Created by Mohab Mamdouh on 7/19/2023 in #❓┊help
Does filament v3 support multi dashboard ?
This functionality is included in v3 as Panels.
8 replies
FFilament
Created by Jordy on 7/19/2023 in #❓┊help
Select Table record for bulk action on click
Have you tried to use getAllSelectableTableRecordKeys() ?
17 replies
FFilament
Created by Alvaro Leon on 6/3/2023 in #❓┊help
Package CreatePage seems to not working
Well, you will think i'm a noob (sure I'm.) I just deleted everything and mounted it using spatie package skeleton, then It started to work properly.
15 replies
FFilament
Created by Alvaro Leon on 6/3/2023 in #❓┊help
Package CreatePage seems to not working
I'm going to try something then I'll be back with results (that something is passing it into another fresh FilamentPHP install)
15 replies
FFilament
Created by Alvaro Leon on 6/3/2023 in #❓┊help
Package CreatePage seems to not working
In config/app.php
...
'providers' => [
\FastofiCorp\FilamentPrintables\FilamentPrintablesServiceProvider::class,
...
...
'providers' => [
\FastofiCorp\FilamentPrintables\FilamentPrintablesServiceProvider::class,
...
15 replies
FFilament
Created by Alvaro Leon on 6/3/2023 in #❓┊help
Package CreatePage seems to not working
Actually i'm using the package this way:
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/",
"FastofiCorp\\FilamentPrintables\\": "packages/fastofi-corp/filament-printables/src"

}
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/",
"FastofiCorp\\FilamentPrintables\\": "packages/fastofi-corp/filament-printables/src"

}
15 replies
FFilament
Created by Alvaro Leon on 6/3/2023 in #❓┊help
Package CreatePage seems to not working
Using the $resources array as
<?php

namespace FastofiCorp\FilamentPrintables;

use Closure;

use Filament\PluginServiceProvider;
use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\Commands\InstallCommand;
use FastofiCorp\FilamentPrintables\Resources\FilamentPrintableResource;

class FilamentPrintablesServiceProvider extends PluginServiceProvider
{

protected array $resources = [
FilamentPrintableResource::class,
];
...
<?php

namespace FastofiCorp\FilamentPrintables;

use Closure;

use Filament\PluginServiceProvider;
use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\Commands\InstallCommand;
use FastofiCorp\FilamentPrintables\Resources\FilamentPrintableResource;

class FilamentPrintablesServiceProvider extends PluginServiceProvider
{

protected array $resources = [
FilamentPrintableResource::class,
];
...
15 replies
FFilament
Created by Alvaro Leon on 5/16/2023 in #❓┊help
CreateAction modal not working when TableComponent is used inside a view inside a resource in Edit
Ok, you gave an idea of how to solve it for my purpose and It's using a Page component. Also according to this (the forms html situation), sending all the modals to another part of the code (maybe a component that stores modal form 😅 ) should work. Will try both. Thanks 😅
7 replies
FFilament
Created by Alvaro Leon on 5/16/2023 in #❓┊help
CreateAction modal not working when TableComponent is used inside a view inside a resource in Edit
UPDATE: It is kinda not working for the first table Component (I mean the one in the "Antecedentes" section), the others are OK. Thing is, those three are the same table Component, but it seems the error is not in the component because the same thing happens with diferent table components.
7 replies
FFilament
Created by Alvaro Leon on 5/11/2023 in #❓┊help
TimePicker and DateTimePicker incorrect behaviour due to {{ $field::class }}.display-text
Thanks for the answer. It worked.
17 replies
FFilament
Created by Alvaro Leon on 5/11/2023 in #❓┊help
TimePicker and DateTimePicker incorrect behaviour due to {{ $field::class }}.display-text
Sorry for the delay. I'll put the button here just for not to complicate everything (that particular resource has 1210 lines of code, I know, I'm refactoring).
Select::make('transforming_instruction_id')->label('Instrucción de Transformación')->columnSpan(6)
->options(function ($get) {
return TransformInstruction::all()->pluck('name', 'id');
})
->visible(function ($get) {
if ($movementType = MovementType::find($get('movement_type_id')) and ($movementType->type == 'transform')) {
return true;
}

return false;
})->reactive()->searchable()
Select::make('transforming_instruction_id')->label('Instrucción de Transformación')->columnSpan(6)
->options(function ($get) {
return TransformInstruction::all()->pluck('name', 'id');
})
->visible(function ($get) {
if ($movementType = MovementType::find($get('movement_type_id')) and ($movementType->type == 'transform')) {
return true;
}

return false;
})->reactive()->searchable()
17 replies
FFilament
Created by Alvaro Leon on 5/11/2023 in #❓┊help
TimePicker and DateTimePicker incorrect behaviour due to {{ $field::class }}.display-text
17 replies
FFilament
Created by Alvaro Leon on 5/11/2023 in #❓┊help
TimePicker and DateTimePicker incorrect behaviour due to {{ $field::class }}.display-text
Hi. Well. The thing I'm doing is a little bit complicated, but I can explain with an example: - I have a FormResource that allows the user to create and modify custom forms. In that resource, the user creates custom form fields, defining title, type (TextInput, Select, DatePicker, DateTimePicker and toggle), size (using 12 cols grid) and if it is required or not. - I have a second resource FormAnswersResource, that allows the user to enter the form answers. First, the user enters and using a Select, finds the corresponding form. Then the app fills a Card with the fields with that form using the data given in the first resource. - The user input the data, and press save to save the results of that form, which is stored into a column called "answers" into the database. The problem is that when the form has DatePicker, DateTimePicker and Toggle components, the data is not passed nor into the validation, nor into the corresponding JSON field, then data is gone somewhere. I'm trying to be as clear as my little english knowledge can allows me. But i'll try to find the answer, and actually i'm going to be this weekend checking what is happening in filament code.
17 replies
FFilament
Created by Alvaro Leon on 5/11/2023 in #❓┊help
TimePicker and DateTimePicker incorrect behaviour due to {{ $field::class }}.display-text
Ok, I replaced field names using
Str::kebab()
Str::kebab()
to store and retrieve. Also field names were stored like this:
"-prueba-de-formulario":{
"-prueba-de-campo-fecha":null,
"-prueba-de-campo-texto":"aseraserase",
"-prueba-de-campo-selector":"2"
}
"-prueba-de-formulario":{
"-prueba-de-campo-fecha":null,
"-prueba-de-campo-texto":"aseraserase",
"-prueba-de-campo-selector":"2"
}
Still not working for the dateField 🥺 Checking, it is also happening when I use toggle fields.
17 replies
FFilament
Created by Alvaro Leon on 3/22/2023 in #❓┊help
Double dashboard menu
Ok, mi issue was that i removed all the line " 'register' => [..]," in settings/filament.php, You have to just let 'register' => [] as an empty array
5 replies