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)
{
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 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 Languages
#region Language
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Forms.FormLanguage))
{
var formLanguage = await _listFormRepository.InsertAsync(
new ListForm()
{
@ -76,7 +62,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
new {
TabTitle = "Language Texts",
TabType = ListFormTabTypeEnum.List,
Code = ListFormCodes.LanguageText,
Code = ListFormCodes.Lists.LanguageText,
Relation = new List<dynamic>() {
new {
ParentFieldName = "CultureName",
@ -102,6 +88,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
Title = AppCodes.Languages.Language,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.Languages.Language,
SelectCommandType = SelectCommandTypeEnum.Table,
@ -371,20 +358,26 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}),
},
]);
}
#endregion
#endregion
#region List
#region Tenants
#region Tenant
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Tenant))
{
var listFormTenants = await _listFormRepository.InsertAsync(
new ListForm()
{
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Tenants,
ListFormCode = ListFormCodes.Lists.Tenant,
Name = TenantManagementPermissions.Tenants.Default,
Title = TenantManagementPermissions.Tenants.Default,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false,
Description = TenantManagementPermissions.Tenants.Default,
SelectCommandType = SelectCommandTypeEnum.Table,
@ -946,18 +939,23 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
},
]);
#endregion
}
#endregion
#region Permissions
#region Permission
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Permission))
{
var listFormPermissions = await _listFormRepository.InsertAsync(
new ListForm()
{
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Permission,
ListFormCode = ListFormCodes.Lists.Permission,
Name = AbpIdentity.Permissions.Default,
Title = AbpIdentity.Permissions.Default,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false,
Description = AbpIdentity.Permissions.Default,
SelectCommandType = SelectCommandTypeEnum.Table,
@ -1276,17 +1274,21 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}
});
#endregion
}
#endregion
#region Roles
#region Role
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Role))
{
var listFormRoles = await _listFormRepository.InsertAsync(
new ListForm()
{
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Roles,
ListFormCode = ListFormCodes.Lists.Role,
Name = IdentityPermissions.Roles.Default,
Title = IdentityPermissions.Roles.Default,
IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
Description = IdentityPermissions.Roles.Default,
@ -1477,17 +1479,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
},
});
#endregion
}
#endregion
#region Users
#region User
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.User))
{
var listFormUsers = await _listFormRepository.InsertAsync(
new ListForm()
{
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Users,
ListFormCode = ListFormCodes.Lists.User,
Name = IdentityPermissions.Users.Default,
Title = IdentityPermissions.Users.Default,
IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
Description = IdentityPermissions.Users.Default,
SelectCommandType = SelectCommandTypeEnum.Table,
@ -1799,19 +1806,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
},
]);
#endregion
}
#endregion
#region Languages
#region Language
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Language))
{
var listFormLanguages = await _listFormRepository.InsertAsync(
new ListForm()
{
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Language,
ListFormCode = ListFormCodes.Lists.Language,
Name = AppCodes.Languages.Language,
Title = AppCodes.Languages.Language,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.Languages.Language,
SelectCommandType = SelectCommandTypeEnum.Table,
@ -2140,19 +2150,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
});
#endregion
}
#endregion
#region LanguageText
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.LanguageText))
{
var listFormLanguageTexts = await _listFormRepository.InsertAsync(
new ListForm()
{
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.LanguageText,
ListFormCode = ListFormCodes.Lists.LanguageText,
Name = AppCodes.Languages.LanguageText,
Title = AppCodes.Languages.LanguageText,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.Languages.LanguageText,
SelectCommandType = SelectCommandTypeEnum.Table,
@ -2445,18 +2458,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
]);
#endregion
}
#endregion
#region Menus
#region Menu
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Menu))
{
var listFormMenus = await _listFormRepository.InsertAsync(
new ListForm()
{
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Menu,
ListFormCode = ListFormCodes.Lists.Menu,
Name = AppCodes.Menus,
Title = AppCodes.Menus,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.Menus,
SelectCommandType = SelectCommandTypeEnum.Table,
@ -2940,18 +2957,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
});
#endregion
}
#endregion
#region ListForms
#region ListForm
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Listform))
{
var listForms = await _listFormRepository.InsertAsync(
new ListForm()
{
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Listform,
ListFormCode = ListFormCodes.Lists.Listform,
Name = AppCodes.Listforms.Listform,
Title = AppCodes.Listforms.Listform,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.Listforms.Listform,
SelectCommandType = SelectCommandTypeEnum.Table,
@ -3797,18 +3818,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
},
});
#endregion
}
#endregion
#region SettingDefinitions
#region SettingDefinition
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.SettingDefinition))
{
var listFormSettingDefinitions = await _listFormRepository.InsertAsync(
new ListForm()
{
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.SettingDefinition,
ListFormCode = ListFormCodes.Lists.SettingDefinition,
Name = AppCodes.Settings.SettingDefinitions,
Title = AppCodes.Settings.SettingDefinitions,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.Settings.SettingDefinitions,
SelectCommandType = SelectCommandTypeEnum.Table,
@ -4450,18 +4475,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
},
});
#endregion
}
#endregion
#region Chart
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Chart))
{
var listFormCharts = await _listFormRepository.InsertAsync(
new ListForm()
{
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Chart,
ListFormCode = ListFormCodes.Lists.Chart,
Name = AppCodes.Listforms.Chart,
Title = AppCodes.Listforms.Chart,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.Listforms.Chart,
SelectCommandType = SelectCommandTypeEnum.Table,
@ -4759,19 +4788,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}
});
#endregion
}
#endregion
#region Data Sources
#region Data Source
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.DataSource))
{
var listFormDataSources = await _listFormRepository.InsertAsync(
new ListForm()
{
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.DataSource,
ListFormCode = ListFormCodes.Lists.DataSource,
Name = AppCodes.Listforms.DataSource,
Title = AppCodes.Listforms.DataSource,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.Listforms.DataSource,
SelectCommandType = SelectCommandTypeEnum.Table,
@ -5005,22 +5037,25 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
},
});
#endregion
}
#endregion
#region Background Worker
var configurationSection = _configuration.GetSection("OpenIddict:Applications");
var swaggerRootUrl = configurationSection["Platform_Swagger:RootUrl"]?.TrimEnd('/');
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.BackgroundWorker))
{
var listFormBackgroundWorkers = await _listFormRepository.InsertAsync(
new ListForm()
{
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.BackgroundWorker,
ListFormCode = ListFormCodes.Lists.BackgroundWorker,
Name = AppCodes.BackgroundWorkers,
Title = AppCodes.BackgroundWorkers,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.BackgroundWorkers,
SelectCommandType = SelectCommandTypeEnum.Table,
@ -5399,19 +5434,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
},
});
#endregion
}
#endregion
#region Notification Rules
#region Notification Rule
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.NotificationRule))
{
var listFormNotificationRules = await _listFormRepository.InsertAsync(
new ListForm()
{
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.NotificationRule,
ListFormCode = ListFormCodes.Lists.NotificationRule,
Name = AppCodes.Notifications.NotificationRules,
Title = AppCodes.Notifications.NotificationRules,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.Notifications.NotificationRules,
SelectCommandType = SelectCommandTypeEnum.Table,
@ -5806,19 +5844,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
},
]);
#endregion
}
#endregion
#region Notifications
#region Notification
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Notification))
{
var listFormNotifications = await _listFormRepository.InsertAsync(
new ListForm()
{
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Notification,
ListFormCode = ListFormCodes.Lists.Notification,
Name = AppCodes.Notifications.Notification,
Title = AppCodes.Notifications.Notification,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.Notifications.Notification,
SelectCommandType = SelectCommandTypeEnum.Table,
@ -6137,19 +6178,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
},
]);
#endregion
}
#endregion
#region Ip Restriction
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.IpRestriction))
{
var listFormIpRestrictions = await _listFormRepository.InsertAsync(
new ListForm()
{
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.IpRestriction,
ListFormCode = ListFormCodes.Lists.IpRestriction,
Name = AppCodes.IpRestrictions,
Title = AppCodes.IpRestrictions,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.IpRestrictions,
SelectCommandType = SelectCommandTypeEnum.Table,
@ -6387,19 +6431,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
},
]);
#endregion
}
#endregion
#region Public Apis
#region Public Api
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.PublicApi))
{
var listFormPublicApis = await _listFormRepository.InsertAsync(
new ListForm()
{
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.PublicApi,
ListFormCode = ListFormCodes.Lists.PublicApi,
Name = AppCodes.PublicApis,
Title = AppCodes.PublicApis,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.PublicApis,
SelectCommandType = SelectCommandTypeEnum.Table,
@ -6778,19 +6825,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
},
]);
#endregion
}
#endregion
#region Permission Groups
#region Permission Group
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.PermissionGroup))
{
var listFormPermissionGroups = await _listFormRepository.InsertAsync(
new ListForm()
{
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.PermissionGroup,
ListFormCode = ListFormCodes.Lists.PermissionGroup,
Name = AbpIdentity.PermissionGroups.Default,
Title = AbpIdentity.PermissionGroups.Default,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false,
Description = AbpIdentity.PermissionGroups.Default,
SelectCommandType = SelectCommandTypeEnum.Table,
@ -6986,18 +7036,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
},
});
#endregion
}
#endregion
#region Global Search
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.GlobalSearch))
{
var listFormGlobalSearch = await _listFormRepository.InsertAsync(
new ListForm()
{
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.GlobalSearch,
ListFormCode = ListFormCodes.Lists.GlobalSearch,
Name = AppCodes.Settings.GlobalSearch,
Title = AppCodes.Settings.GlobalSearch,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.Settings.GlobalSearch,
SelectCommandType = SelectCommandTypeEnum.Table,
@ -7252,18 +7306,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
},
]);
#endregion
}
#endregion
#region Security Logs
#region Security Log
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.SecurityLog))
{
var listFormSecurityLog = await _listFormRepository.InsertAsync(
new ListForm()
{
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.SecurityLog,
ListFormCode = ListFormCodes.Lists.SecurityLog,
Name = AppCodes.IdentityPermissions.Users.SecurityLogs,
Title = AppCodes.IdentityPermissions.Users.SecurityLogs,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.IdentityPermissions.Users.SecurityLogs,
SelectCommandType = SelectCommandTypeEnum.Table,
@ -7585,18 +7643,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
},
]);
#endregion
}
#endregion
#region Audit Logs
#region Audit Log
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.AuditLog))
{
var listFormAuditLog = await _listFormRepository.InsertAsync(
new ListForm()
{
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.AuditLog,
ListFormCode = ListFormCodes.Lists.AuditLog,
Name = AppCodes.AuditLogs,
Title = AppCodes.AuditLogs,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.AuditLogs,
SelectCommandType = SelectCommandTypeEnum.Table,
@ -7903,18 +7965,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
},
]);
#endregion
}
#endregion
#region Branches
#region Branche
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Branch))
{
var listFormBranches = await _listFormRepository.InsertAsync(
new ListForm()
{
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Branch,
ListFormCode = ListFormCodes.Lists.Branch,
Name = AppCodes.Branches,
Title = AppCodes.Branches,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.Branches,
SelectCommandType = SelectCommandTypeEnum.Table,
@ -8513,18 +8579,22 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
},
]);
#endregion
}
#endregion
#region ClaimTypes
#region ClaimType
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.ClaimType))
{
var listFormClaimTypes = await _listFormRepository.InsertAsync(
new ListForm()
{
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.ClaimTypes,
ListFormCode = ListFormCodes.Lists.ClaimType,
Name = AppCodes.IdentityPermissions.Users.ClaimTypes,
Title = AppCodes.IdentityPermissions.Users.ClaimTypes,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.IdentityPermissions.Users.ClaimTypes,
SelectCommandType = SelectCommandTypeEnum.Table,
@ -8878,6 +8948,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}
]);
#endregion
}
#endregion
#endregion
}

View file

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

View file

@ -307,36 +307,36 @@ public static class PlatformConsts
public static class ListFormCodes
{
public const string Tenants = "List-0001";
public const string Permission = "List-0002";
public const string Roles = "List-0003";
public const string Users = "List-0004";
public const string Language = "List-0005";
public const string LanguageText = "List-0006";
public const string Menu = "List-0007";
public const string Listform = "List-0008";
public const string SettingDefinition = "List-0009";
public const string Chart = "List-0010";
public const string DataSource = "List-0011";
public const string BackgroundWorker = "List-0012";
public const string NotificationRule = "List-0013";
public const string Notification = "List-0014";
public const string IpRestriction = "List-0015";
public const string PublicApi = "List-0016";
public const string PermissionGroup = "List-0017";
public const string GlobalSearch = "List-0018";
public const string SecurityLog = "List-0019";
public const string AuditLog = "List-0020";
public const string Branch = "List-0021";
public const string ClaimTypes = "List-0022";
public const string ListformField = "List-1000";
public const string Order = "List-Order";
public const string Complaint = "List-Complaint";
public const string Shipment = "List-Shipment";
public static class Lists
{
public const string Tenant = "list-tenant";
public const string Permission = "list-permission";
public const string Role = "list-role";
public const string User = "list-user";
public const string Language = "list-language";
public const string LanguageText = "list-languagetext";
public const string Menu = "list-menu";
public const string Listform = "list-listform";
public const string SettingDefinition = "list-settingdefinition";
public const string Chart = "list-chart";
public const string DataSource = "list-datasource";
public const string BackgroundWorker = "list-backgroundworker";
public const string NotificationRule = "list-notificationrule";
public const string Notification = "list-notification";
public const string IpRestriction = "list-iprestriction";
public const string PublicApi = "list-publicapi";
public const string PermissionGroup = "list-permissiongroup";
public const string GlobalSearch = "list-globalsearch";
public const string SecurityLog = "list-securitylog";
public const string AuditLog = "list-auditlog";
public const string Branch = "list-branch";
public const string ClaimType = "list-claimtype";
public const string ListformField = "list-listformfield";
}
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}
>
<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>
{isSelected && <HiCheck className="text-emerald-500 text-xl" />}
</div>
@ -77,8 +77,9 @@ const Simple = ({ children, content, ...rest }: SimpleProps) => {
<Avatar
className="ltr:mr-2 rtl:ml-2"
shape="circle"
size={18}
size={24}
src={`/img/countries/${data.cultureName}.png`}
title={data.label}
/>
</div>
</components.SingleValue>

View file

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

View file

@ -2,7 +2,6 @@ import { FailedSignInResponse } from '@/@types/auth'
import ActionLink from '@/components/shared/ActionLink'
import Captcha from '@/components/shared/Captcha'
import PasswordInput from '@/components/shared/PasswordInput'
import { Avatar, Select } from '@/components/ui'
import Alert from '@/components/ui/Alert'
import Button from '@/components/ui/Button'
import Checkbox from '@/components/ui/Checkbox'
@ -17,16 +16,9 @@ import useTimeOutMessage from '@/utils/hooks/useTimeOutMessage'
import { TurnstileInstance } from '@marsidev/react-turnstile'
import { Field, Form, Formik } from 'formik'
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 * 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 = {
userName: string
@ -209,8 +201,6 @@ const Login = () => {
}
}, [isMultiTenant])
console.log(currentCulture)
return (
<motion.div
initial={{ opacity: 0, x: 100 }}