From 98cc43b683749cc1d48f7d4f242ae3e71b1247d2 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Mon, 1 Jul 2024 16:17:51 +0530 Subject: [PATCH] fix: add/delete column in kanban --- crm/api/doc.py | 4 +- frontend/src/components/Kanban/KanbanView.vue | 305 ++++++++++-------- 2 files changed, 173 insertions(+), 136 deletions(-) diff --git a/crm/api/doc.py b/crm/api/doc.py index 8505a7a8..b779a126 100644 --- a/crm/api/doc.py +++ b/crm/api/doc.py @@ -332,7 +332,8 @@ def get_data( for kc in kanban_columns: column_filters = { column_field: kc.get('name') } - if column_field in filters and filters.get(column_field) != kc.name: + order = kc.get("order") + if column_field in filters and filters.get(column_field) != kc.name or kc.get('delete'): column_data = [] else: column_filters.update(filters.copy()) @@ -341,7 +342,6 @@ def get_data( if kc.get("page_length"): page_length = kc.get("page_length") - order = kc.get("order") if order: column_data = get_records_based_on_order(doctype, rows, column_filters, page_length, order) else: diff --git a/frontend/src/components/Kanban/KanbanView.vue b/frontend/src/components/Kanban/KanbanView.vue index b6364e63..1001d4e0 100644 --- a/frontend/src/components/Kanban/KanbanView.vue +++ b/frontend/src/components/Kanban/KanbanView.vue @@ -1,145 +1,169 @@