feat access CRUD pages

This commit is contained in:
2026-07-07 08:51:56 +07:00
parent 287d50f4d6
commit 0ec9cc091f
9 changed files with 251 additions and 41 deletions
+16
View File
@@ -0,0 +1,16 @@
export const findMenuItemByPath = (items: any[], targetPath: string): any | null => {
for (const item of items || []) {
if (item?.to === targetPath) {
return item;
}
if (Array.isArray(item?.children) && item.children.length > 0) {
const found = findMenuItemByPath(item.children, targetPath);
if (found) {
return found;
}
}
}
return null;
};