Template 360 ve Diğer seeder düzenlemeleri
This commit is contained in:
parent
c74c357c36
commit
a4adc860ff
16 changed files with 1010 additions and 63 deletions
|
|
@ -12111,7 +12111,7 @@
|
|||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Hr.EvaluationTemplate",
|
||||
"key": "App.Hr.Template360",
|
||||
"tr": "360° Şablonları",
|
||||
"en": "360° Templates"
|
||||
},
|
||||
|
|
@ -13168,7 +13168,7 @@
|
|||
"authority": null
|
||||
},
|
||||
{
|
||||
"key": "admin.hr.evaluationTemplates",
|
||||
"key": "admin.hr.Template360s",
|
||||
"path": "/admin/hr/360-templates",
|
||||
"componentPath": "@/views/hr/components/Degree360Templates",
|
||||
"routeType": "protected",
|
||||
|
|
@ -15045,12 +15045,12 @@
|
|||
},
|
||||
{
|
||||
"ParentCode": "App.Hr",
|
||||
"Code": "App.Hr.EvaluationTemplate",
|
||||
"DisplayName": "App.Hr.EvaluationTemplate",
|
||||
"Code": "App.Hr.Template360",
|
||||
"DisplayName": "App.Hr.Template360",
|
||||
"Order": 11,
|
||||
"Url": "/admin/hr/360-templates",
|
||||
"Url": "/admin/list/list-template360",
|
||||
"Icon": "FcInspection",
|
||||
"RequiredPermissionName": "App.Hr.EvaluationTemplate",
|
||||
"RequiredPermissionName": "App.Hr.Template360",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
|
|
@ -24637,17 +24637,17 @@
|
|||
},
|
||||
{
|
||||
"GroupName": "App.Hr",
|
||||
"Name": "App.Hr.EvaluationTemplate",
|
||||
"Name": "App.Hr.Template360",
|
||||
"ParentName": null,
|
||||
"DisplayName": "App.Hr.EvaluationTemplate",
|
||||
"DisplayName": "App.Hr.Template360",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Hr",
|
||||
"Name": "App.Hr.EvaluationTemplate.Create",
|
||||
"ParentName": "App.Hr.EvaluationTemplate",
|
||||
"Name": "App.Hr.Template360.Create",
|
||||
"ParentName": "App.Hr.Template360",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
|
|
@ -24655,8 +24655,8 @@
|
|||
},
|
||||
{
|
||||
"GroupName": "App.Hr",
|
||||
"Name": "App.Hr.EvaluationTemplate.Update",
|
||||
"ParentName": "App.Hr.EvaluationTemplate",
|
||||
"Name": "App.Hr.Template360.Update",
|
||||
"ParentName": "App.Hr.Template360",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
|
|
@ -24664,8 +24664,8 @@
|
|||
},
|
||||
{
|
||||
"GroupName": "App.Hr",
|
||||
"Name": "App.Hr.EvaluationTemplate.Delete",
|
||||
"ParentName": "App.Hr.EvaluationTemplate",
|
||||
"Name": "App.Hr.Template360.Delete",
|
||||
"ParentName": "App.Hr.Template360",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
|
|
@ -24673,8 +24673,8 @@
|
|||
},
|
||||
{
|
||||
"GroupName": "App.Hr",
|
||||
"Name": "App.Hr.EvaluationTemplate.Export",
|
||||
"ParentName": "App.Hr.EvaluationTemplate",
|
||||
"Name": "App.Hr.Template360.Export",
|
||||
"ParentName": "App.Hr.Template360",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
|
|
@ -24682,8 +24682,8 @@
|
|||
},
|
||||
{
|
||||
"GroupName": "App.Hr",
|
||||
"Name": "App.Hr.EvaluationTemplate.Import",
|
||||
"ParentName": "App.Hr.EvaluationTemplate",
|
||||
"Name": "App.Hr.Template360.Import",
|
||||
"ParentName": "App.Hr.Template360",
|
||||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
|
|
@ -24691,8 +24691,8 @@
|
|||
},
|
||||
{
|
||||
"GroupName": "App.Hr",
|
||||
"Name": "App.Hr.EvaluationTemplate.Activity",
|
||||
"ParentName": "App.Hr.EvaluationTemplate",
|
||||
"Name": "App.Hr.Template360.Activity",
|
||||
"ParentName": "App.Hr.Template360",
|
||||
"DisplayName": "Activity",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
|
|
|
|||
|
|
@ -13337,6 +13337,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "MonthlyPrice",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 120,
|
||||
ListOrderNo = 5,
|
||||
Visible = true,
|
||||
|
|
@ -13363,6 +13365,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "YearlyPrice",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 120,
|
||||
ListOrderNo = 7,
|
||||
Visible = true,
|
||||
|
|
@ -13628,6 +13632,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "Commission",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
|
|
@ -13901,6 +13907,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "Commission",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
|
|
@ -14499,6 +14507,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "Subtotal",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 15,
|
||||
Visible = true,
|
||||
|
|
@ -14525,6 +14535,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "Commission",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 16,
|
||||
Visible = true,
|
||||
|
|
@ -14551,6 +14563,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "Total",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 17,
|
||||
Visible = true,
|
||||
|
|
@ -17187,6 +17201,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "Rate",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 5,
|
||||
Visible = true,
|
||||
|
|
@ -20035,6 +20051,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "Ratio",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 150,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
|
|
@ -20070,6 +20088,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "Rounding",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 150,
|
||||
ListOrderNo = 5,
|
||||
Visible = true,
|
||||
|
|
@ -27772,6 +27792,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "MonthlyPaymentRate",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 150,
|
||||
ListOrderNo = 9,
|
||||
Visible = true,
|
||||
|
|
@ -31161,6 +31183,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "Points",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 60,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
|
|
@ -32164,6 +32188,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "Points",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 9,
|
||||
Visible = true,
|
||||
|
|
@ -32652,6 +32678,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "MinSalary",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 7,
|
||||
Visible = true,
|
||||
|
|
@ -32683,6 +32711,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "MaxSalary",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 8,
|
||||
Visible = true,
|
||||
|
|
@ -33286,6 +33316,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "Budget",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 8,
|
||||
Visible = true,
|
||||
|
|
@ -33800,6 +33832,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "BudgetedAmount",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 9,
|
||||
Visible = true,
|
||||
|
|
@ -33831,6 +33865,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "ActualAmount",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 10,
|
||||
Visible = true,
|
||||
|
|
@ -33860,7 +33896,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
SourceDbType = DbType.Int32,
|
||||
FieldName = "CurrencyId",
|
||||
Width = 100,
|
||||
ListOrderNo = 11,
|
||||
|
|
@ -33900,6 +33936,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "FiscalYear",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 12,
|
||||
Visible = true,
|
||||
|
|
@ -35090,6 +35128,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "BaseSalary",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 28,
|
||||
Visible = true,
|
||||
|
|
@ -35656,6 +35696,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "TotalDays",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 6,
|
||||
Visible = true,
|
||||
|
|
@ -36256,6 +36297,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "TotalHours",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 5,
|
||||
Visible = true,
|
||||
|
|
@ -36369,6 +36411,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "Amount",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 8,
|
||||
Visible = true,
|
||||
|
|
@ -37010,6 +37054,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "BaseSalary",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 150,
|
||||
ListOrderNo = 6,
|
||||
Visible = true,
|
||||
|
|
@ -37044,6 +37090,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "Overtime",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 7,
|
||||
Visible = true,
|
||||
|
|
@ -37075,6 +37123,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "Bonus",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 8,
|
||||
Visible = true,
|
||||
|
|
@ -37106,6 +37156,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "GrossSalary",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 9,
|
||||
Visible = true,
|
||||
|
|
@ -37137,6 +37189,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "NetSalary",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 10,
|
||||
Visible = true,
|
||||
|
|
@ -37168,6 +37222,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "Tax",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 11,
|
||||
Visible = true,
|
||||
|
|
@ -37199,6 +37255,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "SocialSecurity",
|
||||
Alignment = "right",
|
||||
Format = "fixedPoint",
|
||||
Width = 100,
|
||||
ListOrderNo = 12,
|
||||
Visible = true,
|
||||
|
|
@ -37276,6 +37334,312 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region Template 360
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Payroll))
|
||||
{
|
||||
var listFormTemplate360 = 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.Template360,
|
||||
Name = AppCodes.Hr.Template360,
|
||||
Title = AppCodes.Hr.Template360,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = true,
|
||||
IsBranch = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = AppCodes.Hr.Template360,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Template360)),
|
||||
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.Template360 + ".Create",
|
||||
R = AppCodes.Hr.Template360,
|
||||
U = AppCodes.Hr.Template360 + ".Update",
|
||||
D = AppCodes.Hr.Template360 + ".Delete",
|
||||
E = AppCodes.Hr.Template360 + ".Export",
|
||||
I = AppCodes.Hr.Template360 + ".Import",
|
||||
A = AppCodes.Hr.Template360 + ".Activity",
|
||||
}),
|
||||
DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Template360))}\" 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 = 400,
|
||||
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<EditingFormDto>()
|
||||
{
|
||||
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 = 4, DataField = "AssessorTypes", ColSpan = 2, IsRequired=true, EditorType2 = EditorTypes.dxTagBox },
|
||||
new EditingFormItemDto { Order = 3, DataField = "IsActive", ColSpan = 2, EditorType2 = EditorTypes.dxCheckBox },
|
||||
]
|
||||
}
|
||||
}),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() {
|
||||
FieldName = "IsActive",
|
||||
FieldDbType = DbType.Boolean,
|
||||
Value = "true",
|
||||
CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
}),
|
||||
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
|
||||
new() {
|
||||
Hint = "Questions",
|
||||
Text = "Questions",
|
||||
AuthName = TenantManagementPermissions.Tenants.ManageConnectionStrings,
|
||||
DialogName = "Template360Questions",
|
||||
DialogParameters = JsonSerializer.Serialize(new {
|
||||
name = "@Name",
|
||||
id = "@Id"
|
||||
})
|
||||
},
|
||||
}),
|
||||
}
|
||||
);
|
||||
|
||||
#region Template 360 Fields
|
||||
await _listFormFieldRepository.InsertManyAsync([
|
||||
new() {
|
||||
ListFormCode = listFormTemplate360.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.Template360 + ".Create",
|
||||
R = AppCodes.Hr.Template360,
|
||||
U = AppCodes.Hr.Template360 + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listFormTemplate360.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Name",
|
||||
Width = 300,
|
||||
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.Template360 + ".Create",
|
||||
R = AppCodes.Hr.Template360,
|
||||
U = AppCodes.Hr.Template360 + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listFormTemplate360.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Description",
|
||||
Width = 600,
|
||||
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.Template360 + ".Create",
|
||||
R = AppCodes.Hr.Template360,
|
||||
U = AppCodes.Hr.Template360 + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listFormTemplate360.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "AssessorTypes",
|
||||
Width = 500,
|
||||
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.StaticData,
|
||||
DisplayExpr = "name",
|
||||
ValueExpr = "key",
|
||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||
new () { Key= "self", Name= "Self" },
|
||||
new () { Key= "manager", Name= "Manager" },
|
||||
new () { Key= "peer", Name= "Peer"},
|
||||
new () { Key= "subordinate", Name= "Subordinate" },
|
||||
new () { Key= "customer", Name= "Customer" },
|
||||
new () { Key= "otherDepartment", Name= "OtherDepartment" },
|
||||
new () { Key= "hrUpperManagement", Name= "HRUpperManagement" },
|
||||
new () { Key= "external", Name= "External" },
|
||||
}),
|
||||
}),
|
||||
ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto
|
||||
{
|
||||
AllowReordering = true,
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Hr.Template360 + ".Create",
|
||||
R = AppCodes.Hr.Template360,
|
||||
U = AppCodes.Hr.Template360 + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
]);
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,5 +114,7 @@ public enum TableNameEnum
|
|||
Leave,
|
||||
Overtime,
|
||||
Payroll,
|
||||
PayrollItem
|
||||
PayrollItem,
|
||||
Template360,
|
||||
Result360
|
||||
}
|
||||
|
|
@ -518,6 +518,8 @@ public static class PlatformConsts
|
|||
public const string Leave = "list-leave";
|
||||
public const string Overtime = "list-overtime";
|
||||
public const string Payroll = "list-payroll";
|
||||
public const string Template360 = "list-template360";
|
||||
public const string Result360 = "list-result360";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -132,6 +132,7 @@ public static class TableNameResolver
|
|||
{ nameof(TableNameEnum.Overtime), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) },
|
||||
{ nameof(TableNameEnum.Payroll), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) },
|
||||
{ nameof(TableNameEnum.PayrollItem), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) },
|
||||
{ nameof(TableNameEnum.Template360), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) },
|
||||
|
||||
// 🔹 ACCOUNTING
|
||||
{ nameof(TableNameEnum.Bank), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Accounting) },
|
||||
|
|
|
|||
|
|
@ -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 Evulation360 = Default + ".Evulation360";
|
||||
public const string Result360 = Default + ".Result360";
|
||||
}
|
||||
|
||||
public static class Accounting
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ public class Payroll : FullAuditedEntity<Guid>, IMultiTenant
|
|||
public Guid? TenantId { get; set; }
|
||||
|
||||
public Guid EmployeeId { get; set; }
|
||||
public string PeriodYear { get; set; }
|
||||
public string PeriodMonth { get; set; }
|
||||
public int PeriodYear { get; set; }
|
||||
public int PeriodMonth { get; set; }
|
||||
public decimal? BaseSalary { get; set; }
|
||||
public decimal? Overtime { get; set; }
|
||||
public decimal? Bonus { get; set; }
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
using System;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Kurs.Platform.Entities;
|
||||
|
||||
public class Template360 : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
public string AssessorTypes { get; set; }
|
||||
public string QuestionGroupsJson { get; set; }
|
||||
}
|
||||
|
|
@ -65,6 +65,7 @@ public class PlatformDbContext :
|
|||
public DbSet<ReportGenerated> ReportGenerated { get; set; }
|
||||
public DbSet<ReportCategory> ReportCategories { get; set; }
|
||||
public DbSet<Activity> Activities { get; set; }
|
||||
public DbSet<IpRestriction> IpRestrictions { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Definitions from the modules
|
||||
|
|
@ -119,10 +120,6 @@ public class PlatformDbContext :
|
|||
|
||||
#endregion
|
||||
|
||||
#region Administrator from the modules
|
||||
public DbSet<IpRestriction> IpRestrictions { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Web Site from the modules
|
||||
public DbSet<About> Abouts { get; set; }
|
||||
public DbSet<Service> Services { get; set; }
|
||||
|
|
@ -148,18 +145,9 @@ public class PlatformDbContext :
|
|||
public DbSet<Question> Questions { get; set; }
|
||||
public DbSet<QuestionOption> QuestionOptions { get; set; }
|
||||
|
||||
#region Hr
|
||||
public DbSet<Employee> Employees { get; set; }
|
||||
public DbSet<Department> Departments { get; set; }
|
||||
public DbSet<JobPosition> JobPositions { get; set; }
|
||||
public DbSet<EmploymentType> EmploymentTypes { get; set; }
|
||||
public DbSet<Badge> Badges { get; set; }
|
||||
public DbSet<CostCenter> CostCenters { get; set; }
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region Entities from the modules
|
||||
#region Administrator from the modules
|
||||
|
||||
/* Notice: We only implemented IIdentityDbContext and ITenantManagementDbContext
|
||||
* and replaced them for this DbContext. This allows you to perform JOIN
|
||||
|
|
@ -188,6 +176,19 @@ public class PlatformDbContext :
|
|||
|
||||
#endregion
|
||||
|
||||
#region Hr
|
||||
public DbSet<Employee> Employees { get; set; }
|
||||
public DbSet<Department> Departments { get; set; }
|
||||
public DbSet<JobPosition> JobPositions { get; set; }
|
||||
public DbSet<EmploymentType> EmploymentTypes { get; set; }
|
||||
public DbSet<Badge> Badges { get; set; }
|
||||
public DbSet<CostCenter> CostCenters { get; set; }
|
||||
public DbSet<Payroll> Payrolls { get; set; }
|
||||
public DbSet<Overtime> Overtimes { get; set; }
|
||||
public DbSet<Leave> Leaves { get; set; }
|
||||
public DbSet<Template360> Template360s { get; set; }
|
||||
#endregion
|
||||
|
||||
public PlatformDbContext(DbContextOptions<PlatformDbContext> options)
|
||||
: base(options)
|
||||
{
|
||||
|
|
@ -1852,5 +1853,18 @@ public class PlatformDbContext :
|
|||
.HasPrincipalKey(e => e.Id)
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
builder.Entity<Template360>(b =>
|
||||
{
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Template360)), Prefix.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
|
||||
b.Property(x => x.Name).IsRequired().HasMaxLength(200);
|
||||
b.Property(x => x.Description).HasMaxLength(500);
|
||||
b.Property(x => x.IsActive).HasDefaultValue(true);
|
||||
b.Property(x => x.AssessorTypes).HasMaxLength(500);
|
||||
|
||||
b.Property(x => x.QuestionGroupsJson).HasColumnType("text");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
|||
namespace Kurs.Platform.Migrations
|
||||
{
|
||||
[DbContext(typeof(PlatformDbContext))]
|
||||
[Migration("20251023112727_Initial")]
|
||||
[Migration("20251023144126_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -5809,7 +5809,6 @@ namespace Kurs.Platform.Migrations
|
|||
modelBuilder.Entity("Kurs.Platform.Entities.Payroll", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<decimal?>("BaseSalary")
|
||||
|
|
@ -5868,13 +5867,12 @@ namespace Kurs.Platform.Migrations
|
|||
b.Property<DateTime?>("PaymentDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("PeriodMonth")
|
||||
.IsRequired()
|
||||
b.Property<int>("PeriodMonth")
|
||||
.HasMaxLength(20)
|
||||
.HasColumnType("nvarchar(20)");
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("PeriodYear")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
b.Property<int>("PeriodYear")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal?>("SocialSecurity")
|
||||
.HasPrecision(18, 2)
|
||||
|
|
@ -5899,7 +5897,6 @@ namespace Kurs.Platform.Migrations
|
|||
modelBuilder.Entity("Kurs.Platform.Entities.PayrollItem", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<decimal>("Amount")
|
||||
|
|
@ -7442,6 +7439,71 @@ namespace Kurs.Platform.Migrations
|
|||
b.ToTable("T_Prt_Source", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.Template360", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("AssessorTypes")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
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(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<string>("QuestionGroupsJson")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("T_Hr_Template360", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.Uom", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -1805,8 +1805,8 @@ namespace Kurs.Platform.Migrations
|
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
EmployeeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
PeriodYear = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
PeriodMonth = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
|
||||
PeriodYear = table.Column<int>(type: "int", nullable: false),
|
||||
PeriodMonth = table.Column<int>(type: "int", maxLength: 20, nullable: false),
|
||||
BaseSalary = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true),
|
||||
Overtime = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true),
|
||||
Bonus = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true),
|
||||
|
|
@ -1829,6 +1829,30 @@ namespace Kurs.Platform.Migrations
|
|||
table.PrimaryKey("PK_T_Hr_Payroll", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "T_Hr_Template360",
|
||||
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(200)", maxLength: 200, nullable: false),
|
||||
Description = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
|
||||
AssessorTypes = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||
QuestionGroupsJson = table.Column<string>(type: "text", 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_T_Hr_Template360", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "T_Prt_Interesting",
|
||||
columns: table => new
|
||||
|
|
@ -5048,6 +5072,9 @@ namespace Kurs.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "T_Hr_PayrollItem");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "T_Hr_Template360");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "T_Prt_Interesting");
|
||||
|
||||
|
|
@ -5806,7 +5806,6 @@ namespace Kurs.Platform.Migrations
|
|||
modelBuilder.Entity("Kurs.Platform.Entities.Payroll", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<decimal?>("BaseSalary")
|
||||
|
|
@ -5865,13 +5864,12 @@ namespace Kurs.Platform.Migrations
|
|||
b.Property<DateTime?>("PaymentDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("PeriodMonth")
|
||||
.IsRequired()
|
||||
b.Property<int>("PeriodMonth")
|
||||
.HasMaxLength(20)
|
||||
.HasColumnType("nvarchar(20)");
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("PeriodYear")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
b.Property<int>("PeriodYear")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal?>("SocialSecurity")
|
||||
.HasPrecision(18, 2)
|
||||
|
|
@ -5896,7 +5894,6 @@ namespace Kurs.Platform.Migrations
|
|||
modelBuilder.Entity("Kurs.Platform.Entities.PayrollItem", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<decimal>("Amount")
|
||||
|
|
@ -7439,6 +7436,71 @@ namespace Kurs.Platform.Migrations
|
|||
b.ToTable("T_Prt_Source", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.Template360", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("AssessorTypes")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
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(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<string>("QuestionGroupsJson")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("T_Hr_Template360", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.Uom", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
|
|||
|
|
@ -2181,22 +2181,22 @@
|
|||
],
|
||||
"EmployeeTypes": [
|
||||
{
|
||||
"name": "FULL_TIME"
|
||||
"name": "Full Time"
|
||||
},
|
||||
{
|
||||
"name": "PART_TIME"
|
||||
"name": "Part Time"
|
||||
},
|
||||
{
|
||||
"name": "CONTRACT"
|
||||
"name": "Contract"
|
||||
},
|
||||
{
|
||||
"name": "INTERN"
|
||||
"name": "Intern"
|
||||
},
|
||||
{
|
||||
"name": "TEMPORARY"
|
||||
"name": "Temporary"
|
||||
},
|
||||
{
|
||||
"name": "CONSULTANT"
|
||||
"name": "Consultant"
|
||||
}
|
||||
],
|
||||
"JobPositions": [
|
||||
|
|
@ -3106,5 +3106,242 @@
|
|||
"trainings": [],
|
||||
"disciplinaryActions": []
|
||||
}
|
||||
],
|
||||
"Leaves": [
|
||||
{
|
||||
"employeeCode": "EMP-001",
|
||||
"leaveType": "Annual",
|
||||
"startDate": "12-12-2024",
|
||||
"endDate": "12-04-2024",
|
||||
"totalDays": 5,
|
||||
"reason": "Yıllık izin talebi",
|
||||
"status": "Pending",
|
||||
"appliedDate": "11-15-2024",
|
||||
"isHalfDay": false
|
||||
},
|
||||
{
|
||||
"employeeCode": "EMP-002",
|
||||
"leaveType": "Sick",
|
||||
"startDate": "11-10-2024",
|
||||
"endDate": "11-12-2024",
|
||||
"totalDays": 3,
|
||||
"reason": "Sağlık kontrolü",
|
||||
"status": "Approved",
|
||||
"appliedDate": "11-08-2024",
|
||||
"approvedDate": "11-09-2024",
|
||||
"isHalfDay": false
|
||||
},
|
||||
{
|
||||
"employeeCode": "EMP-003",
|
||||
"leaveType": "Personal",
|
||||
"startDate": "01-12-2024",
|
||||
"endDate": "01-12-2024",
|
||||
"totalDays": 0.5,
|
||||
"reason": "Kişisel işler",
|
||||
"status": "Rejected",
|
||||
"appliedDate": "02-11-2024",
|
||||
"rejectionReason": "Proje teslim tarihi nedeniyle uygun değil",
|
||||
"isHalfDay": true
|
||||
},
|
||||
{
|
||||
"employeeCode": "EMP-004",
|
||||
"leaveType": "Emergency",
|
||||
"startDate": "05-11-2024",
|
||||
"endDate": "06-11-2024",
|
||||
"totalDays": 2,
|
||||
"reason": "Acil aile durumu",
|
||||
"status": "Pending",
|
||||
"appliedDate": "04-11-2024",
|
||||
"isHalfDay": false
|
||||
}
|
||||
],
|
||||
"Overtimes": [
|
||||
{
|
||||
"employeeCode": "EMP-001",
|
||||
"date": "12-05-2024",
|
||||
"startTime": "18:00",
|
||||
"endTime": "21:00",
|
||||
"totalHours": 3,
|
||||
"reason": "Proje deadline'ı nedeniyle acil çalışma",
|
||||
"status": "Approved",
|
||||
"rate": 1.5,
|
||||
"amount": 450
|
||||
},
|
||||
{
|
||||
"employeeCode": "EMP-002",
|
||||
"date": "12-01-2024",
|
||||
"startTime": "17:30",
|
||||
"endTime": "20:00",
|
||||
"totalHours": 2.5,
|
||||
"reason": "Müşteri talep değişikliği nedeniyle ek çalışma",
|
||||
"status": "Pending",
|
||||
"rate": 1.5,
|
||||
"amount": 375
|
||||
},
|
||||
{
|
||||
"employeeCode": "EMP-003",
|
||||
"date": "12-01-2024",
|
||||
"startTime": "19:00",
|
||||
"endTime": "22:30",
|
||||
"totalHours": 3.5,
|
||||
"reason": "Sistem bakımı ve güncelleme çalışmaları",
|
||||
"status": "Approved",
|
||||
"rate": 1.5,
|
||||
"amount": 525
|
||||
},
|
||||
{
|
||||
"employeeCode": "EMP-004",
|
||||
"date": "12-12-2024",
|
||||
"startTime": "17:00",
|
||||
"endTime": "19:00",
|
||||
"totalHours": 2,
|
||||
"reason": "Rapor hazırlama ve sunum düzenleme",
|
||||
"status": "Rejected",
|
||||
"rate": 1.5,
|
||||
"amount": 0
|
||||
},
|
||||
{
|
||||
"employeeCode": "EMP-005",
|
||||
"date": "12-11-2024",
|
||||
"startTime": "18:30",
|
||||
"endTime": "21:00",
|
||||
"totalHours": 2.5,
|
||||
"reason": "Acil hata düzeltme ve test çalışmaları",
|
||||
"status": "Approved",
|
||||
"approvedBy": "emp_001",
|
||||
"rate": 2.0,
|
||||
"amount": 500
|
||||
},
|
||||
{
|
||||
"employeeCode": "EMP-006",
|
||||
"date": "02-10-2024",
|
||||
"startTime": "16:00",
|
||||
"endTime": "20:00",
|
||||
"totalHours": 4,
|
||||
"reason": "Yeni müşteri onboarding süreci",
|
||||
"status": "Pending",
|
||||
"rate": 1.5,
|
||||
"amount": 600
|
||||
},
|
||||
{
|
||||
"employeeCode": "EMP-007",
|
||||
"date": "01-09-2024",
|
||||
"startTime": "17:45",
|
||||
"endTime": "21:15",
|
||||
"totalHours": 3.5,
|
||||
"reason": "Veri analizi ve raporlama çalışmaları",
|
||||
"status": "Approved",
|
||||
"approvedBy": "emp_002",
|
||||
"rate": 1.5,
|
||||
"amount": 525
|
||||
},
|
||||
{
|
||||
"employeeCode": "EMP-008",
|
||||
"date": "09-08-2024",
|
||||
"startTime": "18:00",
|
||||
"endTime": "20:30",
|
||||
"totalHours": 2.5,
|
||||
"reason": "Eğitim materyali hazırlama",
|
||||
"status": "Pending",
|
||||
"rate": 1.5,
|
||||
"amount": 375
|
||||
},
|
||||
{
|
||||
"employeeCode": "EMP-009",
|
||||
"date": "01-07-2024",
|
||||
"startTime": "19:30",
|
||||
"endTime": "23:00",
|
||||
"totalHours": 3.5,
|
||||
"reason": "Kritik sistem güvenlik yaması uygulaması",
|
||||
"status": "Approved",
|
||||
"rate": 1.5,
|
||||
"amount": 525
|
||||
},
|
||||
{
|
||||
"employeeCode": "EMP-010",
|
||||
"date": "06-06-2024",
|
||||
"startTime": "17:30",
|
||||
"endTime": "20:00",
|
||||
"totalHours": 2.5,
|
||||
"reason": "Stratejik planlama toplantısı hazırlığı",
|
||||
"status": "Rejected",
|
||||
"rate": 1.5,
|
||||
"amount": 0
|
||||
}
|
||||
],
|
||||
"Payrolls": [
|
||||
{
|
||||
"employeeCode": "EMP-001",
|
||||
"periodYear": 2023,
|
||||
"periodMonth": 1,
|
||||
"baseSalary": 3000,
|
||||
"overtime": 0,
|
||||
"bonus": 0,
|
||||
"grossSalary": 0,
|
||||
"netSalary": 0,
|
||||
"tax": 0,
|
||||
"socialSecurity": 0,
|
||||
"status": "Cancelled"
|
||||
},
|
||||
{
|
||||
"employeeCode": "EMP-002",
|
||||
"periodYear": 2023,
|
||||
"periodMonth": 1,
|
||||
"baseSalary": 3200,
|
||||
"overtime": 0,
|
||||
"bonus": 0,
|
||||
"grossSalary": 0,
|
||||
"netSalary": 0,
|
||||
"tax": 0,
|
||||
"socialSecurity": 0,
|
||||
"status": "Paid"
|
||||
},
|
||||
{
|
||||
"employeeCode": "EMP-003",
|
||||
"periodYear": 2023,
|
||||
"periodMonth": 1,
|
||||
"baseSalary": 2800,
|
||||
"overtime": 0,
|
||||
"bonus": 0,
|
||||
"grossSalary": 0,
|
||||
"netSalary": 0,
|
||||
"tax": 0,
|
||||
"socialSecurity": 0,
|
||||
"status": "Approved"
|
||||
},
|
||||
{
|
||||
"employeeCode": "EMP-004",
|
||||
"periodYear": 2023,
|
||||
"periodMonth": 1,
|
||||
"baseSalary": 3500,
|
||||
"overtime": 0,
|
||||
"bonus": 0,
|
||||
"grossSalary": 0,
|
||||
"netSalary": 0,
|
||||
"tax": 0,
|
||||
"socialSecurity": 0,
|
||||
"status": "Calculated"
|
||||
},
|
||||
{
|
||||
"employeeCode": "EMP-004",
|
||||
"periodYear": 2023,
|
||||
"periodMonth": 1,
|
||||
"baseSalary": 4000,
|
||||
"overtime": 0,
|
||||
"bonus": 0,
|
||||
"grossSalary": 0,
|
||||
"netSalary": 0,
|
||||
"tax": 0,
|
||||
"socialSecurity": 0,
|
||||
"status": "Draft"
|
||||
}
|
||||
],
|
||||
"Template360s": [
|
||||
{
|
||||
"name": "Genel Yetkinlik Değerlendirmesi",
|
||||
"description": "Tüm pozisyonlar için kullanılabilecek genel 360° derece değerlendirme şablonu",
|
||||
"isActive": true,
|
||||
"assessorTypes": "self|manager|peer|subordinate|customer|external|hrUpperManagement|otherDepartment"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,6 +68,10 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
private readonly IRepository<Employee, Guid> _employeeRepository;
|
||||
private readonly IRepository<Bank, Guid> _bankRepository;
|
||||
private readonly IRepository<BankAccount, Guid> _bankAccountRepository;
|
||||
private readonly IRepository<Leave, Guid> _leaveRepository;
|
||||
private readonly IRepository<Overtime, Guid> _overtimeRepository;
|
||||
private readonly IRepository<Payroll, Guid> _payrollRepository;
|
||||
private readonly IRepository<Template360, Guid> _template360Repository;
|
||||
|
||||
public TenantDataSeeder(
|
||||
IRepository<IdentityUser, Guid> repositoryUser,
|
||||
|
|
@ -119,7 +123,11 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
IRepository<Employee, Guid> employeeRepository,
|
||||
IRepository<Badge, Guid> badgeRepository,
|
||||
IRepository<Bank, Guid> bankRepository,
|
||||
IRepository<BankAccount, Guid> bankAccountRepository
|
||||
IRepository<BankAccount, Guid> bankAccountRepository,
|
||||
IRepository<Leave, Guid> leaveRepository,
|
||||
IRepository<Overtime, Guid> overtimeRepository,
|
||||
IRepository<Payroll, Guid> payrollRepository,
|
||||
IRepository<Template360, Guid> template360Repository
|
||||
)
|
||||
{
|
||||
_repositoryUser = repositoryUser;
|
||||
|
|
@ -172,6 +180,10 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
_badgeRepository = badgeRepository;
|
||||
_bankRepository = bankRepository;
|
||||
_bankAccountRepository = bankAccountRepository;
|
||||
_leaveRepository = leaveRepository;
|
||||
_overtimeRepository = overtimeRepository;
|
||||
_payrollRepository = payrollRepository;
|
||||
_template360Repository = template360Repository;
|
||||
}
|
||||
|
||||
private static IConfigurationRoot BuildConfiguration()
|
||||
|
|
@ -1050,5 +1062,93 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
IsActive = item.IsActive
|
||||
}, autoSave: true);
|
||||
}
|
||||
|
||||
foreach (var item in items.Leaves)
|
||||
{
|
||||
var employee = await _employeeRepository.FirstOrDefaultAsync(x => x.Code == item.EmployeeCode);
|
||||
if (employee != null)
|
||||
{
|
||||
var exists = await _leaveRepository.AnyAsync(x => x.EmployeeId == employee.Id);
|
||||
if (exists)
|
||||
continue;
|
||||
|
||||
await _leaveRepository.InsertAsync(new Leave
|
||||
{
|
||||
EmployeeId = employee.Id,
|
||||
LeaveType = item.LeaveType,
|
||||
StartDate = item.StartDate,
|
||||
EndDate = item.EndDate,
|
||||
TotalDays = item.TotalDays,
|
||||
IsHalfDay = item.IsHalfDay,
|
||||
Reason = item.Reason,
|
||||
Status = item.Status,
|
||||
}, autoSave: true);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in items.Overtimes)
|
||||
{
|
||||
var employee = await _employeeRepository.FirstOrDefaultAsync(x => x.Code == item.EmployeeCode);
|
||||
if (employee != null)
|
||||
{
|
||||
var exists = await _overtimeRepository.AnyAsync(x => x.EmployeeId == employee.Id);
|
||||
if (exists)
|
||||
continue;
|
||||
|
||||
await _overtimeRepository.InsertAsync(new Overtime
|
||||
{
|
||||
EmployeeId = employee.Id,
|
||||
Date = item.Date,
|
||||
StartTime = item.StartTime,
|
||||
EndTime = item.EndTime,
|
||||
TotalHours = item.TotalHours,
|
||||
Reason = item.Reason,
|
||||
Status = item.Status,
|
||||
Rate = item.Rate,
|
||||
Amount = item.Amount
|
||||
}, autoSave: true);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in items.Payrolls)
|
||||
{
|
||||
var employee = await _employeeRepository.FirstOrDefaultAsync(x => x.Code == item.EmployeeCode);
|
||||
if (employee != null)
|
||||
{
|
||||
var exists = await _payrollRepository.AnyAsync(x => x.EmployeeId == employee.Id);
|
||||
if (exists)
|
||||
continue;
|
||||
|
||||
await _payrollRepository.InsertAsync(new Payroll
|
||||
{
|
||||
EmployeeId = employee.Id,
|
||||
PeriodYear = item.PeriodYear,
|
||||
PeriodMonth = item.PeriodMonth,
|
||||
BaseSalary = item.BaseSalary,
|
||||
Overtime = item.Overtime,
|
||||
Bonus = item.Bonus,
|
||||
GrossSalary = item.GrossSalary,
|
||||
NetSalary = item.NetSalary,
|
||||
Tax = item.Tax,
|
||||
SocialSecurity = item.SocialSecurity,
|
||||
Status = item.Status
|
||||
}, autoSave: true);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in items.Template360s)
|
||||
{
|
||||
var exists = await _template360Repository.AnyAsync(x => x.Name == item.Name);
|
||||
if (exists)
|
||||
continue;
|
||||
|
||||
await _template360Repository.InsertAsync(new Template360
|
||||
{
|
||||
Name = item.Name,
|
||||
Description = item.Description,
|
||||
IsActive = item.IsActive,
|
||||
AssessorTypes = item.AssessorTypes,
|
||||
}, autoSave: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,6 +57,58 @@ public class TenantSeederDto
|
|||
public List<BadgeSeedDto> Badges { get; set; }
|
||||
public List<CostCenterSeedDto> CostCenters { get; set; }
|
||||
public List<EmployeeSeedDto> Employees { get; set; }
|
||||
public List<LeaveSeedDto> Leaves { get; set; }
|
||||
public List<OvertimeSeedDto> Overtimes { get; set; }
|
||||
public List<PayrollSeedDto> Payrolls { get; set; }
|
||||
public List<Template360SeedDto> Template360s { get; set; }
|
||||
}
|
||||
|
||||
public class Template360SeedDto
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
public string AssessorTypes { get; set; }
|
||||
}
|
||||
|
||||
public class PayrollSeedDto
|
||||
{
|
||||
public string EmployeeCode { get; set; }
|
||||
public int PeriodYear { get; set; }
|
||||
public int PeriodMonth { get; set; }
|
||||
public decimal BaseSalary { get; set; }
|
||||
public decimal Overtime { get; set; }
|
||||
public decimal Bonus { get; set; }
|
||||
public decimal GrossSalary { get; set; }
|
||||
public decimal NetSalary { get; set; }
|
||||
public decimal Tax { get; set; }
|
||||
public decimal SocialSecurity { get; set; }
|
||||
public string Status { get; set; }
|
||||
}
|
||||
|
||||
public class OvertimeSeedDto
|
||||
{
|
||||
public string EmployeeCode { get; set; }
|
||||
public DateTime Date { get; set; }
|
||||
public DateTime StartTime { get; set; }
|
||||
public DateTime EndTime { get; set; }
|
||||
public decimal TotalHours { get; set; }
|
||||
public string Reason { get; set; }
|
||||
public string Status { get; set; }
|
||||
public decimal Rate { get; set; }
|
||||
public decimal Amount { get; set; }
|
||||
}
|
||||
|
||||
public class LeaveSeedDto
|
||||
{
|
||||
public string EmployeeCode { get; set; }
|
||||
public string LeaveType { get; set; }
|
||||
public DateTime StartDate { get; set; }
|
||||
public DateTime EndDate { get; set; }
|
||||
public decimal TotalDays { get; set; }
|
||||
public bool IsHalfDay { get; set; }
|
||||
public string Reason { get; set; }
|
||||
public string Status { get; set; }
|
||||
}
|
||||
|
||||
public class EmployeeSeedDto
|
||||
|
|
|
|||
|
|
@ -99,6 +99,14 @@ const DialogShowComponent = (): JSX.Element => {
|
|||
{...dialogContext.config?.props}
|
||||
></QuestionDialog>
|
||||
)
|
||||
case 'Template360Questions':
|
||||
return (
|
||||
<QuestionDialog
|
||||
open={true}
|
||||
onDialogClose={handleDialogClose}
|
||||
{...dialogContext.config?.props}
|
||||
></QuestionDialog>
|
||||
)
|
||||
default:
|
||||
return <></>
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue