1
0
mirror of https://gitlab.com/bramw/baserow.git synced 2024-11-25 00:46:46 +00:00
bramw_baserow/web-frontend/modules/database/components/view/grid/fields/FunctionalGridViewFieldDuration.vue

22 lines
536 B
Vue

<template functional>
<div ref="cell" class="grid-view__cell" :class="data.staticClass || ''">
<div class="grid-field-duration">
{{ $options.methods.formatValue(props.field, props.value) }}
</div>
</div>
</template>
<script>
import { formatDurationValue } from '@baserow/modules/database/utils/duration'
export default {
name: 'FunctionalGridViewFieldDuration',
functional: true,
methods: {
formatValue(field, value) {
return formatDurationValue(value, field.duration_format)
},
},
}
</script>