From 192eee46ed79f469762babf52b8cb0f59e8b0ce0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96ZT=C3=9CRK?= <76204082+iamsedatozturk@users.noreply.github.com> Date: Fri, 24 Oct 2025 08:37:38 +0300 Subject: [PATCH] Hr Performans --- .../Seeds/HostData.json | 42 +- .../Seeds/ListFormsSeeder.cs | 496 ++++++++++++++++++ .../Enums/LookUpQueryValues.cs | 9 +- .../Enums/TableNameEnum.cs | 2 +- .../PlatformConsts.cs | 2 +- .../TableNameResolver.cs | 1 + .../Kurs.Platform.Domain/Data/SeedConsts.cs | 2 +- .../Entities/Tenant/Hr/Department.cs | 2 + .../Entities/Tenant/Hr/Performans360.cs | 25 + .../Entities/Tenant/Hr/Template360.cs | 3 + .../EntityFrameworkCore/PlatformDbContext.cs | 36 +- ....cs => 20251023210323_Initial.Designer.cs} | 103 +++- ...6_Initial.cs => 20251023210323_Initial.cs} | 54 +- .../PlatformDbContextModelSnapshot.cs | 101 ++++ .../Tenants/Seeds/TenantData.json | 75 ++- .../Tenants/TenantDataSeeder.cs | 29 +- .../Tenants/TenantSeederDto.cs | 13 + ui/src/shared/useListFormColumns.ts | 2 - .../DialogContext/DialogShowComponent.tsx | 8 + 19 files changed, 961 insertions(+), 44 deletions(-) create mode 100644 api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/Performans360.cs rename api/src/Kurs.Platform.EntityFrameworkCore/Migrations/{20251023144126_Initial.Designer.cs => 20251023210323_Initial.Designer.cs} (99%) rename api/src/Kurs.Platform.EntityFrameworkCore/Migrations/{20251023144126_Initial.cs => 20251023210323_Initial.cs} (99%) diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/HostData.json b/api/src/Kurs.Platform.DbMigrator/Seeds/HostData.json index 426b06aa..0b3bec8a 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/HostData.json +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/HostData.json @@ -12117,9 +12117,9 @@ }, { "resourceName": "Platform", - "key": "App.Hr.Evaluation", - "tr": "360° Değerlendirme", - "en": "360° Evaluation" + "key": "App.Hr.Performance360", + "tr": "360° Performance", + "en": "360° Performans" }, { "resourceName": "Platform", @@ -15055,12 +15055,12 @@ }, { "ParentCode": "App.Hr", - "Code": "App.Hr.Evaluation", - "DisplayName": "App.Hr.Evaluation", + "Code": "App.Hr.Performance360", + "DisplayName": "App.Hr.Performance360", "Order": 12, - "Url": "/admin/hr/360-evaluation", + "Url": "/admin/list/list-performance360", "Icon": "FcSurvey", - "RequiredPermissionName": "App.Hr.Evaluation", + "RequiredPermissionName": "App.Hr.Performance360", "IsDisabled": false }, { @@ -24700,17 +24700,17 @@ }, { "GroupName": "App.Hr", - "Name": "App.Hr.Evaluation", + "Name": "App.Hr.Performance360", "ParentName": null, - "DisplayName": "App.Hr.Evaluation", + "DisplayName": "App.Hr.Performance360", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { "GroupName": "App.Hr", - "Name": "App.Hr.Evaluation.Create", - "ParentName": "App.Hr.Evaluation", + "Name": "App.Hr.Performance360.Create", + "ParentName": "App.Hr.Performance360", "DisplayName": "Create", "IsEnabled": true, "MultiTenancySide": 3, @@ -24718,8 +24718,8 @@ }, { "GroupName": "App.Hr", - "Name": "App.Hr.Evaluation.Update", - "ParentName": "App.Hr.Evaluation", + "Name": "App.Hr.Performance360.Update", + "ParentName": "App.Hr.Performance360", "DisplayName": "Update", "IsEnabled": true, "MultiTenancySide": 3, @@ -24727,8 +24727,8 @@ }, { "GroupName": "App.Hr", - "Name": "App.Hr.Evaluation.Delete", - "ParentName": "App.Hr.Evaluation", + "Name": "App.Hr.Performance360.Delete", + "ParentName": "App.Hr.Performance360", "DisplayName": "Delete", "IsEnabled": true, "MultiTenancySide": 3, @@ -24736,8 +24736,8 @@ }, { "GroupName": "App.Hr", - "Name": "App.Hr.Evaluation.Export", - "ParentName": "App.Hr.Evaluation", + "Name": "App.Hr.Performance360.Export", + "ParentName": "App.Hr.Performance360", "DisplayName": "Export", "IsEnabled": true, "MultiTenancySide": 3, @@ -24745,8 +24745,8 @@ }, { "GroupName": "App.Hr", - "Name": "App.Hr.Evaluation.Import", - "ParentName": "App.Hr.Evaluation", + "Name": "App.Hr.Performance360.Import", + "ParentName": "App.Hr.Performance360", "DisplayName": "Import", "IsEnabled": true, "MultiTenancySide": 3, @@ -24754,8 +24754,8 @@ }, { "GroupName": "App.Hr", - "Name": "App.Hr.Evaluation.Activity", - "ParentName": "App.Hr.Evaluation", + "Name": "App.Hr.Performance360.Activity", + "ParentName": "App.Hr.Performance360", "DisplayName": "Activity", "IsEnabled": true, "MultiTenancySide": 3, diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs index 74dec2aa..5fb2bf14 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs @@ -37640,6 +37640,502 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency } #endregion + #region Performans 360 + if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Performance360)) + { + var listFormPerformans360 = await _listFormRepository.InsertAsync( + new ListForm() + { + ListFormType = ListFormTypeEnum.List, + IsSubForm = true, + LayoutJson = JsonSerializer.Serialize(new LayoutDto() + { + Grid = true, + Card = true, + Pivot = true, + Chart = true, + DefaultLayout = "grid", + CardLayoutColumn = 3 + }), + CultureName = LanguageCodes.En, + ListFormCode = ListFormCodes.Lists.Performance360, + Name = AppCodes.Hr.Performance360, + Title = AppCodes.Hr.Performance360, + DataSourceCode = SeedConsts.DataSources.DefaultCode, + IsTenant = true, + IsBranch = false, + IsOrganizationUnit = false, + Description = AppCodes.Hr.Performance360, + SelectCommandType = SelectCommandTypeEnum.Table, + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Performance360)), + 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, + ColumnAutoWidth = true, + ColumnChooserEnabled = true, + AllowColumnResizing = true, + AllowColumnReordering = true, + ColumnResizingMode = "widget", + }), + PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto + { + C = AppCodes.Hr.Performance360 + ".Create", + R = AppCodes.Hr.Performance360, + U = AppCodes.Hr.Performance360 + ".Update", + D = AppCodes.Hr.Performance360 + ".Delete", + E = AppCodes.Hr.Performance360 + ".Export", + I = AppCodes.Hr.Performance360 + ".Import", + A = AppCodes.Hr.Performance360 + ".Activity", + }), + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Performance360))}\" 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 } + }), + 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 = "Template 360 Form", + Width = 500, + Height = 520 + }, + AllowDeleting = true, + AllowAdding = true, + AllowUpdating = true, + SendOnlyChangedFormValuesUpdate = false, + }), + InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { + FieldName = "CreationTime", + FieldDbType = DbType.DateTime, + Value = "@NOW", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "CreatorId", + FieldDbType = DbType.Guid, + Value = "@USERID", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "IsDeleted", + FieldDbType = DbType.Boolean, + Value = "false", + CustomValueType = FieldCustomValueTypeEnum.Value } + }), + EditingFormJson = JsonSerializer.Serialize(new List() + { + new() { + Order=1, ColCount=1, ColSpan=2, ItemType="group", Items = + [ + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired=true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 3, DataField = "TemplateId", ColSpan = 2, IsRequired=true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 4, DataField = "StartDate", ColSpan = 2, IsRequired=true, EditorType2 = EditorTypes.dxDateBox }, + new EditingFormItemDto { Order = 5, DataField = "EndDate", ColSpan = 2, IsRequired=true, EditorType2 = EditorTypes.dxDateBox }, + new EditingFormItemDto { Order = 6, DataField = "Status", ColSpan = 2, IsRequired=true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 7, DataField = "DepartmentId", ColSpan = 2, IsRequired=true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 8, DataField = "TargetEmployees", ColSpan = 2, IsRequired=true, EditorType2 = EditorTypes.dxTagBox }, + ] + } + }), + FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { + FieldName = "Status", + FieldDbType = DbType.String, + Value = "Draft", + CustomValueType = FieldCustomValueTypeEnum.Value }, + }), + CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { + new() { + Hint = "Evaluations", + Text = "Evaluations", + AuthName = TenantManagementPermissions.Tenants.ManageConnectionStrings, + DialogName = "Evaluation360", + DialogParameters = JsonSerializer.Serialize(new { + name = "@Name", + id = "@Id" + }) + }, + }), + } + ); + + #region Performans 360 Fields + await _listFormFieldRepository.InsertManyAsync([ + new() { + ListFormCode = listFormPerformans360.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "Id", + Width = 100, + ListOrderNo = 1, + Visible = false, + IsActive = true, + IsDeleted = false, + SortIndex = 0, + ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { + new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } + }), + ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto + { + AllowReordering = true, + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Hr.Performance360 + ".Create", + R = AppCodes.Hr.Performance360, + U = AppCodes.Hr.Performance360 + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormPerformans360.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Name", + Width = 250, + ListOrderNo = 2, + Visible = true, + IsActive = true, + IsDeleted = false, + SortIndex = 0, + ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { + new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } + }), + ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto + { + AllowReordering = true, + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Hr.Performance360 + ".Create", + R = AppCodes.Hr.Performance360, + U = AppCodes.Hr.Performance360 + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormPerformans360.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Description", + Width = 450, + ListOrderNo = 3, + Visible = true, + IsActive = true, + IsDeleted = false, + SortIndex = 0, + ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto + { + AllowReordering = true, + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Hr.Performance360 + ".Create", + R = AppCodes.Hr.Performance360, + U = AppCodes.Hr.Performance360 + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormPerformans360.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "TemplateId", + Width = 200, + ListOrderNo = 4, + Visible = true, + IsActive = true, + IsDeleted = false, + SortIndex = 0, + ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { + new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } + }), + LookupJson = JsonSerializer.Serialize(new LookupDto + { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "name", + ValueExpr = "key", + LookupQuery = LookUpQueryValues.Template360Values + }), + ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto + { + AllowReordering = true, + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Hr.Performance360 + ".Create", + R = AppCodes.Hr.Performance360, + U = AppCodes.Hr.Performance360 + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormPerformans360.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Date, + FieldName = "StartDate", + Width = 150, + ListOrderNo = 5, + Visible = true, + IsActive = true, + IsDeleted = false, + ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { + new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } + }), + ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto + { + AllowReordering = true, + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Hr.Performance360 + ".Create", + R = AppCodes.Hr.Performance360, + U = AppCodes.Hr.Performance360 + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormPerformans360.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Date, + FieldName = "EndDate", + Width = 150, + ListOrderNo = 6, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { + new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } + }), + ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto + { + AllowReordering = true, + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Hr.Performance360 + ".Create", + R = AppCodes.Hr.Performance360, + U = AppCodes.Hr.Performance360 + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormPerformans360.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Status", + Width = 100, + ListOrderNo = 7, + Visible = true, + IsActive = true, + IsDeleted = false, + SortIndex = 0, + ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { + new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } + }), + LookupJson = JsonSerializer.Serialize(new LookupDto + { + DataSourceType = UiLookupDataSourceTypeEnum.StaticData, + DisplayExpr = "name", + ValueExpr = "key", + LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { + new () { Key= "Draft", Name= "Draft" }, + new () { Key= "Active", Name= "Active" }, + new () { Key= "Completed", Name= "Completed"}, + new () { Key= "Cancelled", Name= "Cancelled" }, + }), + }), + ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto + { + AllowReordering = true, + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Hr.Performance360 + ".Create", + R = AppCodes.Hr.Performance360, + U = AppCodes.Hr.Performance360 + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormPerformans360.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "DepartmentId", + Width = 150, + ListOrderNo = 8, + Visible = true, + IsActive = true, + IsDeleted = false, + SortIndex = 0, + ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { + new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } + }), + LookupJson = JsonSerializer.Serialize(new LookupDto + { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "name", + ValueExpr = "key", + LookupQuery = LookUpQueryValues.DepartmentValues, + }), + ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto + { + AllowReordering = true, + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Hr.Performance360 + ".Create", + R = AppCodes.Hr.Performance360, + U = AppCodes.Hr.Performance360 + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormPerformans360.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "TargetEmployees", + Width = 300, + ListOrderNo = 9, + Visible = true, + IsActive = true, + IsDeleted = false, + SortIndex = 0, + ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { + new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } + }), + LookupJson = JsonSerializer.Serialize(new LookupDto + { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "name", + ValueExpr = "key", + LookupQuery = LookUpQueryValues.EmployeeValues, + }), + ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto + { + AllowReordering = true, + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Hr.Performance360 + ".Create", + R = AppCodes.Hr.Performance360, + U = AppCodes.Hr.Performance360 + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + ]); + #endregion + } + #endregion + #endregion } } diff --git a/api/src/Kurs.Platform.Domain.Shared/Enums/LookUpQueryValues.cs b/api/src/Kurs.Platform.Domain.Shared/Enums/LookUpQueryValues.cs index 1107d323..def533b5 100644 --- a/api/src/Kurs.Platform.Domain.Shared/Enums/LookUpQueryValues.cs +++ b/api/src/Kurs.Platform.Domain.Shared/Enums/LookUpQueryValues.cs @@ -285,5 +285,12 @@ public static class LookUpQueryValues $"\"Id\" AS \"Key\", " + $"\"Name\" AS \"Name\" " + $"FROM \"{FullNameTable(TableNameEnum.Badge)}\" " + - $"WHERE \"IsDeleted\" = 'false' "; + $"WHERE \"IsDeleted\" = 'false' "; + + public static string Template360Values = + $"SELECT " + + $"\"Id\" AS \"Key\", " + + $"\"Name\" AS \"Name\" " + + $"FROM \"{FullNameTable(TableNameEnum.Template360)}\" " + + $"WHERE \"IsDeleted\" = 'false' "; } \ No newline at end of file diff --git a/api/src/Kurs.Platform.Domain.Shared/Enums/TableNameEnum.cs b/api/src/Kurs.Platform.Domain.Shared/Enums/TableNameEnum.cs index 5b60d513..8d6b06c1 100644 --- a/api/src/Kurs.Platform.Domain.Shared/Enums/TableNameEnum.cs +++ b/api/src/Kurs.Platform.Domain.Shared/Enums/TableNameEnum.cs @@ -116,5 +116,5 @@ public enum TableNameEnum Payroll, PayrollItem, Template360, - Result360 + Performance360 } \ No newline at end of file diff --git a/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs b/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs index d5cecdf0..4300629e 100644 --- a/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs +++ b/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs @@ -519,7 +519,7 @@ public static class PlatformConsts public const string Overtime = "list-overtime"; public const string Payroll = "list-payroll"; public const string Template360 = "list-template360"; - public const string Result360 = "list-result360"; + public const string Performance360 = "list-performance360"; } } diff --git a/api/src/Kurs.Platform.Domain.Shared/TableNameResolver.cs b/api/src/Kurs.Platform.Domain.Shared/TableNameResolver.cs index ef35593f..354e371d 100644 --- a/api/src/Kurs.Platform.Domain.Shared/TableNameResolver.cs +++ b/api/src/Kurs.Platform.Domain.Shared/TableNameResolver.cs @@ -133,6 +133,7 @@ public static class TableNameResolver { nameof(TableNameEnum.Payroll), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) }, { nameof(TableNameEnum.PayrollItem), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) }, { nameof(TableNameEnum.Template360), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) }, + { nameof(TableNameEnum.Performance360), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) }, // 🔹 ACCOUNTING { nameof(TableNameEnum.Bank), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Accounting) }, diff --git a/api/src/Kurs.Platform.Domain/Data/SeedConsts.cs b/api/src/Kurs.Platform.Domain/Data/SeedConsts.cs index f3be4733..21d8d60b 100644 --- a/api/src/Kurs.Platform.Domain/Data/SeedConsts.cs +++ b/api/src/Kurs.Platform.Domain/Data/SeedConsts.cs @@ -461,7 +461,7 @@ public static class SeedConsts public const string Overtime = Default + ".Overtime"; public const string Payroll = Default + ".Payroll"; public const string Template360 = Default + ".Template360"; - public const string Result360 = Default + ".Result360"; + public const string Performance360 = Default + ".Performance360"; } public static class Accounting diff --git a/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/Department.cs b/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/Department.cs index 9db68804..606ee757 100644 --- a/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/Department.cs +++ b/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/Department.cs @@ -27,6 +27,8 @@ public class Department : FullAuditedEntity, IMultiTenant public decimal Budget { get; set; } public bool IsActive { get; set; } + public ICollection Performans360s { get; set; } + public Department() { SubDepartments = []; diff --git a/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/Performans360.cs b/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/Performans360.cs new file mode 100644 index 00000000..8f0d4671 --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/Performans360.cs @@ -0,0 +1,25 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class Performans360 : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public string Name { get; set; } + public string Description { get; set; } + + public Guid? TemplateId { get; set; } + public Template360 Template { get; set; } + + public DateTime StartDate { get; set; } + public DateTime EndDate { get; set; } + public string Status { get; set; } + + public Guid? DepartmentId { get; set; } + public Department Department { get; set; } + + public string TargetEmployees { get; set; } +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/Template360.cs b/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/Template360.cs index 36effaba..2e32f82d 100644 --- a/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/Template360.cs +++ b/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/Template360.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.MultiTenancy; @@ -13,4 +14,6 @@ public class Template360 : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public string AssessorTypes { get; set; } public string QuestionGroupsJson { get; set; } + + public ICollection Performans360s { get; set; } } diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs b/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs index e387f30c..c2be70c7 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs @@ -149,17 +149,6 @@ public class PlatformDbContext : #region Administrator from the modules - /* Notice: We only implemented IIdentityDbContext and ITenantManagementDbContext - * and replaced them for this DbContext. This allows you to perform JOIN - * queries for the entities of these modules over the repositories easily. You - * typically don't need that for other modules. But, if you need, you can - * implement the DbContext interface of the needed module and use ReplaceDbContext - * attribute just like IIdentityDbContext and ITenantManagementDbContext. - * - * More info: Replacing a DbContext of a module ensures that the related module - * uses this DbContext on runtime. Otherwise, it will use its own DbContext class. - */ - //Identity public DbSet Users { get; set; } public DbSet Roles { get; set; } @@ -187,6 +176,8 @@ public class PlatformDbContext : public DbSet Overtimes { get; set; } public DbSet Leaves { get; set; } public DbSet Template360s { get; set; } + public DbSet Performans360s { get; set; } + #endregion public PlatformDbContext(DbContextOptions options) @@ -1866,5 +1857,28 @@ public class PlatformDbContext : b.Property(x => x.QuestionGroupsJson).HasColumnType("text"); }); + + builder.Entity(b => + { + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Performance360)), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).IsRequired().HasMaxLength(200); + b.Property(x => x.Description).HasMaxLength(500); + b.Property(x => x.Status).HasMaxLength(10); + b.Property(x => x.TargetEmployees).HasMaxLength(4000); + + b.HasOne(x => x.Template) + .WithMany(e => e.Performans360s) + .HasForeignKey(x => x.TemplateId) + .HasPrincipalKey(e => e.Id) + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne(x => x.Department) + .WithMany(e => e.Performans360s) + .HasForeignKey(x => x.DepartmentId) + .HasPrincipalKey(e => e.Id) + .OnDelete(DeleteBehavior.Restrict); + }); } } diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251023144126_Initial.Designer.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251023210323_Initial.Designer.cs similarity index 99% rename from api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251023144126_Initial.Designer.cs rename to api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251023210323_Initial.Designer.cs index fa43f5ad..2aa1d99b 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251023144126_Initial.Designer.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251023210323_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Kurs.Platform.Migrations { [DbContext(typeof(PlatformDbContext))] - [Migration("20251023144126_Initial")] + [Migration("20251023210323_Initial")] partial class Initial { /// @@ -5967,6 +5967,83 @@ namespace Kurs.Platform.Migrations b.ToTable("T_Hr_PayrollItem", (string)null); }); + modelBuilder.Entity("Kurs.Platform.Entities.Performans360", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TargetEmployees") + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); + + b.Property("TemplateId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("TemplateId"); + + b.ToTable("T_Hr_Performance360", (string)null); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Product", b => { b.Property("Id") @@ -10465,6 +10542,23 @@ namespace Kurs.Platform.Migrations b.Navigation("Payroll"); }); + modelBuilder.Entity("Kurs.Platform.Entities.Performans360", b => + { + b.HasOne("Kurs.Platform.Entities.Department", "Department") + .WithMany("Performans360s") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Kurs.Platform.Entities.Template360", "Template") + .WithMany("Performans360s") + .HasForeignKey("TemplateId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("Department"); + + b.Navigation("Template"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Question", b => { b.HasOne("Kurs.Platform.Entities.QuestionPool", "QuestionPool") @@ -10808,6 +10902,8 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.Department", b => { + b.Navigation("Performans360s"); + b.Navigation("SubDepartments"); }); @@ -10886,6 +10982,11 @@ namespace Kurs.Platform.Migrations b.Navigation("Skills"); }); + modelBuilder.Entity("Kurs.Platform.Entities.Template360", b => + { + b.Navigation("Performans360s"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.UomCategory", b => { b.Navigation("Uoms"); diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251023144126_Initial.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251023210323_Initial.cs similarity index 99% rename from api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251023144126_Initial.cs rename to api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251023210323_Initial.cs index 3e21b90e..10f4168d 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251023144126_Initial.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251023210323_Initial.cs @@ -3933,6 +3933,45 @@ namespace Kurs.Platform.Migrations principalColumn: "Id"); }); + migrationBuilder.CreateTable( + name: "T_Hr_Performance360", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + TemplateId = table.Column(type: "uniqueidentifier", nullable: true), + StartDate = table.Column(type: "datetime2", nullable: false), + EndDate = table.Column(type: "datetime2", nullable: false), + Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + DepartmentId = table.Column(type: "uniqueidentifier", nullable: true), + TargetEmployees = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_T_Hr_Performance360", x => x.Id); + table.ForeignKey( + name: "FK_T_Hr_Performance360_T_Hr_Department_DepartmentId", + column: x => x.DepartmentId, + principalTable: "T_Hr_Department", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_T_Hr_Performance360_T_Hr_Template360_TemplateId", + column: x => x.TemplateId, + principalTable: "T_Hr_Template360", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( name: "T_Hr_Employee", columns: table => new @@ -4741,6 +4780,16 @@ namespace Kurs.Platform.Migrations table: "T_Hr_PayrollItem", column: "PayrollItemId"); + migrationBuilder.CreateIndex( + name: "IX_T_Hr_Performance360_DepartmentId", + table: "T_Hr_Performance360", + column: "DepartmentId"); + + migrationBuilder.CreateIndex( + name: "IX_T_Hr_Performance360_TemplateId", + table: "T_Hr_Performance360", + column: "TemplateId"); + migrationBuilder.CreateIndex( name: "IX_T_Sas_ApiEndpoint_EntityId", table: "T_Sas_ApiEndpoint", @@ -5073,7 +5122,7 @@ namespace Kurs.Platform.Migrations name: "T_Hr_PayrollItem"); migrationBuilder.DropTable( - name: "T_Hr_Template360"); + name: "T_Hr_Performance360"); migrationBuilder.DropTable( name: "T_Prt_Interesting"); @@ -5201,6 +5250,9 @@ namespace Kurs.Platform.Migrations migrationBuilder.DropTable( name: "T_Hr_Payroll"); + migrationBuilder.DropTable( + name: "T_Hr_Template360"); + migrationBuilder.DropTable( name: "T_Sas_CustomEntity"); diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs index de6a4db0..4b4a28c6 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs @@ -5964,6 +5964,83 @@ namespace Kurs.Platform.Migrations b.ToTable("T_Hr_PayrollItem", (string)null); }); + modelBuilder.Entity("Kurs.Platform.Entities.Performans360", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TargetEmployees") + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); + + b.Property("TemplateId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("TemplateId"); + + b.ToTable("T_Hr_Performance360", (string)null); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Product", b => { b.Property("Id") @@ -10462,6 +10539,23 @@ namespace Kurs.Platform.Migrations b.Navigation("Payroll"); }); + modelBuilder.Entity("Kurs.Platform.Entities.Performans360", b => + { + b.HasOne("Kurs.Platform.Entities.Department", "Department") + .WithMany("Performans360s") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Kurs.Platform.Entities.Template360", "Template") + .WithMany("Performans360s") + .HasForeignKey("TemplateId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("Department"); + + b.Navigation("Template"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Question", b => { b.HasOne("Kurs.Platform.Entities.QuestionPool", "QuestionPool") @@ -10805,6 +10899,8 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.Department", b => { + b.Navigation("Performans360s"); + b.Navigation("SubDepartments"); }); @@ -10883,6 +10979,11 @@ namespace Kurs.Platform.Migrations b.Navigation("Skills"); }); + modelBuilder.Entity("Kurs.Platform.Entities.Template360", b => + { + b.Navigation("Performans360s"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.UomCategory", b => { b.Navigation("Uoms"); diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json b/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json index 2744e6b5..43b500c7 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json @@ -100,7 +100,9 @@ "props": null, "description": null, "isActive": true, - "dependencies": ["AxiosListComponent"] + "dependencies": [ + "AxiosListComponent" + ] } ], "ReportCategories": [ @@ -2209,7 +2211,12 @@ "minSalary": 80000, "maxSalary": 120000, "currencyCode": "USD", - "requiredSkills": ["JavaScript", "TypeScript", "React", "Node.js"], + "requiredSkills": [ + "JavaScript", + "TypeScript", + "React", + "Node.js" + ], "responsibilities": [ "Develop frontend and backend applications", "Write clean and maintainable code", @@ -3343,5 +3350,67 @@ "isActive": true, "assessorTypes": "self|manager|peer|subordinate|customer|external|hrUpperManagement|otherDepartment" } + ], + "Performans360s": [ + { + "name": "2024 Q4 360° Derece Değerlendirme", + "description": "2024 yılı son çeyrek 360° derece performans değerlendirmesi", + "templateName": "Genel Yetkinlik Değerlendirmesi", + "startDate": "01-11-2024", + "endDate": "15-12-2024", + "status": "Active", + "departmentCode": "ÜRT", + "targetEmployees": "EMP-001|EMP-002|EMP-003|EMP-004|EMP-005" + }, + { + "name": "2025 Q1 Liderlik Değerlendirmesi", + "description": "Liderlik pozisyonları için özel 360° derece değerlendirme kampanyası", + "templateName": "Genel Yetkinlik Değerlendirmesi", + "startDate": "01-01-2025", + "endDate": "08-02-2025", + "status": "Active", + "departmentCode": "ÜRT", + "targetEmployees": "EMP-007|EMP-008|EMP-009" + }, + { + "name": "2023 Kalite Departmanı Değerlendirme", + "description": "Kalite kontrol departmanı personeli için 360° derece değerlendirme", + "templateName": "Genel Yetkinlik Değerlendirmesi", + "startDate": "01-10-2023", + "endDate": "10-11-2023", + "status": "Active", + "departmentCode": "ÜRT", + "targetEmployees": "EMP-005|EMP-006" + }, + { + "name": "2022 Kalite Departmanı Değerlendirme", + "description": "Kalite kontrol departmanı personeli için 360° derece değerlendirme", + "templateName": "Genel Yetkinlik Değerlendirmesi", + "startDate": "01-10-2022", + "endDate": "08-11-2024", + "status": "Cancelled", + "departmentCode": "BAK", + "targetEmployees": "EMP-005|EMP-006" + }, + { + "name": "2021 Kalite Departmanı Değerlendirme", + "description": "Kalite kontrol departmanı personeli için 360° derece değerlendirme", + "templateName": "Genel Yetkinlik Değerlendirmesi", + "startDate": "01-10-2021", + "endDate": "10-11-2021", + "status": "Draft", + "departmentCode": "KAL", + "targetEmployees": "EMP-005|EMP-006" + }, + { + "name": "2020 Kalite Departmanı Değerlendirme", + "description": "Kalite kontrol departmanı personeli için 360° derece değerlendirme", + "templateName": "Genel Yetkinlik Değerlendirmesi", + "startDate": "01-10-2020", + "endDate": "05-11-2020", + "status": "Completed", + "departmentCode": "KAL", + "targetEmployees": "EMP-005|EMP-006" + } ] -} +} \ No newline at end of file diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs index 59b6dc67..ed7fb6fc 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs @@ -72,6 +72,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency private readonly IRepository _overtimeRepository; private readonly IRepository _payrollRepository; private readonly IRepository _template360Repository; + private readonly IRepository _performans360Repository; public TenantDataSeeder( IRepository repositoryUser, @@ -127,7 +128,8 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency IRepository leaveRepository, IRepository overtimeRepository, IRepository payrollRepository, - IRepository template360Repository + IRepository template360Repository, + IRepository performans360Repository ) { _repositoryUser = repositoryUser; @@ -184,6 +186,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency _overtimeRepository = overtimeRepository; _payrollRepository = payrollRepository; _template360Repository = template360Repository; + _performans360Repository = performans360Repository; } private static IConfigurationRoot BuildConfiguration() @@ -1150,5 +1153,29 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency AssessorTypes = item.AssessorTypes, }, autoSave: true); } + + foreach (var item in items.Performans360s) + { + var exists = await _performans360Repository.AnyAsync(x => x.Name == item.Name); + if (exists) + continue; + + var template = await _template360Repository.FirstOrDefaultAsync(x => x.Name == item.TemplateName); + var department = await _departmentRepository.FirstOrDefaultAsync(x => x.Code == item.DepartmentCode); + var targetEmployees = await _employeeRepository.GetListAsync(x => + item.TargetEmployees.Split('|', StringSplitOptions.RemoveEmptyEntries).Contains(x.Code)); + + await _performans360Repository.InsertAsync(new Performans360 + { + Name = item.Name, + Description = item.Description, + TemplateId = template != null ? template.Id : null, + StartDate = item.StartDate, + EndDate = item.EndDate, + Status = item.Status, + DepartmentId = department != null ? department.Id : null, + TargetEmployees = string.Join("|", targetEmployees.Select(e => e.Id)) + }, autoSave: true); + } } } diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs index afde629c..ad068c9d 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs @@ -61,6 +61,19 @@ public class TenantSeederDto public List Overtimes { get; set; } public List Payrolls { get; set; } public List Template360s { get; set; } + public List Performans360s { get; set; } +} + +public class Performans360SeedDto +{ + public string Name { get; set; } + public string Description { get; set; } + public string TemplateName { get; set; } + public DateTime StartDate { get; set; } + public DateTime EndDate { get; set; } + public string Status { get; set; } + public string DepartmentCode { get; set; } + public string TargetEmployees { get; set; } } public class Template360SeedDto diff --git a/ui/src/shared/useListFormColumns.ts b/ui/src/shared/useListFormColumns.ts index 8abe14f7..1778c3b5 100644 --- a/ui/src/shared/useListFormColumns.ts +++ b/ui/src/shared/useListFormColumns.ts @@ -59,8 +59,6 @@ const cellTemplateMultiValue = ( ) .join('') - console.log({ html }) - cellElement.innerHTML = html cellElement.title = values.join(',') } diff --git a/ui/src/views/shared/DialogContext/DialogShowComponent.tsx b/ui/src/views/shared/DialogContext/DialogShowComponent.tsx index 5dd4b1b6..a58e6097 100644 --- a/ui/src/views/shared/DialogContext/DialogShowComponent.tsx +++ b/ui/src/views/shared/DialogContext/DialogShowComponent.tsx @@ -107,6 +107,14 @@ const DialogShowComponent = (): JSX.Element => { {...dialogContext.config?.props} > ) + case 'Evaluation360': + return ( + + ) default: return <> }