Commit 6f85e5bb authored by christianrhansen's avatar christianrhansen

added table-config

parent a7344a91
......@@ -2,10 +2,10 @@
full-screen
back-button(slot="backButton")
| Annotations Table
.q-my-lg.bg-grey-8
data-table(v-if="annotations", :config="config")
br
| {{ $route.params.id }}
br
| // {{ annotations }}
.q-mt-md(v-for="annotation in annotations") {{ annotation }}
</template>
<script>
......@@ -16,11 +16,53 @@
export default {
name: 'AnnotationsTable',
data () {
const _this = this
return {
annotations: undefined,
video: undefined,
timeline: undefined,
metadata: undefined
metadata: undefined,
config: {
pagination: {
sortBy: 'date',
descending: true
},
columns: [
{
name: 'title',
label: _this.$t('labels.title'),
field: 'title',
sortable: true,
filter: true
},
{
name: 'date',
label: _this.$t('labels.date'),
sortable: true,
sort: _this.$sort.onDateValue,
field: 'date',
format: val => DateTime.fromISO(val)
.toLocaleString(DateTime.DATETIME_SHORT_WITH_SECONDS)
},
{
name: 'author',
label: _this.$t('labels.author'),
field: 'author',
sortable: true,
filter: true
}
],
actions: [
{
type: 'edit',
title: 'buttons.xxxxx',
click: (item) => {
console.log(item)
// this.$refs.confirmModal.show('buttons.delete', item, 'buttons.delete')
}
}
]
}
}
},
async mounted () {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment