fix: align right - currency, int, float & percent fields
This commit is contained in:
parent
a91d8e449f
commit
538885cffb
@ -139,6 +139,7 @@ class CRMDeal(Document):
|
|||||||
'label': 'Amount',
|
'label': 'Amount',
|
||||||
'type': 'Currency',
|
'type': 'Currency',
|
||||||
'key': 'annual_revenue',
|
'key': 'annual_revenue',
|
||||||
|
'align': 'right',
|
||||||
'width': '9rem',
|
'width': '9rem',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -49,7 +49,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</Draggable>
|
</Draggable>
|
||||||
<div class="mt-1.5 flex flex-col gap-1 border-t border-outline-gray-modals pt-1.5">
|
<div
|
||||||
|
class="mt-1.5 flex flex-col gap-1 border-t border-outline-gray-modals pt-1.5"
|
||||||
|
>
|
||||||
<Autocomplete
|
<Autocomplete
|
||||||
value=""
|
value=""
|
||||||
:options="fields"
|
:options="fields"
|
||||||
@ -213,11 +215,13 @@ const fields = computed(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
function addColumn(c) {
|
function addColumn(c) {
|
||||||
|
let align = ['Float', 'Int', 'Percent', 'Currency'].includes(c.type) ? 'right' : 'left'
|
||||||
let _column = {
|
let _column = {
|
||||||
label: c.label,
|
label: c.label,
|
||||||
type: c.type,
|
type: c.type,
|
||||||
key: c.value,
|
key: c.value,
|
||||||
width: '10rem',
|
width: '10rem',
|
||||||
|
align,
|
||||||
}
|
}
|
||||||
columns.value.push(_column)
|
columns.value.push(_column)
|
||||||
rows.value.push(c.value)
|
rows.value.push(c.value)
|
||||||
|
|||||||
@ -38,7 +38,7 @@
|
|||||||
v-slot="{ idx, column, item }"
|
v-slot="{ idx, column, item }"
|
||||||
doctype="CRM Call Log"
|
doctype="CRM Call Log"
|
||||||
>
|
>
|
||||||
<ListRowItem :item="item">
|
<ListRowItem :item="item" :align="column.align">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<div v-if="['caller', 'receiver'].includes(column.key)">
|
<div v-if="['caller', 'receiver'].includes(column.key)">
|
||||||
<Avatar
|
<Avatar
|
||||||
|
|||||||
@ -42,7 +42,7 @@
|
|||||||
v-slot="{ idx, column, item }"
|
v-slot="{ idx, column, item }"
|
||||||
doctype="Contact"
|
doctype="Contact"
|
||||||
>
|
>
|
||||||
<ListRowItem :item="item">
|
<ListRowItem :item="item" :align="column.align">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<div v-if="column.key === 'full_name'">
|
<div v-if="column.key === 'full_name'">
|
||||||
<Avatar
|
<Avatar
|
||||||
|
|||||||
@ -57,7 +57,7 @@
|
|||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<ListRowItem v-else :item="item">
|
<ListRowItem v-else :item="item" :align="column.align">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<div v-if="column.key === 'status'">
|
<div v-if="column.key === 'status'">
|
||||||
<IndicatorIcon :class="item.color" />
|
<IndicatorIcon :class="item.color" />
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
v-slot="{ idx, column, item }"
|
v-slot="{ idx, column, item }"
|
||||||
doctype="Email Template"
|
doctype="Email Template"
|
||||||
>
|
>
|
||||||
<ListRowItem :item="item">
|
<ListRowItem :item="item" :align="column.align">
|
||||||
<!-- <template #prefix>
|
<!-- <template #prefix>
|
||||||
|
|
||||||
</template> -->
|
</template> -->
|
||||||
|
|||||||
@ -57,7 +57,7 @@
|
|||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<ListRowItem v-else :item="item">
|
<ListRowItem v-else :item="item" :align="column.align">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<div v-if="column.key === 'status'">
|
<div v-if="column.key === 'status'">
|
||||||
<IndicatorIcon :class="item.color" />
|
<IndicatorIcon :class="item.color" />
|
||||||
|
|||||||
@ -41,7 +41,7 @@
|
|||||||
v-slot="{ idx, column, item }"
|
v-slot="{ idx, column, item }"
|
||||||
doctype="CRM Organization"
|
doctype="CRM Organization"
|
||||||
>
|
>
|
||||||
<ListRowItem :item="item">
|
<ListRowItem :item="item" :align="column.align">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<div v-if="column.key === 'organization_name'">
|
<div v-if="column.key === 'organization_name'">
|
||||||
<Avatar
|
<Avatar
|
||||||
|
|||||||
@ -47,7 +47,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
<ListRowItem v-else :item="item">
|
<ListRowItem v-else :item="item" :align="column.align">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<div v-if="column.key === 'status'">
|
<div v-if="column.key === 'status'">
|
||||||
<TaskStatusIcon :status="item" />
|
<TaskStatusIcon :status="item" />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user