Skip to content

Commit

Permalink
Merge pull request #4 from EasyAbp/fix-eto
Browse files Browse the repository at this point in the history
Update `TryCreateMenuItemEto`
  • Loading branch information
gdlcf88 authored Aug 20, 2023
2 parents 93f574a + 296c643 commit 8077645
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
2 changes: 1 addition & 1 deletion common.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>1.0.0</Version>
<Version>1.0.1</Version>
<NoWarn>$(NoWarn);CS1591;CS0436</NoWarn>
<AbpProjectType>module</AbpProjectType>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,25 @@ public class TryCreateMenuItemEto : ExtensibleObject, IMenuItem

public string Permission { get; set; }

public int? Order { get; set; }

public string Icon { get; set; }

public string Target { get; set; }

public bool IsDisabled { get; set; }

public string LResourceTypeName { get; set; }

public string LResourceTypeAssemblyName { get; set; }

public TryCreateMenuItemEto()
{
}

public TryCreateMenuItemEto(string parentName, bool inAdministration, string name, string displayName,
string url, string urlMvc, string urlBlazor, string urlAngular, string permission, string lResourceTypeName,
string lResourceTypeAssemblyName)
string url, string urlMvc, string urlBlazor, string urlAngular, string permission, int? order, string icon,
string target, bool isDisabled, string lResourceTypeName, string lResourceTypeAssemblyName)
{
ParentName = parentName;
InAdministration = inAdministration;
Expand All @@ -42,6 +53,10 @@ public TryCreateMenuItemEto(string parentName, bool inAdministration, string nam
UrlBlazor = urlBlazor;
UrlAngular = urlAngular;
Permission = permission;
Order = order;
Icon = icon;
Target = target;
IsDisabled = isDisabled;
LResourceTypeName = lResourceTypeName;
LResourceTypeAssemblyName = lResourceTypeAssemblyName;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public async Task Should_Create_A_Menu_Item()
var handler = ServiceProvider.GetRequiredService<CreateMenuItemEventHandler>();

var eto = new TryCreateMenuItemEto(null, false, "GoogleLink", "Google", "https://google.com", null, null,
null, null, null, null);
null, null, null, null, null, false, null, null);

// Act

Expand Down Expand Up @@ -50,7 +50,7 @@ public async Task Should_Create_An_Administration_Menu_Item()
var handler = ServiceProvider.GetRequiredService<CreateMenuItemEventHandler>();

var eto = new TryCreateMenuItemEto(null, true, "GoogleLink", "Google", "https://google.com", null, null,
null, null, null, null);
null, null, null, null, null, false, null, null);

// Act

Expand Down Expand Up @@ -78,10 +78,10 @@ public async Task Should_Create_Menu_Items()
var handler = ServiceProvider.GetRequiredService<CreateMenuItemEventHandler>();

var itemEto1 = new TryCreateMenuItemEto(null, false, "SearchEngines", "Search engines", null, null, null,
null, null, null, null);
null, null, null, null, null, false, null, null);

var itemEto2 = new TryCreateMenuItemEto(itemEto1.Name, false, "GoogleLink", "Google", "https://google.com",
null, null, null, null, null, null);
null, null, null, null, null, null, null, false, null, null);

var eto = new TryCreateMenuItemsEto(new List<TryCreateMenuItemEto> { itemEto1, itemEto2 });

Expand Down Expand Up @@ -122,7 +122,7 @@ public async Task Should_Skip_Creating_An_Existing_Menu_Item()
await repository.InsertAsync(existingMenuItem, true);

var eto = new TryCreateMenuItemEto(null, false, "GoogleLink", "Google2", "https://google.com", null, null,
null, null, null, null);
null, null, null, null, null, false, null, null);

// Act

Expand Down

0 comments on commit 8077645

Please sign in to comment.