From 26703070c9dc0ff625e5148a0956459691562a0f Mon Sep 17 00:00:00 2001 From: rajabxahmd Date: Wed, 19 Mar 2025 16:09:46 +0530 Subject: [PATCH] Update frontend/src/pages/Deals.vue Co-authored-by: Shariq Ansari <30859809+shariquerik@users.noreply.github.com> --- frontend/src/pages/Deals.vue | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/frontend/src/pages/Deals.vue b/frontend/src/pages/Deals.vue index 37b3dd70..527a57e6 100644 --- a/frontend/src/pages/Deals.vue +++ b/frontend/src/pages/Deals.vue @@ -387,17 +387,11 @@ function parseRows(rows, columns = []) { deals.value.data.rows.forEach((row) => { _rows[row] = deal[row] - let fieldType; - if (deals.value.data.view_type === 'kanban') { - fieldType = columns?.find( - (col) => (col.fieldname || col.value) == row, - )?.fieldtype - } - else { - fieldType = columns?.find( - (col) => (col.key || col.value) == row, - )?.type - } + let fieldname = deals.value.data.view_type === 'kanban' ? 'fieldname' : 'key' + let fieldtype = deals.value.data.view_type === 'kanban' ? 'fieldtype' : 'type' + let fieldType = columns?.find( + (col) => (col[fieldname] || col.value) == row, + )?.[fieldtype] if ( fieldType &&