@elite.framework/ng.core 2.0.27 → 2.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2263,24 +2263,22 @@ class AbstractNavTreeService extends AbstractTreeService {
|
|
|
2263
2263
|
convertNavigationToRoutes(menuItems, parentName) {
|
|
2264
2264
|
return menuItems
|
|
2265
2265
|
.filter(item => item.isEnabled && item.isVisible)
|
|
2266
|
-
.
|
|
2266
|
+
.map(item => {
|
|
2267
2267
|
const route = {
|
|
2268
2268
|
name: item.name,
|
|
2269
|
+
parentName: parentName,
|
|
2269
2270
|
path: this.extractPathFromUrl(item.url) || item.name.toLowerCase(),
|
|
2270
|
-
// parentName: parentName || null,
|
|
2271
2271
|
requiredPolicy: item.permission || undefined,
|
|
2272
|
-
iconClass: item.icon || undefined,
|
|
2273
2272
|
order: item.order,
|
|
2274
2273
|
invisible: !item.isVisible,
|
|
2275
|
-
|
|
2274
|
+
iconClass: item.icon || undefined,
|
|
2275
|
+
children: [], // سيتم ملؤها إذا كان هناك عناصر فرعية
|
|
2276
2276
|
};
|
|
2277
|
-
|
|
2278
|
-
// Recursively add children
|
|
2277
|
+
// Recursively convert children if exist
|
|
2279
2278
|
if (item.items?.length) {
|
|
2280
|
-
|
|
2281
|
-
routes.push(...childRoutes);
|
|
2279
|
+
route.children = this.convertNavigationToRoutes(item.items, item.name);
|
|
2282
2280
|
}
|
|
2283
|
-
return
|
|
2281
|
+
return route;
|
|
2284
2282
|
});
|
|
2285
2283
|
}
|
|
2286
2284
|
extractPathFromUrl(url) {
|