Departman ve Job Position listeleri eklendi.
This commit is contained in:
parent
61751a48c4
commit
183674afb9
30 changed files with 1198 additions and 248 deletions
|
|
@ -54,4 +54,6 @@ public class UserInfoViewModel: ExtensibleObject
|
|||
public DateTimeOffset? CreationTime { get; set; }
|
||||
public DateTimeOffset? LastModificationTime { get; set; }
|
||||
public string WorkHour { get; set; }
|
||||
public string DepartmentId { get; set; }
|
||||
public string JobPositionId { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -169,7 +169,6 @@ public static class LookupQueryValues
|
|||
$"\"Id\" AS \"Key\", " +
|
||||
$"\"Name\" AS \"Name\" " +
|
||||
$"FROM \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.MenuGroup))}\" " +
|
||||
$"WHERE \"IsDeleted\" = 'false' " +
|
||||
$"ORDER BY \"Name\";";
|
||||
|
||||
public static string ProductValues =
|
||||
|
|
@ -185,8 +184,7 @@ public static class LookupQueryValues
|
|||
$"\"Code\" AS \"Key\", " +
|
||||
$"\"DisplayName\" AS \"Name\" " +
|
||||
$"FROM \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Menu))}\" " +
|
||||
$"WHERE \"IsDeleted\" = 'false' " +
|
||||
"AND \"IsDisabled\" = 'false' " +
|
||||
$"WHERE \"IsDisabled\" = 'false' " +
|
||||
$"ORDER BY \"ParentCode\", \"Order\";";
|
||||
|
||||
public static string OrganizationUnitSalesTeamValues =
|
||||
|
|
@ -209,4 +207,25 @@ public static class LookupQueryValues
|
|||
'/admin/list/' + ""ListFormCode"" AS ""Name""
|
||||
FROM ""{FullNameTable(TableNameEnum.ListForm)}""
|
||||
GROUP BY ""ListFormCode"";";
|
||||
|
||||
public static string DepartmentValues =
|
||||
$"SELECT " +
|
||||
$"\"Id\" AS \"Key\", " +
|
||||
$"\"Name\" AS \"Name\" " +
|
||||
$"FROM \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Department))}\" " +
|
||||
$"WHERE " +
|
||||
$"(\"BranchId\" = @param0 OR @param0 IS NULL) " +
|
||||
$"AND \"IsDeleted\" = 'false' " +
|
||||
$"ORDER BY \"Name\";";
|
||||
|
||||
public static string JobPositionValues =
|
||||
$"SELECT " +
|
||||
$"\"Id\" AS \"Key\", " +
|
||||
$"\"Name\" AS \"Name\" " +
|
||||
$"FROM \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.JobPosition))}\" " +
|
||||
$"WHERE " +
|
||||
$"(\"BranchId\" = @param0 OR @param0 IS NULL) " +
|
||||
$"AND (\"DepartmentId\" = @param1 OR @param1 IS NULL) " +
|
||||
$"AND \"IsDeleted\" = 'false' " +
|
||||
$"ORDER BY \"Name\";";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,6 +136,8 @@ public class PlatformIdentityAppService : ApplicationService
|
|||
ShouldChangePasswordOnNextLogin = user.ShouldChangePasswordOnNextLogin,
|
||||
RocketUsername = user.GetRocketUsername(),
|
||||
WorkHour = user.GetWorkHour(),
|
||||
DepartmentId = user.GetDepartmentId(),
|
||||
JobPositionId = user.GetJobPositionId(),
|
||||
CreationTime = user.CreationTime,
|
||||
LastModificationTime = user.LastModificationTime,
|
||||
};
|
||||
|
|
@ -190,6 +192,8 @@ public class PlatformIdentityAppService : ApplicationService
|
|||
user.SetLastPasswordChangeTime(UserInfo.LastPasswordChangeTime);
|
||||
user.SetRocketUsername(UserInfo.RocketUsername);
|
||||
user.SetWorkHour(UserInfo.WorkHour);
|
||||
user.SetDepartmentId(UserInfo.DepartmentId);
|
||||
user.SetJobPositionId(UserInfo.JobPositionId);
|
||||
|
||||
await UserManager.UpdateAsync(user);
|
||||
|
||||
|
|
|
|||
|
|
@ -2766,6 +2766,18 @@
|
|||
"en": "Last Name",
|
||||
"tr": "Soyadı"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Abp.Identity.User.UserInformation.DepartmentId",
|
||||
"en": "Department",
|
||||
"tr": "Departman"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Abp.Identity.User.UserInformation.JobPositionId",
|
||||
"en": "Job Position",
|
||||
"tr": "Pozisyon"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Abp.Identity.User.UserInformation.PhoneNumber",
|
||||
|
|
@ -5700,6 +5712,18 @@
|
|||
"tr": "Sektörler",
|
||||
"en": "Sectors"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Definitions.Department",
|
||||
"tr": "Departmanlar",
|
||||
"en": "Departments"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Definitions.JobPosition",
|
||||
"tr": "Pozisyonlar",
|
||||
"en": "Job Positions"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Definitions.ContactTag",
|
||||
|
|
|
|||
|
|
@ -2308,6 +2308,319 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Department
|
||||
listFormName = AppCodes.Definitions.Department;
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||
{
|
||||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
PageSize = 10,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson("tree"),
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = listFormName,
|
||||
Name = listFormName,
|
||||
Title = listFormName,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = true,
|
||||
IsBranch = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = listFormName,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Department)),
|
||||
KeyFieldName = "Id",
|
||||
KeyFieldDbSourceType = DbType.Guid,
|
||||
DefaultFilter = DefaultFilterJson,
|
||||
SortMode = GridOptions.SortModeSingle,
|
||||
FilterRowJson = DefaultFilterRowJson,
|
||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||
SearchPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
||||
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
||||
SelectionJson = DefaultSelectionSingleJson,
|
||||
ColumnOptionJson = DefaultColumnOptionJson(),
|
||||
PermissionJson = DefaultPermissionJson(listFormName),
|
||||
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Department)),
|
||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
TreeOptionJson = DefaultTreeOptionJson("Id", "ParentId", true),
|
||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
|
||||
EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 500, true, true, true, true, false),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>
|
||||
{
|
||||
new() {
|
||||
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 = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 3, DataField = "ParentId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }
|
||||
]
|
||||
}
|
||||
}),
|
||||
});
|
||||
|
||||
#region Department Fields
|
||||
await _listFormFieldRepository.InsertManyAsync([
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "Id",
|
||||
CaptionName = "App.Listform.ListformField.Id",
|
||||
Width = 100,
|
||||
ListOrderNo = 1,
|
||||
Visible = false,
|
||||
IsActive = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Name",
|
||||
CaptionName = "App.Listform.ListformField.Name",
|
||||
Width = 300,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
SortIndex = 1,
|
||||
SortDirection = GridColumnOptions.SortOrderAsc,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "ParentId",
|
||||
CaptionName = "App.Listform.ListformField.ParentId",
|
||||
Width = 300,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
AllowSearch = true,
|
||||
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
||||
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||
DisplayExpr = "Name",
|
||||
ValueExpr = "Key",
|
||||
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,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
]);
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region JobPosition
|
||||
listFormName = AppCodes.Definitions.JobPosition;
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||
{
|
||||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
PageSize = 10,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson("tree"),
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = listFormName,
|
||||
Name = listFormName,
|
||||
Title = listFormName,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = true,
|
||||
IsBranch = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = listFormName,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.JobPosition)),
|
||||
KeyFieldName = "Id",
|
||||
KeyFieldDbSourceType = DbType.Guid,
|
||||
DefaultFilter = DefaultFilterJson,
|
||||
SortMode = GridOptions.SortModeSingle,
|
||||
FilterRowJson = DefaultFilterRowJson,
|
||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||
SearchPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
||||
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
||||
SelectionJson = DefaultSelectionSingleJson,
|
||||
ColumnOptionJson = DefaultColumnOptionJson(),
|
||||
PermissionJson = DefaultPermissionJson(listFormName),
|
||||
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.JobPosition)),
|
||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
TreeOptionJson = DefaultTreeOptionJson("Id", "ParentId", true),
|
||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
|
||||
EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 650, true, true, true, true, false),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>
|
||||
{
|
||||
new() {
|
||||
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 = 2, DataField = "DepartmentId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 3, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 4, DataField = "ParentId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
]
|
||||
}
|
||||
}),
|
||||
});
|
||||
|
||||
#region JobPosition Fields
|
||||
await _listFormFieldRepository.InsertManyAsync([
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "Id",
|
||||
CaptionName = "App.Listform.ListformField.Id",
|
||||
Width = 0,
|
||||
ListOrderNo = 1,
|
||||
Visible = false,
|
||||
IsActive = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Name",
|
||||
CaptionName = "App.Listform.ListformField.Name",
|
||||
Width = 0,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
SortIndex = 1,
|
||||
SortDirection = GridColumnOptions.SortOrderAsc,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "ParentId",
|
||||
CaptionName = "App.Listform.ListformField.ParentId",
|
||||
Width = 0,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
AllowSearch = true,
|
||||
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
||||
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||
DisplayExpr = "Name",
|
||||
ValueExpr = "Key",
|
||||
LookupQuery = LookupQueryValues.JobPositionValues,
|
||||
CascadeRelationField = "BranchId",
|
||||
CascadeFilterOperator="=",
|
||||
CascadeParentFields = "BranchId,DepartmentId",
|
||||
}),
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "DepartmentId",
|
||||
CaptionName = "App.Listform.ListformField.DepartmentId",
|
||||
Width = 0,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
AllowSearch = true,
|
||||
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
||||
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||
DisplayExpr = "Name",
|
||||
ValueExpr = "Key",
|
||||
LookupQuery = LookupQueryValues.DepartmentValues,
|
||||
CascadeRelationField = "BranchId",
|
||||
CascadeFilterOperator="=",
|
||||
CascadeParentFields = "BranchId",
|
||||
CascadeEmptyFields = "ParentId"
|
||||
}),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
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 = 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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -590,7 +590,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
new() { Order=1, ColCount=2, ColSpan=1, ItemType="group", Items =
|
||||
[
|
||||
new EditingFormItemDto { Order=1, DataField = "TenantId", ColSpan=2, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order=1, DataField = "TenantId", ColSpan=1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order=2, DataField = "Code", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order=3, DataField = "Name", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order=4, DataField = "VknTckn", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxNumberBox },
|
||||
|
|
@ -599,6 +599,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
new EditingFormItemDto { Order=7, DataField = "PhoneNumber", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions },
|
||||
new EditingFormItemDto { Order=8, DataField = "FaxNumber", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions },
|
||||
new EditingFormItemDto { Order=9, DataField = "IsActive", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxCheckBox },
|
||||
new EditingFormItemDto { Order=10, DataField = "PostalCode", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
|
||||
]
|
||||
},
|
||||
new() { Order=2, ColCount=2, ColSpan=1, ItemType="group", Items =
|
||||
|
|
@ -609,9 +610,8 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
new EditingFormItemDto { Order=4, DataField = "Township", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order=5, DataField = "Address1", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextArea },
|
||||
new EditingFormItemDto { Order=6, DataField = "Address2", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextArea },
|
||||
new EditingFormItemDto { Order=7, DataField = "PostalCode", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order=8, DataField = "Email", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order=9, DataField = "Website", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order=7, DataField = "Email", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order=8, DataField = "Website", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||
]
|
||||
}
|
||||
}),
|
||||
|
|
@ -643,7 +643,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "Id",
|
||||
CaptionName = "App.Listform.ListformField.Id",
|
||||
CaptionName = "App.Listform.ListformField.Id",
|
||||
Width = 500,
|
||||
ListOrderNo = 0,
|
||||
Visible = false,
|
||||
|
|
@ -684,7 +684,6 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
|
|
@ -696,7 +695,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Name",
|
||||
CaptionName = "App.Listform.ListformField.Name",
|
||||
CaptionName = "App.Listform.ListformField.Name",
|
||||
Width = 200,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
|
|
@ -713,12 +712,11 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Int64,
|
||||
FieldName = "VknTckn",
|
||||
CaptionName = "App.Listform.ListformField.VknTckn",
|
||||
CaptionName = "App.Listform.ListformField.VknTckn",
|
||||
Width = 100,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
|
|
@ -730,12 +728,11 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "TaxOffice",
|
||||
CaptionName = "App.Listform.ListformField.TaxOffice",
|
||||
CaptionName = "App.Listform.ListformField.TaxOffice",
|
||||
Width = 150,
|
||||
ListOrderNo = 5,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
|
|
@ -747,7 +744,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Country",
|
||||
CaptionName = "App.Listform.ListformField.Country",
|
||||
CaptionName = "App.Listform.ListformField.Country",
|
||||
Width = 100,
|
||||
ListOrderNo = 6,
|
||||
Visible = true,
|
||||
|
|
@ -772,7 +769,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "City",
|
||||
CaptionName = "App.Listform.ListformField.City",
|
||||
CaptionName = "App.Listform.ListformField.City",
|
||||
Width = 100,
|
||||
ListOrderNo = 7,
|
||||
Visible = true,
|
||||
|
|
@ -800,7 +797,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "District",
|
||||
CaptionName = "App.Listform.ListformField.District",
|
||||
CaptionName = "App.Listform.ListformField.District",
|
||||
Width = 100,
|
||||
ListOrderNo = 8,
|
||||
Visible = true,
|
||||
|
|
@ -828,7 +825,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Township",
|
||||
CaptionName = "App.Listform.ListformField.Township",
|
||||
CaptionName = "App.Listform.ListformField.Township",
|
||||
Width = 100,
|
||||
ListOrderNo = 9,
|
||||
Visible = true,
|
||||
|
|
@ -855,7 +852,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Address1",
|
||||
CaptionName = "App.Listform.ListformField.Address1",
|
||||
CaptionName = "App.Listform.ListformField.Address1",
|
||||
Width = 150,
|
||||
ListOrderNo = 10,
|
||||
Visible = true,
|
||||
|
|
@ -872,7 +869,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Address2",
|
||||
CaptionName = "App.Listform.ListformField.Address2",
|
||||
CaptionName = "App.Listform.ListformField.Address2",
|
||||
Width = 150,
|
||||
ListOrderNo = 11,
|
||||
Visible = true,
|
||||
|
|
@ -889,7 +886,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "PostalCode",
|
||||
CaptionName = "App.Listform.ListformField.PostalCode",
|
||||
CaptionName = "App.Listform.ListformField.PostalCode",
|
||||
Width = 100,
|
||||
ListOrderNo = 12,
|
||||
Visible = true,
|
||||
|
|
@ -924,7 +921,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Website",
|
||||
CaptionName = "App.Listform.ListformField.Website",
|
||||
CaptionName = "App.Listform.ListformField.Website",
|
||||
Width = 170,
|
||||
ListOrderNo = 14,
|
||||
Visible = true,
|
||||
|
|
@ -941,7 +938,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "MobileNumber",
|
||||
CaptionName = "App.Listform.ListformField.MobileNumber",
|
||||
CaptionName = "App.Listform.ListformField.MobileNumber",
|
||||
Width = 100,
|
||||
ListOrderNo = 15,
|
||||
Visible = true,
|
||||
|
|
@ -959,7 +956,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "PhoneNumber",
|
||||
CaptionName = "Abp.Identity.User.UserInformation.PhoneNumber",
|
||||
CaptionName = "Abp.Identity.User.UserInformation.PhoneNumber",
|
||||
Width = 100,
|
||||
ListOrderNo = 16,
|
||||
Visible = true,
|
||||
|
|
@ -977,7 +974,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Int64,
|
||||
FieldName = "FaxNumber",
|
||||
CaptionName = "App.Listform.ListformField.FaxNumber",
|
||||
CaptionName = "App.Listform.ListformField.FaxNumber",
|
||||
Width = 100,
|
||||
ListOrderNo = 17,
|
||||
Visible = true,
|
||||
|
|
@ -995,7 +992,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Boolean,
|
||||
FieldName = "IsActive",
|
||||
CaptionName = "App.Listform.ListformField.IsActive",
|
||||
CaptionName = "App.Listform.ListformField.IsActive",
|
||||
Width = 100,
|
||||
ListOrderNo = 18,
|
||||
Visible = true,
|
||||
|
|
|
|||
|
|
@ -944,6 +944,26 @@
|
|||
"RequiredPermissionName": "App.Definitions.Sector",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Administration.Definitions",
|
||||
"Code": "App.Definitions.Department",
|
||||
"DisplayName": "App.Definitions.Department",
|
||||
"Order": 2,
|
||||
"Url": "/admin/list/App.Definitions.Department",
|
||||
"Icon": "FcDepartment",
|
||||
"RequiredPermissionName": "App.Definitions.Department",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Administration.Definitions",
|
||||
"Code": "App.Definitions.JobPosition",
|
||||
"DisplayName": "App.Definitions.JobPosition",
|
||||
"Order": 3,
|
||||
"Url": "/admin/list/App.Definitions.JobPosition",
|
||||
"Icon": "FcDebt",
|
||||
"RequiredPermissionName": "App.Definitions.JobPosition",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Administration",
|
||||
"Code": "App.Administration.Restrictions",
|
||||
|
|
|
|||
|
|
@ -2522,6 +2522,117 @@
|
|||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp|Kurs"
|
||||
},
|
||||
|
||||
{
|
||||
"GroupName": "App.Administration",
|
||||
"Name": "App.Definitions.Department",
|
||||
"ParentName": null,
|
||||
"DisplayName": "App.Definitions.Department",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp|Kurs"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Administration",
|
||||
"Name": "App.Definitions.Department.Create",
|
||||
"ParentName": "App.Definitions.Department",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp|Kurs"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Administration",
|
||||
"Name": "App.Definitions.Department.Update",
|
||||
"ParentName": "App.Definitions.Department",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp|Kurs"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Administration",
|
||||
"Name": "App.Definitions.Department.Delete",
|
||||
"ParentName": "App.Definitions.Department",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp|Kurs"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Administration",
|
||||
"Name": "App.Definitions.Department.Export",
|
||||
"ParentName": "App.Definitions.Department",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp|Kurs"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Administration",
|
||||
"Name": "App.Definitions.Department.Import",
|
||||
"ParentName": "App.Definitions.Department",
|
||||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp|Kurs"
|
||||
},
|
||||
|
||||
{
|
||||
"GroupName": "App.Administration",
|
||||
"Name": "App.Definitions.JobPosition",
|
||||
"ParentName": null,
|
||||
"DisplayName": "App.Definitions.JobPosition",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp|Kurs"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Administration",
|
||||
"Name": "App.Definitions.JobPosition.Create",
|
||||
"ParentName": "App.Definitions.JobPosition",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp|Kurs"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Administration",
|
||||
"Name": "App.Definitions.JobPosition.Update",
|
||||
"ParentName": "App.Definitions.JobPosition",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp|Kurs"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Administration",
|
||||
"Name": "App.Definitions.JobPosition.Delete",
|
||||
"ParentName": "App.Definitions.JobPosition",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp|Kurs"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Administration",
|
||||
"Name": "App.Definitions.JobPosition.Export",
|
||||
"ParentName": "App.Definitions.JobPosition",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp|Kurs"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Administration",
|
||||
"Name": "App.Definitions.JobPosition.Import",
|
||||
"ParentName": "App.Definitions.JobPosition",
|
||||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp|Kurs"
|
||||
},
|
||||
|
||||
{
|
||||
"GroupName": "App.Administration",
|
||||
"Name": "App.Restrictions.WorkHour",
|
||||
|
|
@ -3198,4 +3309,4 @@
|
|||
"MenuGroup": "Erp|Kurs"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ using Volo.Abp.MultiTenancy;
|
|||
using Volo.Abp.PermissionManagement;
|
||||
using IdentityRole = Volo.Abp.Identity.IdentityRole;
|
||||
using IdentityUser = Volo.Abp.Identity.IdentityUser;
|
||||
using Volo.Abp.Domain.Repositories;
|
||||
using Sozsoft.Platform.Entities;
|
||||
|
||||
namespace Sozsoft.Platform.Data.Seeds;
|
||||
|
||||
|
|
@ -18,11 +20,15 @@ namespace Sozsoft.Platform.Data.Seeds;
|
|||
public class PlatformIdentityDataSeeder : IdentityDataSeeder
|
||||
{
|
||||
private readonly IPermissionGrantRepository permissionGrantRepository;
|
||||
private readonly IRepository<Branch, Guid> _branchRepository;
|
||||
private readonly IRepository<BranchUsers, Guid> _branchUsersRepository;
|
||||
|
||||
public PlatformIdentityDataSeeder(
|
||||
IGuidGenerator guidGenerator,
|
||||
IIdentityRoleRepository roleRepository,
|
||||
IIdentityUserRepository userRepository,
|
||||
IRepository<Branch, Guid> branchRepository,
|
||||
IRepository<BranchUsers, Guid> branchUsersRepository,
|
||||
ILookupNormalizer lookupNormalizer,
|
||||
IdentityUserManager userManager,
|
||||
IdentityRoleManager roleManager,
|
||||
|
|
@ -32,6 +38,8 @@ public class PlatformIdentityDataSeeder : IdentityDataSeeder
|
|||
) : base(guidGenerator, roleRepository, userRepository, lookupNormalizer, userManager, roleManager, currentTenant, identityOptions)
|
||||
{
|
||||
this.permissionGrantRepository = permissionGrantRepository;
|
||||
this._branchRepository = branchRepository;
|
||||
this._branchUsersRepository = branchUsersRepository;
|
||||
}
|
||||
|
||||
public override async Task<IdentityDataSeedResult> SeedAsync(string adminEmail, string adminPassword, Guid? tenantId = null, string adminUserName = null)
|
||||
|
|
@ -45,11 +53,34 @@ public class PlatformIdentityDataSeeder : IdentityDataSeeder
|
|||
|
||||
var result = new IdentityDataSeedResult();
|
||||
|
||||
var branchId = GuidGenerator.Create();
|
||||
var defaultBranch = await _branchRepository.FirstOrDefaultAsync(b => b.Code == PlatformConsts.Branches.BranchCode);
|
||||
if (defaultBranch == null)
|
||||
{
|
||||
await _branchRepository.InsertAsync(new Branch(branchId)
|
||||
{
|
||||
Code = PlatformConsts.Branches.BranchCode,
|
||||
Name = PlatformConsts.Branches.BranchName,
|
||||
VknTckn = PlatformConsts.Branches.BranchVknTckn,
|
||||
TaxOffice = PlatformConsts.Branches.BranchTaxOffice,
|
||||
MobileNumber = PlatformConsts.Branches.BranchMobileNumber,
|
||||
Country = PlatformConsts.Branches.BranchCountry,
|
||||
City = PlatformConsts.Branches.BranchCity,
|
||||
District = PlatformConsts.Branches.BranchDistrict,
|
||||
Township = PlatformConsts.Branches.BranchTownship,
|
||||
Email = PlatformConsts.Branches.BranchEmail,
|
||||
Website = PlatformConsts.Branches.BranchWebsite,
|
||||
IsActive = PlatformConsts.Branches.BranchIsActive,
|
||||
TenantId = tenantId,
|
||||
});
|
||||
}
|
||||
|
||||
var adminRole = await RoleRepository.FindByNormalizedNameAsync(LookupNormalizer.NormalizeName(PlatformConsts.AbpIdentity.User.AdminRoleName));
|
||||
if (adminRole is null)
|
||||
{
|
||||
var roleId = GuidGenerator.Create();
|
||||
adminRole = new IdentityRole(
|
||||
GuidGenerator.Create(),
|
||||
roleId,
|
||||
PlatformConsts.AbpIdentity.User.AdminRoleName,
|
||||
tenantId
|
||||
)
|
||||
|
|
@ -69,8 +100,9 @@ public class PlatformIdentityDataSeeder : IdentityDataSeeder
|
|||
|
||||
if (adminUser is null)
|
||||
{
|
||||
var userId = GuidGenerator.Create();
|
||||
adminUser = new IdentityUser(
|
||||
GuidGenerator.Create(),
|
||||
userId,
|
||||
adminUserName,
|
||||
adminEmail,
|
||||
tenantId
|
||||
|
|
@ -90,6 +122,18 @@ public class PlatformIdentityDataSeeder : IdentityDataSeeder
|
|||
result.CreatedAdminUser = true;
|
||||
|
||||
(await UserManager.AddToRoleAsync(adminUser, PlatformConsts.AbpIdentity.User.AdminRoleName)).CheckErrors();
|
||||
|
||||
//BranchUsers tablosuna admin kullanıcısı ekleniyor
|
||||
var defaultBranchUsers = await _branchUsersRepository.FirstOrDefaultAsync(bu => bu.UserId == userId && bu.BranchId == branchId);
|
||||
if (defaultBranchUsers is null)
|
||||
{
|
||||
await _branchUsersRepository.InsertAsync(new BranchUsers
|
||||
{
|
||||
BranchId = branchId,
|
||||
UserId = userId,
|
||||
TenantId = tenantId
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/*admin rolüne ait yetkiler otomatik atanıyor*/
|
||||
|
|
|
|||
|
|
@ -1,32 +0,0 @@
|
|||
IF OBJECT_ID(N'[dbo].[Adm_T_Behavior]', 'U') IS NULL
|
||||
BEGIN
|
||||
CREATE TABLE [dbo].[Adm_T_Behavior](
|
||||
[Id] [nvarchar](128) NOT NULL,
|
||||
[TenantId] [uniqueidentifier] NULL,
|
||||
[Name] [nvarchar](128) NOT NULL,
|
||||
[CreationTime] [datetime2](7) NOT NULL,
|
||||
[CreatorId] [uniqueidentifier] NULL,
|
||||
[LastModificationTime] [datetime2](7) NULL,
|
||||
[LastModifierId] [uniqueidentifier] NULL,
|
||||
[IsDeleted] [bit] NOT NULL,
|
||||
[DeleterId] [uniqueidentifier] NULL,
|
||||
[DeletionTime] [datetime2](7) NULL,
|
||||
CONSTRAINT [PK_Adm_T_Behavior] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[Id] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
END
|
||||
GO
|
||||
|
||||
IF NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM sys.default_constraints dc
|
||||
JOIN sys.columns c ON dc.parent_object_id = c.object_id AND dc.parent_column_id = c.column_id
|
||||
WHERE dc.parent_object_id = OBJECT_ID(N'[dbo].[Adm_T_Behavior]')
|
||||
AND c.name = N'IsDeleted'
|
||||
)
|
||||
BEGIN
|
||||
ALTER TABLE [dbo].[Adm_T_Behavior] ADD DEFAULT (CONVERT([bit],(0))) FOR [IsDeleted]
|
||||
END
|
||||
GO
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
IF OBJECT_ID(N'[dbo].[Adm_T_Department]', 'U') IS NULL
|
||||
BEGIN
|
||||
CREATE TABLE [dbo].[Adm_T_Department]
|
||||
(
|
||||
[Id] uniqueidentifier NOT NULL DEFAULT NEWID(),
|
||||
[CreationTime] datetime2 NOT NULL DEFAULT GETUTCDATE(),
|
||||
[CreatorId] uniqueidentifier NULL,
|
||||
[LastModificationTime] datetime2 NULL,
|
||||
[LastModifierId] uniqueidentifier NULL,
|
||||
[IsDeleted] bit NOT NULL DEFAULT 0,
|
||||
[DeletionTime] datetime2 NULL,
|
||||
[DeleterId] uniqueidentifier NULL,
|
||||
[TenantId] uniqueidentifier NULL,
|
||||
[BranchId] uniqueidentifier NULL,
|
||||
[Name] nvarchar(64) NOT NULL,
|
||||
[ParentId] uniqueidentifier NULL,
|
||||
CONSTRAINT [PK_Adm_T_Department] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[Id] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
END
|
||||
GO
|
||||
|
|
@ -1,147 +0,0 @@
|
|||
{
|
||||
"Wizard": {
|
||||
"WizardName": "Departments",
|
||||
"ListFormCode": "App.Wizard.Departments",
|
||||
"MenuCode": "App.Wizard.Departments",
|
||||
"IsTenant": true,
|
||||
"IsBranch": false,
|
||||
"IsOrganizationUnit": false,
|
||||
"AllowAdding": true,
|
||||
"AllowUpdating": true,
|
||||
"AllowDeleting": true,
|
||||
"AllowDetail": false,
|
||||
"ConfirmDelete": true,
|
||||
"DefaultLayout": "tree",
|
||||
"Grid": true,
|
||||
"Pivot": true,
|
||||
"Tree": true,
|
||||
"Chart": true,
|
||||
"Gantt": true,
|
||||
"Scheduler": true,
|
||||
"LanguageTextMenuEn": "Departments",
|
||||
"LanguageTextMenuTr": "Departments",
|
||||
"LanguageTextTitleEn": "Departments",
|
||||
"LanguageTextTitleTr": "Departments",
|
||||
"LanguageTextDescEn": "Departments",
|
||||
"LanguageTextDescTr": "Departments",
|
||||
"LanguageTextMenuParentEn": "",
|
||||
"LanguageTextMenuParentTr": "",
|
||||
"PermissionGroupName": "App.Administration",
|
||||
"MenuParentCode": "App.Administration.Definitions",
|
||||
"MenuIcon": "FcDepartment",
|
||||
"DataSourceCode": "Default",
|
||||
"DataSourceConnectionString": "",
|
||||
"SelectCommandType": 1,
|
||||
"SelectCommand": "Adm_T_Department",
|
||||
"KeyFieldName": "Id",
|
||||
"KeyFieldDbSourceType": 9,
|
||||
"TreeKeyExpr": "Id",
|
||||
"TreeParentIdExpr": "ParentId",
|
||||
"TreeAutoExpandAll": true,
|
||||
"GanttKeyExpr": "",
|
||||
"GanttParentIdExpr": "",
|
||||
"GanttAutoExpandAll": false,
|
||||
"GanttTitleExpr": "",
|
||||
"GanttStartExpr": "",
|
||||
"GanttEndExpr": "",
|
||||
"GanttProgressExpr": "",
|
||||
"SchedulerTextExpr": "",
|
||||
"SchedulerStartDateExpr": "",
|
||||
"SchedulerEndDateExpr": "",
|
||||
"Groups": [
|
||||
{
|
||||
"Caption": "",
|
||||
"ColCount": 1,
|
||||
"Items": [
|
||||
{
|
||||
"DataField": "Id",
|
||||
"CaptionName": "App.Listform.ListformField.Id",
|
||||
"EditorType": "dxTextBox",
|
||||
"EditorOptions": "",
|
||||
"EditorScript": "",
|
||||
"ColSpan": 1,
|
||||
"IsRequired": true,
|
||||
"DbSourceType": 9,
|
||||
"TurkishCaption": "Id",
|
||||
"EnglishCaption": "Id",
|
||||
"LookupDataSourceType": 1,
|
||||
"ValueExpr": "Key",
|
||||
"DisplayExpr": "Name",
|
||||
"LookupQuery": ""
|
||||
},
|
||||
{
|
||||
"DataField": "BranchId",
|
||||
"CaptionName": "App.Listform.ListformField.BranchId",
|
||||
"EditorType": "dxSelectBox",
|
||||
"EditorOptions": "",
|
||||
"EditorScript": "",
|
||||
"ColSpan": 1,
|
||||
"IsRequired": false,
|
||||
"DbSourceType": 9,
|
||||
"TurkishCaption": "Branch Id",
|
||||
"EnglishCaption": "Branch Id",
|
||||
"LookupDataSourceType": 2,
|
||||
"ValueExpr": "Key",
|
||||
"DisplayExpr": "Name",
|
||||
"LookupQuery": "SELECT \u0022Id\u0022 AS \u0022Key\u0022, \u0022Name\u0022 AS \u0022Name\u0022 FROM \u0022Sas_T_Branch\u0022 ORDER BY \u0022Name\u0022;"
|
||||
},
|
||||
{
|
||||
"DataField": "Name",
|
||||
"CaptionName": "App.Listform.ListformField.Name",
|
||||
"EditorType": "dxTextBox",
|
||||
"EditorOptions": "",
|
||||
"EditorScript": "",
|
||||
"ColSpan": 1,
|
||||
"IsRequired": true,
|
||||
"DbSourceType": 16,
|
||||
"TurkishCaption": "Name",
|
||||
"EnglishCaption": "Name",
|
||||
"LookupDataSourceType": 1,
|
||||
"ValueExpr": "Key",
|
||||
"DisplayExpr": "Name",
|
||||
"LookupQuery": ""
|
||||
},
|
||||
{
|
||||
"DataField": "ParentId",
|
||||
"CaptionName": "App.Listform.ListformField.ParentId",
|
||||
"EditorType": "dxSelectBox",
|
||||
"EditorOptions": "",
|
||||
"EditorScript": "",
|
||||
"ColSpan": 1,
|
||||
"IsRequired": false,
|
||||
"DbSourceType": 9,
|
||||
"TurkishCaption": "Parent Id",
|
||||
"EnglishCaption": "Parent Id",
|
||||
"LookupDataSourceType": 2,
|
||||
"ValueExpr": "Key",
|
||||
"DisplayExpr": "Name",
|
||||
"LookupQuery": "SELECT \u0022Id\u0022 AS \u0022Key\u0022, \u0022Name\u0022 AS \u0022Name\u0022 FROM \u0022Adm_T_Department\u0022 ORDER BY \u0022Name\u0022;"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"IsDeletedField": true,
|
||||
"IsCreatedField": true,
|
||||
"InsertedRecords": {
|
||||
"LanguageKeys": [
|
||||
"App.Wizard.Departments",
|
||||
"App.Wizard.Departments.Title",
|
||||
"App.Wizard.Departments.Desc"
|
||||
],
|
||||
"PermissionGroupNames": [],
|
||||
"PermissionNames": [
|
||||
"App.Wizard.Departments",
|
||||
"App.Wizard.Departments.Create",
|
||||
"App.Wizard.Departments.Update",
|
||||
"App.Wizard.Departments.Delete",
|
||||
"App.Wizard.Departments.Export",
|
||||
"App.Wizard.Departments.Import",
|
||||
"App.Wizard.Departments.Note"
|
||||
],
|
||||
"MenuCodes": [
|
||||
"App.Wizard.Departments"
|
||||
],
|
||||
"DataSourceCodes": []
|
||||
}
|
||||
}
|
||||
|
|
@ -356,6 +356,7 @@ public class WizardDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
CaptionName = item.CaptionName,
|
||||
Visible = item.DataField != input.KeyFieldName,
|
||||
IsActive = true,
|
||||
Width = 0, //Fit columns için hepsine sıfır veriyorum.
|
||||
AllowSearch = true,
|
||||
ListOrderNo = fieldOrder,
|
||||
SourceDbType = item.DbSourceType,
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ public enum TableNameEnum
|
|||
ReportTemplate,
|
||||
IpRestriction,
|
||||
Sector,
|
||||
Department,
|
||||
JobPosition,
|
||||
ContactTitle,
|
||||
Currency,
|
||||
CountryGroup,
|
||||
|
|
|
|||
|
|
@ -71,6 +71,22 @@ public static class PlatformConsts
|
|||
public const string MaxConcurrentUsers = "MaxConcurrentUsers";
|
||||
}
|
||||
|
||||
public static class Branches
|
||||
{
|
||||
public const string BranchCode = "DEMO";
|
||||
public const string BranchName = "Demo Şube";
|
||||
public const long BranchVknTckn = 52849619172;
|
||||
public const string BranchTaxOffice = "Sarıgazi";
|
||||
public const string BranchMobileNumber = "5449476346";
|
||||
public const string BranchCountry = "Türkiye";
|
||||
public const string BranchCity = "İstanbul";
|
||||
public const string BranchDistrict = "Ümraniye";
|
||||
public const string BranchTownship = "Esenşehir";
|
||||
public const string BranchEmail = "demo@sozsoft.com";
|
||||
public const string BranchWebsite = "www.sozsoft.com";
|
||||
public const bool BranchIsActive = true;
|
||||
}
|
||||
|
||||
public static class AbpIdentity
|
||||
{
|
||||
public const string GroupName = $"{Prefix.Abp}.Identity";
|
||||
|
|
@ -97,6 +113,8 @@ public static class PlatformConsts
|
|||
public const string IsVerified = "IsVerified";
|
||||
public const string RocketUsername = "RocketUsername";
|
||||
public const string WorkHour = "WorkHour";
|
||||
public const string DepartmentId = "DepartmentId";
|
||||
public const string JobPositionId = "JobPositionId";
|
||||
|
||||
public const string UserLockedOutMessage = GroupName + ".UserLockedOutMessage";
|
||||
public const string InvalidUserNameOrPassword = GroupName + ".InvalidUserNameOrPassword";
|
||||
|
|
@ -313,6 +331,8 @@ public static class PlatformConsts
|
|||
public const string UomCategory = Default + ".UomCategory";
|
||||
|
||||
public const string Sector = Default + ".Sector";
|
||||
public const string Department = Default + ".Department";
|
||||
public const string JobPosition = Default + ".JobPosition";
|
||||
}
|
||||
|
||||
public static class Restrictions
|
||||
|
|
|
|||
|
|
@ -69,6 +69,8 @@ public static class TableNameResolver
|
|||
|
||||
// 🔹 ADMINISTRATION TABLOLARI
|
||||
{ nameof(TableNameEnum.Sector), (TablePrefix.TenantByName, MenuPrefix.Administration) },
|
||||
{ nameof(TableNameEnum.Department), (TablePrefix.TenantByName, MenuPrefix.Administration) },
|
||||
{ nameof(TableNameEnum.JobPosition), (TablePrefix.TenantByName, MenuPrefix.Administration) },
|
||||
{ nameof(TableNameEnum.WorkHour), (TablePrefix.TenantByName, MenuPrefix.Administration) },
|
||||
{ nameof(TableNameEnum.IpRestriction), (TablePrefix.TenantByName, MenuPrefix.Administration) },
|
||||
{ nameof(TableNameEnum.Note), (TablePrefix.TenantByName, MenuPrefix.Administration) },
|
||||
|
|
|
|||
|
|
@ -341,6 +341,8 @@ public static class SeedConsts
|
|||
public const string Uom = Default + ".Uom";
|
||||
|
||||
public const string Sector = Default + ".Sector";
|
||||
public const string Department = Default + ".Department";
|
||||
public const string JobPosition = Default + ".JobPosition";
|
||||
}
|
||||
|
||||
public static class Restrictions
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Sozsoft.Platform.Entities;
|
||||
|
||||
public class Department : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public Guid? ParentId { get; set; }
|
||||
|
||||
public Guid? BranchId { get; set; }
|
||||
|
||||
Guid? IMultiTenant.TenantId => TenantId;
|
||||
|
||||
public ICollection<JobPosition> JobPositions { get; set; }
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Sozsoft.Platform.Entities;
|
||||
|
||||
public class JobPosition : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public Guid? BranchId { get; set; }
|
||||
|
||||
public Guid DepartmentId { get; set; }
|
||||
public Department Department { get; set; }
|
||||
|
||||
public Guid? ParentId { get; set; }
|
||||
|
||||
Guid? IMultiTenant.TenantId => TenantId;
|
||||
}
|
||||
|
|
@ -27,5 +27,10 @@ public class Branch : FullAuditedEntity<Guid>
|
|||
public bool? IsActive { get; set; }
|
||||
|
||||
public ICollection<BranchUsers> UserBranches { get; set; }
|
||||
|
||||
public Branch(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,5 +50,25 @@ public static class AbpIdentityUserExtensions
|
|||
{
|
||||
return user.GetProperty<string>(PlatformConsts.AbpIdentity.User.WorkHour);
|
||||
}
|
||||
|
||||
//DepartmentId
|
||||
public static void SetDepartmentId(this IdentityUser user, string departmentId)
|
||||
{
|
||||
user.SetProperty(PlatformConsts.AbpIdentity.User.DepartmentId, departmentId);
|
||||
}
|
||||
public static string GetDepartmentId(this IdentityUser user)
|
||||
{
|
||||
return user.GetProperty<string>(PlatformConsts.AbpIdentity.User.DepartmentId);
|
||||
}
|
||||
|
||||
//JobPositionId
|
||||
public static void SetJobPositionId(this IdentityUser user, string jobPositionId)
|
||||
{
|
||||
user.SetProperty(PlatformConsts.AbpIdentity.User.JobPositionId, jobPositionId);
|
||||
}
|
||||
public static string GetJobPositionId(this IdentityUser user)
|
||||
{
|
||||
return user.GetProperty<string>(PlatformConsts.AbpIdentity.User.JobPositionId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -105,6 +105,8 @@ public class PlatformDbContext :
|
|||
public DbSet<UomCategory> UomCategories { get; set; }
|
||||
public DbSet<Uom> Uoms { get; set; }
|
||||
public DbSet<WorkHour> WorkHours { get; set; }
|
||||
public DbSet<Department> Departments { get; set; }
|
||||
public DbSet<JobPosition> JobPositions { get; set; }
|
||||
#endregion
|
||||
|
||||
public PlatformDbContext(DbContextOptions<PlatformDbContext> options)
|
||||
|
|
@ -232,7 +234,7 @@ public class PlatformDbContext :
|
|||
{
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.MenuGroup)), Prefix.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
|
||||
|
||||
b.Property(a => a.Name).IsRequired().HasMaxLength(128);
|
||||
});
|
||||
|
||||
|
|
@ -610,7 +612,7 @@ public class PlatformDbContext :
|
|||
|
||||
b.Property(x => x.Name).IsRequired().HasMaxLength(128);
|
||||
});
|
||||
|
||||
|
||||
builder.Entity<ContactTitle>(b =>
|
||||
{
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ContactTitle)), Prefix.DbSchema);
|
||||
|
|
@ -778,6 +780,28 @@ public class PlatformDbContext :
|
|||
b.Property(x => x.Sunday);
|
||||
});
|
||||
|
||||
builder.Entity<Department>(b =>
|
||||
{
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Department)), Prefix.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
|
||||
b.Property(x => x.Name).IsRequired().HasMaxLength(64);
|
||||
});
|
||||
|
||||
builder.Entity<JobPosition>(b =>
|
||||
{
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.JobPosition)), Prefix.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
|
||||
b.Property(x => x.Name).IsRequired().HasMaxLength(64);
|
||||
b.Property(x => x.DepartmentId).IsRequired();
|
||||
|
||||
b.HasOne(x => x.Department)
|
||||
.WithMany(x => x.JobPositions)
|
||||
.HasForeignKey(x => x.DepartmentId)
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
});
|
||||
|
||||
//Web Site
|
||||
builder.Entity<About>(b =>
|
||||
{
|
||||
|
|
@ -1002,7 +1026,5 @@ public class PlatformDbContext :
|
|||
b.Property(x => x.PrimaryEntityType).HasMaxLength(256);
|
||||
b.Property(x => x.ControllerName).HasMaxLength(256);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,6 +55,24 @@ public static class PlatformEfCoreEntityExtensionMappings
|
|||
}
|
||||
);
|
||||
|
||||
ObjectExtensionManager.Instance
|
||||
.MapEfCoreProperty<IdentityUser, string>(
|
||||
PlatformConsts.AbpIdentity.User.DepartmentId,
|
||||
(entityBuilder, propertyBuilder) =>
|
||||
{
|
||||
propertyBuilder.HasDefaultValue(null);
|
||||
}
|
||||
);
|
||||
|
||||
ObjectExtensionManager.Instance
|
||||
.MapEfCoreProperty<IdentityUser, string>(
|
||||
PlatformConsts.AbpIdentity.User.JobPositionId,
|
||||
(entityBuilder, propertyBuilder) =>
|
||||
{
|
||||
propertyBuilder.HasDefaultValue(null);
|
||||
}
|
||||
);
|
||||
|
||||
ObjectExtensionManager.Instance
|
||||
.MapEfCoreProperty<Tenant, bool>(
|
||||
PlatformConsts.Tenants.IsActive,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
|||
namespace Sozsoft.Platform.Migrations
|
||||
{
|
||||
[DbContext(typeof(PlatformDbContext))]
|
||||
[Migration("20260502173210_Initial")]
|
||||
[Migration("20260504085315_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -1644,6 +1644,61 @@ namespace Sozsoft.Platform.Migrations
|
|||
b.ToTable("Sas_H_Demo", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Sozsoft.Platform.Entities.Department", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("BranchId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
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<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<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("nvarchar(64)");
|
||||
|
||||
b.Property<Guid?>("ParentId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Adm_T_Department", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Sozsoft.Platform.Entities.District", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -2045,6 +2100,66 @@ namespace Sozsoft.Platform.Migrations
|
|||
b.ToTable("Adm_T_IpRestriction", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Sozsoft.Platform.Entities.JobPosition", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("BranchId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
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<Guid>("DepartmentId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
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<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("nvarchar(64)");
|
||||
|
||||
b.Property<Guid?>("ParentId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("DepartmentId");
|
||||
|
||||
b.ToTable("Adm_T_JobPosition", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Sozsoft.Platform.Entities.ListForm", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -4963,6 +5078,9 @@ namespace Sozsoft.Platform.Migrations
|
|||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("DepartmentId")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasMaxLength(256)
|
||||
|
|
@ -5004,6 +5122,9 @@ namespace Sozsoft.Platform.Migrations
|
|||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false);
|
||||
|
||||
b.Property<string>("JobPositionId")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
|
@ -6129,6 +6250,17 @@ namespace Sozsoft.Platform.Migrations
|
|||
.HasForeignKey("CityId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Sozsoft.Platform.Entities.JobPosition", b =>
|
||||
{
|
||||
b.HasOne("Sozsoft.Platform.Entities.Department", "Department")
|
||||
.WithMany("JobPositions")
|
||||
.HasForeignKey("DepartmentId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Department");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Sozsoft.Platform.Entities.ListFormCustomization", b =>
|
||||
{
|
||||
b.HasOne("Sozsoft.Platform.Entities.ListForm", null)
|
||||
|
|
@ -6434,6 +6566,11 @@ namespace Sozsoft.Platform.Migrations
|
|||
b.Navigation("Cities");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Sozsoft.Platform.Entities.Department", b =>
|
||||
{
|
||||
b.Navigation("JobPositions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Sozsoft.Platform.Entities.Order", b =>
|
||||
{
|
||||
b.Navigation("Items");
|
||||
|
|
@ -417,7 +417,9 @@ namespace Sozsoft.Platform.Migrations
|
|||
ShouldChangePasswordOnNextLogin = table.Column<bool>(type: "bit", nullable: false),
|
||||
EntityVersion = table.Column<int>(type: "int", nullable: false),
|
||||
LastPasswordChangeTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
|
||||
DepartmentId = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
IsVerified = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
JobPositionId = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
LoginEndDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
RocketUsername = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WorkHour = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
|
|
@ -436,6 +438,28 @@ namespace Sozsoft.Platform.Migrations
|
|||
table.PrimaryKey("PK_AbpUsers", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Adm_T_Department",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
||||
ParentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
BranchId = table.Column<Guid>(type: "uniqueidentifier", 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_Adm_T_Department", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Adm_T_IpRestriction",
|
||||
columns: table => new
|
||||
|
|
@ -1762,6 +1786,35 @@ namespace Sozsoft.Platform.Migrations
|
|||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Adm_T_JobPosition",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
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),
|
||||
ParentId = table.Column<Guid>(type: "uniqueidentifier", 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_Adm_T_JobPosition", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Adm_T_JobPosition_Adm_T_Department_DepartmentId",
|
||||
column: x => x.DepartmentId,
|
||||
principalTable: "Adm_T_Department",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Adm_T_ReportTemplate",
|
||||
columns: table => new
|
||||
|
|
@ -2696,6 +2749,11 @@ namespace Sozsoft.Platform.Migrations
|
|||
table: "AbpUsers",
|
||||
column: "UserName");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Adm_T_JobPosition_DepartmentId",
|
||||
table: "Adm_T_JobPosition",
|
||||
column: "DepartmentId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Adm_T_ReportTemplate_CategoryId",
|
||||
table: "Adm_T_ReportTemplate",
|
||||
|
|
@ -2988,6 +3046,9 @@ namespace Sozsoft.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "Adm_T_IpRestriction");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Adm_T_JobPosition");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Adm_T_Note");
|
||||
|
||||
|
|
@ -3132,6 +3193,9 @@ namespace Sozsoft.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "AbpUsers");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Adm_T_Department");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Adm_T_ReportCategory");
|
||||
|
||||
|
|
@ -1641,6 +1641,61 @@ namespace Sozsoft.Platform.Migrations
|
|||
b.ToTable("Sas_H_Demo", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Sozsoft.Platform.Entities.Department", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("BranchId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
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<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<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("nvarchar(64)");
|
||||
|
||||
b.Property<Guid?>("ParentId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Adm_T_Department", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Sozsoft.Platform.Entities.District", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -2042,6 +2097,66 @@ namespace Sozsoft.Platform.Migrations
|
|||
b.ToTable("Adm_T_IpRestriction", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Sozsoft.Platform.Entities.JobPosition", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("BranchId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
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<Guid>("DepartmentId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
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<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("nvarchar(64)");
|
||||
|
||||
b.Property<Guid?>("ParentId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("DepartmentId");
|
||||
|
||||
b.ToTable("Adm_T_JobPosition", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Sozsoft.Platform.Entities.ListForm", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -4960,6 +5075,9 @@ namespace Sozsoft.Platform.Migrations
|
|||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("DepartmentId")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasMaxLength(256)
|
||||
|
|
@ -5001,6 +5119,9 @@ namespace Sozsoft.Platform.Migrations
|
|||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false);
|
||||
|
||||
b.Property<string>("JobPositionId")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
|
@ -6126,6 +6247,17 @@ namespace Sozsoft.Platform.Migrations
|
|||
.HasForeignKey("CityId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Sozsoft.Platform.Entities.JobPosition", b =>
|
||||
{
|
||||
b.HasOne("Sozsoft.Platform.Entities.Department", "Department")
|
||||
.WithMany("JobPositions")
|
||||
.HasForeignKey("DepartmentId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Department");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Sozsoft.Platform.Entities.ListFormCustomization", b =>
|
||||
{
|
||||
b.HasOne("Sozsoft.Platform.Entities.ListForm", null)
|
||||
|
|
@ -6431,6 +6563,11 @@ namespace Sozsoft.Platform.Migrations
|
|||
b.Navigation("Cities");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Sozsoft.Platform.Entities.Department", b =>
|
||||
{
|
||||
b.Navigation("JobPositions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Sozsoft.Platform.Entities.Order", b =>
|
||||
{
|
||||
b.Navigation("Items");
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ using System.Collections.Generic;
|
|||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Linq.Dynamic.Core;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Sozsoft.Platform.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
|
|
|||
|
|
@ -361,9 +361,7 @@
|
|||
"props": null,
|
||||
"description": null,
|
||||
"isActive": true,
|
||||
"dependencies": [
|
||||
"DynamicEntityComponent"
|
||||
]
|
||||
"dependencies": ["DynamicEntityComponent"]
|
||||
}
|
||||
],
|
||||
"Abouts": [
|
||||
|
|
@ -1245,5 +1243,61 @@
|
|||
"Saturday": true,
|
||||
"Sunday": true
|
||||
}
|
||||
],
|
||||
"Departments": [
|
||||
{
|
||||
"Name": "Yönetim",
|
||||
"BranchCode": "DEMO"
|
||||
},
|
||||
{
|
||||
"Name": "Üretim",
|
||||
"BranchCode": "DEMO",
|
||||
"ParentName": "Yönetim"
|
||||
},
|
||||
{
|
||||
"Name": "Satış",
|
||||
"BranchCode": "DEMO",
|
||||
"ParentName": "Yönetim"
|
||||
},
|
||||
{
|
||||
"Name": "Finans",
|
||||
"BranchCode": "DEMO",
|
||||
"ParentName": "Yönetim"
|
||||
},
|
||||
{
|
||||
"Name": "Muhasebe",
|
||||
"BranchCode": "DEMO",
|
||||
"ParentName": "Finans"
|
||||
},
|
||||
{
|
||||
"Name": "Bilgi İşlem",
|
||||
"BranchCode": "DEMO",
|
||||
"ParentName": "Yönetim"
|
||||
}
|
||||
],
|
||||
"JobPositions": [
|
||||
{
|
||||
"DepartmentName": "Yönetim",
|
||||
"Name": "Genel Müdür",
|
||||
"BranchCode": "DEMO"
|
||||
},
|
||||
{
|
||||
"DepartmentName": "Yönetim",
|
||||
"Name": "Genel Müdür Yardımcısı",
|
||||
"BranchCode": "DEMO",
|
||||
"ParentName": "Genel Müdür"
|
||||
},
|
||||
{
|
||||
"DepartmentName": "Muhasebe",
|
||||
"Name": "Muhasebe Müdürü",
|
||||
"BranchCode": "DEMO",
|
||||
"ParentName": "Genel Müdür"
|
||||
},
|
||||
{
|
||||
"DepartmentName": "Muhasebe",
|
||||
"Name": "Muhasebe Şefi",
|
||||
"BranchCode": "DEMO",
|
||||
"ParentName": "Muhasebe Müdürü"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public class TenantSeederDto
|
|||
public List<CustomEndpointSeedDto> CustomEndpoints { get; set; }
|
||||
public List<CustomComponentSeedDto> CustomComponents { get; set; }
|
||||
|
||||
//Tanımlamalar
|
||||
//Definitions
|
||||
public List<SectorSeedDto> Sectors { get; set; }
|
||||
public List<WorkHourSeedDto> WorkHours { get; set; }
|
||||
public List<UomCategorySeedDto> UomCategories { get; set; }
|
||||
|
|
@ -32,7 +32,10 @@ public class TenantSeederDto
|
|||
public List<SkillTypeSeedDto> SkillTypes { get; set; }
|
||||
public List<SkillSeedDto> Skills { get; set; }
|
||||
public List<SkillLevelSeedDto> SkillLevels { get; set; }
|
||||
public List<DepartmentSeedDto> Departments { get; set; }
|
||||
public List<JobPositionSeedDto> JobPositions { get; set; }
|
||||
|
||||
//Public
|
||||
public List<AboutSeedDto> Abouts { get; set; }
|
||||
public List<ServiceSeedDto> Services { get; set; }
|
||||
public List<PaymentMethodSeedDto> PaymentMethods { get; set; }
|
||||
|
|
@ -46,9 +49,25 @@ public class TenantSeederDto
|
|||
public List<ReportCategorySeedDto> ReportCategories { get; set; }
|
||||
public List<ReportTemplateSeedDto> ReportTemplates { get; set; }
|
||||
|
||||
//Forum
|
||||
public List<ForumCategorySeedDto> ForumCategories { get; set; }
|
||||
}
|
||||
|
||||
public class JobPositionSeedDto
|
||||
{
|
||||
public string DepartmentName { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string BranchCode { get; set; }
|
||||
public string ParentName { get; set; }
|
||||
}
|
||||
|
||||
public class DepartmentSeedDto
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string BranchCode { get; set; }
|
||||
public string ParentName { get; set; }
|
||||
}
|
||||
|
||||
public class GlobalSearchSeedDto
|
||||
{
|
||||
public string System { get; set; }
|
||||
|
|
@ -243,6 +262,7 @@ public class ProductSeedDto
|
|||
public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||
{
|
||||
private readonly IClock _clock;
|
||||
private readonly IRepository<Branch, Guid> _branchRepository;
|
||||
private readonly IRepository<GlobalSearch, int> _globalSearch;
|
||||
private readonly IRepository<CustomEndpoint, Guid> _customEndpointRepository;
|
||||
private readonly IRepository<CustomComponent, Guid> _customComponentRepository;
|
||||
|
|
@ -268,11 +288,14 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
private readonly OrganizationUnitManager _organizationUnitManager;
|
||||
private readonly IIdentityUserRepository _repositoryUser;
|
||||
private readonly IRepository<Product, Guid> _productRepository;
|
||||
private readonly IRepository<Department, Guid> _departmentRepository;
|
||||
private readonly IRepository<JobPosition, Guid> _jobPositionRepository;
|
||||
private readonly ICurrentTenant _currentTenant;
|
||||
|
||||
public TenantDataSeeder(
|
||||
IClock clock,
|
||||
IIdentityUserRepository repositoryUser,
|
||||
IRepository<Branch, Guid> branchRepository,
|
||||
IRepository<GlobalSearch, int> globalSearch,
|
||||
IRepository<Sector, Guid> sectorRepository,
|
||||
IRepository<UomCategory, string> uomCategoryRepository,
|
||||
|
|
@ -296,12 +319,15 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
IRepository<ForumCategory, Guid> forumCategoryRepository,
|
||||
IRepository<Currency, string> currencyRepository,
|
||||
IRepository<OrganizationUnit, Guid> organizationUnitRepository,
|
||||
IRepository<Department, Guid> departmentRepository,
|
||||
IRepository<JobPosition, Guid> jobPositionRepository,
|
||||
OrganizationUnitManager organizationUnitManager,
|
||||
ICurrentTenant currentTenant
|
||||
)
|
||||
{
|
||||
_clock = clock;
|
||||
_repositoryUser = repositoryUser;
|
||||
_branchRepository = branchRepository;
|
||||
_globalSearch = globalSearch;
|
||||
_sectorRepository = sectorRepository;
|
||||
_uomCategoryRepository = uomCategoryRepository;
|
||||
|
|
@ -325,6 +351,8 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
_forumCategoryRepository = forumCategoryRepository;
|
||||
_currencyRepository = currencyRepository;
|
||||
_organizationUnitRepository = organizationUnitRepository;
|
||||
_departmentRepository = departmentRepository;
|
||||
_jobPositionRepository = jobPositionRepository;
|
||||
_organizationUnitManager = organizationUnitManager;
|
||||
_currentTenant = currentTenant;
|
||||
}
|
||||
|
|
@ -689,7 +717,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach (var item in items.ReportTemplates)
|
||||
{
|
||||
var exists = await _reportTemplatesRepository.AnyAsync(x => x.Name == item.Name);
|
||||
|
|
@ -707,6 +735,41 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
item.Status
|
||||
), autoSave: true);
|
||||
}
|
||||
|
||||
foreach (var item in items.Departments)
|
||||
{
|
||||
var exists = await _departmentRepository.AnyAsync(x => x.Name == item.Name);
|
||||
if (exists)
|
||||
continue;
|
||||
|
||||
var branch = await _branchRepository.FirstOrDefaultAsync(x => x.Code == item.BranchCode);
|
||||
var parent = await _departmentRepository.FirstOrDefaultAsync(x => x.Name == item.ParentName);
|
||||
|
||||
await _departmentRepository.InsertAsync(new Department
|
||||
{
|
||||
Name = item.Name,
|
||||
BranchId = branch.Id,
|
||||
ParentId = parent?.Id
|
||||
}, autoSave: true);
|
||||
}
|
||||
|
||||
foreach (var item in items.JobPositions)
|
||||
{
|
||||
var exists = await _jobPositionRepository.AnyAsync(x => x.Name == item.Name);
|
||||
if (exists)
|
||||
continue;
|
||||
|
||||
var branch = await _branchRepository.FirstOrDefaultAsync(x => x.Code == item.BranchCode);
|
||||
var department = await _departmentRepository.FirstOrDefaultAsync(x => x.Name == item.DepartmentName);
|
||||
var parent = await _jobPositionRepository.FirstOrDefaultAsync(x => x.Name == item.ParentName);
|
||||
|
||||
await _jobPositionRepository.InsertAsync(new JobPosition
|
||||
{
|
||||
Name = item.Name,
|
||||
DepartmentId = department.Id,
|
||||
BranchId = branch.Id,
|
||||
ParentId = parent?.Id
|
||||
}, autoSave: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -166,7 +166,6 @@ function UserDetails() {
|
|||
</FormItem>
|
||||
</div>
|
||||
|
||||
{/* Personal Information */}
|
||||
<div>
|
||||
<FormItem
|
||||
label={translate('::Abp.Identity.User.UserInformation.Surname')}
|
||||
|
|
@ -244,6 +243,36 @@ function UserDetails() {
|
|||
</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">
|
||||
|
|
@ -295,6 +324,7 @@ function UserDetails() {
|
|||
<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}
|
||||
|
|
@ -318,7 +348,7 @@ function UserDetails() {
|
|||
field={field}
|
||||
form={form}
|
||||
value={
|
||||
field.value ? dayjs(field.value).format('L LT') : undefined
|
||||
field.value ? dayjs(field.value).format('DD/MM/YYYY HH:mm') : undefined
|
||||
}
|
||||
disabled
|
||||
/>
|
||||
|
|
@ -334,7 +364,7 @@ function UserDetails() {
|
|||
field={field}
|
||||
form={form}
|
||||
value={
|
||||
field.value ? dayjs(field.value).format('L LT') : undefined
|
||||
field.value ? dayjs(field.value).format('DD/MM/YYYY HH:mm') : undefined
|
||||
}
|
||||
disabled
|
||||
/>
|
||||
|
|
|
|||
Loading…
Reference in a new issue