-drag menu continua

This commit is contained in:
Surya Paolo
2025-09-16 22:18:21 +02:00
parent 95fa0b9ac0
commit e40bf8b73d
16 changed files with 746 additions and 1233 deletions

View File

@@ -11191,18 +11191,16 @@ export const tools = {
getmenuByPath(path: string) {
const myroutes = static_data.routes;
const normalized = this.norm(path);
const norm = path ? (path.startsWith('/') ? path : `/${path}`).trim().toLowerCase() : undefined;
const mymenus = myroutes.find((menu: any) => menu.path === normalized);
const mymenus = myroutes.find((menu: any) => menu.path === norm);
// console.log('mymenus', mymenus, 'path', path, 'norm', norm);
return mymenus;
},
norm(path: string): string {
return path
.trim()
.replace(/^\/+|\/+$/g, '')
.toLowerCase();
norm(path?: string): string | undefined {
return typeof path === 'string' ? path.trim().replace(/^\/+|\/+$/g, '').toLowerCase() : undefined;
},
// FINE !