feat: Make category name in article table clickable (#5626)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
committed by
GitHub
parent
a533f43fbf
commit
bf4338ef9e
@@ -16,7 +16,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<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>
|
||||||
<td>
|
<td>
|
||||||
<span class="fs-small">
|
<span class="fs-small">
|
||||||
@@ -43,6 +48,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import timeMixin from 'dashboard/mixins/time';
|
import timeMixin from 'dashboard/mixins/time';
|
||||||
import portalMixin from '../mixins/portalMixin';
|
import portalMixin from '../mixins/portalMixin';
|
||||||
|
import { frontendURL } from 'dashboard/helper/URLHelper';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [timeMixin, portalMixin],
|
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>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user