Commit bfa673d6 authored by christianrhansen's avatar christianrhansen

highlighting current sort (unfinished)

parent da7dfd0c
Pipeline #50733 passed with stage
in 5 minutes and 27 seconds
......@@ -20,6 +20,23 @@
:title="tableTitle")
div.q-pa-md.full-width(slot="item", slot-scope="props")
q-card.bg-grey-9
q-card-main.q-py-none.text-grey-7.row
| {{ props.row }} x
// .col-12(v-for="prop in Object.getOwnPropertyNames(props.row)") {{ getTitle(props, prop) }}
.col-12(v-for="prop in props.cols",
:class="{'text-white': prop.name === pagination.sortBy}")
// | {{ prop.label }}
| {{ getTitle(props, prop) }} xxx
//
.col(:class="{'text-white': pagination.sortBy === props.row.date}") {{ props.row.date }}
.col {{ props.row.last_updated }}`
.col {{ props.row.creator }}
q-card-separator
| x {{ pagination.sortBy }}
q-card-separator
q-card-title.q-py-sm
template(v-if="customTitleLink")
q-btn(type="a", color="primary", :to="getCustomLink(customTitleLink, props.row._uuid)", flat)
......@@ -29,7 +46,9 @@
q-btn(v-if="hasShow", type="a", color="primary", :to="getViewLink(props.row._uuid)", flat)
promise-span(:value="props.row.title")
promise-span(v-if="!hasShow", :value="props.row.title")
q-card-separator
q-card-main.q-py-none
q-btn.text-grey-7(v-for="btn in config.actions", :key="btn.icon", "flat", size="md", :icon="btn.icon",
@click="defaultClick(btn, props)") {{ $t(btn.title) }}
......@@ -117,6 +136,10 @@
}
},
methods: {
getTitle (_props, _prop) {
console.log(_prop.row)
return _prop.row
},
returnDatetime (val) {
return DateTime.fromMillis(val).toLocaleString(DateTime.DATETIME_SHORT_WITH_SECONDS)
},
......
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