Created
July 8, 2019 21:24
-
-
Save wharley/74a943df706dc69d50eb7e7e991aa679 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ComingSoon from './ComingSoon.vue'; | |
/* CUSTOMER */ | |
import Customer from './customer/Customer.vue'; | |
import CustomerList from './customer/CustomerList.vue'; | |
export const views = { | |
ComingSoon, | |
/* CUSTOMER */ | |
Customer, | |
CustomerList, | |
}; | |
export let routes: any[] = [ | |
{ | |
name: 'Customer', | |
icon: 'customer ', | |
routes: [ | |
{ | |
name: 'Customer', | |
icon: 'one-customer', | |
routes: [ | |
{ name: 'Customer', title: 'Customer', subTitle: 'Customer', icon: 'customer' }, | |
{ name: 'Customer List', title: 'Customer List', subTitle: 'Customer List', icon: 'list' }, | |
], | |
}, | |
], | |
}, | |
]; | |
// creating router links for each menu | |
routes.forEach((x: any) => { | |
x.link = x.name | |
.toLowerCase() | |
.replace(/[^a-zA-Z0-9 ]/g, '') | |
.replace(/ /g, '-'); | |
x.routes.forEach((z: any) => { | |
z.link = z.name | |
.toLowerCase() | |
.replace(/[^a-zA-Z0-9 ]/g, '') | |
.replace(/ /g, '-'); | |
z.routes.forEach((c: any) => { | |
c.link = c.title | |
.toLowerCase() | |
.replace(/[^a-zA-Z0-9 ]/g, '') | |
.replace(/ /g, '-'); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment