ListFormSeeder düzenlemesi ve Login

Eğer ilgili form numarası yoksa kayıt ekleniyor
This commit is contained in:
Sedat ÖZTÜRK 2025-06-19 10:15:26 +03:00
parent 6b348ff3ac
commit eb23174f7a
6 changed files with 1825 additions and 1760 deletions

View file

@ -45,28 +45,14 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
public async Task SeedAsync(DataSeedContext context) public async Task SeedAsync(DataSeedContext context)
{ {
if (await _listFormRepository.GetCountAsync() > 0)
{
return;
}
var lookupQueryLanguage = $"SELECT \"{DbTablePrefix}LanguageKey\".\"Key\", CONCAT(\"{DbTablePrefix}LanguageKey\".\"Key\", ' (', \"{DbTablePrefix}LanguageText\".\"Value\", ')') AS \"Name\" FROM \"{DbTablePrefix}LanguageKey\" LEFT OUTER JOIN \"{DbTablePrefix}LanguageText\" ON \"{DbTablePrefix}LanguageKey\".\"Key\" = \"{DbTablePrefix}LanguageText\".\"Key\" AND \"{DbTablePrefix}LanguageKey\".\"ResourceName\" = \"{DbTablePrefix}LanguageText\".\"ResourceName\" WHERE \"{DbTablePrefix}LanguageKey\".\"IsDeleted\" = 'false' AND \"{DbTablePrefix}LanguageText\".\"IsDeleted\" = 'false' AND \"{DbTablePrefix}LanguageText\".\"CultureName\" = 'tr' ORDER BY \"{DbTablePrefix}LanguageKey\".\"Key\";"; var lookupQueryLanguage = $"SELECT \"{DbTablePrefix}LanguageKey\".\"Key\", CONCAT(\"{DbTablePrefix}LanguageKey\".\"Key\", ' (', \"{DbTablePrefix}LanguageText\".\"Value\", ')') AS \"Name\" FROM \"{DbTablePrefix}LanguageKey\" LEFT OUTER JOIN \"{DbTablePrefix}LanguageText\" ON \"{DbTablePrefix}LanguageKey\".\"Key\" = \"{DbTablePrefix}LanguageText\".\"Key\" AND \"{DbTablePrefix}LanguageKey\".\"ResourceName\" = \"{DbTablePrefix}LanguageText\".\"ResourceName\" WHERE \"{DbTablePrefix}LanguageKey\".\"IsDeleted\" = 'false' AND \"{DbTablePrefix}LanguageText\".\"IsDeleted\" = 'false' AND \"{DbTablePrefix}LanguageText\".\"CultureName\" = 'tr' ORDER BY \"{DbTablePrefix}LanguageKey\".\"Key\";";
var lookupQueryCulture = $"SELECT \"CultureName\" AS \"Key\", \"DisplayName\" AS \"Name\", \"CreationTime\" FROM \"{DbTablePrefix}Language\" WHERE \"IsEnabled\" = 'true' and \"IsDeleted\" = 'false'"; var lookupQueryCulture = $"SELECT \"CultureName\" AS \"Key\", \"DisplayName\" AS \"Name\", \"CreationTime\" FROM \"{DbTablePrefix}Language\" WHERE \"IsEnabled\" = 'true' and \"IsDeleted\" = 'false'";
var adminUser = _identityUserManager.FindByNameAsync(PlatformConsts.AbpIdentity.User.AdminEmailDefaultValue);
string roleId = null;
string userId = null;
if (adminUser != null && adminUser.Result != null)
{
userId = adminUser.Result.UserName.ToString();
var userRole = _identityRoleManager.GetByIdAsync(adminUser.Result.Roles.FirstOrDefault().RoleId);
if (userRole != null && userRole.Result != null)
roleId = userRole.Result.Name.ToString();
}
#region Form #region Form
#region Languages
#region Language
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Forms.FormLanguage))
{
var formLanguage = await _listFormRepository.InsertAsync( var formLanguage = await _listFormRepository.InsertAsync(
new ListForm() new ListForm()
{ {
@ -76,7 +62,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
new { new {
TabTitle = "Language Texts", TabTitle = "Language Texts",
TabType = ListFormTabTypeEnum.List, TabType = ListFormTabTypeEnum.List,
Code = ListFormCodes.LanguageText, Code = ListFormCodes.Lists.LanguageText,
Relation = new List<dynamic>() { Relation = new List<dynamic>() {
new { new {
ParentFieldName = "CultureName", ParentFieldName = "CultureName",
@ -102,6 +88,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
Title = AppCodes.Languages.Language, Title = AppCodes.Languages.Language,
DataSourceCode = SeedConsts.DataSources.DefaultCode, DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false, IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false, IsOrganizationUnit = false,
Description = AppCodes.Languages.Language, Description = AppCodes.Languages.Language,
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
@ -371,20 +358,26 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}), }),
}, },
]); ]);
}
#endregion #endregion
#endregion #endregion
#region List #region List
#region Tenants
#region Tenant
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Tenant))
{
var listFormTenants = await _listFormRepository.InsertAsync( var listFormTenants = await _listFormRepository.InsertAsync(
new ListForm() new ListForm()
{ {
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Tenants, ListFormCode = ListFormCodes.Lists.Tenant,
Name = TenantManagementPermissions.Tenants.Default, Name = TenantManagementPermissions.Tenants.Default,
Title = TenantManagementPermissions.Tenants.Default, Title = TenantManagementPermissions.Tenants.Default,
DataSourceCode = SeedConsts.DataSources.DefaultCode, DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false, IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false, IsOrganizationUnit = false,
Description = TenantManagementPermissions.Tenants.Default, Description = TenantManagementPermissions.Tenants.Default,
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
@ -946,18 +939,23 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}, },
]); ]);
#endregion #endregion
}
#endregion #endregion
#region Permissions #region Permission
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Permission))
{
var listFormPermissions = await _listFormRepository.InsertAsync( var listFormPermissions = await _listFormRepository.InsertAsync(
new ListForm() new ListForm()
{ {
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Permission, ListFormCode = ListFormCodes.Lists.Permission,
Name = AbpIdentity.Permissions.Default, Name = AbpIdentity.Permissions.Default,
Title = AbpIdentity.Permissions.Default, Title = AbpIdentity.Permissions.Default,
DataSourceCode = SeedConsts.DataSources.DefaultCode, DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false, IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false, IsOrganizationUnit = false,
Description = AbpIdentity.Permissions.Default, Description = AbpIdentity.Permissions.Default,
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
@ -1276,17 +1274,21 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
} }
}); });
#endregion #endregion
}
#endregion #endregion
#region Roles #region Role
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Role))
{
var listFormRoles = await _listFormRepository.InsertAsync( var listFormRoles = await _listFormRepository.InsertAsync(
new ListForm() new ListForm()
{ {
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Roles, ListFormCode = ListFormCodes.Lists.Role,
Name = IdentityPermissions.Roles.Default, Name = IdentityPermissions.Roles.Default,
Title = IdentityPermissions.Roles.Default, Title = IdentityPermissions.Roles.Default,
IsTenant = true, IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false, IsOrganizationUnit = false,
DataSourceCode = SeedConsts.DataSources.DefaultCode, DataSourceCode = SeedConsts.DataSources.DefaultCode,
Description = IdentityPermissions.Roles.Default, Description = IdentityPermissions.Roles.Default,
@ -1477,17 +1479,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}, },
}); });
#endregion #endregion
}
#endregion #endregion
#region Users #region User
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.User))
{
var listFormUsers = await _listFormRepository.InsertAsync( var listFormUsers = await _listFormRepository.InsertAsync(
new ListForm() new ListForm()
{ {
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Users, ListFormCode = ListFormCodes.Lists.User,
Name = IdentityPermissions.Users.Default, Name = IdentityPermissions.Users.Default,
Title = IdentityPermissions.Users.Default, Title = IdentityPermissions.Users.Default,
IsTenant = true, IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false,
DataSourceCode = SeedConsts.DataSources.DefaultCode, DataSourceCode = SeedConsts.DataSources.DefaultCode,
Description = IdentityPermissions.Users.Default, Description = IdentityPermissions.Users.Default,
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
@ -1799,19 +1806,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}, },
]); ]);
#endregion #endregion
}
#endregion #endregion
#region Languages #region Language
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Language))
{
var listFormLanguages = await _listFormRepository.InsertAsync( var listFormLanguages = await _listFormRepository.InsertAsync(
new ListForm() new ListForm()
{ {
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Language, ListFormCode = ListFormCodes.Lists.Language,
Name = AppCodes.Languages.Language, Name = AppCodes.Languages.Language,
Title = AppCodes.Languages.Language, Title = AppCodes.Languages.Language,
DataSourceCode = SeedConsts.DataSources.DefaultCode, DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false, IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false, IsOrganizationUnit = false,
Description = AppCodes.Languages.Language, Description = AppCodes.Languages.Language,
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
@ -2140,19 +2150,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}); });
#endregion #endregion
}
#endregion #endregion
#region LanguageText #region LanguageText
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.LanguageText))
{
var listFormLanguageTexts = await _listFormRepository.InsertAsync( var listFormLanguageTexts = await _listFormRepository.InsertAsync(
new ListForm() new ListForm()
{ {
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.LanguageText, ListFormCode = ListFormCodes.Lists.LanguageText,
Name = AppCodes.Languages.LanguageText, Name = AppCodes.Languages.LanguageText,
Title = AppCodes.Languages.LanguageText, Title = AppCodes.Languages.LanguageText,
DataSourceCode = SeedConsts.DataSources.DefaultCode, DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false, IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false, IsOrganizationUnit = false,
Description = AppCodes.Languages.LanguageText, Description = AppCodes.Languages.LanguageText,
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
@ -2445,18 +2458,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
]); ]);
#endregion #endregion
}
#endregion #endregion
#region Menus #region Menu
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Menu))
{
var listFormMenus = await _listFormRepository.InsertAsync( var listFormMenus = await _listFormRepository.InsertAsync(
new ListForm() new ListForm()
{ {
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Menu, ListFormCode = ListFormCodes.Lists.Menu,
Name = AppCodes.Menus, Name = AppCodes.Menus,
Title = AppCodes.Menus, Title = AppCodes.Menus,
DataSourceCode = SeedConsts.DataSources.DefaultCode, DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false, IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false, IsOrganizationUnit = false,
Description = AppCodes.Menus, Description = AppCodes.Menus,
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
@ -2940,18 +2957,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}); });
#endregion #endregion
}
#endregion #endregion
#region ListForms #region ListForm
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Listform))
{
var listForms = await _listFormRepository.InsertAsync( var listForms = await _listFormRepository.InsertAsync(
new ListForm() new ListForm()
{ {
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Listform, ListFormCode = ListFormCodes.Lists.Listform,
Name = AppCodes.Listforms.Listform, Name = AppCodes.Listforms.Listform,
Title = AppCodes.Listforms.Listform, Title = AppCodes.Listforms.Listform,
DataSourceCode = SeedConsts.DataSources.DefaultCode, DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false, IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false, IsOrganizationUnit = false,
Description = AppCodes.Listforms.Listform, Description = AppCodes.Listforms.Listform,
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
@ -3797,18 +3818,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}, },
}); });
#endregion #endregion
}
#endregion #endregion
#region SettingDefinitions #region SettingDefinition
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.SettingDefinition))
{
var listFormSettingDefinitions = await _listFormRepository.InsertAsync( var listFormSettingDefinitions = await _listFormRepository.InsertAsync(
new ListForm() new ListForm()
{ {
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.SettingDefinition, ListFormCode = ListFormCodes.Lists.SettingDefinition,
Name = AppCodes.Settings.SettingDefinitions, Name = AppCodes.Settings.SettingDefinitions,
Title = AppCodes.Settings.SettingDefinitions, Title = AppCodes.Settings.SettingDefinitions,
DataSourceCode = SeedConsts.DataSources.DefaultCode, DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false, IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false, IsOrganizationUnit = false,
Description = AppCodes.Settings.SettingDefinitions, Description = AppCodes.Settings.SettingDefinitions,
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
@ -4450,18 +4475,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}, },
}); });
#endregion #endregion
}
#endregion #endregion
#region Chart #region Chart
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Chart))
{
var listFormCharts = await _listFormRepository.InsertAsync( var listFormCharts = await _listFormRepository.InsertAsync(
new ListForm() new ListForm()
{ {
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Chart, ListFormCode = ListFormCodes.Lists.Chart,
Name = AppCodes.Listforms.Chart, Name = AppCodes.Listforms.Chart,
Title = AppCodes.Listforms.Chart, Title = AppCodes.Listforms.Chart,
DataSourceCode = SeedConsts.DataSources.DefaultCode, DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false, IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false, IsOrganizationUnit = false,
Description = AppCodes.Listforms.Chart, Description = AppCodes.Listforms.Chart,
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
@ -4759,19 +4788,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
} }
}); });
#endregion #endregion
}
#endregion #endregion
#region Data Sources #region Data Source
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.DataSource))
{
var listFormDataSources = await _listFormRepository.InsertAsync( var listFormDataSources = await _listFormRepository.InsertAsync(
new ListForm() new ListForm()
{ {
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.DataSource, ListFormCode = ListFormCodes.Lists.DataSource,
Name = AppCodes.Listforms.DataSource, Name = AppCodes.Listforms.DataSource,
Title = AppCodes.Listforms.DataSource, Title = AppCodes.Listforms.DataSource,
DataSourceCode = SeedConsts.DataSources.DefaultCode, DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false, IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false, IsOrganizationUnit = false,
Description = AppCodes.Listforms.DataSource, Description = AppCodes.Listforms.DataSource,
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
@ -5005,22 +5037,25 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}, },
}); });
#endregion #endregion
}
#endregion #endregion
#region Background Worker #region Background Worker
var configurationSection = _configuration.GetSection("OpenIddict:Applications"); var configurationSection = _configuration.GetSection("OpenIddict:Applications");
var swaggerRootUrl = configurationSection["Platform_Swagger:RootUrl"]?.TrimEnd('/'); var swaggerRootUrl = configurationSection["Platform_Swagger:RootUrl"]?.TrimEnd('/');
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.BackgroundWorker))
{
var listFormBackgroundWorkers = await _listFormRepository.InsertAsync( var listFormBackgroundWorkers = await _listFormRepository.InsertAsync(
new ListForm() new ListForm()
{ {
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.BackgroundWorker, ListFormCode = ListFormCodes.Lists.BackgroundWorker,
Name = AppCodes.BackgroundWorkers, Name = AppCodes.BackgroundWorkers,
Title = AppCodes.BackgroundWorkers, Title = AppCodes.BackgroundWorkers,
DataSourceCode = SeedConsts.DataSources.DefaultCode, DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false, IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false, IsOrganizationUnit = false,
Description = AppCodes.BackgroundWorkers, Description = AppCodes.BackgroundWorkers,
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
@ -5399,19 +5434,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}, },
}); });
#endregion #endregion
}
#endregion #endregion
#region Notification Rules #region Notification Rule
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.NotificationRule))
{
var listFormNotificationRules = await _listFormRepository.InsertAsync( var listFormNotificationRules = await _listFormRepository.InsertAsync(
new ListForm() new ListForm()
{ {
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.NotificationRule, ListFormCode = ListFormCodes.Lists.NotificationRule,
Name = AppCodes.Notifications.NotificationRules, Name = AppCodes.Notifications.NotificationRules,
Title = AppCodes.Notifications.NotificationRules, Title = AppCodes.Notifications.NotificationRules,
DataSourceCode = SeedConsts.DataSources.DefaultCode, DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false, IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false, IsOrganizationUnit = false,
Description = AppCodes.Notifications.NotificationRules, Description = AppCodes.Notifications.NotificationRules,
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
@ -5806,19 +5844,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}, },
]); ]);
#endregion #endregion
}
#endregion #endregion
#region Notifications #region Notification
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Notification))
{
var listFormNotifications = await _listFormRepository.InsertAsync( var listFormNotifications = await _listFormRepository.InsertAsync(
new ListForm() new ListForm()
{ {
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Notification, ListFormCode = ListFormCodes.Lists.Notification,
Name = AppCodes.Notifications.Notification, Name = AppCodes.Notifications.Notification,
Title = AppCodes.Notifications.Notification, Title = AppCodes.Notifications.Notification,
DataSourceCode = SeedConsts.DataSources.DefaultCode, DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false, IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false, IsOrganizationUnit = false,
Description = AppCodes.Notifications.Notification, Description = AppCodes.Notifications.Notification,
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
@ -6137,19 +6178,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}, },
]); ]);
#endregion #endregion
}
#endregion #endregion
#region Ip Restriction #region Ip Restriction
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.IpRestriction))
{
var listFormIpRestrictions = await _listFormRepository.InsertAsync( var listFormIpRestrictions = await _listFormRepository.InsertAsync(
new ListForm() new ListForm()
{ {
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.IpRestriction, ListFormCode = ListFormCodes.Lists.IpRestriction,
Name = AppCodes.IpRestrictions, Name = AppCodes.IpRestrictions,
Title = AppCodes.IpRestrictions, Title = AppCodes.IpRestrictions,
DataSourceCode = SeedConsts.DataSources.DefaultCode, DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = true, IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false, IsOrganizationUnit = false,
Description = AppCodes.IpRestrictions, Description = AppCodes.IpRestrictions,
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
@ -6387,19 +6431,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}, },
]); ]);
#endregion #endregion
}
#endregion #endregion
#region Public Apis #region Public Api
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.PublicApi))
{
var listFormPublicApis = await _listFormRepository.InsertAsync( var listFormPublicApis = await _listFormRepository.InsertAsync(
new ListForm() new ListForm()
{ {
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.PublicApi, ListFormCode = ListFormCodes.Lists.PublicApi,
Name = AppCodes.PublicApis, Name = AppCodes.PublicApis,
Title = AppCodes.PublicApis, Title = AppCodes.PublicApis,
DataSourceCode = SeedConsts.DataSources.DefaultCode, DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false, IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false, IsOrganizationUnit = false,
Description = AppCodes.PublicApis, Description = AppCodes.PublicApis,
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
@ -6778,19 +6825,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}, },
]); ]);
#endregion #endregion
}
#endregion #endregion
#region Permission Groups #region Permission Group
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.PermissionGroup))
{
var listFormPermissionGroups = await _listFormRepository.InsertAsync( var listFormPermissionGroups = await _listFormRepository.InsertAsync(
new ListForm() new ListForm()
{ {
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.PermissionGroup, ListFormCode = ListFormCodes.Lists.PermissionGroup,
Name = AbpIdentity.PermissionGroups.Default, Name = AbpIdentity.PermissionGroups.Default,
Title = AbpIdentity.PermissionGroups.Default, Title = AbpIdentity.PermissionGroups.Default,
DataSourceCode = SeedConsts.DataSources.DefaultCode, DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false, IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false, IsOrganizationUnit = false,
Description = AbpIdentity.PermissionGroups.Default, Description = AbpIdentity.PermissionGroups.Default,
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
@ -6986,18 +7036,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}, },
}); });
#endregion #endregion
}
#endregion #endregion
#region Global Search #region Global Search
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.GlobalSearch))
{
var listFormGlobalSearch = await _listFormRepository.InsertAsync( var listFormGlobalSearch = await _listFormRepository.InsertAsync(
new ListForm() new ListForm()
{ {
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.GlobalSearch, ListFormCode = ListFormCodes.Lists.GlobalSearch,
Name = AppCodes.Settings.GlobalSearch, Name = AppCodes.Settings.GlobalSearch,
Title = AppCodes.Settings.GlobalSearch, Title = AppCodes.Settings.GlobalSearch,
DataSourceCode = SeedConsts.DataSources.DefaultCode, DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = true, IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false, IsOrganizationUnit = false,
Description = AppCodes.Settings.GlobalSearch, Description = AppCodes.Settings.GlobalSearch,
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
@ -7252,18 +7306,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}, },
]); ]);
#endregion #endregion
}
#endregion #endregion
#region Security Logs #region Security Log
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.SecurityLog))
{
var listFormSecurityLog = await _listFormRepository.InsertAsync( var listFormSecurityLog = await _listFormRepository.InsertAsync(
new ListForm() new ListForm()
{ {
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.SecurityLog, ListFormCode = ListFormCodes.Lists.SecurityLog,
Name = AppCodes.IdentityPermissions.Users.SecurityLogs, Name = AppCodes.IdentityPermissions.Users.SecurityLogs,
Title = AppCodes.IdentityPermissions.Users.SecurityLogs, Title = AppCodes.IdentityPermissions.Users.SecurityLogs,
DataSourceCode = SeedConsts.DataSources.DefaultCode, DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = true, IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false, IsOrganizationUnit = false,
Description = AppCodes.IdentityPermissions.Users.SecurityLogs, Description = AppCodes.IdentityPermissions.Users.SecurityLogs,
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
@ -7585,18 +7643,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}, },
]); ]);
#endregion #endregion
}
#endregion #endregion
#region Audit Logs #region Audit Log
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.AuditLog))
{
var listFormAuditLog = await _listFormRepository.InsertAsync( var listFormAuditLog = await _listFormRepository.InsertAsync(
new ListForm() new ListForm()
{ {
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.AuditLog, ListFormCode = ListFormCodes.Lists.AuditLog,
Name = AppCodes.AuditLogs, Name = AppCodes.AuditLogs,
Title = AppCodes.AuditLogs, Title = AppCodes.AuditLogs,
DataSourceCode = SeedConsts.DataSources.DefaultCode, DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = true, IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false, IsOrganizationUnit = false,
Description = AppCodes.AuditLogs, Description = AppCodes.AuditLogs,
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
@ -7903,18 +7965,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}, },
]); ]);
#endregion #endregion
}
#endregion #endregion
#region Branches #region Branche
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Branch))
{
var listFormBranches = await _listFormRepository.InsertAsync( var listFormBranches = await _listFormRepository.InsertAsync(
new ListForm() new ListForm()
{ {
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Branch, ListFormCode = ListFormCodes.Lists.Branch,
Name = AppCodes.Branches, Name = AppCodes.Branches,
Title = AppCodes.Branches, Title = AppCodes.Branches,
DataSourceCode = SeedConsts.DataSources.DefaultCode, DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false, IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false, IsOrganizationUnit = false,
Description = AppCodes.Branches, Description = AppCodes.Branches,
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
@ -8513,18 +8579,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}, },
]); ]);
#endregion #endregion
}
#endregion #endregion
#region ClaimTypes #region ClaimType
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.ClaimType))
{
var listFormClaimTypes = await _listFormRepository.InsertAsync( var listFormClaimTypes = await _listFormRepository.InsertAsync(
new ListForm() new ListForm()
{ {
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.ClaimTypes, ListFormCode = ListFormCodes.Lists.ClaimType,
Name = AppCodes.IdentityPermissions.Users.ClaimTypes, Name = AppCodes.IdentityPermissions.Users.ClaimTypes,
Title = AppCodes.IdentityPermissions.Users.ClaimTypes, Title = AppCodes.IdentityPermissions.Users.ClaimTypes,
DataSourceCode = SeedConsts.DataSources.DefaultCode, DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false, IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false, IsOrganizationUnit = false,
Description = AppCodes.IdentityPermissions.Users.ClaimTypes, Description = AppCodes.IdentityPermissions.Users.ClaimTypes,
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
@ -8878,6 +8948,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
} }
]); ]);
#endregion #endregion
}
#endregion #endregion
#endregion #endregion
} }

View file

@ -5773,7 +5773,7 @@
"Code": "AbpTenantManagement.Tenants", "Code": "AbpTenantManagement.Tenants",
"DisplayName": "AbpTenantManagement.Tenants", "DisplayName": "AbpTenantManagement.Tenants",
"Order": 1, "Order": 1,
"Url": "/list/List-0001", "Url": "/list/list-tenant",
"Icon": "FcDepartment", "Icon": "FcDepartment",
"RequiredPermissionName": "AbpTenantManagement.Tenants", "RequiredPermissionName": "AbpTenantManagement.Tenants",
"IsDisabled": false "IsDisabled": false
@ -5783,7 +5783,7 @@
"Code": "App.Branches", "Code": "App.Branches",
"DisplayName": "App.Branches", "DisplayName": "App.Branches",
"Order": 2, "Order": 2,
"Url": "/list/List-0022", "Url": "/list/list-branch",
"Icon": "FcShop", "Icon": "FcShop",
"RequiredPermissionName": "App.Branches", "RequiredPermissionName": "App.Branches",
"IsDisabled": false "IsDisabled": false
@ -5803,7 +5803,7 @@
"Code": "App.Settings.SettingDefinitions", "Code": "App.Settings.SettingDefinitions",
"DisplayName": "App.Settings.SettingDefinitions", "DisplayName": "App.Settings.SettingDefinitions",
"Order": 1, "Order": 1,
"Url": "/list/List-0009", "Url": "/list/list-settingdefinition",
"Icon": "FcSupport", "Icon": "FcSupport",
"RequiredPermissionName": "App.Settings.SettingDefinitions", "RequiredPermissionName": "App.Settings.SettingDefinitions",
"IsDisabled": false "IsDisabled": false
@ -5813,7 +5813,7 @@
"Code": "App.Settings.GlobalSearch", "Code": "App.Settings.GlobalSearch",
"DisplayName": "App.Settings.GlobalSearch", "DisplayName": "App.Settings.GlobalSearch",
"Order": 2, "Order": 2,
"Url": "/list/List-0018", "Url": "/list/list-globalsearch",
"Icon": "FcSearch", "Icon": "FcSearch",
"RequiredPermissionName": "App.Settings.GlobalSearch", "RequiredPermissionName": "App.Settings.GlobalSearch",
"IsDisabled": false "IsDisabled": false
@ -5833,7 +5833,7 @@
"Code": "App.Languages.Language", "Code": "App.Languages.Language",
"DisplayName": "App.Languages.Language", "DisplayName": "App.Languages.Language",
"Order": 1, "Order": 1,
"Url": "/list/List-0005", "Url": "/list/list-language",
"Icon": "FcGraduationCap", "Icon": "FcGraduationCap",
"RequiredPermissionName": "App.Languages.Language", "RequiredPermissionName": "App.Languages.Language",
"IsDisabled": false "IsDisabled": false
@ -5843,7 +5843,7 @@
"Code": "App.Languages.LanguageText", "Code": "App.Languages.LanguageText",
"DisplayName": "App.Languages.LanguageText", "DisplayName": "App.Languages.LanguageText",
"Order": 2, "Order": 2,
"Url": "/list/List-0006", "Url": "/list/list-languagetext",
"Icon": "FcMindMap", "Icon": "FcMindMap",
"RequiredPermissionName": "App.Languages.LanguageText", "RequiredPermissionName": "App.Languages.LanguageText",
"IsDisabled": false "IsDisabled": false
@ -5853,7 +5853,7 @@
"Code": "App.Menus", "Code": "App.Menus",
"DisplayName": "App.Menus", "DisplayName": "App.Menus",
"Order": 5, "Order": 5,
"Url": "/list/List-0007", "Url": "/list/list-menu",
"Icon": "FcMenu", "Icon": "FcMenu",
"RequiredPermissionName": "App.Menus", "RequiredPermissionName": "App.Menus",
"IsDisabled": false "IsDisabled": false
@ -5893,7 +5893,7 @@
"Code": "Abp.Identity.PermissionGroups", "Code": "Abp.Identity.PermissionGroups",
"DisplayName": "Abp.Identity.PermissionGroups", "DisplayName": "Abp.Identity.PermissionGroups",
"Order": 1, "Order": 1,
"Url": "/list/List-0017", "Url": "/list/list-permissiongroup",
"Icon": "FcEngineering", "Icon": "FcEngineering",
"RequiredPermissionName": "Abp.Identity.PermissionGroups", "RequiredPermissionName": "Abp.Identity.PermissionGroups",
"IsDisabled": false "IsDisabled": false
@ -5903,7 +5903,7 @@
"Code": "Abp.Identity.Permissions", "Code": "Abp.Identity.Permissions",
"DisplayName": "Abp.Identity.Permissions", "DisplayName": "Abp.Identity.Permissions",
"Order": 2, "Order": 2,
"Url": "/list/List-0002", "Url": "/list/list-permission",
"Icon": "FcSupport", "Icon": "FcSupport",
"RequiredPermissionName": "Abp.Identity.Permissions", "RequiredPermissionName": "Abp.Identity.Permissions",
"IsDisabled": false "IsDisabled": false
@ -5913,7 +5913,7 @@
"Code": "AbpIdentity.Roles", "Code": "AbpIdentity.Roles",
"DisplayName": "AbpIdentity.Roles", "DisplayName": "AbpIdentity.Roles",
"Order": 3, "Order": 3,
"Url": "/list/List-0003", "Url": "/list/list-role",
"Icon": "FcFlowChart", "Icon": "FcFlowChart",
"RequiredPermissionName": "AbpIdentity.Roles", "RequiredPermissionName": "AbpIdentity.Roles",
"IsDisabled": false "IsDisabled": false
@ -5923,7 +5923,7 @@
"Code": "AbpIdentity.Users", "Code": "AbpIdentity.Users",
"DisplayName": "AbpIdentity.Users", "DisplayName": "AbpIdentity.Users",
"Order": 4, "Order": 4,
"Url": "/list/List-0004", "Url": "/list/list-user",
"Icon": "FcBusinessman", "Icon": "FcBusinessman",
"RequiredPermissionName": "AbpIdentity.Users", "RequiredPermissionName": "AbpIdentity.Users",
"IsDisabled": false "IsDisabled": false
@ -5943,7 +5943,7 @@
"Code": "AbpIdentity.Users.ClaimType", "Code": "AbpIdentity.Users.ClaimType",
"DisplayName": "AbpIdentity.Users.ClaimType", "DisplayName": "AbpIdentity.Users.ClaimType",
"Order": 6, "Order": 6,
"Url": "/list/List-0022", "Url": "/list/list-claimtype",
"Icon": "FcOrganization", "Icon": "FcOrganization",
"RequiredPermissionName": "AbpIdentity.Users.ClaimType", "RequiredPermissionName": "AbpIdentity.Users.ClaimType",
"IsDisabled": false "IsDisabled": false
@ -5953,7 +5953,7 @@
"Code": "App.IpRestrictions", "Code": "App.IpRestrictions",
"DisplayName": "App.IpRestrictions", "DisplayName": "App.IpRestrictions",
"Order": 7, "Order": 7,
"Url": "/list/List-0015", "Url": "/list/list-iprestriction",
"Icon": "FcNfcSign", "Icon": "FcNfcSign",
"RequiredPermissionName": "App.IpRestrictions", "RequiredPermissionName": "App.IpRestrictions",
"IsDisabled": false "IsDisabled": false
@ -5963,7 +5963,7 @@
"Code": "AbpIdentity.Users.SecurityLog", "Code": "AbpIdentity.Users.SecurityLog",
"DisplayName": "AbpIdentity.Users.SecurityLog", "DisplayName": "AbpIdentity.Users.SecurityLog",
"Order": 8, "Order": 8,
"Url": "/list/List-0019", "Url": "/list/list-securitylog",
"Icon": "FcPrivacy", "Icon": "FcPrivacy",
"RequiredPermissionName": "AbpIdentity.Users.SecurityLog", "RequiredPermissionName": "AbpIdentity.Users.SecurityLog",
"IsDisabled": false "IsDisabled": false
@ -5983,7 +5983,7 @@
"Code": "App.Listforms.DataSource", "Code": "App.Listforms.DataSource",
"DisplayName": "App.Listforms.DataSource", "DisplayName": "App.Listforms.DataSource",
"Order": 1, "Order": 1,
"Url": "/list/List-0011", "Url": "/list/list-datasource",
"Icon": "FcAcceptDatabase", "Icon": "FcAcceptDatabase",
"RequiredPermissionName": "App.Listforms.DataSource", "RequiredPermissionName": "App.Listforms.DataSource",
"IsDisabled": false "IsDisabled": false
@ -6003,7 +6003,7 @@
"Code": "App.Listforms.Listform", "Code": "App.Listforms.Listform",
"DisplayName": "App.Listforms.Listform", "DisplayName": "App.Listforms.Listform",
"Order": 3, "Order": 3,
"Url": "/list/List-0008", "Url": "/list/list-listform",
"Icon": "FcDataSheet", "Icon": "FcDataSheet",
"RequiredPermissionName": "App.Listforms.Listform", "RequiredPermissionName": "App.Listforms.Listform",
"IsDisabled": false "IsDisabled": false
@ -6013,7 +6013,7 @@
"Code": "App.Listforms.Chart", "Code": "App.Listforms.Chart",
"DisplayName": "App.Listforms.Chart", "DisplayName": "App.Listforms.Chart",
"Order": 4, "Order": 4,
"Url": "/list/List-0010", "Url": "/list/list-chart",
"Icon": "FcTodoList", "Icon": "FcTodoList",
"RequiredPermissionName": "App.Listforms.Chart", "RequiredPermissionName": "App.Listforms.Chart",
"IsDisabled": false "IsDisabled": false
@ -6033,7 +6033,7 @@
"Code": "App.Notifications.NotificationRules", "Code": "App.Notifications.NotificationRules",
"DisplayName": "App.Notifications.NotificationRules", "DisplayName": "App.Notifications.NotificationRules",
"Order": 1, "Order": 1,
"Url": "/list/List-0013", "Url": "/list/list-notificationrule",
"Icon": "FcLibrary", "Icon": "FcLibrary",
"RequiredPermissionName": "App.Notifications.NotificationRules", "RequiredPermissionName": "App.Notifications.NotificationRules",
"IsDisabled": false "IsDisabled": false
@ -6043,7 +6043,7 @@
"Code": "App.Notifications.Notification", "Code": "App.Notifications.Notification",
"DisplayName": "App.Notifications.Notification", "DisplayName": "App.Notifications.Notification",
"Order": 2, "Order": 2,
"Url": "/list/List-0014", "Url": "/list/list-notification",
"Icon": "FcBrokenLink", "Icon": "FcBrokenLink",
"RequiredPermissionName": "App.Notifications.Notification", "RequiredPermissionName": "App.Notifications.Notification",
"IsDisabled": false "IsDisabled": false
@ -6053,7 +6053,7 @@
"Code": "App.BackgroundWorkers", "Code": "App.BackgroundWorkers",
"DisplayName": "App.BackgroundWorkers", "DisplayName": "App.BackgroundWorkers",
"Order": 8, "Order": 8,
"Url": "/list/List-0012", "Url": "/list/list-backgroundworker",
"Icon": "FcWorkflow", "Icon": "FcWorkflow",
"RequiredPermissionName": "App.BackgroundWorkers", "RequiredPermissionName": "App.BackgroundWorkers",
"IsDisabled": false "IsDisabled": false
@ -6063,7 +6063,7 @@
"Code": "App.PublicApis", "Code": "App.PublicApis",
"DisplayName": "App.PublicApis", "DisplayName": "App.PublicApis",
"Order": 9, "Order": 9,
"Url": "/list/List-0016", "Url": "/list/list-publicapi",
"Icon": "FcMindMap", "Icon": "FcMindMap",
"RequiredPermissionName": "App.PublicApis", "RequiredPermissionName": "App.PublicApis",
"IsDisabled": false "IsDisabled": false
@ -6073,7 +6073,7 @@
"Code": "App.AuditLogs", "Code": "App.AuditLogs",
"DisplayName": "App.AuditLogs", "DisplayName": "App.AuditLogs",
"Order": 3, "Order": 3,
"Url": "/list/List-0020", "Url": "/list/list-auditlog",
"Icon": "FcMultipleInputs", "Icon": "FcMultipleInputs",
"RequiredPermissionName": "App.AuditLogs", "RequiredPermissionName": "App.AuditLogs",
"IsDisabled": false "IsDisabled": false

View file

@ -307,36 +307,36 @@ public static class PlatformConsts
public static class ListFormCodes public static class ListFormCodes
{ {
public const string Tenants = "List-0001"; public static class Lists
public const string Permission = "List-0002"; {
public const string Roles = "List-0003"; public const string Tenant = "list-tenant";
public const string Users = "List-0004"; public const string Permission = "list-permission";
public const string Language = "List-0005"; public const string Role = "list-role";
public const string LanguageText = "List-0006"; public const string User = "list-user";
public const string Menu = "List-0007"; public const string Language = "list-language";
public const string Listform = "List-0008"; public const string LanguageText = "list-languagetext";
public const string SettingDefinition = "List-0009"; public const string Menu = "list-menu";
public const string Chart = "List-0010"; public const string Listform = "list-listform";
public const string DataSource = "List-0011"; public const string SettingDefinition = "list-settingdefinition";
public const string BackgroundWorker = "List-0012"; public const string Chart = "list-chart";
public const string NotificationRule = "List-0013"; public const string DataSource = "list-datasource";
public const string Notification = "List-0014"; public const string BackgroundWorker = "list-backgroundworker";
public const string IpRestriction = "List-0015"; public const string NotificationRule = "list-notificationrule";
public const string PublicApi = "List-0016"; public const string Notification = "list-notification";
public const string PermissionGroup = "List-0017"; public const string IpRestriction = "list-iprestriction";
public const string GlobalSearch = "List-0018"; public const string PublicApi = "list-publicapi";
public const string SecurityLog = "List-0019"; public const string PermissionGroup = "list-permissiongroup";
public const string AuditLog = "List-0020"; public const string GlobalSearch = "list-globalsearch";
public const string Branch = "List-0021"; public const string SecurityLog = "list-securitylog";
public const string ClaimTypes = "List-0022"; public const string AuditLog = "list-auditlog";
public const string ListformField = "List-1000"; public const string Branch = "list-branch";
public const string Order = "List-Order"; public const string ClaimType = "list-claimtype";
public const string Complaint = "List-Complaint"; public const string ListformField = "list-listformfield";
public const string Shipment = "List-Shipment"; }
public static class Forms public static class Forms
{ {
public const string FormLanguage = "Form-Language"; public const string FormLanguage = "form-language";
} }
} }

View file

@ -63,7 +63,7 @@ const Simple = ({ children, content, ...rest }: SimpleProps) => {
{...innerProps} {...innerProps}
> >
<div className="flex items-center"> <div className="flex items-center">
<Avatar shape="circle" size={20} src={data.imgPath} /> <Avatar shape="circle" size={24} src={data.imgPath} title={data.label} />
</div> </div>
{isSelected && <HiCheck className="text-emerald-500 text-xl" />} {isSelected && <HiCheck className="text-emerald-500 text-xl" />}
</div> </div>
@ -77,8 +77,9 @@ const Simple = ({ children, content, ...rest }: SimpleProps) => {
<Avatar <Avatar
className="ltr:mr-2 rtl:ml-2" className="ltr:mr-2 rtl:ml-2"
shape="circle" shape="circle"
size={18} size={24}
src={`/img/countries/${data.cultureName}.png`} src={`/img/countries/${data.cultureName}.png`}
title={data.label}
/> />
</div> </div>
</components.SingleValue> </components.SingleValue>

View file

@ -12,6 +12,7 @@ export interface AvatarProps extends CommonProps {
shape?: Exclude<TypeAttributes.Shape, 'none'> | 'square' shape?: Exclude<TypeAttributes.Shape, 'none'> | 'square'
src?: string src?: string
srcSet?: string srcSet?: string
title?: string
} }
const Avatar = forwardRef<HTMLSpanElement, AvatarProps>((props, ref) => { const Avatar = forwardRef<HTMLSpanElement, AvatarProps>((props, ref) => {
@ -23,6 +24,7 @@ const Avatar = forwardRef<HTMLSpanElement, AvatarProps>((props, ref) => {
size = 'md', size = 'md',
src, src,
srcSet, srcSet,
title,
...rest ...rest
} = props } = props
@ -78,6 +80,7 @@ const Avatar = forwardRef<HTMLSpanElement, AvatarProps>((props, ref) => {
className={`avatar-img avatar-${shape}`} className={`avatar-img avatar-${shape}`}
src={src} src={src}
srcSet={srcSet} srcSet={srcSet}
title={title}
alt={alt} alt={alt}
loading="lazy" loading="lazy"
onError={({ currentTarget }) => { onError={({ currentTarget }) => {

View file

@ -2,7 +2,6 @@ import { FailedSignInResponse } from '@/@types/auth'
import ActionLink from '@/components/shared/ActionLink' import ActionLink from '@/components/shared/ActionLink'
import Captcha from '@/components/shared/Captcha' import Captcha from '@/components/shared/Captcha'
import PasswordInput from '@/components/shared/PasswordInput' import PasswordInput from '@/components/shared/PasswordInput'
import { Avatar, Select } from '@/components/ui'
import Alert from '@/components/ui/Alert' import Alert from '@/components/ui/Alert'
import Button from '@/components/ui/Button' import Button from '@/components/ui/Button'
import Checkbox from '@/components/ui/Checkbox' import Checkbox from '@/components/ui/Checkbox'
@ -17,16 +16,9 @@ import useTimeOutMessage from '@/utils/hooks/useTimeOutMessage'
import { TurnstileInstance } from '@marsidev/react-turnstile' import { TurnstileInstance } from '@marsidev/react-turnstile'
import { Field, Form, Formik } from 'formik' import { Field, Form, Formik } from 'formik'
import { motion } from 'framer-motion' import { motion } from 'framer-motion'
import { useEffect, useMemo, useRef, useState } from 'react' import { useEffect, useRef, useState } from 'react'
import { useNavigate } from 'react-router-dom' import { useNavigate } from 'react-router-dom'
import * as Yup from 'yup' import * as Yup from 'yup'
import { components } from 'react-select'
import { HiArrowLeft, HiCheck } from 'react-icons/hi'
import { SelectBoxOption } from '@/shared/types'
import i18n from 'i18next'
import appConfig from '@/configs/app.config'
import { dateLocales } from '@/locales'
import dayjs from 'dayjs'
type SignInFormSchema = { type SignInFormSchema = {
userName: string userName: string
@ -209,8 +201,6 @@ const Login = () => {
} }
}, [isMultiTenant]) }, [isMultiTenant])
console.log(currentCulture)
return ( return (
<motion.div <motion.div
initial={{ opacity: 0, x: 100 }} initial={{ opacity: 0, x: 100 }}