diff --git a/crm/api/doc.py b/crm/api/doc.py index b8766283..8a162a35 100644 --- a/crm/api/doc.py +++ b/crm/api/doc.py @@ -571,4 +571,22 @@ def get_fields(doctype: str, allow_all_fieldtypes: bool = False): "mandatory": field.reqd, }) - return _fields \ No newline at end of file + return _fields + +@frappe.whitelist() +def get_kanban_fields(doctype): + allowed_fieldtypes = ["Link", "Select"] + fields = frappe.get_meta(doctype).fields + fields = [field for field in fields if field.fieldtype in allowed_fieldtypes] + fields = [ + { + "label": _(field.label), + "name": field.fieldname, + "type": field.fieldtype, + "options": field.options, + } + for field in fields + if field.label and field.fieldname + ] + + return fields \ No newline at end of file diff --git a/frontend/src/components/Kanban/KanbanSettings.vue b/frontend/src/components/Kanban/KanbanSettings.vue new file mode 100644 index 00000000..6b0604ac --- /dev/null +++ b/frontend/src/components/Kanban/KanbanSettings.vue @@ -0,0 +1,85 @@ + + diff --git a/frontend/src/components/ViewControls.vue b/frontend/src/components/ViewControls.vue index 4a30ac18..c82f5cf4 100644 --- a/frontend/src/components/ViewControls.vue +++ b/frontend/src/components/ViewControls.vue @@ -65,8 +65,14 @@ @update="updateSort" :hideLabel="isMobileView" /> + +