Merge pull request #666 from rajabxahmd/develop

fix: improper currency formatting issue in kanban view
This commit is contained in:
Shariq Ansari 2025-03-21 16:29:03 +05:30 committed by GitHub
commit 72e499e845
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 27 additions and 11 deletions

View File

@ -350,7 +350,9 @@ function getGroupedByRows(listRows, groupByField, columns) {
if (!option) { if (!option) {
filteredRows = listRows.filter((row) => !row[groupByField.fieldname]) filteredRows = listRows.filter((row) => !row[groupByField.fieldname])
} else { } else {
filteredRows = listRows.filter((row) => row[groupByField.fieldname] == option) filteredRows = listRows.filter(
(row) => row[groupByField.fieldname] == option,
)
} }
let groupDetail = { let groupDetail = {
@ -382,14 +384,18 @@ function getKanbanRows(data, columns) {
} }
function parseRows(rows, columns = []) { function parseRows(rows, columns = []) {
let view_type = deals.value.data.view_type
let key = view_type === 'kanban' ? 'fieldname' : 'key'
let type = view_type === 'kanban' ? 'fieldtype' : 'type'
return rows.map((deal) => { return rows.map((deal) => {
let _rows = {} let _rows = {}
deals.value.data.rows.forEach((row) => { deals.value.data.rows.forEach((row) => {
_rows[row] = deal[row] _rows[row] = deal[row]
let fieldType = columns?.find( let fieldType = columns?.find((col) => (col[key] || col.value) == row)?.[
(col) => (col.key || col.value) == row, type
)?.type ]
if ( if (
fieldType && fieldType &&

View File

@ -370,7 +370,9 @@ function getGroupedByRows(listRows, groupByField, columns) {
if (!option) { if (!option) {
filteredRows = listRows.filter((row) => !row[groupByField.fieldname]) filteredRows = listRows.filter((row) => !row[groupByField.fieldname])
} else { } else {
filteredRows = listRows.filter((row) => row[groupByField.fieldname] == option) filteredRows = listRows.filter(
(row) => row[groupByField.fieldname] == option,
)
} }
let groupDetail = { let groupDetail = {
@ -402,14 +404,18 @@ function getKanbanRows(data, columns) {
} }
function parseRows(rows, columns = []) { function parseRows(rows, columns = []) {
let view_type = leads.value.data.view_type
let key = view_type === 'kanban' ? 'fieldname' : 'key'
let type = view_type === 'kanban' ? 'fieldtype' : 'type'
return rows.map((lead) => { return rows.map((lead) => {
let _rows = {} let _rows = {}
leads.value?.data.rows.forEach((row) => { leads.value?.data.rows.forEach((row) => {
_rows[row] = lead[row] _rows[row] = lead[row]
let fieldType = columns?.find( let fieldType = columns?.find((col) => (col[key] || col.value) == row)?.[
(col) => (col.key || col.value) == row, type
)?.type ]
if ( if (
fieldType && fieldType &&

View File

@ -257,14 +257,18 @@ function getKanbanRows(data, columns) {
} }
function parseRows(rows, columns = []) { function parseRows(rows, columns = []) {
let view_type = tasks.value.data.view_type
let key = view_type === 'kanban' ? 'fieldname' : 'key'
let type = view_type === 'kanban' ? 'fieldtype' : 'type'
return rows.map((task) => { return rows.map((task) => {
let _rows = {} let _rows = {}
tasks.value?.data.rows.forEach((row) => { tasks.value?.data.rows.forEach((row) => {
_rows[row] = task[row] _rows[row] = task[row]
let fieldType = columns?.find( let fieldType = columns?.find((col) => (col[key] || col.value) == row)?.[
(col) => (col.key || col.value) == row, type
)?.type ]
if ( if (
fieldType && fieldType &&