Merge remote-tracking branch 'devops.sozsoft.com/main'
This commit is contained in:
commit
0878da4a36
32 changed files with 5249 additions and 330 deletions
|
|
@ -403,6 +403,7 @@ namespace Kurs.Platform.Charts.Dto
|
|||
}
|
||||
|
||||
public bool IsTenant { get; set; }
|
||||
public bool IsBranch { get; set; }
|
||||
public bool IsOrganizationUnit { get; set; }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
using System;
|
||||
|
||||
namespace Kurs.Platform.Identity.Dto;
|
||||
|
||||
public class AssignedBranchViewModel
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public bool IsAssigned { get; set; }
|
||||
}
|
||||
|
|
@ -36,6 +36,8 @@ public class UserInfoViewModel: ExtensibleObject
|
|||
|
||||
public AssignedRoleViewModel[] Roles { get; set; }
|
||||
|
||||
public AssignedBranchViewModel[] Branches { get; set; }
|
||||
|
||||
public bool LockUser { get; set; }
|
||||
|
||||
public DateTimeOffset? LastPasswordChangeTime { get; set; }
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ public class ListFormsDto : AuditedEntityDto<Guid>
|
|||
public string Description { get; set; } // Liste aciklamasi
|
||||
public string Title { get; set; } // Liste basligi
|
||||
public bool IsTenant { get; set; } // Liste formun Tenant durumu
|
||||
public bool IsBranch { get; set; } // Liste formun Branch durumu
|
||||
public bool IsOrganizationUnit { get; set; } // Liste formun Organization Unit durumu
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -268,6 +268,10 @@ public class GridOptionsDto : AuditedEntityDto<Guid>
|
|||
/// </summary>
|
||||
public bool IsTenant { get; set; }
|
||||
/// <summary>
|
||||
/// Liste formların branch çalışıp çalışmadığını ifade eder.
|
||||
/// </summary>
|
||||
public bool IsBranch { get; set; } = false;
|
||||
/// <summary>
|
||||
/// Liste formların ou'lu çalışıp çalışmadığını ifade eder.
|
||||
/// </summary>
|
||||
public bool IsOrganizationUnit { get; set; } = false;
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ public class ChartsAppService : CrudAppService<
|
|||
entity.CultureName = updateInput.CultureName;
|
||||
entity.DataSourceCode = updateInput.DataSourceCode;
|
||||
entity.IsTenant = updateInput.IsTenant;
|
||||
entity.IsBranch = updateInput.IsBranch;
|
||||
entity.IsOrganizationUnit = updateInput.IsOrganizationUnit;
|
||||
|
||||
entity.CommonJson = JsonSerializer.Serialize(updateInput.CommonDto);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Kurs.Platform.Entities;
|
||||
using Kurs.Platform.Extensions;
|
||||
using Kurs.Platform.Identity.Dto;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
|
|
@ -18,18 +19,23 @@ public class PlatformIdentityAppService : ApplicationService
|
|||
public IIdentityUserAppService IdentityUserAppService { get; }
|
||||
private readonly IIdentityUserRepository identityUserRepository;
|
||||
public IRepository<PermissionDefinitionRecord, Guid> permissionRepository { get; }
|
||||
|
||||
public IRepository<Branch, Guid> branchRepository { get; }
|
||||
public IRepository<BranchUsers, Guid> branchUsersRepository { get; }
|
||||
public IdentityUserManager UserManager { get; set; }
|
||||
|
||||
public PlatformIdentityAppService(
|
||||
IIdentityUserAppService identityUserAppService,
|
||||
IIdentityUserRepository identityUserRepository,
|
||||
IRepository<PermissionDefinitionRecord, Guid> permissionRepository
|
||||
IRepository<PermissionDefinitionRecord, Guid> permissionRepository,
|
||||
IRepository<Branch, Guid> branchRepository,
|
||||
IRepository<BranchUsers, Guid> branchUsersRepository
|
||||
)
|
||||
{
|
||||
this.IdentityUserAppService = identityUserAppService;
|
||||
this.identityUserRepository = identityUserRepository;
|
||||
this.permissionRepository = permissionRepository;
|
||||
this.branchRepository = branchRepository;
|
||||
this.branchUsersRepository = branchUsersRepository;
|
||||
}
|
||||
|
||||
public async Task<UserInfoViewModel> GetByIdAsync(Guid UserId)
|
||||
|
|
@ -46,6 +52,19 @@ public class PlatformIdentityAppService : ApplicationService
|
|||
}
|
||||
}
|
||||
|
||||
var query = await branchUsersRepository.GetQueryableAsync();
|
||||
var branchUsers = query.Where(a => a.UserId == UserId).Select(r => r.BranchId).ToList();
|
||||
var currentTenantId = CurrentTenant.Id.HasValue ? CurrentTenant.Id : null;
|
||||
|
||||
var branchList = await branchRepository.GetListAsync(a=> a.TenantId == currentTenantId);
|
||||
var branches = branchList.Select(branch => new AssignedBranchViewModel
|
||||
{
|
||||
Id = branch.Id,
|
||||
Name = branch.Name,
|
||||
IsAssigned = branchUsers.Contains(branch.Id)
|
||||
})
|
||||
.ToArray();
|
||||
|
||||
return new UserInfoViewModel()
|
||||
{
|
||||
Id = user.Id,
|
||||
|
|
@ -53,6 +72,7 @@ public class PlatformIdentityAppService : ApplicationService
|
|||
Name = user.Name,
|
||||
Surname = user.Surname,
|
||||
Roles = roles,
|
||||
Branches = branches,
|
||||
Email = user.Email,
|
||||
PhoneNumber = user.PhoneNumber,
|
||||
IsActive = user.IsActive,
|
||||
|
|
@ -126,6 +146,29 @@ public class PlatformIdentityAppService : ApplicationService
|
|||
user.SetRocketUsername(UserInfo.RocketUsername);
|
||||
|
||||
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()
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ using static Kurs.Platform.PlatformConsts;
|
|||
|
||||
namespace Kurs.Platform.ListForms.Administration;
|
||||
|
||||
[Authorize(PlatformConsts.AppCodes.Listforms.Listform)]
|
||||
[Authorize(AppCodes.Listforms.Listform)]
|
||||
public class ListFormsAppService : CrudAppService<
|
||||
ListForm,
|
||||
GridOptionsDto,
|
||||
|
|
@ -28,9 +28,9 @@ public class ListFormsAppService : CrudAppService<
|
|||
{
|
||||
authManager = _authManager;
|
||||
|
||||
CreatePolicyName = $"{PlatformConsts.AppCodes.Listforms.Listform}.Create";
|
||||
UpdatePolicyName = $"{PlatformConsts.AppCodes.Listforms.Listform}.Update";
|
||||
DeletePolicyName = $"{PlatformConsts.AppCodes.Listforms.Listform}.Delete";
|
||||
CreatePolicyName = $"{AppCodes.Listforms.Listform}.Create";
|
||||
UpdatePolicyName = $"{AppCodes.Listforms.Listform}.Update";
|
||||
DeletePolicyName = $"{AppCodes.Listforms.Listform}.Delete";
|
||||
}
|
||||
|
||||
public async Task<GridOptionsEditDto> GetByListFormCodeAsync(string listFormCode)
|
||||
|
|
@ -76,6 +76,7 @@ public class ListFormsAppService : CrudAppService<
|
|||
item.KeyFieldName = input.KeyFieldName;
|
||||
item.KeyFieldDbSourceType = input.KeyFieldDbSourceType;
|
||||
item.IsTenant = input.IsTenant;
|
||||
item.IsBranch = input.IsBranch;
|
||||
item.IsOrganizationUnit = input.IsOrganizationUnit;
|
||||
}
|
||||
else if (input.EditType == ListFormEditTabs.Database.Select.SelectForm)
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormTenants.ListFormCode,
|
||||
|
|
@ -310,7 +310,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormTenants.ListFormCode,
|
||||
|
|
@ -337,7 +337,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormTenants.ListFormCode,
|
||||
|
|
@ -364,7 +364,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormTenants.ListFormCode,
|
||||
|
|
@ -391,7 +391,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormTenants.ListFormCode,
|
||||
|
|
@ -580,7 +580,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormTenants.ListFormCode,
|
||||
|
|
@ -2229,7 +2229,6 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
SendOnlyChangedFormValuesUpdate = false,
|
||||
}),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||
//Items=["Code","DisplayName","Order","Url","Icon","ParentCode","CssClass","RequiredPermissionName","Target","IsDisabled","ElementId"] },
|
||||
new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=
|
||||
[
|
||||
new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||
|
|
@ -7761,5 +7760,615 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
]);
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region Branches
|
||||
var listFormBranches = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Branch,
|
||||
Name = AppCodes.Branches,
|
||||
Title = AppCodes.Branches,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = AppCodes.Branches,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = DbTablePrefix + "Branch",
|
||||
KeyFieldName = "Id",
|
||||
KeyFieldDbSourceType = DbType.Guid,
|
||||
DefaultFilter = "\"IsDeleted\" = 'false'",
|
||||
SortMode = GridOptions.SortModeSingle,
|
||||
FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto
|
||||
{
|
||||
Visible = true
|
||||
}),
|
||||
HeaderFilterJson = JsonSerializer.Serialize(new
|
||||
{
|
||||
Visible = true
|
||||
}),
|
||||
SearchPanelJson = JsonSerializer.Serialize(new
|
||||
{
|
||||
Visible = true
|
||||
}),
|
||||
GroupPanelJson = JsonSerializer.Serialize(new
|
||||
{
|
||||
Visible = true
|
||||
}),
|
||||
SelectionJson = JsonSerializer.Serialize(new SelectionDto
|
||||
{
|
||||
Mode = GridOptions.SelectionModeSingle,
|
||||
AllowSelectAll = false
|
||||
}),
|
||||
ColumnOptionJson = JsonSerializer.Serialize(new
|
||||
{
|
||||
ColumnFixingEnabled = true,
|
||||
ColumnChooserEnabled = true
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto
|
||||
{
|
||||
C = AppCodes.Branches + ".Create",
|
||||
R = AppCodes.Branches,
|
||||
U = AppCodes.Branches + ".Update",
|
||||
D = AppCodes.Branches + ".Delete",
|
||||
E = AppCodes.Branches + ".Export"
|
||||
}),
|
||||
PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto
|
||||
{
|
||||
Visible = true,
|
||||
AllowedPageSizes = "10,20,50,100",
|
||||
ShowPageSizeSelector = true,
|
||||
ShowNavigationButtons = true,
|
||||
ShowInfo = false,
|
||||
InfoText = "Page {0} of {1} ({2} items)",
|
||||
DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive,
|
||||
ScrollingMode = GridColumnOptions.ScrollingModeStandard,
|
||||
LoadPanelEnabled = "auto",
|
||||
LoadPanelText = "Loading..."
|
||||
}),
|
||||
EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto
|
||||
{
|
||||
Popup = new GridEditingPopupDto()
|
||||
{
|
||||
Title = "Branch Form",
|
||||
Width = 500,
|
||||
Height = 550
|
||||
},
|
||||
AllowDeleting = true,
|
||||
AllowAdding = true,
|
||||
AllowUpdating = true,
|
||||
SendOnlyChangedFormValuesUpdate = false,
|
||||
}),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
||||
{
|
||||
new() { Order=1, ColCount=1, ColSpan=2, ItemType="group", Items =
|
||||
[
|
||||
new EditingFormItemDto { Order=1, DataField="TenantId", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions="{ \"showClearButton\" : true }" },
|
||||
new EditingFormItemDto { Order=2, DataField="Code", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
|
||||
new EditingFormItemDto { Order=3, DataField="Name", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
|
||||
new EditingFormItemDto { Order=4, DataField="VknTckn", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxNumberBox, EditorOptions="{ \"showClearButton\" : true }" },
|
||||
new EditingFormItemDto { Order=5, DataField="TaxOffice", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
|
||||
new EditingFormItemDto { Order=6, DataField="Mobile", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxNumberBox },
|
||||
new EditingFormItemDto { Order=7, DataField="Phone", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxNumberBox },
|
||||
new EditingFormItemDto { Order=8, DataField="Fax", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
|
||||
new EditingFormItemDto { Order=9, DataField="IsActive", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxCheckBox },
|
||||
]
|
||||
},
|
||||
new() { Order=2, ColCount=1, ColSpan=2, ItemType="group", Items =
|
||||
[
|
||||
new EditingFormItemDto { Order=1, DataField="Address", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
|
||||
new EditingFormItemDto { Order=2, DataField="Address2", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
|
||||
new EditingFormItemDto { Order=3, DataField="City", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
|
||||
new EditingFormItemDto { Order=4, DataField="District", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
|
||||
new EditingFormItemDto { Order=5, DataField="PostalCode", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
|
||||
new EditingFormItemDto { Order=6, DataField="Email", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
|
||||
new EditingFormItemDto { Order=7, DataField="Website", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
|
||||
]
|
||||
}
|
||||
}),
|
||||
DeleteCommand = $"UPDATE \"{DbTablePrefix}Branch\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
|
||||
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() {
|
||||
FieldName = "DeleterId",
|
||||
FieldDbType = DbType.Guid,
|
||||
Value = "@USERID",
|
||||
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
|
||||
new() {
|
||||
FieldName = "Id",
|
||||
FieldDbType = DbType.Guid,
|
||||
Value = "@ID",
|
||||
CustomValueType = FieldCustomValueTypeEnum.CustomKey }
|
||||
}),
|
||||
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new FieldsDefaultValue() {
|
||||
FieldName = "CreationTime",
|
||||
FieldDbType = DbType.DateTime,
|
||||
Value = "@NOW",
|
||||
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
|
||||
new FieldsDefaultValue() {
|
||||
FieldName = "CreatorId",
|
||||
FieldDbType = DbType.Guid,
|
||||
Value = "@USERID",
|
||||
CustomValueType = FieldCustomValueTypeEnum.CustomKey }
|
||||
}),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() {
|
||||
FieldName = "IsActive",
|
||||
FieldDbType = DbType.Boolean,
|
||||
Value = "true",
|
||||
CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||
})
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
#region Branches Fields
|
||||
await _listFormFieldRepository.InsertManyAsync(
|
||||
[
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormBranches.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "Id",
|
||||
Width = 500,
|
||||
ListOrderNo = 0,
|
||||
Visible = false,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Branches + ".Create",
|
||||
R = AppCodes.Branches,
|
||||
U = AppCodes.Branches + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormBranches.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "TenantId",
|
||||
Width = 200,
|
||||
ListOrderNo = 1,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
||||
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||
DisplayExpr = "Name",
|
||||
ValueExpr = "Key",
|
||||
LookupQuery = $"SELECT \"AbpTenants\".\"Id\" AS \"Key\", \"AbpTenants\".\"Name\" as \"Name\" FROM \"AbpTenants\" ORDER BY \"AbpTenants\".\"Name\"",
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Branches + ".Create",
|
||||
R = AppCodes.Branches,
|
||||
U = AppCodes.Branches + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormBranches.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Code",
|
||||
Width = 100,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Branches + ".Create",
|
||||
R = AppCodes.Branches,
|
||||
U = AppCodes.Branches + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormBranches.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Name",
|
||||
Width = 200,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Branches + ".Create",
|
||||
R = AppCodes.Branches,
|
||||
U = AppCodes.Branches + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormBranches.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "VknTckn",
|
||||
Width = 100,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Branches + ".Create",
|
||||
R = AppCodes.Branches,
|
||||
U = AppCodes.Branches + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormBranches.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "TaxOffice",
|
||||
Width = 150,
|
||||
ListOrderNo = 5,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Branches + ".Create",
|
||||
R = AppCodes.Branches,
|
||||
U = AppCodes.Branches + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormBranches.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Address",
|
||||
Width = 150,
|
||||
ListOrderNo = 6,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Branches + ".Create",
|
||||
R = AppCodes.Branches,
|
||||
U = AppCodes.Branches + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormBranches.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Address2",
|
||||
Width = 150,
|
||||
ListOrderNo = 7,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Branches + ".Create",
|
||||
R = AppCodes.Branches,
|
||||
U = AppCodes.Branches + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormBranches.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "City",
|
||||
Width = 100,
|
||||
ListOrderNo = 8,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Branches + ".Create",
|
||||
R = AppCodes.Branches,
|
||||
U = AppCodes.Branches + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormBranches.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "District",
|
||||
Width = 100,
|
||||
ListOrderNo = 9,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Branches + ".Create",
|
||||
R = AppCodes.Branches,
|
||||
U = AppCodes.Branches + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormBranches.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "PostalCode",
|
||||
Width = 100,
|
||||
ListOrderNo = 10,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Branches + ".Create",
|
||||
R = AppCodes.Branches,
|
||||
U = AppCodes.Branches + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormBranches.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Email",
|
||||
Width = 170,
|
||||
ListOrderNo = 11,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Branches + ".Create",
|
||||
R = AppCodes.Branches,
|
||||
U = AppCodes.Branches + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormBranches.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Website",
|
||||
Width = 170,
|
||||
ListOrderNo = 12,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Branches + ".Create",
|
||||
R = AppCodes.Branches,
|
||||
U = AppCodes.Branches + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormBranches.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Mobile",
|
||||
Width = 100,
|
||||
ListOrderNo = 13,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Branches + ".Create",
|
||||
R = AppCodes.Branches,
|
||||
U = AppCodes.Branches + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormBranches.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Phone",
|
||||
Width = 100,
|
||||
ListOrderNo = 14,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Branches + ".Create",
|
||||
R = AppCodes.Branches,
|
||||
U = AppCodes.Branches + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormBranches.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Fax",
|
||||
Width = 100,
|
||||
ListOrderNo = 15,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Branches + ".Create",
|
||||
R = AppCodes.Branches,
|
||||
U = AppCodes.Branches + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormBranches.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Boolean,
|
||||
FieldName = "IsActive",
|
||||
Width = 100,
|
||||
ListOrderNo = 16,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Branches + ".Create",
|
||||
R = AppCodes.Branches,
|
||||
U = AppCodes.Branches + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
]);
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ public class MenuSeeder : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
Code = TenantManagementPermissions.Tenants.Default,
|
||||
DisplayName = TenantManagementPermissions.Tenants.Default,
|
||||
Order = -1,
|
||||
Order = -2,
|
||||
IsDisabled = false,
|
||||
ParentCode = menuAdministration.Code,
|
||||
Icon = "FcDepartment",
|
||||
|
|
@ -98,6 +98,22 @@ public class MenuSeeder : IDataSeedContributor, ITransientDependency
|
|||
RequiredPermissionName = TenantManagementPermissions.Tenants.Default
|
||||
});
|
||||
|
||||
//Branch Management
|
||||
await _repository.InsertAsync(new Menu
|
||||
{
|
||||
Code = AppCodes.Branches,
|
||||
DisplayName = AppCodes.Branches,
|
||||
Order = -1,
|
||||
IsDisabled = false,
|
||||
ParentCode = menuAdministration.Code,
|
||||
Icon = "FcShop",
|
||||
Target = null,
|
||||
ElementId = null,
|
||||
CssClass = null,
|
||||
Url = $"/list/{PlatformConsts.ListFormCodes.Branch}",
|
||||
RequiredPermissionName = AppCodes.Branches
|
||||
});
|
||||
|
||||
//Setting Management
|
||||
var menuSettings = await _repository.InsertAsync(new Menu
|
||||
{
|
||||
|
|
|
|||
|
|
@ -868,7 +868,40 @@ public class PermissionSeeder : IDataSeedContributor, ITransientDependency
|
|||
MultiTenancySides.Both
|
||||
));
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region Branches
|
||||
await repositoryGroup.InsertAsync(new PermissionGroupDefinitionRecord
|
||||
{
|
||||
Name = AppCodes.Branches,
|
||||
DisplayName = AppCodes.Branches
|
||||
});
|
||||
|
||||
var permBranches = await repository.InsertAsync(
|
||||
GetNewPermission(
|
||||
AppCodes.Branches,
|
||||
AppCodes.Branches,
|
||||
AppCodes.Branches,
|
||||
null,
|
||||
true,
|
||||
MultiTenancySides.Host
|
||||
));
|
||||
|
||||
foreach (var item in CUDE)
|
||||
{
|
||||
permissionName = AppCodes.Branches + "." + item;
|
||||
|
||||
await repository.InsertAsync(
|
||||
GetNewPermission(
|
||||
AppCodes.Branches,
|
||||
permissionName,
|
||||
item,
|
||||
permBranches.Name,
|
||||
true,
|
||||
MultiTenancySides.Host
|
||||
));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
public static PermissionDefinitionRecord GetNewPermission(
|
||||
|
|
|
|||
|
|
@ -642,6 +642,12 @@
|
|||
"en": "Tenant Management",
|
||||
"tr": "Tenant Management"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Branches",
|
||||
"en": "Branches",
|
||||
"tr": "Şubeler"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "AbpTenantManagement.Tenants",
|
||||
|
|
@ -1956,6 +1962,42 @@
|
|||
"en": "Role Management",
|
||||
"tr": "Rol Yönetimi"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Abp.Identity.User.UserInformation.BranchManagement",
|
||||
"en": "Branch Management",
|
||||
"tr": "Şube Yönetimi"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Abp.Identity.User.UserInformation.PersonalInformation",
|
||||
"en": "Personal Information",
|
||||
"tr": "Kişisel Bilgiler"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Abp.Identity.User.UserInformation.ContactInformation",
|
||||
"en": "Contact Information",
|
||||
"tr": "İletişim Bilgileri"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Abp.Identity.User.UserInformation.AccountTimestamps",
|
||||
"en": "Account Timestamps",
|
||||
"tr": "Zaman Damgaları"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Abp.Identity.User.LockoutManagement.AccountStatus",
|
||||
"en": "Account Status",
|
||||
"tr": "Hesap Durumları"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Abp.Identity.User.LockoutManagement.LoginAndLockoutSettings",
|
||||
"en": "Login And Lockout Settings",
|
||||
"tr": "Giriş ve Kilit Ayarları"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Abp.Identity.User.UserInformation.EmailAddress",
|
||||
|
|
@ -2800,13 +2842,19 @@
|
|||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.IsTenant",
|
||||
"en": "Is Tenant",
|
||||
"tr": "Is Tenant"
|
||||
"tr": "Tenant mı?"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.IsBranch",
|
||||
"en": "Is Branch",
|
||||
"tr": "Şube mi?"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.IsOrganizationUnit",
|
||||
"en": "Is Organization Unit",
|
||||
"tr": "Is Organization Unit"
|
||||
"tr": "Organizasyon Şeması mı?"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
|
|
|
|||
|
|
@ -328,6 +328,7 @@ public static class PlatformConsts
|
|||
public const string SecurityLog = "List-0019";
|
||||
public const string AuditLog = "List-0020";
|
||||
public const string EntityChange = "List-0021";
|
||||
public const string Branch = "List-0022";
|
||||
public const string ListformField = "List-1000";
|
||||
public const string Order = "List-Order";
|
||||
public const string Complaint = "List-Complaint";
|
||||
|
|
|
|||
|
|
@ -363,6 +363,7 @@ public static class SeedConsts
|
|||
public const string PublicApis = Prefix.App + ".PublicApis";
|
||||
public const string AuditLogs = Prefix.App + ".AuditLogs";
|
||||
public const string EntityChanges = Prefix.App + ".EntityChanges";
|
||||
public const string Branches = Prefix.App + ".Branches";
|
||||
}
|
||||
|
||||
public static class DataSources
|
||||
|
|
|
|||
26
api/src/Kurs.Platform.Domain/Entities/Branch.cs
Normal file
26
api/src/Kurs.Platform.Domain/Entities/Branch.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Kurs.Platform.Entities;
|
||||
|
||||
public class Branch : FullAuditedEntity<Guid>
|
||||
{
|
||||
public Guid TenantId { get; set; }
|
||||
public string Code { get; set; }
|
||||
public string Name { get; set; }
|
||||
public long VknTckn { get; set; }
|
||||
public string TaxOffice { get; set; }
|
||||
public string Address { get; set; }
|
||||
public string Address2 { get; set; }
|
||||
public string District { get; set; }
|
||||
public string City { get; set; }
|
||||
public string PostalCode { get; set; }
|
||||
public long? Phone { get; set; }
|
||||
public long Mobile { get; set; }
|
||||
public long? Fax { get; set; }
|
||||
public string Email { get; set; }
|
||||
public string Website { get; set; }
|
||||
public bool? IsActive { get; set; }
|
||||
public ICollection<BranchUsers> BranchUsers { get; set; }
|
||||
}
|
||||
14
api/src/Kurs.Platform.Domain/Entities/BranchUsers.cs
Normal file
14
api/src/Kurs.Platform.Domain/Entities/BranchUsers.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Kurs.Platform.Entities;
|
||||
using Volo.Abp.Domain.Entities;
|
||||
|
||||
public class BranchUsers : Entity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid UserId { get; set; }
|
||||
public Guid BranchId { get; set; }
|
||||
public Guid? TenantId { get; set; }
|
||||
public Branch Branch { get; set; }
|
||||
Guid? IMultiTenant.TenantId => TenantId;
|
||||
}
|
||||
|
|
@ -119,6 +119,10 @@ public class Chart : FullAuditedEntity<Guid>
|
|||
/// </summary>
|
||||
public bool IsTenant { get; set; } = PlatformConsts.IsMultiTenant;
|
||||
|
||||
/// <summary>
|
||||
/// Liste formların şubeli'lu çalışıp çalışmadığını ifade eder.
|
||||
/// </summary>
|
||||
public bool IsBranch { get; set; } = false;
|
||||
/// <summary>
|
||||
/// Liste formların ou'lu çalışıp çalışmadığını ifade eder.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -97,6 +97,11 @@ public class ListForm : FullAuditedEntity<Guid>
|
|||
/// </summary>
|
||||
public bool IsTenant { get; set; } = PlatformConsts.IsMultiTenant;
|
||||
|
||||
/// <summary>
|
||||
/// Liste formların branch çalışıp çalışmadığını ifade eder.
|
||||
/// </summary>
|
||||
public bool IsBranch { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Liste formların ou'lu çalışıp çalışmadığını ifade eder.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ public class ListFormManager : PlatformDomainService, IListFormManager
|
|||
private readonly IRepository<ListForm, Guid> listFormRepository;
|
||||
private readonly IDefaultValueManager defaultValueManager;
|
||||
private readonly IPlatformOuRepository ouRepository;
|
||||
private readonly IRepository<BranchUsers, Guid> branchUsersRepository;
|
||||
private readonly string cultureName;
|
||||
private readonly string cultureNameDefault;
|
||||
|
||||
|
|
@ -48,12 +49,14 @@ public class ListFormManager : PlatformDomainService, IListFormManager
|
|||
IListFormAuthorizationManager authManager,
|
||||
IRepository<ListForm, Guid> listFormRepository,
|
||||
IDefaultValueManager defaultValueManager,
|
||||
IPlatformOuRepository ouRepository)
|
||||
IPlatformOuRepository ouRepository,
|
||||
IRepository<BranchUsers, Guid> branchUsersRepository)
|
||||
: base(settingProvider, localizer, currentUser, objectMapper, authManager)
|
||||
{
|
||||
this.listFormRepository = listFormRepository;
|
||||
this.defaultValueManager = defaultValueManager;
|
||||
this.ouRepository = ouRepository;
|
||||
this.branchUsersRepository = branchUsersRepository;
|
||||
cultureName = CultureInfo.CurrentUICulture.Name;
|
||||
cultureNameDefault = PlatformConsts.DefaultLanguage;
|
||||
}
|
||||
|
|
@ -127,6 +130,19 @@ public class ListFormManager : PlatformDomainService, IListFormManager
|
|||
}
|
||||
}
|
||||
|
||||
if (listForm.IsBranch)
|
||||
{
|
||||
var ids = await branchUsersRepository.GetListAsync((a) => a.UserId == CurrentUser.Id.Value);
|
||||
if (ids.Count > 0)
|
||||
{
|
||||
fields.Add("BranchId", $"IN ({string.Join(",", ids.Select(a => $"'{a.BranchId}'"))})");
|
||||
}
|
||||
else
|
||||
{
|
||||
fields.Add("BranchId", $"IN ('{Guid.Empty}')");
|
||||
}
|
||||
}
|
||||
|
||||
if (listForm.IsOrganizationUnit)
|
||||
{
|
||||
var ids = await ouRepository.GetOrganizationUnitIdsWithChildren(CurrentUser.Id.Value);
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ using Kurs.Platform.ListForms;
|
|||
using Kurs.Platform.Localization;
|
||||
using Kurs.Platform.OrganizationUnits;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Volo.Abp.Domain.Repositories;
|
||||
using Volo.Abp.ObjectMapping;
|
||||
using Volo.Abp.Settings;
|
||||
using Volo.Abp.Users;
|
||||
|
|
@ -103,6 +104,7 @@ public class SelectQueryManager : PlatformDomainService, ISelectQueryManager
|
|||
public bool IsAppliedGridFilter { get; private set; }
|
||||
public bool IsAppliedServerFilter { get; private set; }
|
||||
public IPlatformOuRepository OuRepository { get; }
|
||||
public IRepository<BranchUsers, Guid> BranchUsersRepository { get; }
|
||||
|
||||
public SelectQueryManager(
|
||||
ISettingProvider settingProvider,
|
||||
|
|
@ -110,7 +112,8 @@ public class SelectQueryManager : PlatformDomainService, ISelectQueryManager
|
|||
ICurrentUser currentUser,
|
||||
IObjectMapper objectMapper,
|
||||
IListFormAuthorizationManager authManager,
|
||||
IPlatformOuRepository ouRepository)
|
||||
IPlatformOuRepository ouRepository,
|
||||
IRepository<BranchUsers, Guid> branchUsersRepository)
|
||||
: base(settingProvider, localizer, currentUser, objectMapper, authManager)
|
||||
{
|
||||
SelectFields = [];
|
||||
|
|
@ -119,6 +122,7 @@ public class SelectQueryManager : PlatformDomainService, ISelectQueryManager
|
|||
SortParts = [];
|
||||
SummaryQueries = [];
|
||||
OuRepository = ouRepository;
|
||||
BranchUsersRepository = branchUsersRepository;
|
||||
}
|
||||
|
||||
public void PrepareQueries(ListForm listform,
|
||||
|
|
@ -396,6 +400,24 @@ public class SelectQueryManager : PlatformDomainService, ISelectQueryManager
|
|||
}
|
||||
}
|
||||
|
||||
if (listform.IsBranch)
|
||||
{
|
||||
if (whereParts.Any())
|
||||
{
|
||||
whereParts.Add("AND");
|
||||
}
|
||||
|
||||
var ids = BranchUsersRepository.GetListAsync((a) => a.UserId == CurrentUser.Id.Value).Result;
|
||||
if (ids.Count > 0)
|
||||
{
|
||||
whereParts.Add($"\"BranchId\" IN ({string.Join(",", ids.Select(a => $"'{a.BranchId}'"))})");
|
||||
}
|
||||
else
|
||||
{
|
||||
whereParts.Add($"\"BranchId\" = '{Guid.Empty}'");
|
||||
}
|
||||
}
|
||||
|
||||
if (listform.IsOrganizationUnit)
|
||||
{
|
||||
if (whereParts.Any())
|
||||
|
|
|
|||
|
|
@ -24,11 +24,13 @@ namespace Kurs.Platform.EntityFrameworkCore;
|
|||
[ReplaceDbContext(typeof(IIdentityDbContext))]
|
||||
[ReplaceDbContext(typeof(ITenantManagementDbContext))]
|
||||
[ConnectionStringName(DefaultDatabaseProvider)]
|
||||
public class PlatformDbContext :
|
||||
AbpDbContext<PlatformDbContext>,
|
||||
IIdentityDbContext,
|
||||
ITenantManagementDbContext
|
||||
{
|
||||
public class PlatformDbContext :
|
||||
AbpDbContext<PlatformDbContext>,
|
||||
IIdentityDbContext,
|
||||
ITenantManagementDbContext
|
||||
{
|
||||
public DbSet<Branch> Branches { get; set; }
|
||||
public DbSet<BranchUsers> BranchUsers { get; set; }
|
||||
public DbSet<ListForm> ListForms { get; set; }
|
||||
public DbSet<ListFormField> ListFormFields { get; set; }
|
||||
public DbSet<ListFormCustomization> ListFormCustomization { get; set; }
|
||||
|
|
@ -210,5 +212,26 @@ public class PlatformDbContext :
|
|||
b.ToTable(PlatformConsts.DbTablePrefix + nameof(AiBot), PlatformConsts.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
});
|
||||
|
||||
builder.Entity<BranchUsers>(b =>
|
||||
{
|
||||
b.ToTable(PlatformConsts.DbTablePrefix + nameof(BranchUsers), PlatformConsts.DbSchema);
|
||||
b.HasKey(x => new { x.UserId, x.BranchId });
|
||||
});
|
||||
|
||||
builder.Entity<Branch>(b =>
|
||||
{
|
||||
b.ToTable(PlatformConsts.DbTablePrefix + nameof(Branch), PlatformConsts.DbSchema);
|
||||
b.HasMany(x => x.BranchUsers)
|
||||
.WithOne(x => x.Branch)
|
||||
.HasForeignKey(x => x.BranchId)
|
||||
.IsRequired(false)
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne<Tenant>()
|
||||
.WithMany()
|
||||
.HasForeignKey(x => x.TenantId)
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
3746
api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20250615085246_BranchEntity.Designer.cs
generated
Normal file
3746
api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20250615085246_BranchEntity.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,117 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Kurs.Platform.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class BranchEntity : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsBranch",
|
||||
table: "PListForm",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsBranch",
|
||||
table: "PChart",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PBranch",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Code = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
VknTckn = table.Column<long>(type: "bigint", nullable: false),
|
||||
TaxOffice = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Address = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Address2 = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
District = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
City = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
PostalCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Phone = table.Column<long>(type: "bigint", nullable: true),
|
||||
Mobile = table.Column<long>(type: "bigint", nullable: false),
|
||||
Fax = table.Column<long>(type: "bigint", nullable: true),
|
||||
Email = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Website = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PBranch", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_PBranch_AbpTenants_TenantId",
|
||||
column: x => x.TenantId,
|
||||
principalTable: "AbpTenants",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PBranchUsers",
|
||||
columns: table => new
|
||||
{
|
||||
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
BranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PBranchUsers", x => new { x.UserId, x.BranchId });
|
||||
table.ForeignKey(
|
||||
name: "FK_PBranchUsers_PBranch_BranchId",
|
||||
column: x => x.BranchId,
|
||||
principalTable: "PBranch",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PBranch_TenantId",
|
||||
table: "PBranch",
|
||||
column: "TenantId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PBranchUsers_BranchId",
|
||||
table: "PBranchUsers",
|
||||
column: "BranchId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "PBranchUsers");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PBranch");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsBranch",
|
||||
table: "PListForm");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsBranch",
|
||||
table: "PChart");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -636,6 +636,118 @@ namespace Kurs.Platform.Migrations
|
|||
b.ToTable("PBackgroundWorker", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.Branch", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Address")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Address2")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("City")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Code")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("District")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<long?>("Fax")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<bool?>("IsActive")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<long>("Mobile")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<long?>("Phone")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("PostalCode")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("TaxOffice")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<Guid>("TenantId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<long>("VknTckn")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("Website")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("TenantId");
|
||||
|
||||
b.ToTable("PBranch", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.BranchUsers", b =>
|
||||
{
|
||||
b.Property<Guid>("UserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("BranchId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.HasKey("UserId", "BranchId");
|
||||
|
||||
b.HasIndex("BranchId");
|
||||
|
||||
b.ToTable("PBranchUsers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.Chart", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -707,6 +819,9 @@ namespace Kurs.Platform.Migrations
|
|||
b.Property<string>("ExportJson")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsBranch")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
|
|
@ -1002,6 +1117,9 @@ namespace Kurs.Platform.Migrations
|
|||
b.Property<string>("InsertServiceAddress")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsBranch")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
|
|
@ -3389,6 +3507,25 @@ namespace Kurs.Platform.Migrations
|
|||
.OnDelete(DeleteBehavior.SetNull);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.Branch", b =>
|
||||
{
|
||||
b.HasOne("Volo.Abp.TenantManagement.Tenant", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("TenantId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.BranchUsers", b =>
|
||||
{
|
||||
b.HasOne("Kurs.Platform.Entities.Branch", "Branch")
|
||||
.WithMany("BranchUsers")
|
||||
.HasForeignKey("BranchId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.Navigation("Branch");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.ListFormCustomization", b =>
|
||||
{
|
||||
b.HasOne("Kurs.Platform.Entities.ListForm", null)
|
||||
|
|
@ -3556,6 +3693,11 @@ namespace Kurs.Platform.Migrations
|
|||
b.Navigation("Texts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.Branch", b =>
|
||||
{
|
||||
b.Navigation("BranchUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
|
||||
{
|
||||
b.Navigation("Actions");
|
||||
|
|
|
|||
|
|
@ -34,7 +34,8 @@ public class Program
|
|||
};
|
||||
|
||||
var loggerConfig = new LoggerConfiguration()
|
||||
.MinimumLevel.Information();
|
||||
.MinimumLevel.Error()
|
||||
.WriteTo.Console(); // Konsola da log yaz
|
||||
|
||||
switch (DefaultDatabaseProvider)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict';
|
|||
"revision": "3ca0b8505b4bec776b69afdba2768812"
|
||||
}, {
|
||||
"url": "index.html",
|
||||
"revision": "0.j0e979frdf8"
|
||||
"revision": "0.13cgdm1rjp"
|
||||
}], {});
|
||||
workbox.cleanupOutdatedCaches();
|
||||
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
|
||||
|
|
|
|||
|
|
@ -122,6 +122,7 @@ export interface UserInfoViewModel extends ExtensibleObject {
|
|||
isVerified: boolean
|
||||
userRoleNames: string[]
|
||||
roles: AssignedRoleViewModel[]
|
||||
branches: AssignedRoleViewModel[]
|
||||
lockUser: boolean
|
||||
lastPasswordChangeTime?: Date | string
|
||||
|
||||
|
|
@ -138,3 +139,8 @@ export interface AssignedRoleViewModel {
|
|||
name?: string
|
||||
isAssigned: boolean
|
||||
}
|
||||
|
||||
export interface AssignedBranchViewModel {
|
||||
name?: string
|
||||
isAssigned: boolean
|
||||
}
|
||||
|
|
@ -229,6 +229,7 @@ export interface ChartDto extends AuditedEntityDto<string> {
|
|||
permissionJson?: string
|
||||
permissionDto: PermissionCrudDto
|
||||
isTenant: boolean
|
||||
isBranch: boolean
|
||||
isOrganizationUnit: boolean
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -379,6 +379,7 @@ export interface GridEditingDto {
|
|||
popup: GridEditingPopupDto
|
||||
sendOnlyChangedFormValuesUpdate: boolean
|
||||
isTenant: boolean
|
||||
isBranch: boolean
|
||||
isOrganizationUnit: boolean
|
||||
}
|
||||
|
||||
|
|
@ -471,6 +472,7 @@ export interface GridOptionsDto extends AuditedEntityDto<string> {
|
|||
insertServiceAddress?: string
|
||||
deleteServiceAddress?: string
|
||||
isTenant: boolean
|
||||
isBranch: boolean
|
||||
isOrganizationUnit: boolean
|
||||
listFormType: string
|
||||
isSubForm: boolean
|
||||
|
|
|
|||
|
|
@ -404,7 +404,17 @@ function ChartEdit() {
|
|||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
label={translate('::ListForms.ListFormEdit.IsBranch')}
|
||||
invalid={errors.isBranch && touched.isBranch}
|
||||
errorMessage={errors.isBranch}
|
||||
>
|
||||
<Field
|
||||
name="isBranch"
|
||||
placeholder={translate('::ListForms.ListFormEdit.IsBranch')}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label={translate('::ListForms.ListFormEdit.IsOrganizationUnit')}
|
||||
invalid={errors.isOrganizationUnit && touched.isOrganizationUnit}
|
||||
|
|
|
|||
|
|
@ -79,149 +79,150 @@ function UserDetails() {
|
|||
{({ touched, errors, resetForm, isSubmitting, values }) => {
|
||||
const userRoleNames = values.userRoleNames
|
||||
const roles = values.roles
|
||||
const branches = values.branches
|
||||
|
||||
return (
|
||||
<Form>
|
||||
<FormContainer size="sm">
|
||||
<div className="w-1/2">
|
||||
<div className="form-label mb-2">{translate('::Abp.Identity.User.UserInformation.RoleManagement')}</div>
|
||||
<div className="border-2 rounded-lg">
|
||||
<FieldArray name="roles">
|
||||
{({ form, remove, push }) => (
|
||||
<div className="grid grid-cols-4 text-center">
|
||||
{roles && roles.length > 0
|
||||
? roles.map((_, index: number) => {
|
||||
return (
|
||||
<div key={index} className="p-2">
|
||||
<FormItem
|
||||
labelClass="block text-center"
|
||||
className="mb-0 justify-center"
|
||||
label={roles[index].name}
|
||||
>
|
||||
<Field
|
||||
className="mr-0"
|
||||
name={`roles[${index}].isAssigned`}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
</div>
|
||||
<div className="w-1/2">
|
||||
<FormContainer size="md">
|
||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-4 w-full">
|
||||
{/* Personal Information */}
|
||||
<div>
|
||||
<FormItem label={translate('::Abp.Identity.User.UserInformation.Name')}>
|
||||
<Field type="text" name="name" placeholder="Name" component={Input} />
|
||||
</FormItem>
|
||||
</div>
|
||||
|
||||
{/* Personal Information */}
|
||||
<div>
|
||||
<FormItem label={translate('::Abp.Identity.User.UserInformation.Surname')}>
|
||||
<Field type="text" name="surname" placeholder="Surname" component={Input} />
|
||||
</FormItem>
|
||||
</div>
|
||||
|
||||
{/* Şube Management */}
|
||||
<div>
|
||||
<h6 className="mb-4">{translate('::Abp.Identity.User.UserInformation.BranchManagement')}</h6>
|
||||
<div className="border-2 rounded-lg p-4">
|
||||
<FieldArray name="branches">
|
||||
{({ form, remove, push }) => (
|
||||
<div className="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-2 text-center">
|
||||
{branches && branches.length > 0
|
||||
? branches.map((_, index: number) => (
|
||||
<div key={index} className="p-2">
|
||||
<FormItem
|
||||
labelClass="block text-center"
|
||||
className="mb-0 justify-center"
|
||||
label={branches[index].name}
|
||||
>
|
||||
<Field
|
||||
className="mr-0"
|
||||
name={`branches[${index}].isAssigned`}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
</div>
|
||||
))
|
||||
: null}
|
||||
</div>
|
||||
)}
|
||||
</FieldArray>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Role Management */}
|
||||
<div>
|
||||
<h6 className="mb-4">{translate('::Abp.Identity.User.UserInformation.RoleManagement')}</h6>
|
||||
<div className="border-2 rounded-lg p-4">
|
||||
<FieldArray name="roles">
|
||||
{({ form, remove, push }) => (
|
||||
<div className="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-2 text-center">
|
||||
{roles && roles.length > 0
|
||||
? roles.map((_, index: number) => (
|
||||
<div key={index} className="p-2">
|
||||
<FormItem
|
||||
labelClass="block text-center"
|
||||
className="mb-0 justify-center"
|
||||
label={roles[index].name}
|
||||
>
|
||||
<Field
|
||||
className="mr-0"
|
||||
name={`roles[${index}].isAssigned`}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
</div>
|
||||
))
|
||||
: null}
|
||||
</div>
|
||||
)}
|
||||
</FieldArray>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Contact Information */}
|
||||
<div>
|
||||
<h6 className="mb-4">{translate('::Abp.Identity.User.UserInformation.ContactInformation')}</h6>
|
||||
<FormItem label={translate('::Abp.Identity.User.UserInformation.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="Phone Number" 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
|
||||
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[Z]') : null,
|
||||
)
|
||||
})
|
||||
: null}
|
||||
</div>
|
||||
)}
|
||||
</FieldArray>
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</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('L LT') : 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('L LT') : undefined}
|
||||
disabled
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
</FormItem>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mb-3"></div>
|
||||
|
||||
<FormItem
|
||||
labelClass="!justify-start"
|
||||
labelWidth="40%"
|
||||
label={translate('::Abp.Identity.User.UserInformation.EmailAddress')}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
disabled
|
||||
name="email"
|
||||
placeholder="Email Address"
|
||||
component={Input}
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<FormItem labelClass="!justify-start" labelWidth="40%"
|
||||
label={translate('::Abp.Identity.User.UserInformation.Name')}
|
||||
>
|
||||
<Field type="text" name="name" placeholder="Name" component={Input} />
|
||||
</FormItem>
|
||||
|
||||
<FormItem labelClass="!justify-start" labelWidth="40%"
|
||||
label={translate('::Abp.Identity.User.UserInformation.Surname')}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
name="surname"
|
||||
placeholder="Surname"
|
||||
component={Input}
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<FormItem labelClass="!justify-start" labelWidth="40%"
|
||||
label={translate('::Abp.Identity.User.UserInformation.PhoneNumber')}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
name="phoneNumber"
|
||||
placeholder="Phone Number"
|
||||
component={Input}
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
labelClass="!justify-start"
|
||||
labelWidth="40%"
|
||||
label={translate('::Abp.Identity.User.UserInformation.PasswordChangeTime')}
|
||||
>
|
||||
<Field name="lastPasswordChangeTime">
|
||||
{({ field, form }: FieldProps) => (
|
||||
<DateTimepicker
|
||||
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[Z]') : null,
|
||||
)
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
labelClass="!justify-start"
|
||||
labelWidth="40%"
|
||||
label={translate('::RocketUsername')}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
name="rocketUsername"
|
||||
placeholder={translate('::RocketUsername')}
|
||||
component={Input}
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<FormItem labelClass="!justify-start" labelWidth="40%"
|
||||
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('L LT') : undefined}
|
||||
disabled
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
</FormItem>
|
||||
<FormItem labelClass="!justify-start" labelWidth="40%"
|
||||
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('L LT') : undefined}
|
||||
disabled
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
</FormItem>
|
||||
</div>
|
||||
</FormContainer>
|
||||
</FormContainer>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Button variant="solid" loading={isSubmitting} type="submit">
|
||||
|
|
@ -261,178 +262,176 @@ function UserDetails() {
|
|||
const userRoleNames = values.userRoleNames
|
||||
return (
|
||||
<Form>
|
||||
<FormContainer size="sm">
|
||||
<div className="w-1/2">
|
||||
<FormItem
|
||||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.Status')}
|
||||
>
|
||||
<Field name="isActive" placeholder={translate('::Abp.Identity.User.LockoutManagement.Status')} component={Checkbox} />
|
||||
</FormItem>
|
||||
<div className="w-1/2">
|
||||
<FormContainer size="md">
|
||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-4 w-full">
|
||||
{/* Account Status */}
|
||||
<div>
|
||||
<h6 className="mb-4">{translate('::Abp.Identity.User.LockoutManagement.AccountStatus')}</h6>
|
||||
<FormItem
|
||||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.Status')}
|
||||
>
|
||||
<Field name="isActive" placeholder={translate('::Abp.Identity.User.LockoutManagement.Status')} component={Checkbox} />
|
||||
</FormItem>
|
||||
|
||||
<hr className="mb-3" />
|
||||
|
||||
<FormItem
|
||||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.AdminVerification')}
|
||||
>
|
||||
<Field
|
||||
name="isVerified"
|
||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.AdminVerification')}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<hr className="mb-3" />
|
||||
|
||||
<FormItem
|
||||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.EmailConfirmed')}
|
||||
>
|
||||
<Field
|
||||
name="emailConfirmed"
|
||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.EmailConfirmed')}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.PhoneNumberConfirmed')}
|
||||
>
|
||||
<Field
|
||||
name="phoneNumberConfirmed"
|
||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.PhoneNumberConfirmed')}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<hr className="mb-3" />
|
||||
|
||||
<FormItem
|
||||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.TwoFactorEnabled')}
|
||||
>
|
||||
<Field
|
||||
name="twoFactorEnabled"
|
||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.TwoFactorEnabled')}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<hr className="mb-3" />
|
||||
|
||||
<FormItem
|
||||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.LoginEndDate')}
|
||||
>
|
||||
<Field name="loginEndDate">
|
||||
{({ field, form }: FieldProps) => (
|
||||
<DatePicker
|
||||
field={field}
|
||||
form={form}
|
||||
value={field.value ? dayjs(field.value).toDate() : null}
|
||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.LoginEndDate')}
|
||||
onChange={(date) => {
|
||||
form.setFieldValue(
|
||||
field.name,
|
||||
date ? dayjs(date).format('YYYY-MM-DDTHH:mm:ss[Z]') : null,
|
||||
)
|
||||
}}
|
||||
<FormItem
|
||||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.AdminVerification')}
|
||||
>
|
||||
<Field
|
||||
name="isVerified"
|
||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.AdminVerification')}
|
||||
component={Checkbox}
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
</FormItem>
|
||||
</FormItem>
|
||||
|
||||
<hr className="mb-3" />
|
||||
|
||||
<FormItem
|
||||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.AccountLockoutEnabled')}
|
||||
>
|
||||
<Field
|
||||
name="lockoutEnabled"
|
||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.AccountLockoutEnabled')}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.AccountLocked')}
|
||||
>
|
||||
<Field
|
||||
name="lockUser"
|
||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.AccountLocked')}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.AccountEndDate')}
|
||||
>
|
||||
<Field name="lockoutEnd">
|
||||
{({ field, form }: FieldProps) => (
|
||||
<DatePicker
|
||||
field={field}
|
||||
form={form}
|
||||
value={field.value ? dayjs(field.value).toDate() : null}
|
||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.AccountEndDate')}
|
||||
onChange={(date) => {
|
||||
form.setFieldValue(
|
||||
field.name,
|
||||
date ? dayjs(date).format('YYYY-MM-DDTHH:mm:ss[Z]') : null,
|
||||
)
|
||||
}}
|
||||
<FormItem
|
||||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.EmailConfirmed')}
|
||||
>
|
||||
<Field
|
||||
name="emailConfirmed"
|
||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.EmailConfirmed')}
|
||||
component={Checkbox}
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
</FormItem>
|
||||
</FormItem>
|
||||
|
||||
<hr className="mb-3" />
|
||||
<FormItem
|
||||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.PhoneNumberConfirmed')}
|
||||
>
|
||||
<Field
|
||||
name="phoneNumberConfirmed"
|
||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.PhoneNumberConfirmed')}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.ShouldChangePwOnNextLogin')}
|
||||
>
|
||||
<Field
|
||||
name="shouldChangePasswordOnNextLogin"
|
||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.ShouldChangePwOnNextLogin')}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.TwoFactorEnabled')}
|
||||
>
|
||||
<Field
|
||||
name="twoFactorEnabled"
|
||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.TwoFactorEnabled')}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
</div>
|
||||
|
||||
<FormItem
|
||||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.AccessFailedCount')}
|
||||
>
|
||||
<Field type="number" name="accessFailedCount" component={Input} />
|
||||
</FormItem>
|
||||
</div>
|
||||
</FormContainer>
|
||||
{/* Login & Lockout Settings */}
|
||||
<div>
|
||||
<h6 className="mb-4">{translate('::Abp.Identity.User.LockoutManagement.LoginAndLockoutSettings')}</h6>
|
||||
<FormItem
|
||||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.LoginEndDate')}
|
||||
>
|
||||
<Field name="loginEndDate">
|
||||
{({ field, form }: FieldProps) => (
|
||||
<DatePicker
|
||||
field={field}
|
||||
form={form}
|
||||
value={field.value ? dayjs(field.value).toDate() : null}
|
||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.LoginEndDate')}
|
||||
onChange={(date) => {
|
||||
form.setFieldValue(
|
||||
field.name,
|
||||
date ? dayjs(date).format('YYYY-MM-DDTHH:mm:ss[Z]') : null,
|
||||
)
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.AccountLockoutEnabled')}
|
||||
>
|
||||
<Field
|
||||
name="lockoutEnabled"
|
||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.AccountLockoutEnabled')}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.AccountLocked')}
|
||||
>
|
||||
<Field
|
||||
name="lockUser"
|
||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.AccountLocked')}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.AccountEndDate')}
|
||||
>
|
||||
<Field name="lockoutEnd">
|
||||
{({ field, form }: FieldProps) => (
|
||||
<DatePicker
|
||||
field={field}
|
||||
form={form}
|
||||
value={field.value ? dayjs(field.value).toDate() : null}
|
||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.AccountEndDate')}
|
||||
onChange={(date) => {
|
||||
form.setFieldValue(
|
||||
field.name,
|
||||
date ? dayjs(date).format('YYYY-MM-DDTHH:mm:ss[Z]') : null,
|
||||
)
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.ShouldChangePwOnNextLogin')}
|
||||
>
|
||||
<Field
|
||||
name="shouldChangePasswordOnNextLogin"
|
||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.ShouldChangePwOnNextLogin')}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.AccessFailedCount')}
|
||||
>
|
||||
<Field type="number" name="accessFailedCount" component={Input} />
|
||||
</FormItem>
|
||||
</div>
|
||||
</div>
|
||||
</FormContainer>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Button variant="solid" loading={isSubmitting} type="submit">
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import { dbSourceTypeOptions, selectCommandTypeOptions } from './options'
|
|||
const schema = Yup.object().shape({
|
||||
isOrganizationUnit: Yup.bool(),
|
||||
isTenant: Yup.bool(),
|
||||
isBranch: Yup.bool(),
|
||||
dataSourceCode: Yup.string(),
|
||||
selectCommandType: Yup.number().oneOf(Object.values(SelectCommandTypeEnum) as number[]),
|
||||
selectCommand: Yup.string(),
|
||||
|
|
@ -70,6 +71,17 @@ function FormTabDatabaseDataSource(props: FormEditProps) {
|
|||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label={translate('::ListForms.ListFormEdit.IsBranch')}
|
||||
invalid={errors.editingOptionDto?.isBranch && touched.editingOptionDto?.isBranch}
|
||||
errorMessage={errors.editingOptionDto?.isBranch}
|
||||
>
|
||||
<Field
|
||||
name="isBranch"
|
||||
placeholder={translate('::ListForms.ListFormEdit.IsBranch')}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label={translate('::ListForms.ListFormEdit.IsOrganizationUnit')}
|
||||
invalid={
|
||||
|
|
|
|||
Loading…
Reference in a new issue