-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Add-on][Done] KanbanOperation #48
Comments
Hello @svenk2002 Thanks for sharing this with community. Cheers. |
Almost finished with the first versionBelow is a demo video showing the current progress: demo.mp4I've also added a new feature to allow setting up a specific: CRUD::set('kanban.flow', [
'backlog' => ['pending'],
'pending' => ['in_progress', 'backlog'],
'in_progress' => ['done', 'pending'],
'done' => ['in_progress'],
]); |
Just WOW! This is looking very very good. I am wondering if it could be easier if we did a "complete column definition" in one place, instead of having two separate configs for columns/flow. Eg: protected function setupKabanOperation()
{
CRUD::setOperationSetting('columns', [
'column1' => [
'label' => 'My Column Label',
'flow' => ['column2'],
'onAdd' => fn($entry, $from) => // do something when an entry is added into this column
'onRemove' => fn($entry, $to) => // do something when an entry is removed from this column
],
'column2' => [ //.... ],
]);
} Another question, does the edit button on task list is "hardcoded", or is it using the same "actions" that are on List table ? If I have Good job @svenk2002 👍 |
@pxpm Regarding the edit button on the task list, it's currently using the same actions as the List table. So, if you have "Preview | Edit" on the table, it should reflect the same on the card as well. Thanks again! |
First version🥳The first version of the Kanban operation is ready! You can check out the repository here: For now, the basic functionality is in place. Things I plan to work on later include:
Feel free to take a look and share any feedback you may have! |
Introduction
I noticed there was no straightforward way to add a Kanban view to your data, so I developed a new Kanban feature that allows you to easily update the status of a task, among other things.
How it works
Functionality:
Implementation:
To implement the Kanban operation in your CRUD controller, you need to use the
KanbanOperation
trait and configure it. Here's how you can do it:In this implementation:
We use the
KanbanOperation
trait in the controller.We override the
setupKanbanOperation()
method to customize the Kanban columns. In this case, we're setting three columns: 'pending', 'approved', and 'completed', with their respective Dutch translations.We override the
getKanbanFieldsMap()
method to define which fields from your model should be used for the Kanban items. Here, we're mapping the 'id' and 'name' fields from your model to the expected Kanban item fields.By default, the addon uses the 'status' field to determine which column an item belongs to. If your model uses a different field name for this purpose, you can set it like this:
After implementing this, you should see a new Kanban view option in your CRUD panel, allowing you to manage your entries in a Kanban board format.
The text was updated successfully, but these errors were encountered: