fix:typescripts built errors
This commit is contained in:
parent
826eead605
commit
48754d6243
2 changed files with 9 additions and 9 deletions
|
|
@ -30,7 +30,7 @@ const PageManager: React.FC<PageManagerProps> = ({
|
||||||
const checkPageAccess = async (pageData: GenericPageData): Promise<boolean> => {
|
const checkPageAccess = async (pageData: GenericPageData): Promise<boolean> => {
|
||||||
console.log('🔍 PageManager: Checking page access:', {
|
console.log('🔍 PageManager: Checking page access:', {
|
||||||
path: pageData.path,
|
path: pageData.path,
|
||||||
label: pageData.label,
|
name: pageData.name,
|
||||||
hide: pageData.hide,
|
hide: pageData.hide,
|
||||||
moduleEnabled: pageData.moduleEnabled
|
moduleEnabled: pageData.moduleEnabled
|
||||||
});
|
});
|
||||||
|
|
@ -57,7 +57,7 @@ const PageManager: React.FC<PageManagerProps> = ({
|
||||||
hasPageData: !!pageData,
|
hasPageData: !!pageData,
|
||||||
hide: pageData?.hide,
|
hide: pageData?.hide,
|
||||||
moduleEnabled: pageData?.moduleEnabled,
|
moduleEnabled: pageData?.moduleEnabled,
|
||||||
label: pageData?.label
|
name: pageData?.name
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!pageData || pageData.hide || !pageData.moduleEnabled) {
|
if (!pageData || pageData.hide || !pageData.moduleEnabled) {
|
||||||
|
|
@ -83,7 +83,7 @@ const PageManager: React.FC<PageManagerProps> = ({
|
||||||
|
|
||||||
console.log('✅ PageManager: Rendering page:', {
|
console.log('✅ PageManager: Rendering page:', {
|
||||||
path: currentPath,
|
path: currentPath,
|
||||||
label: pageData.label
|
name: pageData.name
|
||||||
});
|
});
|
||||||
|
|
||||||
setPageInstances(prev => {
|
setPageInstances(prev => {
|
||||||
|
|
@ -103,7 +103,7 @@ const PageManager: React.FC<PageManagerProps> = ({
|
||||||
if (!newInstances.has(currentPath)) {
|
if (!newInstances.has(currentPath)) {
|
||||||
console.log('📦 PageManager: Creating new page instance:', {
|
console.log('📦 PageManager: Creating new page instance:', {
|
||||||
path: currentPath,
|
path: currentPath,
|
||||||
label: pageData.label
|
name: pageData.name
|
||||||
});
|
});
|
||||||
const shouldPreserve = pageData.preserveState || false;
|
const shouldPreserve = pageData.preserveState || false;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,7 @@ export const SidebarProvider: React.FC<SidebarProviderProps> = ({ children }) =>
|
||||||
for (const pageData of mainPages) {
|
for (const pageData of mainPages) {
|
||||||
console.log('🔍 SidebarProvider: Checking access for page:', {
|
console.log('🔍 SidebarProvider: Checking access for page:', {
|
||||||
path: pageData.path,
|
path: pageData.path,
|
||||||
label: pageData.label,
|
name: pageData.name,
|
||||||
hasSubpages: pageData.hasSubpages
|
hasSubpages: pageData.hasSubpages
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -206,7 +206,7 @@ export const SidebarProvider: React.FC<SidebarProviderProps> = ({ children }) =>
|
||||||
console.log('🔍 SidebarProvider: Checking subpage access:', {
|
console.log('🔍 SidebarProvider: Checking subpage access:', {
|
||||||
parentPath: pageData.path,
|
parentPath: pageData.path,
|
||||||
subpagePath: subpage.path,
|
subpagePath: subpage.path,
|
||||||
subpageLabel: subpage.label
|
subpageName: subpage.name
|
||||||
});
|
});
|
||||||
|
|
||||||
const hasSubpageRBACAccess = await canView('UI', subpage.path);
|
const hasSubpageRBACAccess = await canView('UI', subpage.path);
|
||||||
|
|
@ -236,7 +236,7 @@ export const SidebarProvider: React.FC<SidebarProviderProps> = ({ children }) =>
|
||||||
if (accessibleSubpages.length > 0) {
|
if (accessibleSubpages.length > 0) {
|
||||||
console.log('✅ SidebarProvider: Adding parent page with subpages:', {
|
console.log('✅ SidebarProvider: Adding parent page with subpages:', {
|
||||||
path: pageData.path,
|
path: pageData.path,
|
||||||
label: pageData.label,
|
name: pageData.name,
|
||||||
subpagesCount: accessibleSubpages.length
|
subpagesCount: accessibleSubpages.length
|
||||||
});
|
});
|
||||||
// Create expandable item with submenu
|
// Create expandable item with submenu
|
||||||
|
|
@ -258,7 +258,7 @@ export const SidebarProvider: React.FC<SidebarProviderProps> = ({ children }) =>
|
||||||
// No accessible subpages, show as regular item
|
// No accessible subpages, show as regular item
|
||||||
console.log('✅ SidebarProvider: Adding parent page without accessible subpages:', {
|
console.log('✅ SidebarProvider: Adding parent page without accessible subpages:', {
|
||||||
path: pageData.path,
|
path: pageData.path,
|
||||||
label: pageData.label
|
name: pageData.name
|
||||||
});
|
});
|
||||||
items.push({
|
items.push({
|
||||||
id: pageData.id,
|
id: pageData.id,
|
||||||
|
|
@ -273,7 +273,7 @@ export const SidebarProvider: React.FC<SidebarProviderProps> = ({ children }) =>
|
||||||
// Regular items without subpages
|
// Regular items without subpages
|
||||||
console.log('✅ SidebarProvider: Adding regular page:', {
|
console.log('✅ SidebarProvider: Adding regular page:', {
|
||||||
path: pageData.path,
|
path: pageData.path,
|
||||||
label: pageData.label
|
name: pageData.name
|
||||||
});
|
});
|
||||||
items.push({
|
items.push({
|
||||||
id: pageData.id,
|
id: pageData.id,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue