Files
libredesk/frontend/src/components/admin/conversation/macros/dataTableColumns.js
Abhinav Raut 87c14aa15d feat: Macros, macros not completely replace canned responses as they do the same job as canned repsonse.
- tiptap editor fixes for hardlines.
- set app font to jakarta, fix shadcn components having a different font.
- UI improvements on /admin
- UI improvements on inbox tab.
2025-01-17 04:57:01 +05:30

66 lines
1.6 KiB
JavaScript

import { h } from 'vue'
import dropdown from './dataTableDropdown.vue'
import { format } from 'date-fns'
export const columns = [
{
accessorKey: 'name',
header: function () {
return h('div', { class: 'text-center' }, 'Name')
},
cell: function ({ row }) {
return h('div', { class: 'text-center font-medium' }, row.getValue('name'))
}
},
{
accessorKey: 'visibility',
header: function () {
return h('div', { class: 'text-center' }, 'Visibility')
},
cell: function ({ row }) {
return h('div', { class: 'text-center' }, row.getValue('visibility'))
}
},
{
accessorKey: 'usage_count',
header: function () {
return h('div', { class: 'text-center' }, 'Usage')
},
cell: function ({ row }) {
return h('div', { class: 'text-center' }, row.getValue('usage_count'))
}
},
{
accessorKey: 'created_at',
header: function () {
return h('div', { class: 'text-center' }, 'Created at')
},
cell: function ({ row }) {
return h('div', { class: 'text-center' }, format(row.getValue('created_at'), 'PPpp'))
}
},
{
accessorKey: 'updated_at',
header: function () {
return h('div', { class: 'text-center' }, 'Updated at')
},
cell: function ({ row }) {
return h('div', { class: 'text-center' }, format(row.getValue('updated_at'), 'PPpp'))
}
},
{
id: 'actions',
enableHiding: false,
cell: ({ row }) => {
const macro = row.original
return h(
'div',
{ class: 'relative' },
h(dropdown, {
macro
})
)
}
}
]