Skip to content
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

Fix: Currency Formatting Issue in Kanban View #651

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

rajabxahmd
Copy link

Issue:

In the Kanban view, currency values were not being formatted correctly. However, formatting worked fine in List view and Group By view.

Cause:

The parseRows() function relies on columns to retrieve the type of each field using:
let fieldType = columns?.find( (col) => (col.key || col.value) == row, )?.type

In List view and Group By view, the function was passed columns, where each object contains:
{ key: "fieldname", type: "fieldtype" }

However, in Kanban view, the getKanbanRows() function was incorrectly passing fields instead of columns. The fields objects contain:
{ fieldname: "fieldname", fieldtype: "fieldtype" }
This mismatch caused fieldType to remain undefined, breaking the formatting logic.

Fix:

Updated the transform function in ViewControls.vue to modify fields before use:
transform(data) { data.fields.forEach((field) => { field.type = field.fieldtype; field.key = field.fieldname; }); return data; }

Now, fields are transformed to match the expected structure of columns, ensuring the parseRows function can correctly apply formatting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant