User Tanımına Departman ve Job Position eklendi
This commit is contained in:
parent
183674afb9
commit
31f632d16a
24 changed files with 586 additions and 370 deletions
|
|
@ -0,0 +1,13 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Sozsoft.Platform.Identity.Dto;
|
||||||
|
|
||||||
|
public class AssignedDepartmentViewModel
|
||||||
|
{
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
public bool IsAssigned { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Sozsoft.Platform.Identity.Dto;
|
||||||
|
|
||||||
|
public class AssignedJobPoisitionViewModel
|
||||||
|
{
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
public Guid DepartmentId { get; set; }
|
||||||
|
|
||||||
|
public bool IsAssigned { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -41,7 +41,11 @@ public class UserInfoViewModel: ExtensibleObject
|
||||||
public AssignedClaimViewModel[] Claims { get; set; }
|
public AssignedClaimViewModel[] Claims { get; set; }
|
||||||
|
|
||||||
public AssignedWorkHourViewModel[] WorkHours { get; set; }
|
public AssignedWorkHourViewModel[] WorkHours { get; set; }
|
||||||
|
|
||||||
|
public AssignedDepartmentViewModel[] Departments { get; set; }
|
||||||
|
|
||||||
|
public AssignedJobPoisitionViewModel[] JobPositions { get; set; }
|
||||||
|
|
||||||
public bool LockUser { get; set; }
|
public bool LockUser { get; set; }
|
||||||
|
|
||||||
public DateTimeOffset? LastPasswordChangeTime { get; set; }
|
public DateTimeOffset? LastPasswordChangeTime { get; set; }
|
||||||
|
|
@ -54,6 +58,6 @@ public class UserInfoViewModel: ExtensibleObject
|
||||||
public DateTimeOffset? CreationTime { get; set; }
|
public DateTimeOffset? CreationTime { get; set; }
|
||||||
public DateTimeOffset? LastModificationTime { get; set; }
|
public DateTimeOffset? LastModificationTime { get; set; }
|
||||||
public string WorkHour { get; set; }
|
public string WorkHour { get; set; }
|
||||||
public string DepartmentId { get; set; }
|
public Guid DepartmentId { get; set; }
|
||||||
public string JobPositionId { get; set; }
|
public Guid JobPositionId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ public class CreateUpdateUserInput
|
||||||
public string PhoneNumber { get; set; }
|
public string PhoneNumber { get; set; }
|
||||||
public string Password { get; set; }
|
public string Password { get; set; }
|
||||||
public string WorkHour { get; set; }
|
public string WorkHour { get; set; }
|
||||||
|
public string DepartmentId { get; set; }
|
||||||
|
public string JobPositionId { get; set; }
|
||||||
public bool? IsActive { get; set; }
|
public bool? IsActive { get; set; }
|
||||||
public bool? LockoutEnabled { get; set; }
|
public bool? LockoutEnabled { get; set; }
|
||||||
public string[] RoleNames { get; set; }
|
public string[] RoleNames { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -213,9 +213,7 @@ public static class LookupQueryValues
|
||||||
$"\"Id\" AS \"Key\", " +
|
$"\"Id\" AS \"Key\", " +
|
||||||
$"\"Name\" AS \"Name\" " +
|
$"\"Name\" AS \"Name\" " +
|
||||||
$"FROM \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Department))}\" " +
|
$"FROM \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Department))}\" " +
|
||||||
$"WHERE " +
|
$"WHERE \"IsDeleted\" = 'false' " +
|
||||||
$"(\"BranchId\" = @param0 OR @param0 IS NULL) " +
|
|
||||||
$"AND \"IsDeleted\" = 'false' " +
|
|
||||||
$"ORDER BY \"Name\";";
|
$"ORDER BY \"Name\";";
|
||||||
|
|
||||||
public static string JobPositionValues =
|
public static string JobPositionValues =
|
||||||
|
|
@ -224,8 +222,7 @@ public static class LookupQueryValues
|
||||||
$"\"Name\" AS \"Name\" " +
|
$"\"Name\" AS \"Name\" " +
|
||||||
$"FROM \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.JobPosition))}\" " +
|
$"FROM \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.JobPosition))}\" " +
|
||||||
$"WHERE " +
|
$"WHERE " +
|
||||||
$"(\"BranchId\" = @param0 OR @param0 IS NULL) " +
|
$"(\"DepartmentId\" = @param0 OR @param0 IS NULL) " +
|
||||||
$"AND (\"DepartmentId\" = @param1 OR @param1 IS NULL) " +
|
|
||||||
$"AND \"IsDeleted\" = 'false' " +
|
$"AND \"IsDeleted\" = 'false' " +
|
||||||
$"ORDER BY \"Name\";";
|
$"ORDER BY \"Name\";";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,8 @@ public class PlatformIdentityAppService : ApplicationService
|
||||||
public IGuidGenerator guidGenerator { get; }
|
public IGuidGenerator guidGenerator { get; }
|
||||||
public IdentityUserManager UserManager { get; set; }
|
public IdentityUserManager UserManager { get; set; }
|
||||||
public IRepository<WorkHour, Guid> workHourRepository { get; }
|
public IRepository<WorkHour, Guid> workHourRepository { get; }
|
||||||
|
public IRepository<Department, Guid> departmentRepository { get; }
|
||||||
|
public IRepository<JobPosition, Guid> jobPositionRepository { get; }
|
||||||
|
|
||||||
public PlatformIdentityAppService(
|
public PlatformIdentityAppService(
|
||||||
IIdentityUserAppService identityUserAppService,
|
IIdentityUserAppService identityUserAppService,
|
||||||
|
|
@ -41,6 +43,8 @@ public class PlatformIdentityAppService : ApplicationService
|
||||||
IRepository<BranchUsers, Guid> branchUsersRepository,
|
IRepository<BranchUsers, Guid> branchUsersRepository,
|
||||||
IRepository<IdentityClaimType, Guid> claimTypesRepository,
|
IRepository<IdentityClaimType, Guid> claimTypesRepository,
|
||||||
IRepository<WorkHour, Guid> workHourRepository,
|
IRepository<WorkHour, Guid> workHourRepository,
|
||||||
|
IRepository<Department, Guid> departmentRepository,
|
||||||
|
IRepository<JobPosition, Guid> jobPositionRepository,
|
||||||
IGuidGenerator guidGenerator
|
IGuidGenerator guidGenerator
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
@ -49,6 +53,8 @@ public class PlatformIdentityAppService : ApplicationService
|
||||||
this.identitySessionRepository = identitySessionRepository;
|
this.identitySessionRepository = identitySessionRepository;
|
||||||
this.openIddictTokenManager = openIddictTokenManager;
|
this.openIddictTokenManager = openIddictTokenManager;
|
||||||
this.workHourRepository = workHourRepository;
|
this.workHourRepository = workHourRepository;
|
||||||
|
this.departmentRepository = departmentRepository;
|
||||||
|
this.jobPositionRepository = jobPositionRepository;
|
||||||
this.permissionRepository = permissionRepository;
|
this.permissionRepository = permissionRepository;
|
||||||
this.branchRepository = branchRepository;
|
this.branchRepository = branchRepository;
|
||||||
this.branchUsersRepository = branchUsersRepository;
|
this.branchUsersRepository = branchUsersRepository;
|
||||||
|
|
@ -106,7 +112,24 @@ public class PlatformIdentityAppService : ApplicationService
|
||||||
Name = workHour.Name,
|
Name = workHour.Name,
|
||||||
IsAssigned = workHourList.Contains(workHour)
|
IsAssigned = workHourList.Contains(workHour)
|
||||||
}).ToArray();
|
}).ToArray();
|
||||||
|
|
||||||
|
var departmentList = await departmentRepository.GetListAsync();
|
||||||
|
var departments = (await departmentRepository.GetListAsync()).Select(department => new AssignedDepartmentViewModel
|
||||||
|
{
|
||||||
|
Id = department.Id,
|
||||||
|
Name = department.Name,
|
||||||
|
IsAssigned = departmentList.Contains(department)
|
||||||
|
}).ToArray();
|
||||||
|
|
||||||
|
var jobPositionList = await jobPositionRepository.GetListAsync();
|
||||||
|
var jobPositions = (await jobPositionRepository.GetListAsync()).Select(jobPosition => new AssignedJobPoisitionViewModel
|
||||||
|
{
|
||||||
|
Id = jobPosition.Id,
|
||||||
|
Name = jobPosition.Name,
|
||||||
|
DepartmentId = jobPosition.DepartmentId,
|
||||||
|
IsAssigned = jobPositionList.Contains(jobPosition)
|
||||||
|
}).ToArray();
|
||||||
|
|
||||||
return new UserInfoViewModel()
|
return new UserInfoViewModel()
|
||||||
{
|
{
|
||||||
Id = user.Id,
|
Id = user.Id,
|
||||||
|
|
@ -115,6 +138,8 @@ public class PlatformIdentityAppService : ApplicationService
|
||||||
Surname = user.Surname,
|
Surname = user.Surname,
|
||||||
Roles = roles,
|
Roles = roles,
|
||||||
Branches = branches,
|
Branches = branches,
|
||||||
|
Departments = departments,
|
||||||
|
JobPositions = jobPositions,
|
||||||
Claims = claims,
|
Claims = claims,
|
||||||
WorkHours = workHours,
|
WorkHours = workHours,
|
||||||
Email = user.Email,
|
Email = user.Email,
|
||||||
|
|
@ -143,6 +168,37 @@ public class PlatformIdentityAppService : ApplicationService
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task UpdatePermissionAsync(UserInfoViewModel UserInfo)
|
||||||
|
{
|
||||||
|
var roles = UserInfo.Roles.Where(r => r.IsAssigned).Select(r => r.Name).ToArray();
|
||||||
|
|
||||||
|
var user = await UserManager.GetByIdAsync(UserInfo.Id);
|
||||||
|
await UserManager.SetRolesAsync(user, roles);
|
||||||
|
|
||||||
|
//Braches bu kısımda güncelleniyor.
|
||||||
|
var existingBranches = await branchUsersRepository.GetListAsync(x => x.UserId == user.Id);
|
||||||
|
foreach (var item in existingBranches)
|
||||||
|
{
|
||||||
|
await branchUsersRepository.DeleteAsync(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Yeni atamaları ekle
|
||||||
|
var assignedBranchIds = UserInfo.Branches
|
||||||
|
.Where(b => b.IsAssigned)
|
||||||
|
.Select(b => b.Id)
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
foreach (var branchId in assignedBranchIds)
|
||||||
|
{
|
||||||
|
var branchUser = new BranchUsers
|
||||||
|
{
|
||||||
|
UserId = user.Id,
|
||||||
|
BranchId = branchId
|
||||||
|
};
|
||||||
|
await branchUsersRepository.InsertAsync(branchUser);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public async Task UpdateLockoutAsync(UserInfoViewModel UserInfo)
|
public async Task UpdateLockoutAsync(UserInfoViewModel UserInfo)
|
||||||
{
|
{
|
||||||
var user = await UserManager.GetByIdAsync(UserInfo.Id);
|
var user = await UserManager.GetByIdAsync(UserInfo.Id);
|
||||||
|
|
@ -181,10 +237,7 @@ public class PlatformIdentityAppService : ApplicationService
|
||||||
|
|
||||||
public async Task UpdateUserAsync(UserInfoViewModel UserInfo)
|
public async Task UpdateUserAsync(UserInfoViewModel UserInfo)
|
||||||
{
|
{
|
||||||
var roles = UserInfo.Roles.Where(r => r.IsAssigned).Select(r => r.Name).ToArray();
|
|
||||||
|
|
||||||
var user = await UserManager.GetByIdAsync(UserInfo.Id);
|
var user = await UserManager.GetByIdAsync(UserInfo.Id);
|
||||||
await UserManager.SetRolesAsync(user, roles);
|
|
||||||
|
|
||||||
user.Name = UserInfo.Name;
|
user.Name = UserInfo.Name;
|
||||||
user.Surname = UserInfo.Surname;
|
user.Surname = UserInfo.Surname;
|
||||||
|
|
@ -196,29 +249,6 @@ public class PlatformIdentityAppService : ApplicationService
|
||||||
user.SetJobPositionId(UserInfo.JobPositionId);
|
user.SetJobPositionId(UserInfo.JobPositionId);
|
||||||
|
|
||||||
await UserManager.UpdateAsync(user);
|
await UserManager.UpdateAsync(user);
|
||||||
|
|
||||||
//Braches bu kısımda güncelleniyor.
|
|
||||||
var existingBranches = await branchUsersRepository.GetListAsync(x => x.UserId == user.Id);
|
|
||||||
foreach (var item in existingBranches)
|
|
||||||
{
|
|
||||||
await branchUsersRepository.DeleteAsync(item);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2. Yeni atamaları ekle
|
|
||||||
var assignedBranchIds = UserInfo.Branches
|
|
||||||
.Where(b => b.IsAssigned)
|
|
||||||
.Select(b => b.Id)
|
|
||||||
.ToList();
|
|
||||||
|
|
||||||
foreach (var branchId in assignedBranchIds)
|
|
||||||
{
|
|
||||||
var branchUser = new BranchUsers
|
|
||||||
{
|
|
||||||
UserId = user.Id,
|
|
||||||
BranchId = branchId
|
|
||||||
};
|
|
||||||
await branchUsersRepository.InsertAsync(branchUser);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<List<PermissionDefinitionRecord>> GetPermissionList()
|
public async Task<List<PermissionDefinitionRecord>> GetPermissionList()
|
||||||
|
|
@ -243,11 +273,6 @@ public class PlatformIdentityAppService : ApplicationService
|
||||||
user.Claims.Remove(claim);
|
user.Claims.Remove(claim);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Kullanıcıyı anlık olarak oturumdan atar:
|
|
||||||
/// 1. AbpSessions kaydını siler → concurrent lisans slotunu serbest bırakır.
|
|
||||||
/// 2. OpenIddict tokenlarını revoke eder → access token anında geçersiz olur.
|
|
||||||
/// </summary>
|
|
||||||
public async Task KickUserAsync(Guid userId)
|
public async Task KickUserAsync(Guid userId)
|
||||||
{
|
{
|
||||||
using (CurrentTenant.Change(CurrentTenant.Id))
|
using (CurrentTenant.Change(CurrentTenant.Id))
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,8 @@ public class ListFormDynamicApiAppService : PlatformAppService, IListFormDynamic
|
||||||
RoleNames = [], //input.Data.RoleNames,
|
RoleNames = [], //input.Data.RoleNames,
|
||||||
};
|
};
|
||||||
user.SetProperty(PlatformConsts.AbpIdentity.User.WorkHour, input.Data.WorkHour);
|
user.SetProperty(PlatformConsts.AbpIdentity.User.WorkHour, input.Data.WorkHour);
|
||||||
|
user.SetProperty(PlatformConsts.AbpIdentity.User.DepartmentId, input.Data.DepartmentId);
|
||||||
|
user.SetProperty(PlatformConsts.AbpIdentity.User.JobPositionId, input.Data.JobPositionId);
|
||||||
|
|
||||||
await identityUserAppService.CreateAsync(user);
|
await identityUserAppService.CreateAsync(user);
|
||||||
}
|
}
|
||||||
|
|
@ -79,6 +81,14 @@ public class ListFormDynamicApiAppService : PlatformAppService, IListFormDynamic
|
||||||
{
|
{
|
||||||
user.SetProperty(PlatformConsts.AbpIdentity.User.WorkHour, input.Data.WorkHour);
|
user.SetProperty(PlatformConsts.AbpIdentity.User.WorkHour, input.Data.WorkHour);
|
||||||
}
|
}
|
||||||
|
if (input.Data.DepartmentId != null)
|
||||||
|
{
|
||||||
|
user.SetProperty(PlatformConsts.AbpIdentity.User.DepartmentId, input.Data.DepartmentId);
|
||||||
|
}
|
||||||
|
if (input.Data.JobPositionId != null)
|
||||||
|
{
|
||||||
|
user.SetProperty(PlatformConsts.AbpIdentity.User.JobPositionId, input.Data.JobPositionId);
|
||||||
|
}
|
||||||
|
|
||||||
await identityUserAppService.UpdateAsync(id, user);
|
await identityUserAppService.UpdateAsync(id, user);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2712,6 +2712,24 @@
|
||||||
"en": "User Information",
|
"en": "User Information",
|
||||||
"tr": "Kullanıcı Bilgileri"
|
"tr": "Kullanıcı Bilgileri"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "Abp.Identity.User.SavePermission",
|
||||||
|
"en": "Permissions saved.",
|
||||||
|
"tr": "Yetkiler kaydedildi."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "Abp.Identity.User.SaveLockout",
|
||||||
|
"en": "Lockout settings saved.",
|
||||||
|
"tr": "Kilit ayarları kaydedildi."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "Abp.Identity.User.Permissions",
|
||||||
|
"en": "User Permissions",
|
||||||
|
"tr": "Kullanıcı Yetkileri"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "Abp.Identity.User.UserInformation.RoleManagement",
|
"key": "Abp.Identity.User.UserInformation.RoleManagement",
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 1,
|
ListOrderNo = 1,
|
||||||
Visible = false,
|
Visible = false,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(AbpIdentity.PermissionGroups.Create, AbpIdentity.PermissionGroups.Default, AbpIdentity.PermissionGroups.Update, true, true, false),
|
PermissionJson = DefaultFieldPermissionJson(AbpIdentity.PermissionGroups.Create, AbpIdentity.PermissionGroups.Default, AbpIdentity.PermissionGroups.Update, true, true, false),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
|
@ -129,7 +129,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 2,
|
ListOrderNo = 2,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(AbpIdentity.PermissionGroups.Create, AbpIdentity.PermissionGroups.Default, AbpIdentity.PermissionGroups.Update, true, true, false),
|
PermissionJson = DefaultFieldPermissionJson(AbpIdentity.PermissionGroups.Create, AbpIdentity.PermissionGroups.Default, AbpIdentity.PermissionGroups.Update, true, true, false),
|
||||||
|
|
@ -145,7 +145,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 3,
|
ListOrderNo = 3,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(AbpIdentity.PermissionGroups.Create, AbpIdentity.PermissionGroups.Default, AbpIdentity.PermissionGroups.Update, true, true, false),
|
PermissionJson = DefaultFieldPermissionJson(AbpIdentity.PermissionGroups.Create, AbpIdentity.PermissionGroups.Default, AbpIdentity.PermissionGroups.Update, true, true, false),
|
||||||
|
|
@ -161,7 +161,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 4,
|
ListOrderNo = 4,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(AbpIdentity.PermissionGroups.Create, AbpIdentity.PermissionGroups.Default, AbpIdentity.PermissionGroups.Update, true, true, false),
|
PermissionJson = DefaultFieldPermissionJson(AbpIdentity.PermissionGroups.Create, AbpIdentity.PermissionGroups.Default, AbpIdentity.PermissionGroups.Update, true, true, false),
|
||||||
|
|
@ -484,7 +484,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 0,
|
ListOrderNo = 0,
|
||||||
Visible = false,
|
Visible = false,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
|
@ -500,7 +500,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 1,
|
ListOrderNo = 1,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
|
@ -517,7 +517,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 2,
|
ListOrderNo = 2,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
LookupJson = JsonSerializer.Serialize(new LookupDto
|
LookupJson = JsonSerializer.Serialize(new LookupDto
|
||||||
{
|
{
|
||||||
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
|
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
|
||||||
|
|
@ -545,7 +545,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 3,
|
ListOrderNo = 3,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
|
@ -561,7 +561,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 4,
|
ListOrderNo = 4,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
|
@ -577,7 +577,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 5,
|
ListOrderNo = 5,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
|
@ -594,7 +594,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 6,
|
ListOrderNo = 6,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
|
@ -611,7 +611,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 7,
|
ListOrderNo = 7,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
|
@ -710,7 +710,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 1,
|
ListOrderNo = 1,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
SortIndex = 1,
|
SortIndex = 1,
|
||||||
SortDirection = GridColumnOptions.SortOrderAsc,
|
SortDirection = GridColumnOptions.SortOrderAsc,
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
|
|
@ -731,7 +731,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 2,
|
ListOrderNo = 2,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Roles.Create, PlatformConsts.IdentityPermissions.Roles.Default, PlatformConsts.IdentityPermissions.Roles.Update, true, true, false),
|
PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Roles.Create, PlatformConsts.IdentityPermissions.Roles.Default, PlatformConsts.IdentityPermissions.Roles.Update, true, true, false),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
|
@ -748,7 +748,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 3,
|
ListOrderNo = 3,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Roles.Create, PlatformConsts.IdentityPermissions.Roles.Default, PlatformConsts.IdentityPermissions.Roles.Update, true, true, false),
|
PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Roles.Create, PlatformConsts.IdentityPermissions.Roles.Default, PlatformConsts.IdentityPermissions.Roles.Update, true, true, false),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
|
@ -802,9 +802,11 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
new EditingFormItemDto { Order=2, DataField="Name", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=2, DataField="Name", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=3, DataField="Surname", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=3, DataField="Surname", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=4, DataField="PhoneNumber", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=4, DataField="PhoneNumber", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=5, DataField="WorkHour", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxSelectBox },
|
new EditingFormItemDto { Order=5, DataField="WorkHour", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions = EditorOptionValues.ShowClearButton },
|
||||||
new EditingFormItemDto { Order=6, DataField="Password", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=6, DataField="DepartmentId", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions = EditorOptionValues.ShowClearButton },
|
||||||
new EditingFormItemDto { Order=7, DataField="IsActive", ColSpan=1, EditorType2=EditorTypes.dxCheckBox },
|
new EditingFormItemDto { Order=7, DataField="JobPositionId", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions = EditorOptionValues.ShowClearButton },
|
||||||
|
new EditingFormItemDto { Order=8, DataField="Password", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
|
new EditingFormItemDto { Order=9, DataField="IsActive", ColSpan=1, EditorType2=EditorTypes.dxCheckBox },
|
||||||
]}
|
]}
|
||||||
}),
|
}),
|
||||||
InsertServiceAddress = "list-form-dynamic-api/user-insert",
|
InsertServiceAddress = "list-form-dynamic-api/user-insert",
|
||||||
|
|
@ -896,7 +898,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 1,
|
ListOrderNo = 1,
|
||||||
Visible = false,
|
Visible = false,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, true, true, false),
|
PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, true, true, false),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
|
@ -914,7 +916,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 2,
|
ListOrderNo = 2,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
ValidationRuleJson = DefaultValidationRuleEmailRequiredJson,
|
ValidationRuleJson = DefaultValidationRuleEmailRequiredJson,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
|
@ -934,7 +936,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 3,
|
ListOrderNo = 3,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
|
@ -954,7 +956,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 4,
|
ListOrderNo = 4,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
|
@ -974,7 +976,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 5,
|
ListOrderNo = 5,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
EditorOptions = EditorOptionValues.PhoneEditorOptions,
|
EditorOptions = EditorOptionValues.PhoneEditorOptions,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
|
@ -995,13 +997,72 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.WorkHour), "Name", "Name"),
|
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.WorkHour), "Name", "Name"),
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, true, true, false),
|
PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, true, true, false),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
|
|
||||||
|
new ListFormField
|
||||||
|
{
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Guid,
|
||||||
|
FieldName = "DepartmentId",
|
||||||
|
CaptionName = "App.Listform.ListformField.DepartmentId",
|
||||||
|
Width = 150,
|
||||||
|
ListOrderNo = 7,
|
||||||
|
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
||||||
|
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||||
|
DisplayExpr = "Name",
|
||||||
|
ValueExpr = "Key",
|
||||||
|
LookupQuery = LookupQueryValues.DepartmentValues,
|
||||||
|
CascadeEmptyFields = "JobPositionId"
|
||||||
|
}),
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
|
||||||
|
AllowSearch = true,
|
||||||
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, true, true, false),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
|
||||||
|
new ListFormField
|
||||||
|
{
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Guid,
|
||||||
|
FieldName = "JobPositionId",
|
||||||
|
CaptionName = "App.Listform.ListformField.JobPositionId",
|
||||||
|
Width = 150,
|
||||||
|
ListOrderNo = 8,
|
||||||
|
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
||||||
|
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||||
|
DisplayExpr = "Name",
|
||||||
|
ValueExpr = "Key",
|
||||||
|
LookupQuery = LookupQueryValues.JobPositionValues,
|
||||||
|
CascadeRelationField = "DepartmentId",
|
||||||
|
CascadeFilterOperator="=",
|
||||||
|
CascadeParentFields = "DepartmentId",
|
||||||
|
}),
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
|
||||||
|
AllowSearch = true,
|
||||||
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, true, true, false),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
|
||||||
new ListFormField
|
new ListFormField
|
||||||
{
|
{
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
|
@ -1012,10 +1073,10 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
FieldName = "IsActive",
|
FieldName = "IsActive",
|
||||||
CaptionName = "App.Listform.ListformField.IsActive",
|
CaptionName = "App.Listform.ListformField.IsActive",
|
||||||
Width = 100,
|
Width = 100,
|
||||||
ListOrderNo = 7,
|
ListOrderNo = 9,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, true, true, false),
|
PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, true, true, false),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
|
@ -1030,10 +1091,10 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
FieldName = "IsVerified",
|
FieldName = "IsVerified",
|
||||||
CaptionName = "App.Listform.ListformField.IsVerified",
|
CaptionName = "App.Listform.ListformField.IsVerified",
|
||||||
Width = 100,
|
Width = 100,
|
||||||
ListOrderNo = 8,
|
ListOrderNo = 10,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, true, true, false),
|
PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, true, true, false),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
|
@ -1048,10 +1109,10 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
FieldName = "EmailConfirmed",
|
FieldName = "EmailConfirmed",
|
||||||
CaptionName = "App.Listform.ListformField.EmailConfirmed",
|
CaptionName = "App.Listform.ListformField.EmailConfirmed",
|
||||||
Width = 100,
|
Width = 100,
|
||||||
ListOrderNo = 9,
|
ListOrderNo = 11,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, true, true, false),
|
PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, true, true, false),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
|
@ -1066,10 +1127,10 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
FieldName = "TwoFactorEnabled",
|
FieldName = "TwoFactorEnabled",
|
||||||
CaptionName = "App.Listform.ListformField.TwoFactorEnabled",
|
CaptionName = "App.Listform.ListformField.TwoFactorEnabled",
|
||||||
Width = 100,
|
Width = 100,
|
||||||
ListOrderNo = 10,
|
ListOrderNo = 12,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, true, true, false),
|
PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, true, true, false),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
|
@ -1084,10 +1145,10 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
FieldName = "Password",
|
FieldName = "Password",
|
||||||
CaptionName = "App.Listform.ListformField.Password",
|
CaptionName = "App.Listform.ListformField.Password",
|
||||||
Width = 100,
|
Width = 100,
|
||||||
ListOrderNo = 11,
|
ListOrderNo = 13,
|
||||||
Visible = false,
|
Visible = false,
|
||||||
IsActive = false,
|
IsActive = false,
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, true, true, false),
|
PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, true, true, false),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
|
@ -1295,7 +1356,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Report Categories
|
#region Report Categories
|
||||||
listFormName = AppCodes.Reports.Categories;
|
listFormName = AppCodes.Reports.Categories;
|
||||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||||
|
|
@ -1361,7 +1422,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 1,
|
ListOrderNo = 1,
|
||||||
Visible = false,
|
Visible = false,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
|
@ -1378,7 +1439,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 2,
|
ListOrderNo = 2,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
|
@ -1396,7 +1457,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 3,
|
ListOrderNo = 3,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
|
@ -1413,7 +1474,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 4,
|
ListOrderNo = 4,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
|
@ -1515,7 +1576,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 1,
|
ListOrderNo = 1,
|
||||||
Visible = false,
|
Visible = false,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
|
@ -1533,7 +1594,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 2,
|
ListOrderNo = 2,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
SortIndex = 1,
|
SortIndex = 1,
|
||||||
SortDirection = GridColumnOptions.SortOrderAsc,
|
SortDirection = GridColumnOptions.SortOrderAsc,
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
|
|
@ -1552,7 +1613,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 3,
|
ListOrderNo = 3,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.ReportCategory), "Id", "Name"),
|
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.ReportCategory), "Id", "Name"),
|
||||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
|
@ -1569,7 +1630,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 4,
|
ListOrderNo = 4,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
||||||
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
|
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
|
||||||
DisplayExpr = "name",
|
DisplayExpr = "name",
|
||||||
|
|
@ -1595,7 +1656,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 5,
|
ListOrderNo = 5,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
|
@ -1611,7 +1672,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 6,
|
ListOrderNo = 6,
|
||||||
Visible = false,
|
Visible = false,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
|
@ -1620,7 +1681,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Sector
|
#region Sector
|
||||||
listFormName = AppCodes.Definitions.Sector;
|
listFormName = AppCodes.Definitions.Sector;
|
||||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||||
|
|
@ -1685,7 +1746,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 1,
|
ListOrderNo = 1,
|
||||||
Visible = false,
|
Visible = false,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
|
@ -1701,7 +1762,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 2,
|
ListOrderNo = 2,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
SortIndex = 1,
|
SortIndex = 1,
|
||||||
SortDirection = GridColumnOptions.SortOrderAsc,
|
SortDirection = GridColumnOptions.SortOrderAsc,
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
|
|
@ -1796,7 +1857,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 1,
|
ListOrderNo = 1,
|
||||||
Visible = false,
|
Visible = false,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
|
@ -1812,7 +1873,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 2,
|
ListOrderNo = 2,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
SortIndex = 1,
|
SortIndex = 1,
|
||||||
SortDirection = GridColumnOptions.SortOrderAsc,
|
SortDirection = GridColumnOptions.SortOrderAsc,
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
|
|
@ -1832,7 +1893,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 3,
|
ListOrderNo = 3,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||||
|
|
@ -1848,7 +1909,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 4,
|
ListOrderNo = 4,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||||
|
|
@ -1866,7 +1927,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 5,
|
ListOrderNo = 5,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
|
@ -1882,7 +1943,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 6,
|
ListOrderNo = 6,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
|
@ -1898,7 +1959,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 7,
|
ListOrderNo = 7,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
|
@ -1914,7 +1975,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 8,
|
ListOrderNo = 8,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
|
@ -1930,7 +1991,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 9,
|
ListOrderNo = 9,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
|
@ -1946,7 +2007,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 10,
|
ListOrderNo = 10,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
|
@ -1962,7 +2023,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 11,
|
ListOrderNo = 11,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
|
@ -2036,7 +2097,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 1,
|
ListOrderNo = 1,
|
||||||
Visible = false,
|
Visible = false,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
|
@ -2051,7 +2112,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 2,
|
ListOrderNo = 2,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
SortIndex = 1,
|
SortIndex = 1,
|
||||||
SortDirection = GridColumnOptions.SortOrderAsc,
|
SortDirection = GridColumnOptions.SortOrderAsc,
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
|
|
@ -2081,7 +2142,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 3,
|
ListOrderNo = 3,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
||||||
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||||
|
|
@ -2104,7 +2165,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 4,
|
ListOrderNo = 4,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
|
@ -2115,7 +2176,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Sessions
|
#region Sessions
|
||||||
listFormName = AppCodes.IdentityManagement.Sessions;
|
listFormName = AppCodes.IdentityManagement.Sessions;
|
||||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||||
|
|
@ -2176,7 +2237,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 1,
|
ListOrderNo = 1,
|
||||||
Visible = false,
|
Visible = false,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
|
@ -2191,7 +2252,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 2,
|
ListOrderNo = 2,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
|
@ -2207,7 +2268,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 3,
|
ListOrderNo = 3,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
|
@ -2224,7 +2285,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 4,
|
ListOrderNo = 4,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
|
@ -2241,7 +2302,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 5,
|
ListOrderNo = 5,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
||||||
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||||
|
|
@ -2264,7 +2325,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 6,
|
ListOrderNo = 6,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
|
@ -2281,7 +2342,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 7,
|
ListOrderNo = 7,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
|
@ -2298,7 +2359,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ListOrderNo = 8,
|
ListOrderNo = 8,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
|
@ -2355,9 +2416,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
new() {
|
new() {
|
||||||
Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items =
|
Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items =
|
||||||
[
|
[
|
||||||
new EditingFormItemDto { Order = 1, DataField = "BranchId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order = 2, DataField = "ParentId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }
|
||||||
new EditingFormItemDto { Order = 3, DataField = "ParentId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
@ -2398,7 +2458,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
new()
|
new()
|
||||||
{
|
{
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
|
@ -2416,32 +2476,6 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
DisplayExpr = "Name",
|
DisplayExpr = "Name",
|
||||||
ValueExpr = "Key",
|
ValueExpr = "Key",
|
||||||
LookupQuery = LookupQueryValues.DepartmentValues,
|
LookupQuery = LookupQueryValues.DepartmentValues,
|
||||||
CascadeRelationField = "BranchId",
|
|
||||||
CascadeFilterOperator="=",
|
|
||||||
CascadeParentFields = "BranchId",
|
|
||||||
}),
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
|
||||||
},
|
|
||||||
new()
|
|
||||||
{
|
|
||||||
ListFormCode = listForm.ListFormCode,
|
|
||||||
CultureName = LanguageCodes.En,
|
|
||||||
SourceDbType = DbType.Guid,
|
|
||||||
FieldName = "BranchId",
|
|
||||||
CaptionName = "App.Listform.ListformField.BranchId",
|
|
||||||
Width = 200,
|
|
||||||
ListOrderNo = 4,
|
|
||||||
Visible = true,
|
|
||||||
IsActive = true,
|
|
||||||
AllowSearch = true,
|
|
||||||
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
|
||||||
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
|
||||||
DisplayExpr = "Name",
|
|
||||||
ValueExpr = "Key",
|
|
||||||
LookupQuery = LookupQueryValues.BranchValues,
|
|
||||||
CascadeEmptyFields = "ParentId"
|
|
||||||
}),
|
}),
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
|
@ -2451,7 +2485,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region JobPosition
|
#region JobPosition
|
||||||
listFormName = AppCodes.Definitions.JobPosition;
|
listFormName = AppCodes.Definitions.JobPosition;
|
||||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||||
|
|
@ -2498,10 +2532,9 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
new() {
|
new() {
|
||||||
Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items =
|
Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items =
|
||||||
[
|
[
|
||||||
new EditingFormItemDto { Order = 1, DataField = "BranchId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
new EditingFormItemDto { Order = 1, DataField = "DepartmentId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||||
new EditingFormItemDto { Order = 2, DataField = "DepartmentId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order = 3, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order = 3, DataField = "ParentId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||||
new EditingFormItemDto { Order = 4, DataField = "ParentId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
@ -2560,9 +2593,9 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
DisplayExpr = "Name",
|
DisplayExpr = "Name",
|
||||||
ValueExpr = "Key",
|
ValueExpr = "Key",
|
||||||
LookupQuery = LookupQueryValues.JobPositionValues,
|
LookupQuery = LookupQueryValues.JobPositionValues,
|
||||||
CascadeRelationField = "BranchId",
|
CascadeRelationField = "DepartmentId",
|
||||||
CascadeFilterOperator="=",
|
CascadeFilterOperator="=",
|
||||||
CascadeParentFields = "BranchId,DepartmentId",
|
CascadeParentFields = "DepartmentId",
|
||||||
}),
|
}),
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
|
@ -2585,39 +2618,13 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
DisplayExpr = "Name",
|
DisplayExpr = "Name",
|
||||||
ValueExpr = "Key",
|
ValueExpr = "Key",
|
||||||
LookupQuery = LookupQueryValues.DepartmentValues,
|
LookupQuery = LookupQueryValues.DepartmentValues,
|
||||||
CascadeRelationField = "BranchId",
|
CascadeEmptyFields = "ParentId"
|
||||||
CascadeFilterOperator="=",
|
|
||||||
CascadeParentFields = "BranchId",
|
|
||||||
CascadeEmptyFields = "ParentId"
|
|
||||||
}),
|
}),
|
||||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
new()
|
|
||||||
{
|
|
||||||
ListFormCode = listForm.ListFormCode,
|
|
||||||
CultureName = LanguageCodes.En,
|
|
||||||
SourceDbType = DbType.Guid,
|
|
||||||
FieldName = "BranchId",
|
|
||||||
CaptionName = "App.Listform.ListformField.BranchId",
|
|
||||||
Width = 0,
|
|
||||||
ListOrderNo = 5,
|
|
||||||
Visible = true,
|
|
||||||
IsActive = true,
|
|
||||||
AllowSearch = true,
|
|
||||||
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
|
||||||
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
|
||||||
DisplayExpr = "Name",
|
|
||||||
ValueExpr = "Key",
|
|
||||||
LookupQuery = LookupQueryValues.BranchValues,
|
|
||||||
CascadeEmptyFields = "DepartmentId,ParentId"
|
|
||||||
}),
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
|
||||||
},
|
|
||||||
]);
|
]);
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -139,6 +139,8 @@ public static class PlatformConsts
|
||||||
public const string AdminPhoneNumberDefaultValue = "05449476346";
|
public const string AdminPhoneNumberDefaultValue = "05449476346";
|
||||||
public const string AdminRocketUsernameDefaultValue = "sedat.ozturk";
|
public const string AdminRocketUsernameDefaultValue = "sedat.ozturk";
|
||||||
public const string AdminWorkHourDefaultValue = "00:00-23:59";
|
public const string AdminWorkHourDefaultValue = "00:00-23:59";
|
||||||
|
public const string AdminDepartmentIdDefaultValue = "Yönetim";
|
||||||
|
public const string AdminJobPositionIdDefaultValue = "Genel Müdür";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class OrganizationUnits
|
public static class OrganizationUnits
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,21 @@ public static class PlatformModuleExtensionConfigurator
|
||||||
{
|
{
|
||||||
property.DisplayName = new LocalizableString(typeof(PlatformResource), PlatformConsts.AbpIdentity.User.RocketUsername);
|
property.DisplayName = new LocalizableString(typeof(PlatformResource), PlatformConsts.AbpIdentity.User.RocketUsername);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
user.AddOrUpdateProperty<Guid>(
|
||||||
|
PlatformConsts.AbpIdentity.User.DepartmentId,
|
||||||
|
property =>
|
||||||
|
{
|
||||||
|
property.DisplayName = new LocalizableString(typeof(PlatformResource), PlatformConsts.AbpIdentity.User.DepartmentId);
|
||||||
|
});
|
||||||
|
|
||||||
|
user.AddOrUpdateProperty<Guid>(
|
||||||
|
PlatformConsts.AbpIdentity.User.JobPositionId,
|
||||||
|
property =>
|
||||||
|
{
|
||||||
|
property.DisplayName = new LocalizableString(typeof(PlatformResource), PlatformConsts.AbpIdentity.User.JobPositionId);
|
||||||
|
});
|
||||||
|
|
||||||
user.AddOrUpdateProperty<string>(
|
user.AddOrUpdateProperty<string>(
|
||||||
PlatformConsts.AbpIdentity.User.WorkHour,
|
PlatformConsts.AbpIdentity.User.WorkHour,
|
||||||
property =>
|
property =>
|
||||||
|
|
@ -96,7 +110,7 @@ public static class PlatformModuleExtensionConfigurator
|
||||||
entity.AddOrUpdateProperty<int?>("MaxConcurrentUsers");
|
entity.AddOrUpdateProperty<int?>("MaxConcurrentUsers");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
/* You can configure extra properties for the
|
/* You can configure extra properties for the
|
||||||
* entities defined in the modules used by your application.
|
* entities defined in the modules used by your application.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,6 @@ public class Department : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
|
|
||||||
public Guid? ParentId { get; set; }
|
public Guid? ParentId { get; set; }
|
||||||
|
|
||||||
public Guid? BranchId { get; set; }
|
|
||||||
|
|
||||||
Guid? IMultiTenant.TenantId => TenantId;
|
Guid? IMultiTenant.TenantId => TenantId;
|
||||||
|
|
||||||
public ICollection<JobPosition> JobPositions { get; set; }
|
public ICollection<JobPosition> JobPositions { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,6 @@ public class JobPosition : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
|
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
public Guid? BranchId { get; set; }
|
|
||||||
|
|
||||||
public Guid DepartmentId { get; set; }
|
public Guid DepartmentId { get; set; }
|
||||||
public Department Department { get; set; }
|
public Department Department { get; set; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,23 +52,23 @@ public static class AbpIdentityUserExtensions
|
||||||
}
|
}
|
||||||
|
|
||||||
//DepartmentId
|
//DepartmentId
|
||||||
public static void SetDepartmentId(this IdentityUser user, string departmentId)
|
public static void SetDepartmentId(this IdentityUser user, Guid departmentId)
|
||||||
{
|
{
|
||||||
user.SetProperty(PlatformConsts.AbpIdentity.User.DepartmentId, departmentId);
|
user.SetProperty(PlatformConsts.AbpIdentity.User.DepartmentId, departmentId);
|
||||||
}
|
}
|
||||||
public static string GetDepartmentId(this IdentityUser user)
|
public static Guid GetDepartmentId(this IdentityUser user)
|
||||||
{
|
{
|
||||||
return user.GetProperty<string>(PlatformConsts.AbpIdentity.User.DepartmentId);
|
return user.GetProperty<Guid>(PlatformConsts.AbpIdentity.User.DepartmentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
//JobPositionId
|
//JobPositionId
|
||||||
public static void SetJobPositionId(this IdentityUser user, string jobPositionId)
|
public static void SetJobPositionId(this IdentityUser user, Guid jobPositionId)
|
||||||
{
|
{
|
||||||
user.SetProperty(PlatformConsts.AbpIdentity.User.JobPositionId, jobPositionId);
|
user.SetProperty(PlatformConsts.AbpIdentity.User.JobPositionId, jobPositionId);
|
||||||
}
|
}
|
||||||
public static string GetJobPositionId(this IdentityUser user)
|
public static Guid GetJobPositionId(this IdentityUser user)
|
||||||
{
|
{
|
||||||
return user.GetProperty<string>(PlatformConsts.AbpIdentity.User.JobPositionId);
|
return user.GetProperty<Guid>(PlatformConsts.AbpIdentity.User.JobPositionId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ public static class PlatformEfCoreEntityExtensionMappings
|
||||||
);
|
);
|
||||||
|
|
||||||
ObjectExtensionManager.Instance
|
ObjectExtensionManager.Instance
|
||||||
.MapEfCoreProperty<IdentityUser, string>(
|
.MapEfCoreProperty<IdentityUser, Guid>(
|
||||||
PlatformConsts.AbpIdentity.User.DepartmentId,
|
PlatformConsts.AbpIdentity.User.DepartmentId,
|
||||||
(entityBuilder, propertyBuilder) =>
|
(entityBuilder, propertyBuilder) =>
|
||||||
{
|
{
|
||||||
|
|
@ -65,7 +65,7 @@ public static class PlatformEfCoreEntityExtensionMappings
|
||||||
);
|
);
|
||||||
|
|
||||||
ObjectExtensionManager.Instance
|
ObjectExtensionManager.Instance
|
||||||
.MapEfCoreProperty<IdentityUser, string>(
|
.MapEfCoreProperty<IdentityUser, Guid>(
|
||||||
PlatformConsts.AbpIdentity.User.JobPositionId,
|
PlatformConsts.AbpIdentity.User.JobPositionId,
|
||||||
(entityBuilder, propertyBuilder) =>
|
(entityBuilder, propertyBuilder) =>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
||||||
namespace Sozsoft.Platform.Migrations
|
namespace Sozsoft.Platform.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(PlatformDbContext))]
|
[DbContext(typeof(PlatformDbContext))]
|
||||||
[Migration("20260504085315_Initial")]
|
[Migration("20260504141857_Initial")]
|
||||||
partial class Initial
|
partial class Initial
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|
@ -1649,9 +1649,6 @@ namespace Sozsoft.Platform.Migrations
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<Guid?>("BranchId")
|
|
||||||
.HasColumnType("uniqueidentifier");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreationTime")
|
b.Property<DateTime>("CreationTime")
|
||||||
.HasColumnType("datetime2")
|
.HasColumnType("datetime2")
|
||||||
.HasColumnName("CreationTime");
|
.HasColumnName("CreationTime");
|
||||||
|
|
@ -2105,9 +2102,6 @@ namespace Sozsoft.Platform.Migrations
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<Guid?>("BranchId")
|
|
||||||
.HasColumnType("uniqueidentifier");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreationTime")
|
b.Property<DateTime>("CreationTime")
|
||||||
.HasColumnType("datetime2")
|
.HasColumnType("datetime2")
|
||||||
.HasColumnName("CreationTime");
|
.HasColumnName("CreationTime");
|
||||||
|
|
@ -5078,8 +5072,8 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("datetime2")
|
.HasColumnType("datetime2")
|
||||||
.HasColumnName("DeletionTime");
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
b.Property<string>("DepartmentId")
|
b.Property<Guid>("DepartmentId")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<string>("Email")
|
b.Property<string>("Email")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
|
|
@ -5122,8 +5116,8 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("bit")
|
.HasColumnType("bit")
|
||||||
.HasDefaultValue(false);
|
.HasDefaultValue(false);
|
||||||
|
|
||||||
b.Property<string>("JobPositionId")
|
b.Property<Guid>("JobPositionId")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<DateTime?>("LastModificationTime")
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
.HasColumnType("datetime2")
|
.HasColumnType("datetime2")
|
||||||
|
|
@ -417,9 +417,9 @@ namespace Sozsoft.Platform.Migrations
|
||||||
ShouldChangePasswordOnNextLogin = table.Column<bool>(type: "bit", nullable: false),
|
ShouldChangePasswordOnNextLogin = table.Column<bool>(type: "bit", nullable: false),
|
||||||
EntityVersion = table.Column<int>(type: "int", nullable: false),
|
EntityVersion = table.Column<int>(type: "int", nullable: false),
|
||||||
LastPasswordChangeTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
|
LastPasswordChangeTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
|
||||||
DepartmentId = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
DepartmentId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
IsVerified = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
IsVerified = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||||
JobPositionId = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
JobPositionId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
LoginEndDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
LoginEndDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
RocketUsername = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
RocketUsername = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
WorkHour = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
WorkHour = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
|
@ -446,7 +446,6 @@ namespace Sozsoft.Platform.Migrations
|
||||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
||||||
ParentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
ParentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
BranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
||||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
|
@ -1793,7 +1792,6 @@ namespace Sozsoft.Platform.Migrations
|
||||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
||||||
BranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
||||||
DepartmentId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
DepartmentId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
ParentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
ParentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
|
@ -1646,9 +1646,6 @@ namespace Sozsoft.Platform.Migrations
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<Guid?>("BranchId")
|
|
||||||
.HasColumnType("uniqueidentifier");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreationTime")
|
b.Property<DateTime>("CreationTime")
|
||||||
.HasColumnType("datetime2")
|
.HasColumnType("datetime2")
|
||||||
.HasColumnName("CreationTime");
|
.HasColumnName("CreationTime");
|
||||||
|
|
@ -2102,9 +2099,6 @@ namespace Sozsoft.Platform.Migrations
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<Guid?>("BranchId")
|
|
||||||
.HasColumnType("uniqueidentifier");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreationTime")
|
b.Property<DateTime>("CreationTime")
|
||||||
.HasColumnType("datetime2")
|
.HasColumnType("datetime2")
|
||||||
.HasColumnName("CreationTime");
|
.HasColumnName("CreationTime");
|
||||||
|
|
@ -5075,8 +5069,8 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("datetime2")
|
.HasColumnType("datetime2")
|
||||||
.HasColumnName("DeletionTime");
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
b.Property<string>("DepartmentId")
|
b.Property<Guid>("DepartmentId")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<string>("Email")
|
b.Property<string>("Email")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
|
|
@ -5119,8 +5113,8 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("bit")
|
.HasColumnType("bit")
|
||||||
.HasDefaultValue(false);
|
.HasDefaultValue(false);
|
||||||
|
|
||||||
b.Property<string>("JobPositionId")
|
b.Property<Guid>("JobPositionId")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<DateTime?>("LastModificationTime")
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
.HasColumnType("datetime2")
|
.HasColumnType("datetime2")
|
||||||
|
|
|
||||||
|
|
@ -1246,57 +1246,47 @@
|
||||||
],
|
],
|
||||||
"Departments": [
|
"Departments": [
|
||||||
{
|
{
|
||||||
"Name": "Yönetim",
|
"Name": "Yönetim"
|
||||||
"BranchCode": "DEMO"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Name": "Üretim",
|
"Name": "Üretim",
|
||||||
"BranchCode": "DEMO",
|
|
||||||
"ParentName": "Yönetim"
|
"ParentName": "Yönetim"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Name": "Satış",
|
"Name": "Satış",
|
||||||
"BranchCode": "DEMO",
|
|
||||||
"ParentName": "Yönetim"
|
"ParentName": "Yönetim"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Name": "Finans",
|
"Name": "Finans",
|
||||||
"BranchCode": "DEMO",
|
|
||||||
"ParentName": "Yönetim"
|
"ParentName": "Yönetim"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Name": "Muhasebe",
|
"Name": "Muhasebe",
|
||||||
"BranchCode": "DEMO",
|
|
||||||
"ParentName": "Finans"
|
"ParentName": "Finans"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Name": "Bilgi İşlem",
|
"Name": "Bilgi İşlem",
|
||||||
"BranchCode": "DEMO",
|
|
||||||
"ParentName": "Yönetim"
|
"ParentName": "Yönetim"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"JobPositions": [
|
"JobPositions": [
|
||||||
{
|
{
|
||||||
"DepartmentName": "Yönetim",
|
"DepartmentName": "Yönetim",
|
||||||
"Name": "Genel Müdür",
|
"Name": "Genel Müdür"
|
||||||
"BranchCode": "DEMO"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DepartmentName": "Yönetim",
|
"DepartmentName": "Yönetim",
|
||||||
"Name": "Genel Müdür Yardımcısı",
|
"Name": "Genel Müdür Yardımcısı",
|
||||||
"BranchCode": "DEMO",
|
|
||||||
"ParentName": "Genel Müdür"
|
"ParentName": "Genel Müdür"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DepartmentName": "Muhasebe",
|
"DepartmentName": "Muhasebe",
|
||||||
"Name": "Muhasebe Müdürü",
|
"Name": "Muhasebe Müdürü",
|
||||||
"BranchCode": "DEMO",
|
|
||||||
"ParentName": "Genel Müdür"
|
"ParentName": "Genel Müdür"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DepartmentName": "Muhasebe",
|
"DepartmentName": "Muhasebe",
|
||||||
"Name": "Muhasebe Şefi",
|
"Name": "Muhasebe Şefi",
|
||||||
"BranchCode": "DEMO",
|
|
||||||
"ParentName": "Muhasebe Müdürü"
|
"ParentName": "Muhasebe Müdürü"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ using Volo.Abp.Identity;
|
||||||
using Volo.Abp.Timing;
|
using Volo.Abp.Timing;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Volo.Abp.MultiTenancy;
|
using Volo.Abp.MultiTenancy;
|
||||||
|
using Sozsoft.Platform.Extensions;
|
||||||
|
|
||||||
namespace Sozsoft.Platform.Data.Seeds;
|
namespace Sozsoft.Platform.Data.Seeds;
|
||||||
|
|
||||||
|
|
@ -748,7 +749,6 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
await _departmentRepository.InsertAsync(new Department
|
await _departmentRepository.InsertAsync(new Department
|
||||||
{
|
{
|
||||||
Name = item.Name,
|
Name = item.Name,
|
||||||
BranchId = branch.Id,
|
|
||||||
ParentId = parent?.Id
|
ParentId = parent?.Id
|
||||||
}, autoSave: true);
|
}, autoSave: true);
|
||||||
}
|
}
|
||||||
|
|
@ -759,7 +759,6 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
if (exists)
|
if (exists)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var branch = await _branchRepository.FirstOrDefaultAsync(x => x.Code == item.BranchCode);
|
|
||||||
var department = await _departmentRepository.FirstOrDefaultAsync(x => x.Name == item.DepartmentName);
|
var department = await _departmentRepository.FirstOrDefaultAsync(x => x.Name == item.DepartmentName);
|
||||||
var parent = await _jobPositionRepository.FirstOrDefaultAsync(x => x.Name == item.ParentName);
|
var parent = await _jobPositionRepository.FirstOrDefaultAsync(x => x.Name == item.ParentName);
|
||||||
|
|
||||||
|
|
@ -767,9 +766,27 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
{
|
{
|
||||||
Name = item.Name,
|
Name = item.Name,
|
||||||
DepartmentId = department.Id,
|
DepartmentId = department.Id,
|
||||||
BranchId = branch.Id,
|
|
||||||
ParentId = parent?.Id
|
ParentId = parent?.Id
|
||||||
}, autoSave: true);
|
}, autoSave: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//admin kullanının departmen ve pozisyonunu default olarak belirliyoruz
|
||||||
|
var adminUser = await _repositoryUser.FindByNormalizedEmailAsync(PlatformConsts.AbpIdentity.User.AdminEmailDefaultValue);
|
||||||
|
if (adminUser != null)
|
||||||
|
{
|
||||||
|
var defaultDepartment = await _departmentRepository.FirstOrDefaultAsync(x => x.Name == PlatformConsts.AbpIdentity.User.AdminDepartmentIdDefaultValue);
|
||||||
|
if (defaultDepartment != null)
|
||||||
|
{
|
||||||
|
adminUser.SetDepartmentId(defaultDepartment.Id);
|
||||||
|
}
|
||||||
|
|
||||||
|
var defaultJobPosition = await _jobPositionRepository.FirstOrDefaultAsync(x => x.Name == PlatformConsts.AbpIdentity.User.AdminJobPositionIdDefaultValue);
|
||||||
|
if (defaultJobPosition != null)
|
||||||
|
{
|
||||||
|
adminUser.SetJobPositionId(defaultJobPosition.Id);
|
||||||
|
}
|
||||||
|
|
||||||
|
await _repositoryUser.UpdateAsync(adminUser);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -125,6 +125,8 @@ export interface UserInfoViewModel extends ExtensibleObject {
|
||||||
branches: AssignedRoleViewModel[]
|
branches: AssignedRoleViewModel[]
|
||||||
claims: AssignedClaimViewModel[]
|
claims: AssignedClaimViewModel[]
|
||||||
workHours: AssignedWorkHourViewModel[]
|
workHours: AssignedWorkHourViewModel[]
|
||||||
|
departments: AssignedDepartmentViewModel[]
|
||||||
|
jobPositions: AssignedJobPositionViewModel[]
|
||||||
lockUser: boolean
|
lockUser: boolean
|
||||||
lastPasswordChangeTime?: Date | string
|
lastPasswordChangeTime?: Date | string
|
||||||
|
|
||||||
|
|
@ -136,6 +138,8 @@ export interface UserInfoViewModel extends ExtensibleObject {
|
||||||
creationTime: Date | string
|
creationTime: Date | string
|
||||||
lastModificationTime: Date | string
|
lastModificationTime: Date | string
|
||||||
workHour?: string
|
workHour?: string
|
||||||
|
departmentId?: string
|
||||||
|
jobPositionId?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AssignedRoleViewModel {
|
export interface AssignedRoleViewModel {
|
||||||
|
|
@ -161,6 +165,19 @@ export interface AssignedWorkHourViewModel {
|
||||||
isAssigned: boolean
|
isAssigned: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface AssignedDepartmentViewModel {
|
||||||
|
id: string
|
||||||
|
name?: string
|
||||||
|
isAssigned: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AssignedJobPositionViewModel {
|
||||||
|
id: string
|
||||||
|
name?: string
|
||||||
|
departmentId?: string
|
||||||
|
isAssigned: boolean
|
||||||
|
}
|
||||||
|
|
||||||
export interface UserClaimModel {
|
export interface UserClaimModel {
|
||||||
id?: string
|
id?: string
|
||||||
userId?: string
|
userId?: string
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,13 @@ export const putUserLookout = (input: UserInfoViewModel) =>
|
||||||
data: input,
|
data: input,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
export const putUserPermission = (input: UserInfoViewModel) =>
|
||||||
|
apiService.fetchData({
|
||||||
|
method: 'PUT',
|
||||||
|
url: `/api/app/platform-identity/permission`,
|
||||||
|
data: input,
|
||||||
|
})
|
||||||
|
|
||||||
export const getPermissions = (providerName: string, providerKey?: string) =>
|
export const getPermissions = (providerName: string, providerKey?: string) =>
|
||||||
apiService.fetchData<GetPermissionListResultDto>({
|
apiService.fetchData<GetPermissionListResultDto>({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
|
|
||||||
|
|
@ -2,3 +2,9 @@ export type SelectBoxOption = {
|
||||||
value?: string
|
value?: string
|
||||||
label?: string
|
label?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type SelectBoxOptionWithGroup = {
|
||||||
|
value?: string
|
||||||
|
label?: string
|
||||||
|
group?: string
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,16 +27,17 @@ import {
|
||||||
postClaimUser,
|
postClaimUser,
|
||||||
putUserDetail,
|
putUserDetail,
|
||||||
putUserLookout,
|
putUserLookout,
|
||||||
|
putUserPermission,
|
||||||
} from '@/services/identity.service'
|
} from '@/services/identity.service'
|
||||||
import { useLocalization } from '@/utils/hooks/useLocalization'
|
import { useLocalization } from '@/utils/hooks/useLocalization'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import { Field, FieldArray, FieldProps, Form, Formik, FormikHelpers } from 'formik'
|
import { Field, FieldArray, FieldProps, Form, Formik, FormikHelpers } from 'formik'
|
||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import { Helmet } from 'react-helmet'
|
import { Helmet } from 'react-helmet'
|
||||||
import { FaLockOpen, FaUser, FaFileAlt, FaTrashAlt } from 'react-icons/fa'
|
import { FaLockOpen, FaUser, FaFileAlt, FaTrashAlt, FaCheckCircle } from 'react-icons/fa'
|
||||||
import { useParams } from 'react-router-dom'
|
import { useParams } from 'react-router-dom'
|
||||||
import * as Yup from 'yup'
|
import * as Yup from 'yup'
|
||||||
import { SelectBoxOption } from '@/types/shared'
|
import { SelectBoxOption, SelectBoxOptionWithGroup } from '@/types/shared'
|
||||||
import { ConfirmDialog, Container } from '@/components/shared'
|
import { ConfirmDialog, Container } from '@/components/shared'
|
||||||
import { AssignedClaimViewModel, UserInfoViewModel } from '@/proxy/admin/models'
|
import { AssignedClaimViewModel, UserInfoViewModel } from '@/proxy/admin/models'
|
||||||
import { APP_NAME } from '@/constants/app.constant'
|
import { APP_NAME } from '@/constants/app.constant'
|
||||||
|
|
@ -115,6 +116,9 @@ function UserDetails() {
|
||||||
<TabNav value="user" icon={<FaUser />}>
|
<TabNav value="user" icon={<FaUser />}>
|
||||||
{translate('::Abp.Identity.User.UserInformation')}
|
{translate('::Abp.Identity.User.UserInformation')}
|
||||||
</TabNav>
|
</TabNav>
|
||||||
|
<TabNav value="permission" icon={<FaCheckCircle />}>
|
||||||
|
{translate('::Abp.Identity.User.Permissions')}
|
||||||
|
</TabNav>
|
||||||
<TabNav value="lockout" icon={<FaLockOpen />}>
|
<TabNav value="lockout" icon={<FaLockOpen />}>
|
||||||
{translate('::Abp.Identity.User.LockoutManagement')}
|
{translate('::Abp.Identity.User.LockoutManagement')}
|
||||||
</TabNav>
|
</TabNav>
|
||||||
|
|
@ -144,14 +148,27 @@ function UserDetails() {
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isSubmitting, values }) => {
|
{({ isSubmitting, values }) => {
|
||||||
const roles = values.roles
|
const departments = values.departments
|
||||||
const branches = values.branches
|
const jobPositions = values.jobPositions
|
||||||
|
|
||||||
|
const departmentOptions: SelectBoxOption[] = departments.map((department) => ({
|
||||||
|
value: department.id,
|
||||||
|
label: department.name,
|
||||||
|
}))
|
||||||
|
|
||||||
|
const jobPositionOptions: SelectBoxOptionWithGroup[] = jobPositions.map(
|
||||||
|
(jobPosition) => ({
|
||||||
|
value: jobPosition.id,
|
||||||
|
label: jobPosition.name,
|
||||||
|
group: jobPosition.departmentId,
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Form>
|
<Form>
|
||||||
<div className="w-1/2">
|
<div className="w-1/2">
|
||||||
<FormContainer size="md">
|
<FormContainer size="md">
|
||||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-4 w-full">
|
<div className="grid grid-cols-1 lg:grid-cols-2 gap-2 w-full">
|
||||||
{/* Personal Information */}
|
{/* Personal Information */}
|
||||||
<div>
|
<div>
|
||||||
<FormItem
|
<FormItem
|
||||||
|
|
@ -179,6 +196,208 @@ function UserDetails() {
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<FormItem
|
||||||
|
label={translate(
|
||||||
|
'::Abp.Identity.User.UserInformation.DepartmentId',
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
<Field type="text" name="departmentId">
|
||||||
|
{({ field, form }: FieldProps<SelectBoxOption>) => (
|
||||||
|
<Select
|
||||||
|
field={field}
|
||||||
|
form={form}
|
||||||
|
options={departmentOptions}
|
||||||
|
isClearable={true}
|
||||||
|
value={departmentOptions.filter(
|
||||||
|
(option) => option.value === values.departmentId,
|
||||||
|
)}
|
||||||
|
onChange={(option) => {
|
||||||
|
form.setFieldValue(field.name, option?.value)
|
||||||
|
form.setFieldValue('jobPositionId', null)
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</Field>
|
||||||
|
</FormItem>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<FormItem
|
||||||
|
label={translate(
|
||||||
|
'::Abp.Identity.User.UserInformation.JobPositionId',
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
<Field type="text" name="jobPositionId">
|
||||||
|
{({ field, form }: FieldProps<SelectBoxOptionWithGroup>) => (
|
||||||
|
<Select
|
||||||
|
field={field}
|
||||||
|
form={form}
|
||||||
|
options={jobPositionOptions.filter(
|
||||||
|
(option) => option.group === values.departmentId,
|
||||||
|
)}
|
||||||
|
isClearable={true}
|
||||||
|
value={jobPositionOptions.filter(
|
||||||
|
(option) => option.value === values.jobPositionId,
|
||||||
|
)}
|
||||||
|
onChange={(option) =>
|
||||||
|
form.setFieldValue(field.name, option?.value)
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</Field>
|
||||||
|
</FormItem>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h6 className="mb-4">
|
||||||
|
{translate(
|
||||||
|
'::Abp.Identity.User.UserInformation.ContactInformation',
|
||||||
|
)}
|
||||||
|
</h6>
|
||||||
|
<FormItem label={translate('::Abp.Account.EmailAddress')}>
|
||||||
|
<Field
|
||||||
|
type="text"
|
||||||
|
disabled
|
||||||
|
name="email"
|
||||||
|
placeholder="Email Address"
|
||||||
|
component={Input}
|
||||||
|
/>
|
||||||
|
</FormItem>
|
||||||
|
<FormItem
|
||||||
|
label={translate('::Abp.Identity.User.UserInformation.PhoneNumber')}
|
||||||
|
>
|
||||||
|
<Field
|
||||||
|
type="text"
|
||||||
|
name="phoneNumber"
|
||||||
|
placeholder={translate(
|
||||||
|
'::Abp.Identity.User.UserInformation.PhoneNumber',
|
||||||
|
)}
|
||||||
|
component={Input}
|
||||||
|
/>
|
||||||
|
</FormItem>
|
||||||
|
<FormItem label={translate('::RocketUsername')}>
|
||||||
|
<Field
|
||||||
|
type="text"
|
||||||
|
name="rocketUsername"
|
||||||
|
placeholder={translate('::RocketUsername')}
|
||||||
|
component={Input}
|
||||||
|
/>
|
||||||
|
</FormItem>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h6 className="mb-4">
|
||||||
|
{translate('::Abp.Identity.User.UserInformation.AccountTimestamps')}
|
||||||
|
</h6>
|
||||||
|
<FormItem
|
||||||
|
label={translate(
|
||||||
|
'::Abp.Identity.User.UserInformation.PasswordChangeTime',
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
<Field name="lastPasswordChangeTime">
|
||||||
|
{({ field, form }: FieldProps) => (
|
||||||
|
<DateTimepicker
|
||||||
|
inputFormat="DD/MM/YYYY HH:mm"
|
||||||
|
field={field}
|
||||||
|
form={form}
|
||||||
|
value={field.value ? dayjs(field.value).toDate() : null}
|
||||||
|
placeholder="Select Date"
|
||||||
|
onChange={(date: any) => {
|
||||||
|
form.setFieldValue(
|
||||||
|
field.name,
|
||||||
|
date ? dayjs(date).format('YYYY-MM-DDTHH:mm:ss') : null,
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</Field>
|
||||||
|
</FormItem>
|
||||||
|
<FormItem
|
||||||
|
label={translate('::Abp.Identity.User.UserInformation.CreateTime')}
|
||||||
|
>
|
||||||
|
<Field name="creationTime">
|
||||||
|
{({ field, form }: FieldProps) => (
|
||||||
|
<Input
|
||||||
|
field={field}
|
||||||
|
form={form}
|
||||||
|
value={
|
||||||
|
field.value
|
||||||
|
? dayjs(field.value).format('DD/MM/YYYY HH:mm')
|
||||||
|
: undefined
|
||||||
|
}
|
||||||
|
disabled
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</Field>
|
||||||
|
</FormItem>
|
||||||
|
<FormItem
|
||||||
|
label={translate('::Abp.Identity.User.UserInformation.UpdateTime')}
|
||||||
|
>
|
||||||
|
<Field name="lastModificationTime">
|
||||||
|
{({ field, form }: FieldProps) => (
|
||||||
|
<Input
|
||||||
|
field={field}
|
||||||
|
form={form}
|
||||||
|
value={
|
||||||
|
field.value
|
||||||
|
? dayjs(field.value).format('DD/MM/YYYY HH:mm')
|
||||||
|
: undefined
|
||||||
|
}
|
||||||
|
disabled
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</Field>
|
||||||
|
</FormItem>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</FormContainer>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="w-1/2">
|
||||||
|
<Button variant="solid" block loading={isSubmitting} type="submit">
|
||||||
|
{isSubmitting ? translate('::SavingWithThreeDot') : translate('::Save')}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</Form>
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
</Formik>
|
||||||
|
</div>
|
||||||
|
</TabContent>
|
||||||
|
|
||||||
|
<TabContent value="permission">
|
||||||
|
<div className="mt-5">
|
||||||
|
<Formik
|
||||||
|
initialValues={userDetails}
|
||||||
|
onSubmit={async (values, { setSubmitting }) => {
|
||||||
|
setSubmitting(true)
|
||||||
|
|
||||||
|
await putUserPermission({ ...values })
|
||||||
|
|
||||||
|
toast.push(
|
||||||
|
<Notification type="success" duration={2000}>
|
||||||
|
{translate('::Abp.Identity.User.SavePermission')}
|
||||||
|
</Notification>,
|
||||||
|
{
|
||||||
|
placement: 'top-end',
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
getUser()
|
||||||
|
|
||||||
|
setSubmitting(false)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{({ isSubmitting, values }) => {
|
||||||
|
const roles = values.roles
|
||||||
|
const branches = values.branches
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Form>
|
||||||
|
<div className="w-1/2">
|
||||||
|
<FormContainer size="md">
|
||||||
|
<div className="grid grid-cols-1 lg:grid-cols-2 gap-4 w-full">
|
||||||
{/* Şube Management */}
|
{/* Şube Management */}
|
||||||
<div>
|
<div>
|
||||||
<h6 className="mb-4">
|
<h6 className="mb-4">
|
||||||
|
|
@ -242,142 +461,12 @@ function UserDetails() {
|
||||||
</FieldArray>
|
</FieldArray>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
|
||||||
<FormItem
|
|
||||||
label={translate(
|
|
||||||
'::Abp.Identity.User.UserInformation.DepartmentId',
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<Field
|
|
||||||
type="text"
|
|
||||||
name="departmentId"
|
|
||||||
placeholder="Department"
|
|
||||||
component={Input}
|
|
||||||
/>
|
|
||||||
</FormItem>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<FormItem
|
|
||||||
label={translate(
|
|
||||||
'::Abp.Identity.User.UserInformation.JobPositionId',
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<Field
|
|
||||||
type="text"
|
|
||||||
name="jobPositionId"
|
|
||||||
placeholder="Job Position"
|
|
||||||
component={Input}
|
|
||||||
/>
|
|
||||||
</FormItem>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Contact Information */}
|
|
||||||
<div>
|
|
||||||
<h6 className="mb-4">
|
|
||||||
{translate(
|
|
||||||
'::Abp.Identity.User.UserInformation.ContactInformation',
|
|
||||||
)}
|
|
||||||
</h6>
|
|
||||||
<FormItem label={translate('::Abp.Account.EmailAddress')}>
|
|
||||||
<Field
|
|
||||||
type="text"
|
|
||||||
disabled
|
|
||||||
name="email"
|
|
||||||
placeholder="Email Address"
|
|
||||||
component={Input}
|
|
||||||
/>
|
|
||||||
</FormItem>
|
|
||||||
<FormItem
|
|
||||||
label={translate('::Abp.Identity.User.UserInformation.PhoneNumber')}
|
|
||||||
>
|
|
||||||
<Field
|
|
||||||
type="text"
|
|
||||||
name="phoneNumber"
|
|
||||||
placeholder={translate(
|
|
||||||
'::Abp.Identity.User.UserInformation.PhoneNumber',
|
|
||||||
)}
|
|
||||||
component={Input}
|
|
||||||
/>
|
|
||||||
</FormItem>
|
|
||||||
<FormItem label={translate('::RocketUsername')}>
|
|
||||||
<Field
|
|
||||||
type="text"
|
|
||||||
name="rocketUsername"
|
|
||||||
placeholder={translate('::RocketUsername')}
|
|
||||||
component={Input}
|
|
||||||
/>
|
|
||||||
</FormItem>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Account Timestamps */}
|
|
||||||
<div>
|
|
||||||
<h6 className="mb-4">
|
|
||||||
{translate('::Abp.Identity.User.UserInformation.AccountTimestamps')}
|
|
||||||
</h6>
|
|
||||||
<FormItem
|
|
||||||
label={translate(
|
|
||||||
'::Abp.Identity.User.UserInformation.PasswordChangeTime',
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<Field name="lastPasswordChangeTime">
|
|
||||||
{({ field, form }: FieldProps) => (
|
|
||||||
<DateTimepicker
|
|
||||||
inputFormat="DD/MM/YYYY HH:mm"
|
|
||||||
field={field}
|
|
||||||
form={form}
|
|
||||||
value={field.value ? dayjs(field.value).toDate() : null}
|
|
||||||
placeholder="Select Date"
|
|
||||||
onChange={(date: any) => {
|
|
||||||
form.setFieldValue(
|
|
||||||
field.name,
|
|
||||||
date ? dayjs(date).format('YYYY-MM-DDTHH:mm:ss') : null,
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</Field>
|
|
||||||
</FormItem>
|
|
||||||
<FormItem
|
|
||||||
label={translate('::Abp.Identity.User.UserInformation.CreateTime')}
|
|
||||||
>
|
|
||||||
<Field name="creationTime">
|
|
||||||
{({ field, form }: FieldProps) => (
|
|
||||||
<Input
|
|
||||||
field={field}
|
|
||||||
form={form}
|
|
||||||
value={
|
|
||||||
field.value ? dayjs(field.value).format('DD/MM/YYYY HH:mm') : undefined
|
|
||||||
}
|
|
||||||
disabled
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</Field>
|
|
||||||
</FormItem>
|
|
||||||
<FormItem
|
|
||||||
label={translate('::Abp.Identity.User.UserInformation.UpdateTime')}
|
|
||||||
>
|
|
||||||
<Field name="lastModificationTime">
|
|
||||||
{({ field, form }: FieldProps) => (
|
|
||||||
<Input
|
|
||||||
field={field}
|
|
||||||
form={form}
|
|
||||||
value={
|
|
||||||
field.value ? dayjs(field.value).format('DD/MM/YYYY HH:mm') : undefined
|
|
||||||
}
|
|
||||||
disabled
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</Field>
|
|
||||||
</FormItem>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</FormContainer>
|
</FormContainer>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div className="w-1/2 mt-4">
|
||||||
<Button variant="solid" loading={isSubmitting} type="submit">
|
<Button variant="solid" block loading={isSubmitting} type="submit">
|
||||||
{isSubmitting ? translate('::SavingWithThreeDot') : translate('::Save')}
|
{isSubmitting ? translate('::SavingWithThreeDot') : translate('::Save')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -387,6 +476,7 @@ function UserDetails() {
|
||||||
</Formik>
|
</Formik>
|
||||||
</div>
|
</div>
|
||||||
</TabContent>
|
</TabContent>
|
||||||
|
|
||||||
<TabContent value="lockout">
|
<TabContent value="lockout">
|
||||||
<div className="mt-5">
|
<div className="mt-5">
|
||||||
<Formik
|
<Formik
|
||||||
|
|
@ -398,7 +488,7 @@ function UserDetails() {
|
||||||
|
|
||||||
toast.push(
|
toast.push(
|
||||||
<Notification type="success" duration={2000}>
|
<Notification type="success" duration={2000}>
|
||||||
{'Lockout bilgileri kaydedildi.'}
|
{translate('::Abp.Identity.User.SaveLockout')}
|
||||||
</Notification>,
|
</Notification>,
|
||||||
{
|
{
|
||||||
placement: 'top-end',
|
placement: 'top-end',
|
||||||
|
|
@ -422,7 +512,7 @@ function UserDetails() {
|
||||||
<Form>
|
<Form>
|
||||||
<div className="w-1/2">
|
<div className="w-1/2">
|
||||||
<FormContainer size="md">
|
<FormContainer size="md">
|
||||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-4 w-full">
|
<div className="grid grid-cols-1 lg:grid-cols-2 gap-2 w-full">
|
||||||
{/* Account Status */}
|
{/* Account Status */}
|
||||||
<div>
|
<div>
|
||||||
<h6 className="mb-4">
|
<h6 className="mb-4">
|
||||||
|
|
@ -665,8 +755,8 @@ function UserDetails() {
|
||||||
</FormContainer>
|
</FormContainer>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div className="w-1/2">
|
||||||
<Button variant="solid" loading={isSubmitting} type="submit">
|
<Button variant="solid" block loading={isSubmitting} type="submit">
|
||||||
{isSubmitting ? translate('::SavingWithThreeDot') : translate('::Save')}
|
{isSubmitting ? translate('::SavingWithThreeDot') : translate('::Save')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue