mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/unity.git
synced 2026-08-19 04:13:58 +00:00
69 lines
1.9 KiB
JavaScript
Vendored
69 lines
1.9 KiB
JavaScript
Vendored
module.exports.menuDefine = function(permission = []) {
|
|
let menu = [];
|
|
|
|
menu.push({
|
|
header: true,
|
|
title: 'Main Navigation',
|
|
});
|
|
/////////////////////////////////////////////////////
|
|
menu.push({
|
|
title: 'Dashboard',
|
|
icon: 'fa fa-home',
|
|
child: [
|
|
{
|
|
href: '/',
|
|
title: 'Analytics',
|
|
},
|
|
]
|
|
});
|
|
|
|
/////////////////////////////////////////////////////
|
|
if (permission.includes('view entity')) {
|
|
let admin_access_menu = {};
|
|
admin_access_menu = {
|
|
title: 'Entity',
|
|
icon: 'fa fa-cubes',
|
|
child: [
|
|
{
|
|
href: '/entity/list',
|
|
title: 'List',
|
|
},
|
|
]
|
|
};
|
|
menu.push(admin_access_menu);
|
|
}
|
|
/////////////////////////////////////////////////////
|
|
if (permission.includes('view contract_template')) {
|
|
let admin_access_menu = {};
|
|
admin_access_menu = {
|
|
title: 'Contract Template',
|
|
icon: 'fa fa-copy',
|
|
child: [
|
|
{
|
|
href: '/contract-template/list',
|
|
title: 'List',
|
|
},
|
|
]
|
|
};
|
|
menu.push(admin_access_menu);
|
|
}
|
|
/////////////////////////////////////////////////////
|
|
if (permission.includes('view contract')) {
|
|
let admin_access_menu = {};
|
|
admin_access_menu = {
|
|
title: 'Contract',
|
|
icon: 'fa fa-file-contract',
|
|
child: [
|
|
{
|
|
href: '/contract/list',
|
|
title: 'List',
|
|
},
|
|
]
|
|
};
|
|
menu.push(admin_access_menu);
|
|
}
|
|
/////////////////////////////////////////////////////
|
|
|
|
return menu;
|
|
};
|