Hide custom button if route is not available
mauthi opened this issue · 2 comments
mauthi commented
This is a question.
Prerequisites
- Are you running the latest version?
- Are you reporting to the correct repository?
- Did you check the documentation?
- Did you perform a cursory search?
Description
For my customers table I have defined an additional row button:
{
"type": "row",
"icon": "dollar-sign",
"class": "is-row-button",
"event": "load-invoices"
}
The event method is the following:
loadInvoices(row) {
this.$router.push({
name: 'billing.invoices.index',
params: {
id: row.id,
filterType: 'customer',
},
});
},
Now I have the problem, that the button should only be visible for users who have access to the billing.invoices.index
route.
My question:
Is there a possibility to show the button only if user has right to view billing.invoices.index
?
Thx in advance for your help.
mauthi commented
Thx - works perfect.