2020-10-31 20:30:02 +00:00
|
|
|
import { FG_Plugin } from 'src/plugins';
|
2020-10-31 16:33:40 +00:00
|
|
|
|
|
|
|
const permissions = {
|
2020-10-31 20:30:02 +00:00
|
|
|
// Show own and others balance
|
|
|
|
SHOW: 'balance_show',
|
|
|
|
SHOW_OTHER: 'balance_show_others',
|
|
|
|
// Credit balance
|
|
|
|
ADD: 'balance_add',
|
|
|
|
// Debit balance
|
|
|
|
SUB: 'balance_sub',
|
|
|
|
// Send from to other
|
|
|
|
SEND: 'balance_send',
|
|
|
|
// Send from other to another
|
|
|
|
SEND_OTHER: 'balance_send_others',
|
|
|
|
// Can set limit for users
|
|
|
|
SET_LIMIT: 'balance_set_limit',
|
|
|
|
//Allow sending / sub while exceeding the set limit
|
|
|
|
EXCEED_LIMIT: 'balance_exceed_limit'
|
|
|
|
};
|
2020-10-31 16:33:40 +00:00
|
|
|
|
|
|
|
const mainRoutes: FG_Plugin.PluginRouteConfig[] = [
|
|
|
|
{
|
|
|
|
title: 'Gerücht',
|
|
|
|
icon: 'mdi-cash-100',
|
|
|
|
path: 'balance',
|
|
|
|
name: 'balance',
|
|
|
|
component: () => import('../pages/MainPage.vue'),
|
2020-10-31 20:30:02 +00:00
|
|
|
meta: { permissions: ['user'] },
|
2020-10-31 16:33:40 +00:00
|
|
|
children: [
|
|
|
|
{
|
|
|
|
title: 'Anschreiben',
|
|
|
|
icon: 'mdi-cash-100',
|
|
|
|
path: 'balance-add',
|
|
|
|
name: 'balance-add',
|
|
|
|
shortcut: true,
|
2020-10-31 20:30:02 +00:00
|
|
|
meta: { permissions: [permissions.SUB, permissions.SHOW] },
|
2020-10-31 16:33:40 +00:00
|
|
|
component: () => import('../pages/Add.vue')
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2020-10-31 20:30:02 +00:00
|
|
|
];
|
2020-10-31 16:33:40 +00:00
|
|
|
|
2020-10-31 20:30:02 +00:00
|
|
|
export default mainRoutes;
|