Skip to content

Commit

Permalink
Update Pro template (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
capdiem authored Jul 3, 2024
1 parent e1e4d81 commit dd129a5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/Content/BlazorProServer/Global/Nav/NavHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ private void Initialization()
{
nav.Children = nav.Children.Where(c => c.Hide is false).ToArray();
nav.Children.ForEach(child =>
foreach (var child in nav.Children)
{
child.ParentId = nav.Id;
child.FullTitle = $"{nav.Title} {child.Title}";
child.ParentIcon = nav.Icon;
});
}
}
});

Expand All @@ -45,7 +45,7 @@ private void Initialization()
if (nav.Children is not null) SameLevelNavs.AddRange(nav.Children);
});

SameLevelNavs.Where(nav => nav.Href is not null).ForEach(nav =>
foreach (var nav in SameLevelNavs.Where(nav => nav.Href is not null))
{
// The following path will not open a new tab
if (nav.Href is "app/user/view" or "app/user/edit" or "app/ecommerce/details")
Expand All @@ -54,7 +54,7 @@ private void Initialization()
}

PageTabItems.Add(new(nav.Title, nav.Href, nav.ParentIcon));
});
}
}

public void NavigateTo(NavModel nav)
Expand Down
2 changes: 1 addition & 1 deletion src/Content/BlazorProServer/Pages/App/User/List.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public partial class List
private List<int> _pageSizes = new() { 10, 25, 50, 100 };
private readonly List<DataTableHeader<UserDto>> _headers = new()
{
new() { Text = "USER", Value = nameof(UserDto.UserName), CellClass = "" },
new() { Text = "USER", Value = nameof(UserDto.UserName) },
new() { Text = "EMAIL", Value = nameof(UserDto.Email) },
new() { Text = "ROLE", Value = nameof(UserDto.Role) },
new() { Text = "PLAN", Value = nameof(UserDto.Plan) },
Expand Down
8 changes: 4 additions & 4 deletions src/Content/BlazorProWasm/Global/Nav/NavHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ private void Initialization()
{
nav.Children = nav.Children.Where(c => c.Hide is false).ToArray();
nav.Children.ForEach(child =>
foreach (var child in nav.Children)
{
child.ParentId = nav.Id;
child.FullTitle = $"{nav.Title} {child.Title}";
child.ParentIcon = nav.Icon;
});
}
}
});

Expand All @@ -45,7 +45,7 @@ private void Initialization()
if (nav.Children is not null) SameLevelNavs.AddRange(nav.Children);
});

SameLevelNavs.Where(nav => nav.Href is not null).ForEach(nav =>
foreach (var nav in SameLevelNavs.Where(nav => nav.Href is not null))
{
// The following path will not open a new tab
if (nav.Href is "app/user/view" or "app/user/edit" or "app/ecommerce/details")
Expand All @@ -54,7 +54,7 @@ private void Initialization()
}

PageTabItems.Add(new(nav.Title, nav.Href, nav.ParentIcon));
});
}
}

public void NavigateTo(NavModel nav)
Expand Down
2 changes: 1 addition & 1 deletion src/Content/BlazorProWasm/Pages/App/User/List.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public partial class List
private List<int> _pageSizes = new() { 10, 25, 50, 100 };
private readonly List<DataTableHeader<UserDto>> _headers = new()
{
new() { Text = "USER", Value = nameof(UserDto.UserName), CellClass = "" },
new() { Text = "USER", Value = nameof(UserDto.UserName) },
new() { Text = "EMAIL", Value = nameof(UserDto.Email) },
new() { Text = "ROLE", Value = nameof(UserDto.Role) },
new() { Text = "PLAN", Value = nameof(UserDto.Plan) },
Expand Down

0 comments on commit dd129a5

Please sign in to comment.