Skip to content

Instantly share code, notes, and snippets.

@wharley
Created July 8, 2019 21:24
Show Gist options
  • Save wharley/74a943df706dc69d50eb7e7e991aa679 to your computer and use it in GitHub Desktop.
Save wharley/74a943df706dc69d50eb7e7e991aa679 to your computer and use it in GitHub Desktop.
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