mokhosh / filament-kanban

Add kanban boards to your Filament pages
https://filamentphp.com/plugins/mokhosh-kanban
MIT License
228 stars 32 forks source link

[Question]: I am Unable to Sort if it is Done & How to Add Filter Form in Header #11

Closed abbasmashaddy72 closed 5 months ago

abbasmashaddy72 commented 5 months ago

What happened?

I would like to add this type of Form, using Schema How can achieve it?

image

Sometime having issue Unable to if it is done: as you see in the first Part of Video

https://github.com/mokhosh/filament-kanban/assets/55267488/d82ee0d5-c184-4553-9ed0-8ed6cc5b76be

How to reproduce the bug

None

Package Version

2.2

PHP Version

8.2

Laravel Version

10.10

Which operating systems does with happen with?

No response

Which browsers does with happen with?

No response

Notes

No response

mokhosh commented 5 months ago

Filtering: we don't have this in the package. So you will need to create a form in your kanban-view, and then use the data from that form to filter your records in the records method.

The "Done" issue: maybe you can check the dev tools, and see if there are any errors, or create a replication repository so I can check the issue.

abbasmashaddy72 commented 5 months ago

getHeaderActions are not rendering, but When I do dd inside the function it is working but not rendering:

is there anything that I am missing

protected function getHeaderActions(): array
{
    return [
        Actions\Action::make('manage-sprints')
            ->button()
            ->visible(fn () => $this->project->currentSprint)
            ->label(__('Manage sprints'))
            ->color('primary')
            ->url(route('filament.admin.resources.projects.edit', ['record' => $this->project, 'tenant' => \Filament\Facades\Filament::getTenant()->id])),

        Actions\Action::make('refresh')
            ->button()
            ->visible(fn () => $this->project->currentSprint)
            ->label(__('Refresh'))
            ->color('secondary')
            ->action(function () {
                $this->getRecords();
                Notification::make()
                    ->title(__('Kanban board updated'))
                    ->success()
                    ->send();
            }),
    ];
}
mokhosh commented 5 months ago

I copy pasted your code into a project of mine and it works fine. Check these two things: