diff --git a/module/index/js/index.js b/module/index/js/index.js index 01582f9c12..6a5d959bd9 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -49,7 +49,7 @@ /** * Get tab group from url * @param {String} urlOrModuleName Url string - * + * @return {String} */ function getGroupFromUrl(urlOrModuleName) { @@ -69,13 +69,10 @@ { if(link.prj) return 'project'; - if(methodLowerCase === 'objectlibs' && (link.params.from || link.params.$3) == 'product') return 'product'; - if(methodLowerCase === 'showfiles' && (link.params.from || link.params.$3) == 'product') return 'product'; - if(methodLowerCase === 'browse' && (link.params.from || link.params.$5) == 'product') return 'product'; - if(methodLowerCase === 'view' && (link.params.from || link.params.$3) == 'product') return 'product'; - if(methodLowerCase === 'edit' && (link.params.from || link.params.$3) == 'product') return 'product'; - if(methodLowerCase === 'delete' && (link.params.from || link.params.$3) == 'product') return 'product'; - if(methodLowerCase === 'create' && (link.params.from || link.params.$4) == 'product') return 'product'; + if((link.params.from || link.params.$3) == 'product') + { + if(['objectlibs', 'showfiles', 'browse', 'view', 'edit', 'delete', 'create'].includes(methodLowerCase)) return 'product'; + } return 'doc'; } if(moduleName === 'custom' && ['estimate', 'browsestoryconcept', 'configurescrum'].includes(methodLowerCase))