Skip to content

Commit

Permalink
Add slug column to q-table in StatsPage.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
arnonrdp committed Dec 2, 2023
1 parent d4f6f7c commit 3a8350e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/pages/StatsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@
:rows="statStore.getSummary"
:title="`Entries from ${prompt?.id}`"
wrap-cells
/>
>
<template v-slot:body-cell-slug="props">
<q-td :props="props">
<q-btn dense flat icon="link" :to="entries?.find((entry) => entry.id === props.row.post_id)?.slug" rounded target="_blank" />
</q-td>
</template>
</q-table>
</Transition>
</q-page>
</q-page-container>
Expand All @@ -39,8 +45,9 @@ const promptStore = usePromptStore()
const statStore = useStatStore()
const colums = ref([
{ name: 'slug', align: 'center', label: '', field: 'slug' },
{
name: 'post_id',
name: 'entry',
align: 'left',
label: 'Entry',
field: (row) => entries.value?.find((entry) => entry.id === row.post_id)?.title ?? 'Deleted',
Expand Down

0 comments on commit 3a8350e

Please sign in to comment.