fix: improper currency formatting issue in kanban view #666
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ISSUE:
Currency is not being formatted inside kanban view. In other views its fine.
CAUSE:
parseRows
function inside pages likeDeals.vue
andLeads.vue
, thefieldType
variable was being populated using the array(columns
) passed into the function, which containskey
andtype.
This worked fine for other views.fields
) into thegetKanbanRows
function, which containsfieldname
andfieldtype
instead. This causedfieldType
to be undefined for the Kanban view, as theparseRows
function expectedkey
andtype
, butfieldname
andfieldtype
were provided instead. As a result, currency and other fields were not formatted correctly in the Kanban view.FIX:
A conditional check was added in the
parseRows
function to handle different structures of the array passed into the function:fieldType
is now populated usingfieldname
andfieldtype.
fieldType
is populated usingkey
andtype
.This ensures that the
fieldType
is correctly set in both Kanban and other views, allowing proper formatting for fields like currency, date, and percent.ADDITIONAL INFO:
BEFORE FIX:
AFTER FIX: