JSFiddle - React, Tailwind, and code Playground

by cmruser

JavaScript

// WHEN USER LOGIN 
// get roletype
const role = 'Internal';

// get menu table base on role
const menus = [
	{
  	 id: 1,
     name: 'Home'
  },
  {
  	id: 2,
    name: 'Products'
  }
];
// get module table base on role
// check subscription require modules
const modules = [
	{
  	id: 1,
    name: 'Welcome',
    pathname: 'welcome'
  },
  {
  	id: 2,
    name: 'Dashboard',
    pathname: 'dashboard'
  }
]

// check subscriptions

// check rolemodules

// create access

const access = {
  modules: ['welcome', 'dashboard', ],
  pages: []
};

can();