I am using Datatables with Vue.js to render content in the form of tables. here is my code:
computed: {
job_table: function () {
return {
title: this.$t('commons.users'),
headers:[
{
text: "Post",
value : "title",
align: "left",
filter: 'capitalize',
search : 'title'
},
{
text: "New Application",
value : "applications",
align: "left",
filter: 'capitalize',
search : 'applications'
},
{
text: "Status",
value : "status",
align: "left",
filter: 'capitalize',
search : 'status'
},
{
text: "Posted On",
value : "created_at",
align: "left",
filter: 'capitalize',
search : ''
},
{
text: "Actions",
align: "left",
value : "role",
filter: 'roleFilter',
search : false
}
],
desc: 'created_at',
resource: 'job',
w:'company',
actions: {
add: "AddEmployee",
edit: "EditEmployee"
},
params:{
company_id: true
}
}
},
}
I wanted to change the format of "created at" and take a count of "applications" which is an array. can I make callback on them.
{
text: "New Application",
value : "applications",
align: "left",
filter: 'capitalize',
search : 'applications'
},
{
text: "Posted On",
value : "created_at",
align: "left",
filter: 'capitalize',
search : ''
},
I am new in JavaScript and any help would be highly appreciable. Thanks in advance.