feat: Make category name in article table clickable (#5626)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Nithin David Thomas
2022-10-14 02:05:11 +05:30
committed by GitHub
parent a533f43fbf
commit bf4338ef9e

View File

@@ -16,7 +16,12 @@
</div>
</td>
<td>
<span class="fs-small">{{ category.name }}</span>
<router-link
class="fs-small button clear link secondary"
:to="getCategoryRoute(category.slug)"
>
{{ category.name }}
</router-link>
</td>
<td>
<span class="fs-small">
@@ -43,6 +48,8 @@
<script>
import timeMixin from 'dashboard/mixins/time';
import portalMixin from '../mixins/portalMixin';
import { frontendURL } from 'dashboard/helper/URLHelper';
export default {
mixins: [timeMixin, portalMixin],
@@ -97,6 +104,14 @@ export default {
}
},
},
methods: {
getCategoryRoute(categorySlug) {
const { portalSlug, locale } = this.$route.params;
return frontendURL(
`accounts/${this.accountId}/portals/${portalSlug}/${locale}/categories/${categorySlug}`
);
},
},
};
</script>