From 538885cffba891a1b88b47da71df6c7b687250a8 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Wed, 25 Dec 2024 18:42:59 +0530 Subject: [PATCH] fix: align right - currency, int, float & percent fields --- crm/fcrm/doctype/crm_deal/crm_deal.py | 1 + frontend/src/components/ColumnSettings.vue | 6 +++++- frontend/src/components/ListViews/CallLogsListView.vue | 2 +- frontend/src/components/ListViews/ContactsListView.vue | 2 +- frontend/src/components/ListViews/DealsListView.vue | 2 +- .../src/components/ListViews/EmailTemplatesListView.vue | 2 +- frontend/src/components/ListViews/LeadsListView.vue | 2 +- frontend/src/components/ListViews/OrganizationsListView.vue | 2 +- frontend/src/components/ListViews/TasksListView.vue | 2 +- 9 files changed, 13 insertions(+), 8 deletions(-) diff --git a/crm/fcrm/doctype/crm_deal/crm_deal.py b/crm/fcrm/doctype/crm_deal/crm_deal.py index dc18c133..04bf74fd 100644 --- a/crm/fcrm/doctype/crm_deal/crm_deal.py +++ b/crm/fcrm/doctype/crm_deal/crm_deal.py @@ -139,6 +139,7 @@ class CRMDeal(Document): 'label': 'Amount', 'type': 'Currency', 'key': 'annual_revenue', + 'align': 'right', 'width': '9rem', }, { diff --git a/frontend/src/components/ColumnSettings.vue b/frontend/src/components/ColumnSettings.vue index d91ce735..438e7eaf 100644 --- a/frontend/src/components/ColumnSettings.vue +++ b/frontend/src/components/ColumnSettings.vue @@ -49,7 +49,9 @@ -
+
{ }) function addColumn(c) { + let align = ['Float', 'Int', 'Percent', 'Currency'].includes(c.type) ? 'right' : 'left' let _column = { label: c.label, type: c.type, key: c.value, width: '10rem', + align, } columns.value.push(_column) rows.value.push(c.value) diff --git a/frontend/src/components/ListViews/CallLogsListView.vue b/frontend/src/components/ListViews/CallLogsListView.vue index 4331237b..1522e0a5 100644 --- a/frontend/src/components/ListViews/CallLogsListView.vue +++ b/frontend/src/components/ListViews/CallLogsListView.vue @@ -38,7 +38,7 @@ v-slot="{ idx, column, item }" doctype="CRM Call Log" > - +