Noor
Noor
FFilament
Created by Noor on 6/11/2024 in #❓┊help
multiple() is not working in form select
I have a Select::make('salesperson') on my form and its works fine If I use options but when I use multiple with it, it does not show anything in the search bar saying no results found My code
Select::make('salesperson')
->multiple()
->options($this->options)
->disablePlaceholderSelection()
->live(),
Select::make('salesperson')
->multiple()
->options($this->options)
->disablePlaceholderSelection()
->live(),
I also tested it with below code shows same issue
Select::make('salesperson')
->multiple()
->options([
'draft' => 'Draft',
'reviewing' => 'Reviewing',
'published' => 'Published',
])
Select::make('salesperson')
->multiple()
->options([
'draft' => 'Draft',
'reviewing' => 'Reviewing',
'published' => 'Published',
])
17 replies
FFilament
Created by Noor on 6/4/2024 in #❓┊help
ImageColumn is not showing image
No description
37 replies
FFilament
Created by Noor on 5/31/2024 in #❓┊help
Creating factory and seeding
Might be out of topic for here but really need a suggestion. So , how can I create some fake images and then store them in the file system somewhere and then reference those images when seeding.
4 replies
FFilament
Created by Noor on 5/17/2024 in #❓┊help
Status color options
I have a status table where there are various status options for instance new , old, cold, taken etc . What I want the user have access to choose color of their own choice so what would be the right approch to do that using colorpicker or what else ? I've used colorpicker before but did not worked in this case. Can someone guide me on this please
30 replies
FFilament
Created by Noor on 5/10/2024 in #❓┊help
Modal Dispatch
I'm using this modal and edit action , so modal shows calendar data and when I click on data it dispatch modal which I want to edit , what would be right approach because what I'm doing is not working
<x-filament::modal id="edit-user">
<x-slot name="trigger">
{{$calendarData[$time][$technician->name]}}
</x-slot>
<div>
<!-- Calendar Data -->
<h2>{{$calendarData[$time][$technician->name]}}</h2>
<!-- Edit Action -->
{{($this->editAction($calendarData[$time][$technician->name]))}}
<x-filament-actions::modals />
</div>
</x-filament::modal>
<x-filament::modal id="edit-user">
<x-slot name="trigger">
{{$calendarData[$time][$technician->name]}}
</x-slot>
<div>
<!-- Calendar Data -->
<h2>{{$calendarData[$time][$technician->name]}}</h2>
<!-- Edit Action -->
{{($this->editAction($calendarData[$time][$technician->name]))}}
<x-filament-actions::modals />
</div>
</x-filament::modal>
Component page
public function openModal()
{
$this->dispatch('open-modal',
['id' => 'edit-user',
]); }
public function openModal()
{
$this->dispatch('open-modal',
['id' => 'edit-user',
]); }
public function editAction(): Action
{
return Action::make('edit')
->form([
TextInput::make('ticket')
])
->action(function (array $data) {
dd($data);
\\
});
}
public function editAction(): Action
{
return Action::make('edit')
->form([
TextInput::make('ticket')
])
->action(function (array $data) {
dd($data);
\\
});
}
2 replies
FFilament
Created by Noor on 5/2/2024 in #❓┊help
Data is not getting saved in db after tranferring one form data to another
What would be the right approach to promote prospect to lead , I have a action on prospect 'promote to lead' and parameters on prospect are promoteLead_on and promoteLead_by so when I click on action it goes to lead form and when I save it , it is not getting saved in database. I want promoteLead_on and promoteLead_by after saving the lead form or when I click action . ViewProspect
Actions\Action::make('promoteLead')
->label('Promote To Lead')
->url(function (): string {
return route('filament.app.resources.leads.create', [
'business_name' => $this->record->business_name,
'contact_name' => $this->record->contact_name,
'phone' => $this->record->phone,
'email' => $this->record->email,
'promoteLead_on' => Carbon::now()->toDateTimeString(),
'promoteLead_by' => Auth::id(),
]);
})
Actions\Action::make('promoteLead')
->label('Promote To Lead')
->url(function (): string {
return route('filament.app.resources.leads.create', [
'business_name' => $this->record->business_name,
'contact_name' => $this->record->contact_name,
'phone' => $this->record->phone,
'email' => $this->record->email,
'promoteLead_on' => Carbon::now()->toDateTimeString(),
'promoteLead_by' => Auth::id(),
]);
})
CreateLead
protected function afterFill(): void
{
$promotedOn = Carbon::now();
$promotedBy = Auth::id();

$contactName = request()->query('contact_name');

$nameParts = explode(" ", $contactName);
if (count($nameParts) === 2) {
list($firstName, $lastName) = explode(" ", $contactName);
} else {
$firstName = $contactName;
$lastName = "";
}

$this->data['business_name'] = request()->query('business_name');
$this->data['first_name'] = $firstName;
$this->data['last_name'] = $lastName;
$this->data['phone'] = request()->query('phone');
$this->data['email'] = request()->query('email');

$this->data['promoteLead_on'] = request()->query('promoteLead_on');
$this->data['promoteLead_by'] = request()->query('promoteLead_by');
}
protected function afterFill(): void
{
$promotedOn = Carbon::now();
$promotedBy = Auth::id();

$contactName = request()->query('contact_name');

$nameParts = explode(" ", $contactName);
if (count($nameParts) === 2) {
list($firstName, $lastName) = explode(" ", $contactName);
} else {
$firstName = $contactName;
$lastName = "";
}

$this->data['business_name'] = request()->query('business_name');
$this->data['first_name'] = $firstName;
$this->data['last_name'] = $lastName;
$this->data['phone'] = request()->query('phone');
$this->data['email'] = request()->query('email');

$this->data['promoteLead_on'] = request()->query('promoteLead_on');
$this->data['promoteLead_by'] = request()->query('promoteLead_by');
}
5 replies
FFilament
Created by Noor on 4/17/2024 in #❓┊help
Open a window pop up when click on an event to edit
There is a custom table with html and in table cells there is a calendarData which I want it to pop up like a little window when user clicks on it. So what would be right approach to do it dispatching an event ?
5 replies
FFilament
Created by Noor on 4/2/2024 in #❓┊help
Toggle-column
Is there any way to make toggle-column from scratch on a custom page ?
8 replies
FFilament
Created by Noor on 3/13/2024 in #❓┊help
Schedule
There is a custom page I have a custom table using html .. so I need help with drag and drop that how can I drag the cell of table and drop it at some other place , is that possible without javascript ?
3 replies
FFilament
Created by Noor on 3/8/2024 in #❓┊help
Old status update To New status
There is a form in which I have a status field and I want it to be saved and update in database for update my code is
protected function mutateFormDataBeforeSave(array $data): array
{

$dbStatus = $this->record->fresh()->status_id;

if ($dbStatus !== $data['status_id']) {
$data['status_update'] = now();
}
return $data;
}
protected function mutateFormDataBeforeSave(array $data): array
{

$dbStatus = $this->record->fresh()->status_id;

if ($dbStatus !== $data['status_id']) {
$data['status_update'] = now();
}
return $data;
}
But when I run it it keep changing my form updated_at which I dont want. I just want status_update to be changed when user change it.
15 replies
FFilament
Created by Noor on 2/13/2024 in #❓┊help
Table column badge
In status badge is there any way to put badges color without hard coding status name , also any option to put color picker so the user can choose whatever color to use for their status.
4 replies
FFilament
Created by Noor on 2/5/2024 in #❓┊help
Issue with breakpoints
No description
13 replies
FFilament
Created by Noor on 1/30/2024 in #❓┊help
Css using wire:target or input type
How can I use css to change colors of actions correctly using wire target or input type . Because I tried to do iT did not worked out for me .
.dark .fi-modal-footer-actions .fi-btn [wire:target="callMountedTableAction"]{
background-color: rgba(var(--warning-400));
}
.dark .fi-modal-footer-actions .fi-btn [wire:target="callMountedTableAction"]{
background-color: rgba(var(--warning-400));
}
OR
.dark .fi-modal-footer-actions .fi-btn :input[type="submit"]{
background-color: rgba(var(--warning-400));
}
.dark .fi-modal-footer-actions .fi-btn :input[type="submit"]{
background-color: rgba(var(--warning-400));
}
39 replies
FFilament
Created by Noor on 1/25/2024 in #❓┊help
Css !Important
Just a quick question if we cannot use !important too much , and if your css code doesn't work without !important then what solution do we have to make your code work. Otherwise there would be alot !important.
11 replies
FFilament
Created by Noor on 1/11/2024 in #❓┊help
Test failing
My code -
test('user cannot view create inspection form if they do not have permission', function () {
$this->get(InspectionResource::getUrl('create'))->assertForbidden();

});
test('user cannot view create inspection form if they do not have permission', function () {
$this->get(InspectionResource::getUrl('create'))->assertForbidden();

});
Error
Tests\Feature\InspectionTest > user cannot view create inspection form if they do not have permission
Expected response status code [403] but received 200.
Failed asserting that 403 is identical to 200.
Tests\Feature\InspectionTest > user cannot view create inspection form if they do not have permission
Expected response status code [403] but received 200.
Failed asserting that 403 is identical to 200.
14 replies
FFilament
Created by Noor on 12/19/2023 in #❓┊help
Colors
No description
125 replies
FFilament
Created by Noor on 12/15/2023 in #❓┊help
DatePicker
How can I modify colors of Date picker inside when selecting month from dropdown list ?
2 replies
FFilament
Created by Noor on 12/13/2023 in #❓┊help
fi-badge css
I'm working on badge-color everything works fine , The only only issue I'm facing is It changes the color for status-badge which I don't want I want status badge to be green but others blue, How can I fix that?
26 replies
FFilament
Created by Noor on 12/8/2023 in #❓┊help
Infolist - Layout
There is a Infolist in which I'm using Grid, Fieldset, Section etc. What If I need to move them and change the layout and colors so, can I do it with theme.css using classes or do I need to use custom layout ... because I cannot understand custom layout that how can I implement or move those section fields using layout component
6 replies
FFilament
Created by Noor on 12/7/2023 in #❓┊help
Css Issue - Buttons & Navigation Icon
I need a help with Buttons Css, In a form there are 3 Buttons out of which I just want to change bg-color of one , which I'm doing using class fi-btn but it doesn't change anything.. am I doing something wrong? and Need to know which class are we using for navigation icons that is not working as well ty.
30 replies