fix: apply timeAgo format for creation field

This commit is contained in:
Shariq Ansari 2023-11-28 12:39:11 +05:30
parent 21cbf2788a
commit da7ecc5c78
4 changed files with 12 additions and 4 deletions

View File

@ -44,7 +44,7 @@
<PhoneIcon class="h-4 w-4" />
</div>
</template>
<div v-if="column.key === 'modified'" class="truncate text-base">
<div v-if="['modified', 'creation'].includes(column.key)" class="truncate text-base">
{{ item.timeAgo }}
</div>
</ListRowItem>

View File

@ -53,7 +53,7 @@
<PhoneIcon class="h-4 w-4" />
</div>
</template>
<div v-if="column.key === 'modified'" class="truncate text-base">
<div v-if="['modified', 'creation'].includes(column.key)" class="truncate text-base">
{{ item.timeAgo }}
</div>
</ListRowItem>

View File

@ -77,7 +77,6 @@ import {
Dialog,
Button,
Dropdown,
createListResource,
createResource,
Breadcrumbs,
} from 'frappe-ui'
@ -162,6 +161,11 @@ const rows = computed(() => {
label: dateFormat(deal.modified, dateTooltipFormat),
timeAgo: timeAgo(deal.modified),
}
} else if (row == 'creation') {
_rows[row] = {
label: dateFormat(deal.creation, dateTooltipFormat),
timeAgo: timeAgo(deal.creation),
}
}
})
return _rows

View File

@ -74,7 +74,6 @@ import {
Dialog,
Button,
Dropdown,
createListResource,
createResource,
Breadcrumbs,
} from 'frappe-ui'
@ -168,6 +167,11 @@ const rows = computed(() => {
label: dateFormat(lead.modified, dateTooltipFormat),
timeAgo: timeAgo(lead.modified),
}
} else if (row == 'creation') {
_rows[row] = {
label: dateFormat(lead.creation, dateTooltipFormat),
timeAgo: timeAgo(lead.creation),
}
}
})
return _rows