Hide Blox Title header based on customer group ID
Hello,
I am using Blox Model, as a navigation menu and JTD. On this Menu, I have the following headers
1. CashFlow,
2. CashOutflow
3. Live Dashboard
Each of the headers above have an ID
1.#cashflow,
2.#cashoutflow,
3.ldashb in that order.
I want to hide the headers based on the user group, because I have multiple user groups that log in. Here is the code I currently use;
widget.on('domready', () => {
console.log('dashboard initialized');
const group0 = prism.user.groups[0];
// Hide #cashflow for specific group
if (group0 === '607626b55dd414002c79ba7e') {
$('#cashflow').hide();
} else {
#hide cashoutflow
$('#cashoutflow').remove();
}
});
This code disables the the JTD but doesn't hide the titles completely. Is there any other way to achieve this functionality (Hide the title header based on groups?) Thank you