Skip to content

Commit 64be0bc

Browse files
authored
Merge pull request #25 from Gid733/master
Updates for menu
2 parents 4b7bcdf + 68f284e commit 64be0bc

File tree

7 files changed

+71
-0
lines changed

7 files changed

+71
-0
lines changed

eFormApi.BasePn/EformBasePlugin.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
using Microsoft.Extensions.DependencyInjection;
66
using Microting.eFormApi.BasePn.Infrastructure.Models.Application;
77
using Microting.eFormApi.BasePn.Infrastructure.Helpers;
8+
using System.Collections.Generic;
9+
using Microting.eFormApi.BasePn.Infrastructure.Models.Application.NavigationMenu;
810

911
namespace Microting.eFormApi.BasePn
1012
{
@@ -46,6 +48,12 @@ public MenuModel HeaderMenu(IServiceProvider serviceProvider)
4648
return result;
4749
}
4850

51+
public List<PluginMenuItemModel> GetNavigationMenu(IServiceProvider serviceProvider)
52+
{
53+
var result = new List<PluginMenuItemModel>();
54+
return result;
55+
}
56+
4957
public void SeedDatabase(string connectionString)
5058
{
5159
}

eFormApi.BasePn/IEformPlugin.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ namespace Microting.eFormApi.BasePn
1010
{
1111
using System.Threading.Tasks;
1212
using Infrastructure.Helpers;
13+
using Microting.eFormApi.BasePn.Infrastructure.Models.Application.NavigationMenu;
1314

1415
public interface IEformPlugin
1516
{
@@ -26,6 +27,7 @@ void ConfigureOptionsServices(
2627

2728
void ConfigureDbContext(IServiceCollection services, string connectionString);
2829
MenuModel HeaderMenu(IServiceProvider serviceProvider);
30+
List<PluginMenuItemModel> GetNavigationMenu(IServiceProvider serviceProvider);
2931
void SeedDatabase(string connectionString);
3032
void AddPluginConfig(
3133
IConfigurationBuilder builder,
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace Microting.eFormApi.BasePn.Infrastructure.Models.Application.NavigationMenu
2+
{
3+
public enum MenuItemTypeEnum
4+
{
5+
Link = 1,
6+
CustomLink = 2,
7+
Dropdown = 3
8+
}
9+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
namespace Microting.eFormApi.BasePn.Infrastructure.Models.Application.NavigationMenu
2+
{
3+
using System.Collections.Generic;
4+
5+
public class PluginMenuItemModel
6+
{
7+
public string Link { get; set; }
8+
public string Name { get; set; }
9+
public MenuItemTypeEnum Type { get; set; }
10+
public int Position { get; set; }
11+
public PluginMenuTemplateModel MenuTemplate { get; set; }
12+
13+
public List<PluginMenuItemModel> ChildItems
14+
= new List<PluginMenuItemModel>();
15+
public List<PluginMenuTranslationModel> Translations { get; set; }
16+
= new List<PluginMenuTranslationModel>();
17+
}
18+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
namespace Microting.eFormApi.BasePn.Infrastructure.Models.Application.NavigationMenu
2+
{
3+
using System.Collections.Generic;
4+
5+
public class PluginMenuTemplateModel
6+
{
7+
public string Name { get; set; }
8+
public string DefaultLink { get; set; }
9+
public string E2EId { get; set; }
10+
11+
public List<PluginMenuTranslationModel> Translations
12+
= new List<PluginMenuTranslationModel>();
13+
public List<PluginPermissionModel> Permissions { get; set; }
14+
= new List<PluginPermissionModel>();
15+
}
16+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace Microting.eFormApi.BasePn.Infrastructure.Models.Application.NavigationMenu
2+
{
3+
public class PluginMenuTranslationModel
4+
{
5+
public string Name { get; set; }
6+
public string LocaleName { get; set; }
7+
public string Language { get; set; }
8+
}
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace Microting.eFormApi.BasePn.Infrastructure.Models.Application.NavigationMenu
2+
{
3+
public class PluginPermissionModel
4+
{
5+
public string ClaimName { get; set; }
6+
public string PermissionName { get; set; }
7+
public string PermissionTypeName { get; set; }
8+
}
9+
}

0 commit comments

Comments
 (0)