fix: better column type naming

This commit is contained in:
Shariq Ansari 2023-07-25 19:55:30 +05:30
parent 8784720c47
commit 0f3e617864
3 changed files with 6 additions and 6 deletions

View File

@ -66,7 +66,7 @@
class="flex items-center space-x-2.5" class="flex items-center space-x-2.5"
:class="[column.size, column.align]" :class="[column.size, column.align]"
> >
<div v-if="column.type === 'user'"> <div v-if="column.type === 'avatar'">
<Avatar <Avatar
v-if="getValue(row[column.key]).label" v-if="getValue(row[column.key]).label"
class="flex items-center" class="flex items-center"
@ -85,7 +85,7 @@
shape="square" shape="square"
/> />
</div> </div>
<div v-else-if="column.type === 'status'"> <div v-else-if="column.type === 'indicator'">
<IndicatorIcon :color="getValue(row[column.key]).color" /> <IndicatorIcon :color="getValue(row[column.key]).color" />
</div> </div>
<div class="text-base text-gray-900 truncate"> <div class="text-base text-gray-900 truncate">

View File

@ -24,7 +24,7 @@ const columns = [
{ {
label: 'Full name', label: 'Full name',
key: 'full_name', key: 'full_name',
type: 'user', type: 'avatar',
size: 'w-44', size: 'w-44',
}, },
{ {

View File

@ -38,7 +38,7 @@ const columns = [
{ {
label: 'Name', label: 'Name',
key: 'lead_name', key: 'lead_name',
type: 'user', type: 'avatar',
size: 'w-44', size: 'w-44',
}, },
{ {
@ -49,7 +49,7 @@ const columns = [
}, },
{ {
label: 'Status', label: 'Status',
key: 'status', key: 'indicator',
type: 'status', type: 'status',
size: 'w-44', size: 'w-44',
}, },
@ -68,7 +68,7 @@ const columns = [
{ {
label: 'Lead owner', label: 'Lead owner',
key: 'lead_owner', key: 'lead_owner',
type: 'user', type: 'avatar',
size: 'w-44', size: 'w-44',
}, },
] ]