140 lines
4.1 KiB
JavaScript
140 lines
4.1 KiB
JavaScript
import { createRouter, createWebHashHistory } from 'vue-router'
|
|
|
|
const router = createRouter({
|
|
history: createWebHashHistory(),
|
|
routes: [
|
|
{
|
|
path: '/',
|
|
name: 'dashboard',
|
|
meta: { label: 'Tableau de bord', icon: ['fa-solid', 'fa-chart-line'] },
|
|
component: () => import('../views/DashboardView.vue'),
|
|
},
|
|
{
|
|
path: '/transactions',
|
|
name: 'transactions',
|
|
meta: {
|
|
label: 'Transactions',
|
|
icon: ['fa-solid', 'fa-money-bill-transfer'],
|
|
},
|
|
component: () => import('../views/transaction/ListView.vue'),
|
|
children: [
|
|
{
|
|
path: '/transaction/:id',
|
|
props: true,
|
|
name: 'transaction_show',
|
|
component: () => import('../views/transaction/ShowView.vue'),
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: '/users',
|
|
component: () => import('../views/ComponentView.vue'),
|
|
children: [
|
|
{
|
|
path: '',
|
|
name: 'users',
|
|
meta: { label: 'Utilisateurs', icon: ['fa-solid', 'fa-users'] },
|
|
component: () => import('../views/user/ListView.vue'),
|
|
},
|
|
{
|
|
path: '/user/edit/:id',
|
|
name: 'user_edit',
|
|
meta: { label: 'Utilisateur' },
|
|
component: () => import('../views/user/EditView.vue'),
|
|
},
|
|
{
|
|
path: '/user/create',
|
|
name: 'user_create',
|
|
meta: { label: 'Nouvel utilisateur' },
|
|
component: () => import('../views/user/CreateView.vue'),
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: '/categories',
|
|
component: () => import('../views/ComponentView.vue'),
|
|
children: [
|
|
{
|
|
path: '',
|
|
name: 'categories',
|
|
meta: { label: 'Catégories', icon: ['fa-solid', 'fa-list'] },
|
|
component: () => import('../views/category/ListView.vue'),
|
|
},
|
|
{
|
|
path: '/category/edit/:id/:transaction?',
|
|
name: 'category_edit',
|
|
meta: { label: 'Catégorie' },
|
|
component: () => import('../views/category/EditView.vue'),
|
|
},
|
|
{
|
|
path: '/category/create',
|
|
name: 'category_create',
|
|
meta: { label: 'Nouvelle catégorie' },
|
|
component: () => import('../views/category/CreateView.vue'),
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: '/bank_accounts',
|
|
component: () => import('../views/ComponentView.vue'),
|
|
children: [
|
|
{
|
|
path: '',
|
|
name: 'bank_accounts',
|
|
meta: {
|
|
label: 'Comptes bancaires',
|
|
icon: ['fa-solid', 'fa-piggy-bank'],
|
|
},
|
|
component: () => import('../views/bank_account/ListView.vue'),
|
|
},
|
|
{
|
|
path: '/bank_account/edit/:id',
|
|
name: 'bank_account_edit',
|
|
meta: { label: 'Compte bancaire' },
|
|
component: () => import('../views/bank_account/EditView.vue'),
|
|
},
|
|
{
|
|
path: '/bank_account/create',
|
|
name: 'bank_account_create',
|
|
meta: { label: 'Nouveau compte bancaire' },
|
|
component: () => import('../views/bank_account/CreateView.vue'),
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: '/saving_accounts',
|
|
component: () => import('../views/ComponentView.vue'),
|
|
children: [
|
|
{
|
|
path: '',
|
|
name: 'saving_accounts',
|
|
meta: {
|
|
label: 'Comptes épargnes',
|
|
icon: ['fa-solid', 'fa-piggy-bank'],
|
|
},
|
|
component: () => import('../views/saving_account/ListView.vue'),
|
|
},
|
|
{
|
|
path: '/saving_account/edit/:id',
|
|
name: 'saving_account_edit',
|
|
meta: { label: 'Compte bancaire' },
|
|
component: () => import('../views/saving_account/EditView.vue'),
|
|
},
|
|
{
|
|
path: '/saving_account/create',
|
|
name: 'saving_account_create',
|
|
meta: { label: 'Nouveau compte épargne' },
|
|
component: () => import('../views/saving_account/CreateView.vue'),
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: '/files',
|
|
name: 'files',
|
|
meta: { label: 'Fichiers', icon: ['fa-solid', 'fa-table'] },
|
|
component: () => import('../views/FilesView.vue'),
|
|
},
|
|
],
|
|
})
|
|
|
|
export default router
|