Vladimir
Vladimir
FFilament
Created by Vladimir on 9/14/2024 in #❓┊help
Help me understand why tailwind partially works in livewire component on custom Dashboard?
I have created a custom Dashboard page, and there is method createReport.
public function createReport()
{
return Action::make('createReport')
->modalHeading('')
->color(fn() => Color::Pink)
->icon('heroicon-o-presentation-chart-bar')
->modalContent(function () {
return view('livewire.staff.report', [
'date' => $this->date,
]);
})
->modalSubmitActionLabel('Send report to Milan')
->iconSize('w-10 h-10')
->action(fn() => dispatch_sync(new DailyReport()));
}

public function createReport()
{
return Action::make('createReport')
->modalHeading('')
->color(fn() => Color::Pink)
->icon('heroicon-o-presentation-chart-bar')
->modalContent(function () {
return view('livewire.staff.report', [
'date' => $this->date,
]);
})
->modalSubmitActionLabel('Send report to Milan')
->iconSize('w-10 h-10')
->action(fn() => dispatch_sync(new DailyReport()));
}

I get my livewire page, but all the tailwind style i want to apply into it fails and styles simply are not applied. So, first i thought somehow this report.blade.php is not aware of tailwind, but it is, as if i change text-gray-500 to text-gray-200 i can see the difference. However, classes with grid, bg-, and others, they simply are not applied on that livewire blade page. So, something like this:
<div class="text-sm text-gray-500">Select a date to view the report</div>
<div class="text-sm text-gray-500">Select a date to view the report</div>
and change to text-gray-200 or change text-2xl works. But if i try to add bg-orange-600 which i use on Dashboard page calling this livewire.staff.report via action, it will not work and no background is added. Also, if i try to use something like grid grid-cols-3 does not work, but if i use flex justify-between it does work. I read someone mention custom themes, and i followed link and honestly absolutely dont understand it. And i dont need any custom theme. What could cause it?
30 replies
FFilament
Created by Vladimir on 9/7/2024 in #❓┊help
getRedirectUrl() not works - how to use it?
No description
5 replies
FFilament
Created by Vladimir on 9/5/2024 in #❓┊help
Is it possible to show multiple modals on page
No description
10 replies
FFilament
Created by Vladimir on 8/23/2024 in #❓┊help
Table Colum Json - Array to string conversion error
in user table there is a settings column that is json. Tables\Columns\TextColumn::make('settings') throws Array to string conversion.
Tables\Columns\TextColumn::make('settings')->formatStateUsing(function (array $state) ....
Tables\Columns\TextColumn::make('settings')->formatStateUsing(function (array $state) ....
formatStateUsing - throws array to string conversion error Tried to cast in user model as protected $cast = [ 'settings' => array ] Also throws array to string conversion error Could not find anything in table builder docs. Not a single mention. I am pretty sure that there is some way to do it, and wondering how as it is not possible that is not possible 😄 Anyone can help?
10 replies
FFilament
Created by Vladimir on 6/13/2024 in #❓┊help
FIlament Wizard Layout in Livewire Component is missing Next button
No description
13 replies
FFilament
Created by Vladimir on 6/9/2024 in #❓┊help
afterStateUpdated results in unpredictable result
Straight from Filament docs, i am trying to use afterStateUpdated to generate a Slug for the field. I am attaching a video as it is not possible for me to explain in proper english. Shortly, i type a name into the field, and expecting a slug to be updated automatically. It is, however it is updated randomly, not what i am typing, and it also changes what i type into the name field. Then, when i try to backspace delete, it is more funny, as it does not delete, actually sometime it delete the lette,r and sometime it create a letter in field 😄 Please see the video, you will see i am typing a title, and you will see what happen. I tried to type- This is my name Then i tried to delete it with backspace, to correct it. Then, i typed very very slow and this is only way to get it work. What do i missing?
21 replies
FFilament
Created by Vladimir on 5/25/2024 in #❓┊help
Creating a resource but is not appearing in navigation menu
No description
7 replies
FFilament
Created by Vladimir on 12/26/2023 in #❓┊help
Question for experienced filament devs- Repeater in form build is not shown
Hello Is there anything i am missing in docs that prevents Repeater component to be shown on page show? here is a simple code:
Repeater::make('jobRecruitmentStages')
->label('Stages')
->relationship()
->visible(true)
->schema([
TextInput::make('title')
->label('Title')
->required()
->live(onBlur: true)
->rules('min:5')
->maxLength(255),
]
)
Repeater::make('jobRecruitmentStages')
->label('Stages')
->relationship()
->visible(true)
->schema([
TextInput::make('title')
->label('Title')
->required()
->live(onBlur: true)
->rules('min:5')
->maxLength(255),
]
)
This shows nothing on page except the button. I would love to know how to get what i see in filament documentation where repeater is pre-filled with some fields. Ideally, i would love to provide something like:
Repeater::make('jobRecruitmentStages')
->label('Stages')
->default([
[
'title' => 'Applied',
'description' => 'Candidate applied for the job',
'order' => 1,
],
....
Repeater::make('jobRecruitmentStages')
->label('Stages')
->default([
[
'title' => 'Applied',
'description' => 'Candidate applied for the job',
'order' => 1,
],
....
However, all i am getting, when open a form page, even with that super simple example on top, is just a button on the page like image attached:
2 replies
FFilament
Created by Vladimir on 12/13/2023 in #❓┊help
Suggestions on How to test after validation hook, or Next step button in Wizard form?
Hello there I have to do some things, like saving a record afterValidation and need to write a test for it. I have a wizard form, and when user click on step 1 next button, i am saving some data into db. Now, i want to test and see if data are saved when user click on Wizard Step Next button. Any suggestions? Is there some 'built in' way to do so?
2 replies
FFilament
Created by Vladimir on 12/6/2023 in #❓┊help
Wizard ->startOnStep()
IN the documentation i see amazing feature.
Wizard::make([
// ...
])->startOnStep(2)
Wizard::make([
// ...
])->startOnStep(2)
However, i don't know how could i use it. Scenario is that your user is starting long wizard form and abandon it from any reason. A few hours later, or a few days later, he comes back and we want to set him up to continue where he left. In my another app i solved that quite easily by setting user loacl storage with form data, and when he lands on the form again, i pop the modal telling him that we detected existing form data and if he want to proceed. Then simply refill data we have and user proceed from the step he left earlier/ Now, is there a way to set data to local storage during the filling up form wizard, so i can use it to decide on what step user will start?
8 replies
FFilament
Created by Vladimir on 12/5/2023 in #❓┊help
Form builder reloading page does not preserve values
When fill the form and reload the page all the values in form are lost. Is it there a way to preserve those values?
4 replies
FFilament
Created by Vladimir on 12/4/2023 in #❓┊help
Browser back button creates duplicated MarkDownEdit0r on page
I have a markdown editor on page within a wizard. If i start filing up the form, actually just open a form, and then navigate to another page via wire:navigate, then click Back button on browser, i get MarkDown editor duplicated. Here is code of relevant page:
return [
Wizard::make([
Wizard\Step::make('General')
->icon('heroicon-m-pencil')
->description('Have a good one')
->schema([
TextInput::make('title')
->helperText('Job title')
->hintIcon('heroicon-o-information-circle')
->required()
->rules('min:5')
->maxLength(255),
MarkdownEditor::make('description')
->disableToolbarButtons(['attachFiles'])
->helperText('The better you describe the better candidate will come')
->required(),
]),
return [
Wizard::make([
Wizard\Step::make('General')
->icon('heroicon-m-pencil')
->description('Have a good one')
->schema([
TextInput::make('title')
->helperText('Job title')
->hintIcon('heroicon-o-information-circle')
->required()
->rules('min:5')
->maxLength(255),
MarkdownEditor::make('description')
->disableToolbarButtons(['attachFiles'])
->helperText('The better you describe the better candidate will come')
->required(),
]),
Attaching a short video🐞 Just discovere, not happens with RIchEditor.
2 replies
FFilament
Created by Vladimir on 12/2/2023 in #❓┊help
table header bg color
When create a table in Livewire component, and display it as {{ $this->table }}, how do i change table header background color? Currently is set to some shade of gray when i display it, and cant find the way to change it to other color.
10 replies
FFilament
Created by Vladimir on 8/19/2023 in #❓┊help
How do i replace Admin Panel header/layout
19 replies
FFilament
Created by Vladimir on 8/4/2023 in #❓┊help
Markdown Editor - how to properly display content?
11 replies
FFilament
Created by Vladimir on 8/3/2023 in #❓┊help
Is there a thing like hot reload for Filament resources?
First time today, i have started working with Filament. What a blast! However, i am missing something. While developing with laravel/inertia/vue, or simply with laravel blade there is awesome thing called hot reloading, where all the changes i do are instantly visible in the browser without reloading. Does Filament have anything similar to it, so when i change FilamentResource i can see the change instantly without having to reload the page in browser?
41 replies
FFilament
Created by Vladimir on 8/3/2023 in #❓┊help
Can filament be used in existing app?
Can filament be used in existing app, as admin dashboard?
3 replies