From b16391468c0e73fe2a0676caf8eab25ba727364e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96ZT=C3=9CRK?= <76204082+iamsedatozturk@users.noreply.github.com> Date: Wed, 22 Oct 2025 11:20:11 +0300 Subject: [PATCH] Hr EmploymenTypes, JobPositions, Department, Badge, CostCenters --- .../Seeds/ListFormsSeeder.cs | 4 +- .../Entities/Tenant/Hr/CostCenter.cs | 7 +- .../Entities/Tenant/Hr/Department.cs | 2 +- .../Entities/Tenant/Hr/Employee.cs | 22 +- .../Entities/Tenant/Hr/JobPosition.cs | 10 +- .../EntityFrameworkCore/PlatformDbContext.cs | 17 +- ....cs => 20251022080448_Initial.Designer.cs} | 115 +- ...6_Initial.cs => 20251022080448_Initial.cs} | 175 ++- .../PlatformDbContextModelSnapshot.cs | 113 +- .../Tenants/Seeds/TenantData.json | 1007 ++++++++++++++++- .../Tenants/TenantDataSeeder.cs | 218 +++- .../Tenants/TenantSeederDto.cs | 116 ++ ui/src/mocks/mockCostCenters.ts | 196 ++-- ui/src/mocks/mockEmployees.ts | 20 +- ui/src/types/hr.ts | 2 +- .../hr/components/Degree360Evaluation.tsx | 28 +- .../hr/components/DepartmentManagement.tsx | 4 +- .../hr/components/DepartmentViewModal.tsx | 4 +- ui/src/views/hr/components/EmployeeForm.tsx | 10 +- .../views/hr/components/LeaveManagement.tsx | 2 +- .../views/hr/components/OrganizationChart.tsx | 6 +- .../hr/components/OvertimeManagement.tsx | 2 +- 22 files changed, 1782 insertions(+), 298 deletions(-) rename api/src/Kurs.Platform.EntityFrameworkCore/Migrations/{20251021144156_Initial.Designer.cs => 20251022080448_Initial.Designer.cs} (99%) rename api/src/Kurs.Platform.EntityFrameworkCore/Migrations/{20251021144156_Initial.cs => 20251022080448_Initial.cs} (98%) diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs index 55fd3512..c3e9047c 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs @@ -34130,7 +34130,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency new EditingFormItemDto { Order = 2, DataField="TerminationDate", ColSpan = 2, EditorType2 = EditorTypes.dxDateBox }, new EditingFormItemDto { Order = 3, DataField="EmploymentTypeId", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 4, DataField="JobPositionId", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 5, DataField="DepartmantId", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 5, DataField="DepartmentId", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 6, DataField="WorkLocation", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 7, DataField="ManagerId", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 8, DataField="BaseSalary", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, @@ -34991,7 +34991,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.Guid, - FieldName = "DepartmantId", + FieldName = "DepartmentId", Width = 100, ListOrderNo = 25, Visible = true, diff --git a/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/CostCenter.cs b/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/CostCenter.cs index a39e1f59..2dab94a3 100644 --- a/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/CostCenter.cs +++ b/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/CostCenter.cs @@ -24,9 +24,10 @@ public class CostCenter : FullAuditedEntity, IMultiTenant public Department Department { get; set; } public string CostCenterType { get; set; } - public int BudgetedAmount { get; set; } - public int ActualAmount { get; set; } - public Guid CurrencyId { get; set; } + public decimal BudgetedAmount { get; set; } + public decimal ActualAmount { get; set; } + public Guid? CurrencyId { get; set; } + public Currency Currency { get; set; } public string FiscalYear { get; set; } public bool IsActive { get; set; } } 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 563246a7..9db68804 100644 --- a/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/Department.cs +++ b/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/Department.cs @@ -24,7 +24,7 @@ public class Department : FullAuditedEntity, IMultiTenant public Guid? CostCenterId { get; set; } public CostCenter CostCenter { get; set; } - public int Budget { get; set; } + public decimal Budget { get; set; } public bool IsActive { get; set; } public Department() diff --git a/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/Employee.cs b/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/Employee.cs index a5a8c421..87d70290 100644 --- a/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/Employee.cs +++ b/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/Employee.cs @@ -35,25 +35,31 @@ public class Employee : FullAuditedEntity, IMultiTenant public DateTime HireDate { get; set; } public DateTime? TerminationDate { get; set; } - public Guid EmploymentTypeId { get; set; } - public Guid JobPositionId { get; set; } + + public Guid? EmploymentTypeId { get; set; } + public EmploymentType EmploymentType { get; set; } + + public Guid? JobPositionId { get; set; } public JobPosition JobPosition { get; set; } - public Guid DepartmantId { get; set; } + public Guid? DepartmentId { get; set; } public Department Department { get; set; } + public string WorkLocation { get; set; } public Guid? ManagerId { get; set; } public Employee Manager { get; set; } - public int BaseSalary { get; set; } - public Guid CurrencyId { get; set; } - public string PayrollGroup { get; set; } + public decimal BaseSalary { get; set; } + public Guid? CurrencyId { get; set; } + public Currency Currency { get; set; } + + public string PayrollGroup { get; set; } // e.g., Monthly, Biweekly, Weekly - public Guid BankAccountId { get; set; } + public Guid? BankAccountId { get; set; } public BankAccount BankAccount { get; set; } - public Guid BadgeId { get; set; } + public Guid? BadgeId { get; set; } public Badge Badge { get; set; } public string EmployeeStatus { get; set; } diff --git a/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/JobPosition.cs b/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/JobPosition.cs index 8c865f4a..9cba39bc 100644 --- a/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/JobPosition.cs +++ b/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/JobPosition.cs @@ -11,11 +11,13 @@ public class JobPosition : FullAuditedEntity, IMultiTenant public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } - public Guid DepartmentId { get; set; } + public Guid? DepartmentId { get; set; } + public Department Department { get; set; } public string Level { get; set; } - public int MinSalary { get; set; } - public int MaxSalary { get; set; } - public Guid CurrencyId { get; set; } + public decimal MinSalary { get; set; } + public decimal MaxSalary { get; set; } + public Guid? CurrencyId { get; set; } + public Currency Currency { get; set; } public string RequiredSkills { get; set; } public string Responsibilities { get; set; } public string Qualifications { get; set; } diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs b/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs index 1b61869f..45547b72 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs @@ -148,6 +148,15 @@ public class PlatformDbContext : public DbSet Questions { get; set; } public DbSet QuestionOptions { get; set; } + #region Hr + public DbSet Employees { get; set; } + public DbSet Departments { get; set; } + public DbSet JobPositions { get; set; } + public DbSet EmploymentTypes { get; set; } + public DbSet Badges { get; set; } + public DbSet CostCenters { get; set; } + #endregion + #endregion #region Entities from the modules @@ -1655,6 +1664,8 @@ public class PlatformDbContext : b.Property(x => x.Responsibilities).HasColumnType("text"); b.Property(x => x.Qualifications).HasColumnType("text"); b.Property(x => x.IsActive).HasDefaultValue(true); + b.Property(x => x.MinSalary).HasPrecision(18, 2); + b.Property(x => x.MaxSalary).HasPrecision(18, 2); }); builder.Entity(b => @@ -1684,6 +1695,7 @@ public class PlatformDbContext : b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.Budget).HasDefaultValue(0); b.Property(x => x.IsActive).HasDefaultValue(true); + b.Property(x => x.Budget).HasPrecision(18, 4); b.HasOne(x => x.ParentDepartment) .WithMany(x => x.SubDepartments) @@ -1711,6 +1723,8 @@ public class PlatformDbContext : b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.FiscalYear).HasMaxLength(10); b.Property(x => x.IsActive).HasDefaultValue(true); + b.Property(x => x.ActualAmount).HasPrecision(18, 4); + b.Property(x => x.BudgetedAmount).HasPrecision(18, 4); b.HasOne(x => x.ParentCostCenter) .WithMany(x => x.SubCostCenters) @@ -1740,6 +1754,7 @@ public class PlatformDbContext : b.Property(x => x.PayrollGroup).HasMaxLength(50); b.Property(x => x.WorkLocation).HasMaxLength(150); b.Property(x => x.IsActive).HasDefaultValue(true); + b.Property(x => x.BaseSalary).HasPrecision(18, 2); b.HasOne(x => x.JobPosition) .WithMany() @@ -1747,7 +1762,7 @@ public class PlatformDbContext : b.HasOne(x => x.Department) .WithMany() - .HasForeignKey(x => x.DepartmantId); + .HasForeignKey(x => x.DepartmentId); b.HasOne(x => x.Manager) .WithMany() diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251021144156_Initial.Designer.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251022080448_Initial.Designer.cs similarity index 99% rename from api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251021144156_Initial.Designer.cs rename to api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251022080448_Initial.Designer.cs index dba3e569..1d59a607 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251021144156_Initial.Designer.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251022080448_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Kurs.Platform.Migrations { [DbContext(typeof(PlatformDbContext))] - [Migration("20251021144156_Initial")] + [Migration("20251022080448_Initial")] partial class Initial { /// @@ -920,7 +920,6 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.Badge", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("BackgroundColor") @@ -2300,14 +2299,15 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.CostCenter", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("ActualAmount") - .HasColumnType("int"); + b.Property("ActualAmount") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); - b.Property("BudgetedAmount") - .HasColumnType("int"); + b.Property("BudgetedAmount") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); b.Property("Code") .IsRequired() @@ -2325,7 +2325,7 @@ namespace Kurs.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("CurrencyId") + b.Property("CurrencyId") .HasColumnType("uniqueidentifier"); b.Property("DeleterId") @@ -2383,6 +2383,8 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); + b.HasIndex("CurrencyId"); + b.HasIndex("DepartmentId"); b.HasIndex("ParentCostCenterId"); @@ -3020,13 +3022,13 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.Department", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("Budget") + b.Property("Budget") .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)") + .HasDefaultValue(0m); b.Property("Code") .IsRequired() @@ -3329,7 +3331,6 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.Employee", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("Address1") @@ -3342,14 +3343,15 @@ namespace Kurs.Platform.Migrations .HasMaxLength(250) .HasColumnType("nvarchar(250)"); - b.Property("BadgeId") + b.Property("BadgeId") .HasColumnType("uniqueidentifier"); - b.Property("BankAccountId") + b.Property("BankAccountId") .HasColumnType("uniqueidentifier"); - b.Property("BaseSalary") - .HasColumnType("int"); + b.Property("BaseSalary") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); b.Property("BirthDate") .HasColumnType("datetime2"); @@ -3373,7 +3375,7 @@ namespace Kurs.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("CurrencyId") + b.Property("CurrencyId") .HasColumnType("uniqueidentifier"); b.Property("DeleterId") @@ -3384,7 +3386,7 @@ namespace Kurs.Platform.Migrations .HasColumnType("datetime2") .HasColumnName("DeletionTime"); - b.Property("DepartmantId") + b.Property("DepartmentId") .HasColumnType("uniqueidentifier"); b.Property("District") @@ -3406,7 +3408,7 @@ namespace Kurs.Platform.Migrations b.Property("EmployeeStatus") .HasColumnType("nvarchar(max)"); - b.Property("EmploymentTypeId") + b.Property("EmploymentTypeId") .HasColumnType("uniqueidentifier"); b.Property("FullName") @@ -3430,7 +3432,7 @@ namespace Kurs.Platform.Migrations .HasDefaultValue(false) .HasColumnName("IsDeleted"); - b.Property("JobPositionId") + b.Property("JobPositionId") .HasColumnType("uniqueidentifier"); b.Property("LastModificationTime") @@ -3486,7 +3488,11 @@ namespace Kurs.Platform.Migrations b.HasIndex("BankAccountId"); - b.HasIndex("DepartmantId"); + b.HasIndex("CurrencyId"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("EmploymentTypeId"); b.HasIndex("JobPositionId"); @@ -3498,7 +3504,6 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.EmploymentType", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("CreationTime") @@ -4050,7 +4055,6 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.JobPosition", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("Code") @@ -4066,7 +4070,7 @@ namespace Kurs.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("CurrencyId") + b.Property("CurrencyId") .HasColumnType("uniqueidentifier"); b.Property("DeleterId") @@ -4077,7 +4081,7 @@ namespace Kurs.Platform.Migrations .HasColumnType("datetime2") .HasColumnName("DeletionTime"); - b.Property("DepartmentId") + b.Property("DepartmentId") .HasColumnType("uniqueidentifier"); b.Property("Description") @@ -4107,11 +4111,13 @@ namespace Kurs.Platform.Migrations .HasMaxLength(50) .HasColumnType("nvarchar(50)"); - b.Property("MaxSalary") - .HasColumnType("int"); + b.Property("MaxSalary") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); - b.Property("MinSalary") - .HasColumnType("int"); + b.Property("MinSalary") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); b.Property("Name") .IsRequired() @@ -4133,6 +4139,10 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); + b.HasIndex("CurrencyId"); + + b.HasIndex("DepartmentId"); + b.ToTable("T_Hr_JobPosition", (string)null); }); @@ -9776,6 +9786,10 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.CostCenter", b => { + b.HasOne("Kurs.Platform.Entities.Currency", "Currency") + .WithMany() + .HasForeignKey("CurrencyId"); + b.HasOne("Kurs.Platform.Entities.Department", "Department") .WithMany() .HasForeignKey("DepartmentId"); @@ -9788,6 +9802,8 @@ namespace Kurs.Platform.Migrations .WithMany() .HasForeignKey("ResponsibleEmployeeId"); + b.Navigation("Currency"); + b.Navigation("Department"); b.Navigation("ParentCostCenter"); @@ -9850,26 +9866,28 @@ namespace Kurs.Platform.Migrations { b.HasOne("Kurs.Platform.Entities.Badge", "Badge") .WithMany() - .HasForeignKey("BadgeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + .HasForeignKey("BadgeId"); b.HasOne("Kurs.Platform.Entities.BankAccount", "BankAccount") .WithMany() .HasForeignKey("BankAccountId") .OnDelete(DeleteBehavior.Restrict); + b.HasOne("Kurs.Platform.Entities.Currency", "Currency") + .WithMany() + .HasForeignKey("CurrencyId"); + b.HasOne("Kurs.Platform.Entities.Department", "Department") .WithMany() - .HasForeignKey("DepartmantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + .HasForeignKey("DepartmentId"); + + b.HasOne("Kurs.Platform.Entities.EmploymentType", "EmploymentType") + .WithMany() + .HasForeignKey("EmploymentTypeId"); b.HasOne("Kurs.Platform.Entities.JobPosition", "JobPosition") .WithMany() - .HasForeignKey("JobPositionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + .HasForeignKey("JobPositionId"); b.HasOne("Kurs.Platform.Entities.Employee", "Manager") .WithMany() @@ -9879,8 +9897,12 @@ namespace Kurs.Platform.Migrations b.Navigation("BankAccount"); + b.Navigation("Currency"); + b.Navigation("Department"); + b.Navigation("EmploymentType"); + b.Navigation("JobPosition"); b.Navigation("Manager"); @@ -9927,6 +9949,21 @@ namespace Kurs.Platform.Migrations b.Navigation("Event"); }); + modelBuilder.Entity("Kurs.Platform.Entities.JobPosition", b => + { + b.HasOne("Kurs.Platform.Entities.Currency", "Currency") + .WithMany() + .HasForeignKey("CurrencyId"); + + b.HasOne("Kurs.Platform.Entities.Department", "Department") + .WithMany() + .HasForeignKey("DepartmentId"); + + b.Navigation("Currency"); + + b.Navigation("Department"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Level", b => { b.HasOne("Kurs.Platform.Entities.ClassType", "ClassType") diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251021144156_Initial.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251022080448_Initial.cs similarity index 98% rename from api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251021144156_Initial.cs rename to api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251022080448_Initial.cs index f4a8e33b..c769aa0d 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251021144156_Initial.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251022080448_Initial.cs @@ -1798,37 +1798,6 @@ namespace Kurs.Platform.Migrations table.PrimaryKey("PK_T_Hr_EmploymentType", x => x.Id); }); - migrationBuilder.CreateTable( - name: "T_Hr_JobPosition", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - Name = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false), - Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - DepartmentId = table.Column(type: "uniqueidentifier", nullable: false), - Level = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - MinSalary = table.Column(type: "int", nullable: false), - MaxSalary = table.Column(type: "int", nullable: false), - CurrencyId = table.Column(type: "uniqueidentifier", nullable: false), - RequiredSkills = table.Column(type: "text", nullable: true), - Responsibilities = table.Column(type: "text", nullable: true), - Qualifications = table.Column(type: "text", nullable: true), - IsActive = table.Column(type: "bit", nullable: false, defaultValue: 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_JobPosition", x => x.Id); - }); - migrationBuilder.CreateTable( name: "T_P_Activity", columns: table => new @@ -3770,9 +3739,9 @@ namespace Kurs.Platform.Migrations ResponsibleEmployeeId = table.Column(type: "uniqueidentifier", nullable: true), DepartmentId = table.Column(type: "uniqueidentifier", nullable: true), CostCenterType = table.Column(type: "nvarchar(max)", nullable: true), - BudgetedAmount = table.Column(type: "int", nullable: false), - ActualAmount = table.Column(type: "int", nullable: false), - CurrencyId = table.Column(type: "uniqueidentifier", nullable: false), + BudgetedAmount = table.Column(type: "decimal(18,4)", precision: 18, scale: 4, nullable: false), + ActualAmount = table.Column(type: "decimal(18,4)", precision: 18, scale: 4, nullable: false), + CurrencyId = table.Column(type: "uniqueidentifier", nullable: true), FiscalYear = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), CreationTime = table.Column(type: "datetime2", nullable: false), @@ -3786,6 +3755,11 @@ namespace Kurs.Platform.Migrations constraints: table => { table.PrimaryKey("PK_T_Hr_CostCenter", x => x.Id); + table.ForeignKey( + name: "FK_T_Hr_CostCenter_P_Sas_Currency_CurrencyId", + column: x => x.CurrencyId, + principalTable: "P_Sas_Currency", + principalColumn: "Id"); table.ForeignKey( name: "FK_T_Hr_CostCenter_T_Hr_CostCenter_ParentCostCenterId", column: x => x.ParentCostCenterId, @@ -3805,7 +3779,7 @@ namespace Kurs.Platform.Migrations ParentDepartmentId = table.Column(type: "uniqueidentifier", nullable: true), ManagerId = table.Column(type: "uniqueidentifier", nullable: true), CostCenterId = table.Column(type: "uniqueidentifier", nullable: true), - Budget = table.Column(type: "int", nullable: false, defaultValue: 0), + Budget = table.Column(type: "decimal(18,4)", precision: 18, scale: 4, nullable: false, defaultValue: 0m), IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), @@ -3832,6 +3806,47 @@ namespace Kurs.Platform.Migrations onDelete: ReferentialAction.Restrict); }); + migrationBuilder.CreateTable( + name: "T_Hr_JobPosition", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Code = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Name = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false), + Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + DepartmentId = table.Column(type: "uniqueidentifier", nullable: true), + Level = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + MinSalary = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), + MaxSalary = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), + CurrencyId = table.Column(type: "uniqueidentifier", nullable: true), + RequiredSkills = table.Column(type: "text", nullable: true), + Responsibilities = table.Column(type: "text", nullable: true), + Qualifications = table.Column(type: "text", nullable: true), + IsActive = table.Column(type: "bit", nullable: false, defaultValue: 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_JobPosition", x => x.Id); + table.ForeignKey( + name: "FK_T_Hr_JobPosition_P_Sas_Currency_CurrencyId", + column: x => x.CurrencyId, + principalTable: "P_Sas_Currency", + principalColumn: "Id"); + table.ForeignKey( + name: "FK_T_Hr_JobPosition_T_Hr_Department_DepartmentId", + column: x => x.DepartmentId, + principalTable: "T_Hr_Department", + principalColumn: "Id"); + }); + migrationBuilder.CreateTable( name: "T_Hr_Employee", columns: table => new @@ -3860,16 +3875,16 @@ namespace Kurs.Platform.Migrations EmergencyContactPhone = table.Column(type: "nvarchar(max)", nullable: true), HireDate = table.Column(type: "datetime2", nullable: false), TerminationDate = table.Column(type: "datetime2", nullable: true), - EmploymentTypeId = table.Column(type: "uniqueidentifier", nullable: false), - JobPositionId = table.Column(type: "uniqueidentifier", nullable: false), - DepartmantId = table.Column(type: "uniqueidentifier", nullable: false), + EmploymentTypeId = table.Column(type: "uniqueidentifier", nullable: true), + JobPositionId = table.Column(type: "uniqueidentifier", nullable: true), + DepartmentId = table.Column(type: "uniqueidentifier", nullable: true), WorkLocation = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: true), ManagerId = table.Column(type: "uniqueidentifier", nullable: true), - BaseSalary = table.Column(type: "int", nullable: false), - CurrencyId = table.Column(type: "uniqueidentifier", nullable: false), + BaseSalary = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), + CurrencyId = table.Column(type: "uniqueidentifier", nullable: true), PayrollGroup = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - BankAccountId = table.Column(type: "uniqueidentifier", nullable: false), - BadgeId = table.Column(type: "uniqueidentifier", nullable: false), + BankAccountId = table.Column(type: "uniqueidentifier", nullable: true), + BadgeId = table.Column(type: "uniqueidentifier", nullable: true), EmployeeStatus = table.Column(type: "nvarchar(max)", nullable: true), IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), CreationTime = table.Column(type: "datetime2", nullable: false), @@ -3883,6 +3898,11 @@ namespace Kurs.Platform.Migrations constraints: table => { table.PrimaryKey("PK_T_Hr_Employee", x => x.Id); + table.ForeignKey( + name: "FK_T_Hr_Employee_P_Sas_Currency_CurrencyId", + column: x => x.CurrencyId, + principalTable: "P_Sas_Currency", + principalColumn: "Id"); table.ForeignKey( name: "FK_T_Hr_Employee_T_Acc_BankAccount_BankAccountId", column: x => x.BankAccountId, @@ -3893,25 +3913,27 @@ namespace Kurs.Platform.Migrations name: "FK_T_Hr_Employee_T_Hr_Badge_BadgeId", column: x => x.BadgeId, principalTable: "T_Hr_Badge", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); + principalColumn: "Id"); table.ForeignKey( - name: "FK_T_Hr_Employee_T_Hr_Department_DepartmantId", - column: x => x.DepartmantId, + name: "FK_T_Hr_Employee_T_Hr_Department_DepartmentId", + column: x => x.DepartmentId, principalTable: "T_Hr_Department", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); + principalColumn: "Id"); table.ForeignKey( name: "FK_T_Hr_Employee_T_Hr_Employee_ManagerId", column: x => x.ManagerId, principalTable: "T_Hr_Employee", principalColumn: "Id"); + table.ForeignKey( + name: "FK_T_Hr_Employee_T_Hr_EmploymentType_EmploymentTypeId", + column: x => x.EmploymentTypeId, + principalTable: "T_Hr_EmploymentType", + principalColumn: "Id"); table.ForeignKey( name: "FK_T_Hr_Employee_T_Hr_JobPosition_JobPositionId", column: x => x.JobPositionId, principalTable: "T_Hr_JobPosition", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); + principalColumn: "Id"); }); migrationBuilder.CreateIndex( @@ -4463,6 +4485,11 @@ namespace Kurs.Platform.Migrations table: "T_Crd_QuestionOption", column: "QuestionId"); + migrationBuilder.CreateIndex( + name: "IX_T_Hr_CostCenter_CurrencyId", + table: "T_Hr_CostCenter", + column: "CurrencyId"); + migrationBuilder.CreateIndex( name: "IX_T_Hr_CostCenter_DepartmentId", table: "T_Hr_CostCenter", @@ -4504,9 +4531,19 @@ namespace Kurs.Platform.Migrations column: "BankAccountId"); migrationBuilder.CreateIndex( - name: "IX_T_Hr_Employee_DepartmantId", + name: "IX_T_Hr_Employee_CurrencyId", table: "T_Hr_Employee", - column: "DepartmantId"); + column: "CurrencyId"); + + migrationBuilder.CreateIndex( + name: "IX_T_Hr_Employee_DepartmentId", + table: "T_Hr_Employee", + column: "DepartmentId"); + + migrationBuilder.CreateIndex( + name: "IX_T_Hr_Employee_EmploymentTypeId", + table: "T_Hr_Employee", + column: "EmploymentTypeId"); migrationBuilder.CreateIndex( name: "IX_T_Hr_Employee_JobPositionId", @@ -4518,6 +4555,16 @@ namespace Kurs.Platform.Migrations table: "T_Hr_Employee", column: "ManagerId"); + migrationBuilder.CreateIndex( + name: "IX_T_Hr_JobPosition_CurrencyId", + table: "T_Hr_JobPosition", + column: "CurrencyId"); + + migrationBuilder.CreateIndex( + name: "IX_T_Hr_JobPosition_DepartmentId", + table: "T_Hr_JobPosition", + column: "DepartmentId"); + migrationBuilder.CreateIndex( name: "IX_T_Sas_ApiEndpoint_EntityId", table: "T_Sas_ApiEndpoint", @@ -4578,6 +4625,18 @@ namespace Kurs.Platform.Migrations name: "FK_T_Acc_BankAccount_P_Sas_Currency_CurrencyId", table: "T_Acc_BankAccount"); + migrationBuilder.DropForeignKey( + name: "FK_T_Hr_CostCenter_P_Sas_Currency_CurrencyId", + table: "T_Hr_CostCenter"); + + migrationBuilder.DropForeignKey( + name: "FK_T_Hr_Employee_P_Sas_Currency_CurrencyId", + table: "T_Hr_Employee"); + + migrationBuilder.DropForeignKey( + name: "FK_T_Hr_JobPosition_P_Sas_Currency_CurrencyId", + table: "T_Hr_JobPosition"); + migrationBuilder.DropForeignKey( name: "FK_T_Acc_BankAccount_T_Acc_Bank_BankId", table: "T_Acc_BankAccount"); @@ -4587,9 +4646,13 @@ namespace Kurs.Platform.Migrations table: "T_Hr_CostCenter"); migrationBuilder.DropForeignKey( - name: "FK_T_Hr_Employee_T_Hr_Department_DepartmantId", + name: "FK_T_Hr_Employee_T_Hr_Department_DepartmentId", table: "T_Hr_Employee"); + migrationBuilder.DropForeignKey( + name: "FK_T_Hr_JobPosition_T_Hr_Department_DepartmentId", + table: "T_Hr_JobPosition"); + migrationBuilder.DropTable( name: "AbpAuditLogActions"); @@ -4824,9 +4887,6 @@ namespace Kurs.Platform.Migrations migrationBuilder.DropTable( name: "T_Crd_QuestionTag"); - migrationBuilder.DropTable( - name: "T_Hr_EmploymentType"); - migrationBuilder.DropTable( name: "T_P_Activity"); @@ -5013,6 +5073,9 @@ namespace Kurs.Platform.Migrations migrationBuilder.DropTable( name: "T_Hr_Badge"); + migrationBuilder.DropTable( + name: "T_Hr_EmploymentType"); + migrationBuilder.DropTable( name: "T_Hr_JobPosition"); } diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs index 0aeba3e2..b992b5f4 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs @@ -917,7 +917,6 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.Badge", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("BackgroundColor") @@ -2297,14 +2296,15 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.CostCenter", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("ActualAmount") - .HasColumnType("int"); + b.Property("ActualAmount") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); - b.Property("BudgetedAmount") - .HasColumnType("int"); + b.Property("BudgetedAmount") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); b.Property("Code") .IsRequired() @@ -2322,7 +2322,7 @@ namespace Kurs.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("CurrencyId") + b.Property("CurrencyId") .HasColumnType("uniqueidentifier"); b.Property("DeleterId") @@ -2380,6 +2380,8 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); + b.HasIndex("CurrencyId"); + b.HasIndex("DepartmentId"); b.HasIndex("ParentCostCenterId"); @@ -3017,13 +3019,13 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.Department", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("Budget") + b.Property("Budget") .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)") + .HasDefaultValue(0m); b.Property("Code") .IsRequired() @@ -3326,7 +3328,6 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.Employee", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("Address1") @@ -3339,14 +3340,15 @@ namespace Kurs.Platform.Migrations .HasMaxLength(250) .HasColumnType("nvarchar(250)"); - b.Property("BadgeId") + b.Property("BadgeId") .HasColumnType("uniqueidentifier"); - b.Property("BankAccountId") + b.Property("BankAccountId") .HasColumnType("uniqueidentifier"); - b.Property("BaseSalary") - .HasColumnType("int"); + b.Property("BaseSalary") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); b.Property("BirthDate") .HasColumnType("datetime2"); @@ -3370,7 +3372,7 @@ namespace Kurs.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("CurrencyId") + b.Property("CurrencyId") .HasColumnType("uniqueidentifier"); b.Property("DeleterId") @@ -3381,7 +3383,7 @@ namespace Kurs.Platform.Migrations .HasColumnType("datetime2") .HasColumnName("DeletionTime"); - b.Property("DepartmantId") + b.Property("DepartmentId") .HasColumnType("uniqueidentifier"); b.Property("District") @@ -3403,7 +3405,7 @@ namespace Kurs.Platform.Migrations b.Property("EmployeeStatus") .HasColumnType("nvarchar(max)"); - b.Property("EmploymentTypeId") + b.Property("EmploymentTypeId") .HasColumnType("uniqueidentifier"); b.Property("FullName") @@ -3427,7 +3429,7 @@ namespace Kurs.Platform.Migrations .HasDefaultValue(false) .HasColumnName("IsDeleted"); - b.Property("JobPositionId") + b.Property("JobPositionId") .HasColumnType("uniqueidentifier"); b.Property("LastModificationTime") @@ -3483,7 +3485,11 @@ namespace Kurs.Platform.Migrations b.HasIndex("BankAccountId"); - b.HasIndex("DepartmantId"); + b.HasIndex("CurrencyId"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("EmploymentTypeId"); b.HasIndex("JobPositionId"); @@ -3495,7 +3501,6 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.EmploymentType", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("CreationTime") @@ -4047,7 +4052,6 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.JobPosition", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("Code") @@ -4063,7 +4067,7 @@ namespace Kurs.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("CurrencyId") + b.Property("CurrencyId") .HasColumnType("uniqueidentifier"); b.Property("DeleterId") @@ -4074,7 +4078,7 @@ namespace Kurs.Platform.Migrations .HasColumnType("datetime2") .HasColumnName("DeletionTime"); - b.Property("DepartmentId") + b.Property("DepartmentId") .HasColumnType("uniqueidentifier"); b.Property("Description") @@ -4104,11 +4108,13 @@ namespace Kurs.Platform.Migrations .HasMaxLength(50) .HasColumnType("nvarchar(50)"); - b.Property("MaxSalary") - .HasColumnType("int"); + b.Property("MaxSalary") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); - b.Property("MinSalary") - .HasColumnType("int"); + b.Property("MinSalary") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); b.Property("Name") .IsRequired() @@ -4130,6 +4136,10 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); + b.HasIndex("CurrencyId"); + + b.HasIndex("DepartmentId"); + b.ToTable("T_Hr_JobPosition", (string)null); }); @@ -9773,6 +9783,10 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.CostCenter", b => { + b.HasOne("Kurs.Platform.Entities.Currency", "Currency") + .WithMany() + .HasForeignKey("CurrencyId"); + b.HasOne("Kurs.Platform.Entities.Department", "Department") .WithMany() .HasForeignKey("DepartmentId"); @@ -9785,6 +9799,8 @@ namespace Kurs.Platform.Migrations .WithMany() .HasForeignKey("ResponsibleEmployeeId"); + b.Navigation("Currency"); + b.Navigation("Department"); b.Navigation("ParentCostCenter"); @@ -9847,26 +9863,28 @@ namespace Kurs.Platform.Migrations { b.HasOne("Kurs.Platform.Entities.Badge", "Badge") .WithMany() - .HasForeignKey("BadgeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + .HasForeignKey("BadgeId"); b.HasOne("Kurs.Platform.Entities.BankAccount", "BankAccount") .WithMany() .HasForeignKey("BankAccountId") .OnDelete(DeleteBehavior.Restrict); + b.HasOne("Kurs.Platform.Entities.Currency", "Currency") + .WithMany() + .HasForeignKey("CurrencyId"); + b.HasOne("Kurs.Platform.Entities.Department", "Department") .WithMany() - .HasForeignKey("DepartmantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + .HasForeignKey("DepartmentId"); + + b.HasOne("Kurs.Platform.Entities.EmploymentType", "EmploymentType") + .WithMany() + .HasForeignKey("EmploymentTypeId"); b.HasOne("Kurs.Platform.Entities.JobPosition", "JobPosition") .WithMany() - .HasForeignKey("JobPositionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + .HasForeignKey("JobPositionId"); b.HasOne("Kurs.Platform.Entities.Employee", "Manager") .WithMany() @@ -9876,8 +9894,12 @@ namespace Kurs.Platform.Migrations b.Navigation("BankAccount"); + b.Navigation("Currency"); + b.Navigation("Department"); + b.Navigation("EmploymentType"); + b.Navigation("JobPosition"); b.Navigation("Manager"); @@ -9924,6 +9946,21 @@ namespace Kurs.Platform.Migrations b.Navigation("Event"); }); + modelBuilder.Entity("Kurs.Platform.Entities.JobPosition", b => + { + b.HasOne("Kurs.Platform.Entities.Currency", "Currency") + .WithMany() + .HasForeignKey("CurrencyId"); + + b.HasOne("Kurs.Platform.Entities.Department", "Department") + .WithMany() + .HasForeignKey("DepartmentId"); + + b.Navigation("Currency"); + + b.Navigation("Department"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Level", b => { b.HasOne("Kurs.Platform.Entities.ClassType", "ClassType") diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json b/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json index 5ece7cec..927d1d26 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json @@ -100,9 +100,7 @@ "props": null, "description": null, "isActive": true, - "dependencies": [ - "AxiosListComponent" - ] + "dependencies": ["AxiosListComponent"] } ], "ReportCategories": [ @@ -1514,7 +1512,7 @@ "Description": "Tüm departmanların katılımıyla düzenlenen geleneksel yaz futbol turnuvası.", "Status": "Published", "ParticipantsCount": 64, - "OrganizerUserName": "system@sozsoft.com", + "OrganizerUserName": "system@sozsoft.com", "Likes": 120, "Photos": [], "Comments": [] @@ -1527,7 +1525,7 @@ "Description": "Çalışanlarımıza özel, rehber eşliğinde 2 günlük kültürel gezi.", "Status": "Published", "ParticipantsCount": 25, - "OrganizerUserName": "system@sozsoft.com", + "OrganizerUserName": "system@sozsoft.com", "Likes": 45, "Photos": [], "Comments": [] @@ -1540,7 +1538,7 @@ "Description": "Caz müziğinin en güzel örneklerinin canlı performanslarla sunulacağı özel akşam.", "Status": "Published", "ParticipantsCount": 40, - "OrganizerUserName": "system@sozsoft.com", + "OrganizerUserName": "system@sozsoft.com", "Likes": 85, "Photos": [], "Comments": [] @@ -2113,5 +2111,1000 @@ "TimeLimit": 0, "Explanation": "" } + ], + "EmployeeTypes": [ + { + "name": "FULL_TIME" + }, + { + "name": "PART_TIME" + }, + { + "name": "CONTRACT" + }, + { + "name": "INTERN" + }, + { + "name": "TEMPORARY" + }, + { + "name": "CONSULTANT" + } + ], + "JobPositions": [ + { + "code": "DEV-001", + "name": "Software Developer", + "description": "Responsible for developing and maintaining web applications", + "departmentCode": "ÜRT", + "level": "Mid", + "minSalary": 80000, + "maxSalary": 120000, + "currencyCode": "USD", + "requiredSkills": ["JavaScript", "TypeScript", "React", "Node.js"], + "responsibilities": [ + "Develop frontend and backend applications", + "Write clean and maintainable code", + "Participate in code reviews", + "Collaborate with team members" + ], + "qualifications": [ + "Bachelor's degree in Computer Science or related field", + "3+ years of experience in web development", + "Strong knowledge of JavaScript and TypeScript" + ], + "isActive": true + }, + { + "code": "MGR-001", + "name": "Project Manager", + "description": "Lead and manage software development projects", + "departmentCode": "BAK", + "level": "Manager", + "minSalary": 100000, + "maxSalary": 150000, + "currencyCode": "USD", + "requiredSkills": [ + "Project Management", + "Agile", + "Scrum", + "Leadership" + ], + "responsibilities": [ + "Plan and execute project timelines", + "Coordinate with cross-functional teams", + "Manage project budgets and resources", + "Ensure project delivery within scope and timeline" + ], + "qualifications": [ + "Bachelor's degree in Business or related field", + "5+ years of project management experience", + "PMP certification preferred" + ], + "isActive": true + }, + { + "code": "QA-001", + "name": "Quality Assurance Engineer", + "description": "Ensure software quality through testing and automation", + "departmentCode": "KAL", + "level": "Mid", + "minSalary": 70000, + "maxSalary": 100000, + "currencyCode": "USD", + "requiredSkills": [ + "Testing", + "Automation", + "Selenium", + "API Testing" + ], + "responsibilities": [ + "Design and execute test cases", + "Automate testing processes", + "Report and track bugs", + "Collaborate with development team" + ], + "qualifications": [ + "Bachelor's degree in Computer Science or related field", + "3+ years of QA experience", + "Experience with automation tools" + ], + "isActive": true + }, + { + "code": "UX-001", + "name": "UX/UI Designer", + "description": "Design user interfaces and improve user experience", + "departmentCode": "DEP", + "level": "Mid", + "minSalary": 75000, + "maxSalary": 110000, + "currencyCode": "USD", + "requiredSkills": [ + "Figma", + "Adobe Creative Suite", + "User Research", + "Prototyping" + ], + "responsibilities": [ + "Create wireframes and prototypes", + "Conduct user research", + "Design intuitive user interfaces", + "Collaborate with development team" + ], + "qualifications": [ + "Bachelor's degree in Design or related field", + "3+ years of UX/UI design experience", + "Strong portfolio demonstrating design skills" + ], + "isActive": true + }, + { + "code": "DA-001", + "name": "Data Analyst", + "description": "Analyze business data and provide insights", + "departmentCode": "IDR", + "level": "Mid", + "minSalary": 85000, + "maxSalary": 125000, + "currencyCode": "USD", + "requiredSkills": [ + "SQL", + "Python", + "Excel", + "Tableau", + "Statistics" + ], + "responsibilities": [ + "Analyze large datasets", + "Create reports and dashboards", + "Identify trends and patterns", + "Present findings to stakeholders" + ], + "qualifications": [ + "Bachelor's degree in Statistics, Mathematics, or related field", + "3+ years of data analysis experience", + "Strong analytical and problem-solving skills" + ], + "isActive": true + }, + { + "code": "HR-001", + "name": "HR Specialist", + "description": "Support human resources operations and employee relations", + "departmentCode": "IDR", + "level": "Mid", + "minSalary": 60000, + "maxSalary": 85000, + "currencyCode": "USD", + "requiredSkills": [ + "HR Management", + "Recruitment", + "Employee Relations", + "HRIS" + ], + "responsibilities": [ + "Manage recruitment processes", + "Handle employee relations issues", + "Maintain HR records and policies", + "Support employee onboarding" + ], + "qualifications": [ + "Bachelor's degree in Human Resources or related field", + "2+ years of HR experience", + "Knowledge of employment laws and regulations" + ], + "isActive": true + }, + { + "code": "SA-001", + "name": "Sales Associate", + "description": "Generate sales leads and maintain customer relationships", + "departmentCode": "BAK", + "level": "Junior", + "minSalary": 45000, + "maxSalary": 70000, + "currencyCode": "USD", + "requiredSkills": [ + "Sales", + "CRM", + "Communication", + "Customer Service" + ], + "responsibilities": [ + "Identify and pursue sales opportunities", + "Maintain customer relationships", + "Prepare sales proposals", + "Meet monthly sales targets" + ], + "qualifications": [ + "Bachelor's degree in Business or related field", + "1+ years of sales experience", + "Excellent communication skills" + ], + "isActive": true + }, + { + "code": "ACC-001", + "name": "Accountant", + "description": "Manage financial records and ensure compliance", + "departmentCode": "ÜRT", + "level": "Mid", + "minSalary": 55000, + "maxSalary": 80000, + "currencyCode": "USD", + "requiredSkills": [ + "Accounting", + "Excel", + "Financial Analysis", + "Tax Preparation" + ], + "responsibilities": [ + "Maintain financial records", + "Prepare financial statements", + "Ensure regulatory compliance", + "Assist with budget planning" + ], + "qualifications": [ + "Bachelor's degree in Accounting or Finance", + "CPA certification preferred", + "3+ years of accounting experience" + ], + "isActive": true, + "employees": [] + }, + { + "code": "CS-001", + "name": "Customer Support Representative", + "description": "Provide excellent customer service and technical support", + "departmentCode": "ÜRT", + "level": "Entry", + "minSalary": 35000, + "maxSalary": 50000, + "currencyCode": "USD", + "requiredSkills": [ + "Customer Service", + "Communication", + "Problem Solving", + "CRM" + ], + "responsibilities": [ + "Respond to customer inquiries", + "Resolve technical issues", + "Document customer interactions", + "Escalate complex issues when needed" + ], + "qualifications": [ + "High school diploma or equivalent", + "1+ years of customer service experience", + "Strong communication skills" + ], + "isActive": true + }, + { + "code": "IT-001", + "name": "IT Support Specialist", + "description": "Provide technical support and maintain IT infrastructure", + "departmentCode": "BAK", + "level": "Junior", + "minSalary": 50000, + "maxSalary": 75000, + "currencyCode": "USD", + "requiredSkills": [ + "Windows", + "Network Administration", + "Hardware", + "Troubleshooting" + ], + "responsibilities": [ + "Provide technical support to employees", + "Maintain computer systems and networks", + "Install and configure software", + "Document IT procedures" + ], + "qualifications": [ + "Associate degree in Information Technology or related field", + "2+ years of IT support experience", + "CompTIA A+ certification preferred" + ], + "isActive": true + } + ], + "Departments": [ + { + "code": "ÜRT", + "name": "Üretim", + "description": "Üretim departmanı", + "parentDepartmentCode": null, + "subDepartments": [], + "managerCode": "1", + "costCenterCode": "cc-005", + "budget": 8500000, + "isActive": true + }, + { + "code": "BAK", + "name": "Bakım", + "description": "Bakım departmanı", + "parentDepartmentCode": null, + "subDepartments": [], + "managerCode": "7", + "costCenterCode": "cc-011", + "budget": 2200000, + "isActive": true + }, + { + "code": "KAL", + "name": "Kalite Kontrol", + "description": "Kalite kontrol departmanı", + "parentDepartmentCode": "ÜRT", + "subDepartments": [], + "managerCode": "5", + "costCenterCode": "cc-007", + "budget": 1200000, + "isActive": true + }, + { + "code": "DEP", + "name": "Depo", + "description": "Depo departmanı", + "parentDepartmentCode": "ÜRT", + "subDepartments": [], + "managerCode": "3", + "costCenterCode": "cc-008", + "budget": 2800000, + "isActive": true + }, + { + "code": "IDR", + "name": "İdari İşler", + "description": "İdari işler departmanı", + "parentDepartmentCode": null, + "subDepartments": [], + "managerCode": "2", + "costCenterCode": "cc-001", + "budget": 2500000, + "isActive": true + } + ], + "Badges": [ + { + "code": "STAR_PERFORMER", + "name": "Yıldız Performans", + "description": "Üstün performans sergileyen çalışanlara verilen prestijli rozet", + "icon": "⭐", + "color": "#FFD700", + "backgroundColor": "#FFF8DC", + "category": "Performance", + "criteria": "3 çeyrek üst üste hedefleri %110 üzerinde tamamlama", + "points": 100, + "rarity": "Epic", + "isActive": true + }, + { + "code": "TEAM_LEADER", + "name": "Takım Lideri", + "description": "Takım arkadaşlarına öncülük eden ve onları motive eden çalışanlar için", + "icon": "👑", + "color": "#4B0082", + "backgroundColor": "#E6E6FA", + "category": "Leadership", + "criteria": "Takım projelerinde liderlik gösterme ve ekip başarısına katkı", + "points": 75, + "rarity": "Rare", + "isActive": true + }, + { + "code": "INNOVATOR", + "name": "İnovatör", + "description": "Yaratıcı çözümler üreten ve yenilikçi yaklaşımlar sergileyen çalışanlar", + "icon": "💡", + "color": "#FF6B35", + "backgroundColor": "#FFF0E6", + "category": "Innovation", + "criteria": "Şirkete değer katan yenilikçi fikirler sunma", + "points": 80, + "rarity": "Rare", + "isActive": true + }, + { + "code": "PERFECT_ATTENDANCE", + "name": "Mükemmel Devam", + "description": "Düzenli ve zamanında işe gelen, devamsızlık yapmayan çalışanlar", + "icon": "📅", + "color": "#28A745", + "backgroundColor": "#E8F5E8", + "category": "Attendance", + "criteria": "6 ay boyunca devamsızlık yapmama", + "points": 50, + "rarity": "Uncommon", + "isActive": true + }, + { + "code": "CUSTOMER_CHAMPION", + "name": "Müşteri Şampiyonu", + "description": "Müşteri memnuniyetinde üstün başarı gösteren çalışanlar", + "icon": "🏆", + "color": "#DC3545", + "backgroundColor": "#FFEBEE", + "category": "Customer", + "criteria": "Müşteri memnuniyet puanı %95 üzerinde alma", + "points": 90, + "rarity": "Epic", + "isActive": true + } + ], + "CostCenters": [ + { + "code": "CC-ADM-001", + "name": "Genel Yönetim", + "description": "Şirket genel yönetim masrafları", + "costCenterType": "Administrative", + "parentCostCenterCode": null, + "responsibleEmployeeCode": "EMP-001", + "departmentCode": "HR", + "budgetedAmount": 2500000, + "actualAmount": 2350000, + "currencyCode": "TRY", + "fiscalYear": "2025", + "isActive": true + }, + { + "code": "CC-HR-001", + "name": "İnsan Kaynakları", + "description": "İnsan kaynakları departmanı masrafları", + "costCenterType": "Support", + "parentCostCenterCode": null, + "responsibleEmployeeCode": "EMP-001", + "departmentCode": "HR", + "budgetedAmount": 1800000, + "actualAmount": 1650000, + "currencyCode": "TRY", + "fiscalYear": "2025", + "isActive": true + }, + { + "code": "CC-FIN-001", + "name": "Finans ve Muhasebe", + "description": "Mali işler ve muhasebe masrafları", + "costCenterType": "Support", + "parentCostCenterCode": null, + "responsibleEmployeeCode": "EMP-002", + "departmentCode": "HR", + "budgetedAmount": 1500000, + "actualAmount": 1420000, + "currencyCode": "TRY", + "fiscalYear": "2025", + "isActive": true + }, + { + "code": "CC-IT-001", + "name": "Bilgi İşlem", + "description": "IT altyapı ve yazılım masrafları", + "costCenterType": "Support", + "parentCostCenterCode": null, + "responsibleEmployeeCode": "EMP-002", + "departmentCode": "HR", + "budgetedAmount": 3200000, + "actualAmount": 3100000, + "currencyCode": "TRY", + "fiscalYear": "2025", + "isActive": true + }, + { + "code": "CC-PROD-001", + "name": "Üretim Departmanı", + "description": "Üretim faaliyetleri masrafları", + "costCenterType": "Production", + "parentCostCenterCode": null, + "responsibleEmployeeCode": "EMP-003", + "departmentCode": "HR", + "budgetedAmount": 8500000, + "actualAmount": 8200000, + "currencyCode": "TRY", + "fiscalYear": "2025", + "isActive": true + }, + { + "code": "CC-SAL-001", + "name": "Satış ve Pazarlama", + "description": "Satış ve pazarlama faaliyetleri", + "costCenterType": "Revenue", + "parentCostCenterCode": null, + "responsibleEmployeeCode": "EMP-002", + "departmentCode": "DEP", + "budgetedAmount": 4200000, + "actualAmount": 4050000, + "currencyCode": "TRY", + "fiscalYear": "2025", + "isActive": true + }, + { + "code": "CC-QUA-001", + "name": "Kalite Kontrol", + "description": "Kalite kontrol ve güvence masrafları", + "costCenterType": "Support", + "parentCostCenterCode": null, + "responsibleEmployeeCode": "EMP-003", + "departmentCode": "HR", + "budgetedAmount": 1200000, + "actualAmount": 1150000, + "currencyCode": "TRY", + "fiscalYear": "2025", + "isActive": true + }, + { + "code": "CC-LOG-001", + "name": "Lojistik ve Depo", + "description": "Lojistik operasyonları ve depo masrafları", + "costCenterType": "Support", + "parentCostCenterCode": null, + "responsibleEmployeeCode": "EMP-003", + "departmentCode": "BAK", + "budgetedAmount": 2800000, + "actualAmount": 2650000, + "currencyCode": "TRY", + "fiscalYear": "2025", + "isActive": true + }, + { + "code": "CC-RND-001", + "name": "Ar-Ge Departmanı", + "description": "Araştırma ve geliştirme masrafları", + "costCenterType": "Investment", + "parentCostCenterCode": null, + "responsibleEmployeeCode": "EMP-001", + "departmentCode": "KAL", + "budgetedAmount": 3500000, + "actualAmount": 3300000, + "currencyCode": "TRY", + "fiscalYear": "2025", + "isActive": true + }, + { + "code": "CC-PUR-001", + "name": "Satın Alma", + "description": "Satın alma ve tedarik masrafları", + "costCenterType": "Support", + "parentCostCenterCode": null, + "responsibleEmployeeCode": "EMP-001", + "departmentCode": "HR", + "budgetedAmount": 1600000, + "actualAmount": 1520000, + "currencyCode": "TRY", + "fiscalYear": "2025", + "isActive": true + }, + { + "code": "CC-MAI-001", + "name": "Bakım ve Onarım", + "description": "Bakım ve onarım masrafları", + "costCenterType": "Service", + "parentCostCenterCode": null, + "responsibleEmployeeCode": "EMP-002", + "departmentCode": "KAL", + "budgetedAmount": 2200000, + "actualAmount": 2100000, + "currencyCode": "TRY", + "fiscalYear": "2025", + "isActive": true + }, + { + "code": "CC-CUS-001", + "name": "Müşteri Hizmetleri", + "description": "Müşteri hizmetleri masrafları", + "costCenterType": "Service", + "parentCostCenterCode": null, + "responsibleEmployeeCode": "EMP-003", + "departmentCode": "IDR", + "budgetedAmount": 1000000, + "actualAmount": 950000, + "currencyCode": "TRY", + "fiscalYear": "2025", + "isActive": true + } + ], + "Employees": [ + { + "code": "EMP-001", + "fullName": "Ali Öztürk", + "avatar": "https://i.pravatar.cc/150?img=12", + "nationalId": "12345678901", + "birthDate": "20.10.1988", + "gender": "Male", + "maritalStatus": "Married", + "country": "Türkiye", + "city": "Ankara", + "district": "Ankara", + "street": "Kızılay Cd. No:12", + "postalCode": "06050", + "phone": "+90 212 555 0100", + "personalPhone": "+90 532 555 0101", + "email": "ali.ozturk@company.com", + "address1": "", + "address2": "", + "emergencyContactname": "Ayşe Öztürk", + "emergencyContactrelationship": "Eşi", + "emergencyContactphone": "+90 532 555 0100", + "hireDate": "15-01-2020", + "terminationDate": "15-01-2020", + "employmentTypeName": "FullTime", + "jobPositionCode": "1", + "departmentCode": "1", + "workLocation": "Ankara Merkez", + "baseSalary": 65000, + "managerCode": "1", + "currencyCode": "TRY", + "payrollGroup": "MONTHLY", + "bankAccountCode": "1", + "badgeCode": "B001", + "employeeStatus": "Active", + "isActive": true, + "leaves": [], + "evaluations": [], + "trainings": [], + "disciplinaryActions": [] + }, + { + "code": "EMP-002", + "fullName": "Ayşe Kaya", + "avatar": "https://i.pravatar.cc/150?img=5", + "nationalId": "12345678902", + "birthDate": "22.08.1990", + "gender": "Female", + "maritalStatus": "Single", + "country": "Türkiye", + "city": "Ankara", + "district": "Ankara", + "street": "İnönü Bulvarı No:456", + "postalCode": "06000", + "phone": "+90 212 555 0102", + "personalPhone": "+90 532 555 0103", + "email": "ayse.kaya@company.com", + "address1": "", + "address2": "", + "emergencyContactname": "Fatma Kaya", + "emergencyContactrelationship": "Anne", + "emergencyContactphone": "+90 532 555 0104", + "hireDate": "01-06-2021", + "terminationDate": "", + "employmentTypeName": "FullTime", + "jobPositionCode": "2", + "departmentCode": "1", + "workLocation": "Ankara Şube", + "baseSalary": 72000, + "managerCode": "1", + "currencyCode": "TRY", + "payrollGroup": "MONTHLY", + "bankAccountCode": "2", + "badgeCode": "B002", + "employeeStatus": "Active", + "isActive": true, + "leaves": [], + "evaluations": [], + "trainings": [], + "disciplinaryActions": [] + }, + { + "code": "EMP-003", + "fullName": "Mehmet Yılmaz", + "avatar": "https://i.pravatar.cc/150?img=8", + "nationalId": "12345678903", + "birthDate": "12.03.1987", + "gender": "Male", + "maritalStatus": "Married", + "country": "Türkiye", + "city": "İstanbul", + "district": "İstanbul", + "street": "Cumhuriyet Cad. No:123", + "postalCode": "34000", + "phone": "+90 212 555 0105", + "personalPhone": "+90 532 555 0106", + "email": "mehmet.yilmaz@company.com", + "address1": "", + "address2": "", + "emergencyContactname": "Zeynep Yılmaz", + "emergencyContactrelationship": "Eşi", + "emergencyContactphone": "+90 532 555 0107", + "hireDate": "15-02-2020", + "terminationDate": "", + "employmentTypeName": "FullTime", + "jobPositionCode": "3", + "departmentCode": "1", + "workLocation": "İstanbul HQ", + "baseSalary": 85000, + "managerCode": "1", + "currencyCode": "TRY", + "payrollGroup": "MONTHLY", + "bankAccountCode": "2", + "badgeCode": "B003", + "employeeStatus": "Active", + "isActive": true, + "leaves": [], + "evaluations": [], + "trainings": [], + "disciplinaryActions": [] + }, + { + "code": "EMP-004", + "fullName": "Selin Demir", + "avatar": "https://i.pravatar.cc/150?img=9", + "nationalId": "12345678904", + "birthDate": "25.05.1993", + "gender": "Female", + "maritalStatus": "Single", + "country": "Türkiye", + "city": "Ankara", + "district": "Ankara", + "street": "Atatürk Bulvarı No:78", + "postalCode": "06100", + "phone": "+90 312 555 0108", + "personalPhone": "+90 542 555 0109", + "email": "selin.demir@company.com", + "address1": "", + "address2": "", + "emergencyContactname": "Ali Demir", + "emergencyContactrelationship": "Baba", + "emergencyContactphone": "+90 532 555 0110", + "hireDate": "10-01-2022", + "terminationDate": "", + "employmentTypeName": "PartTime", + "jobPositionCode": "4", + "departmentCode": "1", + "workLocation": "Ankara Şube", + "baseSalary": 60000, + "managerCode": "1", + "currencyCode": "TRY", + "payrollGroup": "MONTHLY", + "bankAccountCode": "3", + "badgeCode": "B004", + "employeeStatus": "Active", + "isActive": true, + "leaves": [], + "evaluations": [], + "trainings": [], + "disciplinaryActions": [] + }, + { + "code": "EMP-005", + "fullName": "Ahmet Çelik", + "avatar": "https://i.pravatar.cc/150?img=33", + "nationalId": "12345678905", + "birthDate": "10.09.1985", + "gender": "Male", + "maritalStatus": "Married", + "country": "Türkiye", + "city": "İstanbul", + "district": "İstanbul", + "street": "Bağdat Cad. No:25", + "postalCode": "34728", + "phone": "+90 212 555 0111", + "personalPhone": "+90 532 555 0112", + "email": "ahmet.celik@company.com", + "address1": "", + "address2": "", + "emergencyContactname": "Emine Çelik", + "emergencyContactrelationship": "Eşi", + "emergencyContactphone": "+90 532 555 0113", + "hireDate": "01-04-2019", + "terminationDate": "", + "employmentTypeName": "FullTime", + "jobPositionCode": "5", + "departmentCode": "1", + "workLocation": "İstanbul HQ", + "baseSalary": 95000, + "managerCode": "1", + "currencyCode": "TRY", + "payrollGroup": "MONTHLY", + "bankAccountCode": "4", + "badgeCode": "B005", + "employeeStatus": "Active", + "isActive": true, + "leaves": [], + "evaluations": [], + "trainings": [], + "disciplinaryActions": [] + }, + { + "code": "EMP-006", + "fullName": "Zeynep Arslan", + "avatar": "https://i.pravatar.cc/150?img=10", + "nationalId": "12345678906", + "birthDate": "30.01.1995", + "gender": "Female", + "maritalStatus": "Single", + "country": "Türkiye", + "city": "İzmir", + "district": "İzmir", + "street": "Yıldız Mah. No:19", + "postalCode": "35000", + "phone": "+90 216 555 0114", + "personalPhone": "+90 532 555 0115", + "email": "zeynep.arslan@company.com", + "address1": "", + "address2": "", + "emergencyContactname": "Hasan Arslan", + "emergencyContactrelationship": "Baba", + "emergencyContactphone": "+90 532 555 0116", + "hireDate": "20-03-2023", + "terminationDate": "", + "employmentTypeName": "Intern", + "jobPositionCode": "6", + "departmentCode": "1", + "workLocation": "İzmir Ofis", + "baseSalary": 15000, + "managerCode": "1", + "currencyCode": "TRY", + "payrollGroup": "MONTHLY", + "bankAccountCode": "1", + "badgeCode": "B006", + "employeeStatus": "Active", + "isActive": true, + "leaves": [], + "evaluations": [], + "trainings": [], + "disciplinaryActions": [] + }, + { + "code": "EMP-007", + "fullName": "Burak Koç", + "avatar": "https://i.pravatar.cc/150?img=14", + "nationalId": "12345678907", + "birthDate": "18.06.1991", + "gender": "Male", + "maritalStatus": "Married", + "country": "Türkiye", + "city": "Bursa", + "district": "Bursa", + "street": "Osmangazi Mah. No:45", + "postalCode": "16000", + "phone": "+90 224 555 0117", + "personalPhone": "+90 532 555 0118", + "email": "burak.koc@company.com", + "address1": "", + "address2": "", + "emergencyContactname": "Elif Koç", + "emergencyContactrelationship": "Eşi", + "emergencyContactphone": "+90 532 555 0119", + "hireDate": "12-07-2021", + "terminationDate": "", + "employmentTypeName": "FullTime", + "jobPositionCode": "7", + "departmentCode": "2", + "workLocation": "Bursa Depo", + "baseSalary": 75000, + "managerCode": "1", + "currencyCode": "TRY", + "payrollGroup": "MONTHLY", + "bankAccountCode": "3", + "badgeCode": "B007", + "employeeStatus": "Active", + "isActive": true, + "leaves": [], + "evaluations": [], + "trainings": [], + "disciplinaryActions": [] + }, + { + "code": "EMP-008", + "fullName": "Elif Şahin", + "avatar": "https://i.pravatar.cc/150?img=20", + "nationalId": "12345678908", + "birthDate": "05.11.1989", + "gender": "Female", + "maritalStatus": "Married", + "country": "Türkiye", + "city": "İzmir", + "district": "İzmir", + "street": "Alsancak Mah. No:88", + "postalCode": "35220", + "phone": "+90 232 555 0120", + "personalPhone": "+90 532 555 0121", + "email": "elif.sahin@company.com", + "address1": "", + "address2": "", + "emergencyContactname": "Murat Şahin", + "emergencyContactrelationship": "Eşi", + "emergencyContactphone": "+90 532 555 0122", + "hireDate": "01-09-2018", + "terminationDate": "", + "employmentTypeName": "FullTime", + "jobPositionCode": "8", + "departmentCode": "2", + "workLocation": "İzmir Bölge Ofisi", + "baseSalary": 130000, + "managerCode": "1", + "currencyCode": "TRY", + "payrollGroup": "MONTHLY", + "bankAccountCode": "2", + "badgeCode": "B008", + "employeeStatus": "Active", + "isActive": true, + "leaves": [], + "evaluations": [], + "trainings": [], + "disciplinaryActions": [] + }, + { + "code": "EMP-009", + "fullName": "Canan Öztürk", + "avatar": "https://i.pravatar.cc/150?img=25", + "nationalId": "12345678909", + "birthDate": "14.04.1992", + "gender": "Female", + "maritalStatus": "Single", + "country": "Türkiye", + "city": "Ankara", + "district": "Ankara", + "street": "Bahçelievler Mah. No:55", + "postalCode": "06490", + "phone": "+90 312 555 0123", + "personalPhone": "+90 532 555 0124", + "email": "canan.ozturk@company.com", + "address1": "", + "address2": "", + "emergencyContactname": "Hüseyin Öztürk", + "emergencyContactrelationship": "Baba", + "emergencyContactphone": "+90 532 555 0125", + "hireDate": "02-11-2020", + "terminationDate": "", + "employmentTypeName": "FullTime", + "jobPositionCode": "9", + "departmentCode": "1", + "workLocation": "Ankara Çağrı Merkezi", + "baseSalary": 50000, + "managerCode": "1", + "currencyCode": "TRY", + "payrollGroup": "MONTHLY", + "bankAccountCode": "1", + "badgeCode": "B009", + "employeeStatus": "Active", + "isActive": true, + "leaves": [], + "evaluations": [], + "trainings": [], + "disciplinaryActions": [] + }, + { + "code": "EMP-010", + "fullName": "Murat Aydın", + "avatar": "https://i.pravatar.cc/150?img=30", + "nationalId": "12345678910", + "birthDate": "22.12.1984", + "gender": "Male", + "maritalStatus": "Married", + "country": "Türkiye", + "city": "İstanbul", + "district": "İstanbul", + "street": "Şişli Mah. No:101", + "postalCode": "34360", + "phone": "+90 212 555 0126", + "personalPhone": "+90 532 555 0127", + "email": "murat.aydin@company.com", + "address1": "", + "address2": "", + "emergencyContactname": "Ayten Aydın", + "emergencyContactrelationship": "Eşi", + "emergencyContactphone": "+90 532 555 0128", + "hireDate": "15-05-2017", + "terminationDate": "", + "employmentTypeName": "FullTime", + "jobPositionCode": "10", + "departmentCode": "1", + "workLocation": "İstanbul Genel Merkez", + "baseSalary": 250000, + "managerCode": "1", + "currencyCode": "TRY", + "payrollGroup": "MONTHLY", + "bankAccountCode": "4", + "badgeCode": "B010", + "employeeStatus": "Active", + "isActive": true, + "leaves": [], + "evaluations": [], + "trainings": [], + "disciplinaryActions": [] + } ] -} \ 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 d709936c..86055bbd 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs @@ -13,7 +13,6 @@ using Microsoft.EntityFrameworkCore; using System.Linq; using System.Collections.Generic; using Volo.Abp.Identity; -using Volo.Abp.Users; namespace Kurs.Platform.Data.Seeds; @@ -60,6 +59,15 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency private readonly IRepository _tagRepository; private readonly IRepository _questionPoolRepository; private readonly IRepository _questionRepository; + private readonly IRepository _employeeTypeRepository; + private readonly IRepository _jobPositionRepository; + private readonly IRepository _currencyRepository; + private readonly IRepository _departmentRepository; + private readonly IRepository _badgeRepository; + private readonly IRepository _costCenterRepository; + private readonly IRepository _employeeRepository; + private readonly IRepository _bankRepository; + private readonly IRepository _bankAccountRepository; public TenantDataSeeder( IRepository repositoryUser, @@ -102,7 +110,16 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency IRepository forumCategoryRepository, IRepository tagRepository, IRepository questionPoolRepository, - IRepository questionRepository + IRepository questionRepository, + IRepository employeeTypeRepository, + IRepository jobPositionRepository, + IRepository currencyRepository, + IRepository departmentRepository, + IRepository costCenterRepository, + IRepository employeeRepository, + IRepository badgeRepository, + IRepository bankRepository, + IRepository bankAccountRepository ) { _repositoryUser = repositoryUser; @@ -146,6 +163,15 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency _tagRepository = tagRepository; _questionPoolRepository = questionPoolRepository; _questionRepository = questionRepository; + _employeeTypeRepository = employeeTypeRepository; + _jobPositionRepository = jobPositionRepository; + _currencyRepository = currencyRepository; + _departmentRepository = departmentRepository; + _costCenterRepository = costCenterRepository; + _employeeRepository = employeeRepository; + _badgeRepository = badgeRepository; + _bankRepository = bankRepository; + _bankAccountRepository = bankAccountRepository; } private static IConfigurationRoot BuildConfiguration() @@ -769,6 +795,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency } } + //Coordinator foreach (var item in items.QuestionTags) { var exists = await _tagRepository.AnyAsync(x => x.Name == item.Name); @@ -839,5 +866,192 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency } } } + + //Hr + foreach (var item in items.Badges) + { + if (string.IsNullOrWhiteSpace(item.Code) || string.IsNullOrWhiteSpace(item.Name)) + continue; + + var exists = await _badgeRepository.AnyAsync(x => x.Code == item.Code); + if (exists) + continue; + + await _badgeRepository.InsertAsync(new Badge + { + Code = item.Code, + Name = item.Name, + Description = item.Description, + Icon = item.Icon, + Color = item.Color, + BackgroundColor = item.BackgroundColor, + Category = item.Category, + Criteria = item.Criteria, + Points = item.Points, + Rarity = item.Rarity, + IsActive = item.IsActive + }, autoSave: true); + } + + foreach (var item in items.EmployeeTypes) + { + if (string.IsNullOrWhiteSpace(item.Name)) + continue; + + var exists = await _employeeTypeRepository.AnyAsync(x => x.Name == item.Name); + if (exists) + continue; + + await _employeeTypeRepository.InsertAsync(new EmploymentType + { + Name = item.Name, + }, autoSave: true); + } + + foreach (var item in items.CostCenters) + { + if (string.IsNullOrWhiteSpace(item.Code) || string.IsNullOrWhiteSpace(item.Name)) + continue; + + var currency = await _currencyRepository.FirstOrDefaultAsync(x => x.Code == item.CurrencyCode); + var parentCostCenter = await _costCenterRepository.FirstOrDefaultAsync(x => x.Code == item.ParentCostCenterCode); + var responsibleEmployee = await _employeeRepository.FirstOrDefaultAsync(x => x.Code == item.ResponsibleEmployeeCode); + var department = await _departmentRepository.FirstOrDefaultAsync(x => x.Code == item.DepartmentCode); + + var exists = await _costCenterRepository.AnyAsync(x => x.Code == item.Code); + if (exists) + continue; + + await _costCenterRepository.InsertAsync(new CostCenter + { + Code = item.Code, + Name = item.Name, + Description = item.Description, + ParentCostCenterId = parentCostCenter != null ? parentCostCenter.Id : null, + ResponsibleEmployeeId = responsibleEmployee != null ? responsibleEmployee.Id : null, + DepartmentId = department != null ? department.Id : null, + CostCenterType = item.CostCenterType, + BudgetedAmount = item.BudgetedAmount, + ActualAmount = item.ActualAmount, + CurrencyId = currency != null ? currency.Id : null, + FiscalYear = item.FiscalYear, + IsActive = item.IsActive + }, autoSave: true); + } + + foreach (var item in items.JobPositions) + { + if (string.IsNullOrWhiteSpace(item.Name) || string.IsNullOrWhiteSpace(item.Code)) + continue; + + var exists = await _jobPositionRepository.AnyAsync(x => x.Code == item.Code); + if (exists) + continue; + + var currency = await _currencyRepository.FirstOrDefaultAsync(x => x.Code == item.CurrencyCode); + var department = await _departmentRepository.FirstOrDefaultAsync(x => x.Code == item.DepartmentCode); + + await _jobPositionRepository.InsertAsync(new JobPosition + { + Code = item.Code, + Name = item.Name, + Description = item.Description, + DepartmentId = department != null ? department.Id : null, + Level = item.Level, + MinSalary = item.MinSalary, + MaxSalary = item.MaxSalary, + CurrencyId = currency != null ? currency.Id : null, + RequiredSkills = item.RequiredSkills != null ? string.Join(",", item.RequiredSkills) : null, + Responsibilities = item.Responsibilities != null ? string.Join(",", item.Responsibilities) : null, + Qualifications = item.Qualifications != null ? string.Join(",", item.Qualifications) : null, + IsActive = item.IsActive + }, autoSave: true); + } + + foreach (var item in items.Departments) + { + if (string.IsNullOrWhiteSpace(item.Name) || string.IsNullOrWhiteSpace(item.Code)) + continue; + + var parentDepartment = await _departmentRepository.FirstOrDefaultAsync(x => x.Code == item.ParentDepartmentCode); + var costCenter = await _costCenterRepository.FirstOrDefaultAsync(x => x.Code == item.CostCenterCode); + var employee = await _employeeRepository.FirstOrDefaultAsync(x => x.Code == item.ManagerCode); + + var exists = await _departmentRepository.AnyAsync(x => x.Code == item.Code); + if (exists) + continue; + + await _departmentRepository.InsertAsync(new Department + { + Code = item.Code, + Name = item.Name, + Description = item.Description, + ParentDepartmentId = parentDepartment != null ? parentDepartment.Id : null, + ManagerId = employee != null ? employee.Id : null, + CostCenterId = costCenter != null ? costCenter.Id : null, + Budget = item.Budget, + IsActive = item.IsActive + }, autoSave: true); + } + + foreach (var item in items.Employees) + { + if (string.IsNullOrWhiteSpace(item.Code) || string.IsNullOrWhiteSpace(item.FullName)) + continue; + + var exists = await _employeeRepository.AnyAsync(x => x.Code == item.Code); + if (exists) + continue; + + var department = await _departmentRepository.FirstOrDefaultAsync(x => x.Code == item.DepartmentCode); + var jobPosition = await _jobPositionRepository.FirstOrDefaultAsync(x => x.Code == item.JobPositionCode); + var employmentType = await _employeeTypeRepository.FirstOrDefaultAsync(x => x.Name == item.EmploymentTypeName); + var currency = await _currencyRepository.FirstOrDefaultAsync(x => x.Code == item.CurrencyCode); + var manager = await _employeeRepository.FirstOrDefaultAsync(x => x.Code == item.ManagerCode); + var bankAccount = await _bankAccountRepository.FirstOrDefaultAsync(x => x.AccountNumber == item.BankAccountNumber); + var badge = await _badgeRepository.FirstOrDefaultAsync(x => x.Code == item.BadgeCode); + + await _employeeRepository.InsertAsync(new Employee + { + Code = item.Code, + FullName = item.FullName, + Avatar = item.Avatar, + NationalId = item.NationalId, + BirthDate = item.BirthDate, + Gender = item.Gender, + MaritalStatus = item.MaritalStatus, + + Country = item.Country, + City = item.City, + District = item.District, + Street = item.Street, + PostalCode = item.PostalCode, + Phone = item.Phone, + PersonalPhone = item.PersonalPhone, + Email = item.Email, + Address1 = item.Address1, + Address2 = item.Address2, + + EmergencyContactName = item.EmergencyContactName, + EmergencyContactRelationship = item.EmergencyContactRelationship, + EmergencyContactPhone = item.EmergencyContactPhone, + + HireDate = item.HireDate, + TerminationDate = item.TerminationDate, + EmploymentTypeId = employmentType != null ? employmentType.Id : null, + JobPositionId = jobPosition != null ? jobPosition.Id : null, + DepartmentId = department != null ? department.Id : null, + WorkLocation = item.WorkLocation, + BaseSalary = item.BaseSalary, + ManagerId = manager != null ? manager.Id : null, + CurrencyId = currency != null ? currency.Id : null, + PayrollGroup = item.PayrollGroup, + BankAccountId = bankAccount != null ? bankAccount.Id : null, + + BadgeId = badge != null ? badge.Id : null, + EmployeeStatus = item.EmployeeStatus, + IsActive = item.IsActive + }, autoSave: true); + } } } diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs index 6395cc13..9d9b6ff9 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs @@ -49,6 +49,122 @@ public class TenantSeederDto public List Sources { get; set; } public List Interesting { get; set; } public List Programs { get; set; } + + //Hr + public List EmployeeTypes { get; set; } + public List JobPositions { get; set; } + public List Departments { get; set; } + public List Badges { get; set; } + public List CostCenters { get; set; } + public List Employees { get; set; } +} + +public class EmployeeSeedDto +{ + public string Code { get; set; } + public string FullName { get; set; } + public string Avatar { get; set; } + public string NationalId { get; set; } + public DateTime BirthDate { get; set; } + public string Gender { get; set; } + public string MaritalStatus { get; set; } + + public string Country { get; set; } + public string City { get; set; } + public string District { get; set; } + public string Street { get; set; } + public string PostalCode { get; set; } + public string Phone { get; set; } + public string PersonalPhone { get; set; } + public string Email { get; set; } + public string Address1 { get; set; } + public string Address2 { get; set; } + + public string EmergencyContactName { get; set; } + public string EmergencyContactRelationship { get; set; } + public string EmergencyContactPhone { get; set; } + + public DateTime HireDate { get; set; } + public DateTime TerminationDate { get; set; } + public string EmploymentTypeName { get; set; } + public string JobPositionCode { get; set; } + public string DepartmentCode { get; set; } + public string WorkLocation { get; set; } + public decimal BaseSalary { get; set; } + public string ManagerCode { get; set; } + + public string CurrencyCode { get; set; } + public string PayrollGroup { get; set; } + public string BankAccountNumber { get; set; } + + public string BadgeCode { get; set; } + public string EmployeeStatus { get; set; } + public bool IsActive { get; set; } +} + +public class BadgeSeedDto +{ + public string Code { get; set; } + public string Name { get; set; } + public string Description { get; set; } + public string Icon { get; set; } + public string Color { get; set; } + public string BackgroundColor { get; set; } + public string Category { get; set; } + public string Criteria { get; set; } + public int Points { get; set; } + public string Rarity { get; set; } + public bool IsActive { get; set; } +} + +public class CostCenterSeedDto +{ + public string Code { get; set; } + public string Name { get; set; } + public string Description { get; set; } + public string ParentCostCenterCode { get; set; } + public string ResponsibleEmployeeCode { get; set; } + public string DepartmentCode { get; set; } + public string CostCenterType { get; set; } + public decimal BudgetedAmount { get; set; } + public decimal ActualAmount { get; set; } + public string CurrencyCode { get; set; } + public string FiscalYear { get; set; } + public bool IsActive { get; set; } +} + +public class DepartmentSeedDto +{ + public string Code { get; set; } + public string Name { get; set; } + public string Description { get; set; } + public string ParentDepartmentCode { get; set; } + public List SubDepartments { get; set; } + public string ManagerCode { get; set; } + public string CostCenterCode { get; set; } + public decimal Budget { get; set; } + public bool IsActive { get; set; } +} + +public class JobPositionSeedDto +{ + public string Code { get; set; } + public string Name { get; set; } + public string Description { get; set; } + public string DepartmentCode { get; set; } + public string Level { get; set; } + public decimal MinSalary { get; set; } + public decimal MaxSalary { get; set; } + public string CurrencyCode { get; set; } + public List RequiredSkills { get; set; } + public List Responsibilities { get; set; } + public List Qualifications { get; set; } + public bool IsActive { get; set; } +} + +public class EmployeeTypeSeedDto +{ + public string Name { get; set; } } public class GlobalSearchSeedDto diff --git a/ui/src/mocks/mockCostCenters.ts b/ui/src/mocks/mockCostCenters.ts index 14c63885..c1cce51f 100644 --- a/ui/src/mocks/mockCostCenters.ts +++ b/ui/src/mocks/mockCostCenters.ts @@ -1,184 +1,184 @@ -import { HrCostCenter, CostCenterType } from "../types/hr"; +import { HrCostCenter, CostCenterType } from '../types/hr' export const mockCostCenters: HrCostCenter[] = [ { - id: "cc-001", - code: "CC-ADM-001", - name: "Genel Yönetim", - description: "Şirket genel yönetim masrafları", + id: 'cc-001', + code: 'CC-ADM-001', + name: 'Genel Yönetim', + description: 'Şirket genel yönetim masrafları', costCenterType: CostCenterType.Administrative, budgetedAmount: 2500000, actualAmount: 2350000, - currency: "TRY", - fiscalYear: "2025", + currency: 'TRY', + fiscalYear: '2025', isActive: true, - creationTime: new Date("2024-01-15"), - lastModificationTime: new Date("2024-12-01"), + creationTime: new Date('2024-01-15'), + lastModificationTime: new Date('2024-12-01'), subCostCenters: [], }, { - id: "cc-002", - code: "CC-HR-001", - name: "İnsan Kaynakları", - description: "İnsan kaynakları departmanı masrafları", + id: 'cc-002', + code: 'CC-HR-001', + name: 'İnsan Kaynakları', + description: 'İnsan kaynakları departmanı masrafları', costCenterType: CostCenterType.Support, budgetedAmount: 1800000, actualAmount: 1650000, - currency: "TRY", - fiscalYear: "2025", + currency: 'TRY', + fiscalYear: '2025', isActive: true, - creationTime: new Date("2024-01-15"), - lastModificationTime: new Date("2024-11-15"), + creationTime: new Date('2024-01-15'), + lastModificationTime: new Date('2024-11-15'), subCostCenters: [], }, { - id: "cc-003", - code: "CC-FIN-001", - name: "Finans ve Muhasebe", - description: "Mali işler ve muhasebe masrafları", + id: 'cc-003', + code: 'CC-FIN-001', + name: 'Finans ve Muhasebe', + description: 'Mali işler ve muhasebe masrafları', costCenterType: CostCenterType.Support, budgetedAmount: 1500000, actualAmount: 1420000, - currency: "TRY", - fiscalYear: "2025", + currency: 'TRY', + fiscalYear: '2025', isActive: true, - creationTime: new Date("2024-01-15"), - lastModificationTime: new Date("2024-11-20"), + creationTime: new Date('2024-01-15'), + lastModificationTime: new Date('2024-11-20'), subCostCenters: [], }, { - id: "cc-004", - code: "CC-IT-001", - name: "Bilgi İşlem", - description: "IT altyapı ve yazılım masrafları", + id: 'cc-004', + code: 'CC-IT-001', + name: 'Bilgi İşlem', + description: 'IT altyapı ve yazılım masrafları', costCenterType: CostCenterType.Support, budgetedAmount: 3200000, actualAmount: 3100000, - currency: "TRY", - fiscalYear: "2025", + currency: 'TRY', + fiscalYear: '2025', isActive: true, - creationTime: new Date("2024-01-15"), - lastModificationTime: new Date("2024-12-05"), + creationTime: new Date('2024-01-15'), + lastModificationTime: new Date('2024-12-05'), subCostCenters: [], }, { - id: "cc-005", - code: "CC-PROD-001", - name: "Üretim Departmanı", - description: "Üretim faaliyetleri masrafları", + id: 'cc-005', + code: 'CC-PROD-001', + name: 'Üretim Departmanı', + description: 'Üretim faaliyetleri masrafları', costCenterType: CostCenterType.Production, budgetedAmount: 8500000, actualAmount: 8200000, - currency: "TRY", - fiscalYear: "2025", + currency: 'TRY', + fiscalYear: '2025', isActive: true, - creationTime: new Date("2024-01-15"), - lastModificationTime: new Date("2024-12-10"), + creationTime: new Date('2024-01-15'), + lastModificationTime: new Date('2024-12-10'), subCostCenters: [], }, { - id: "cc-006", - code: "CC-SAL-001", - name: "Satış ve Pazarlama", - description: "Satış ve pazarlama faaliyetleri", + id: 'cc-006', + code: 'CC-SAL-001', + name: 'Satış ve Pazarlama', + description: 'Satış ve pazarlama faaliyetleri', costCenterType: CostCenterType.Revenue, budgetedAmount: 4200000, actualAmount: 4050000, - currency: "TRY", - fiscalYear: "2025", + currency: 'TRY', + fiscalYear: '2025', isActive: true, - creationTime: new Date("2024-01-15"), - lastModificationTime: new Date("2024-12-08"), + creationTime: new Date('2024-01-15'), + lastModificationTime: new Date('2024-12-08'), subCostCenters: [], }, { - id: "cc-007", - code: "CC-QUA-001", - name: "Kalite Kontrol", - description: "Kalite kontrol ve güvence masrafları", + id: 'cc-007', + code: 'CC-QUA-001', + name: 'Kalite Kontrol', + description: 'Kalite kontrol ve güvence masrafları', costCenterType: CostCenterType.Support, budgetedAmount: 1200000, actualAmount: 1150000, - currency: "TRY", - fiscalYear: "2025", + currency: 'TRY', + fiscalYear: '2025', isActive: true, - creationTime: new Date("2024-01-15"), - lastModificationTime: new Date("2024-11-25"), + creationTime: new Date('2024-01-15'), + lastModificationTime: new Date('2024-11-25'), subCostCenters: [], }, { - id: "cc-008", - code: "CC-LOG-001", - name: "Lojistik ve Depo", - description: "Lojistik operasyonları ve depo masrafları", + id: 'cc-008', + code: 'CC-LOG-001', + name: 'Lojistik ve Depo', + description: 'Lojistik operasyonları ve depo masrafları', costCenterType: CostCenterType.Support, budgetedAmount: 2800000, actualAmount: 2650000, - currency: "TRY", - fiscalYear: "2025", + currency: 'TRY', + fiscalYear: '2025', isActive: true, - creationTime: new Date("2024-01-15"), - lastModificationTime: new Date("2024-12-03"), + creationTime: new Date('2024-01-15'), + lastModificationTime: new Date('2024-12-03'), subCostCenters: [], }, { - id: "cc-009", - code: "CC-RND-001", - name: "Ar-Ge Departmanı", - description: "Araştırma ve geliştirme masrafları", + id: 'cc-009', + code: 'CC-RND-001', + name: 'Ar-Ge Departmanı', + description: 'Araştırma ve geliştirme masrafları', costCenterType: CostCenterType.Investment, budgetedAmount: 3500000, actualAmount: 3300000, - currency: "TRY", - fiscalYear: "2025", + currency: 'TRY', + fiscalYear: '2025', isActive: true, - creationTime: new Date("2024-01-15"), - lastModificationTime: new Date("2024-12-07"), + creationTime: new Date('2024-01-15'), + lastModificationTime: new Date('2024-12-07'), subCostCenters: [], }, { - id: "cc-010", - code: "CC-PUR-001", - name: "Satın Alma", - description: "Satın alma ve tedarik masrafları", + id: 'cc-010', + code: 'CC-PUR-001', + name: 'Satın Alma', + description: 'Satın alma ve tedarik masrafları', costCenterType: CostCenterType.Support, budgetedAmount: 1600000, actualAmount: 1520000, - currency: "TRY", - fiscalYear: "2025", + currency: 'TRY', + fiscalYear: '2025', isActive: true, - creationTime: new Date("2024-01-15"), - lastModificationTime: new Date("2024-11-30"), + creationTime: new Date('2024-01-15'), + lastModificationTime: new Date('2024-11-30'), subCostCenters: [], }, { - id: "cc-011", - code: "CC-MAI-001", - name: "Bakım ve Onarım", - description: "Bakım ve onarım masrafları", + id: 'cc-011', + code: 'CC-MAI-001', + name: 'Bakım ve Onarım', + description: 'Bakım ve onarım masrafları', costCenterType: CostCenterType.Service, budgetedAmount: 2200000, actualAmount: 2100000, - currency: "TRY", - fiscalYear: "2025", + currency: 'TRY', + fiscalYear: '2025', isActive: true, - creationTime: new Date("2024-01-15"), - lastModificationTime: new Date("2024-12-02"), + creationTime: new Date('2024-01-15'), + lastModificationTime: new Date('2024-12-02'), subCostCenters: [], }, { - id: "cc-012", - code: "CC-CUS-001", - name: "Müşteri Hizmetleri", - description: "Müşteri hizmetleri masrafları", + id: 'cc-012', + code: 'CC-CUS-001', + name: 'Müşteri Hizmetleri', + description: 'Müşteri hizmetleri masrafları', costCenterType: CostCenterType.Service, budgetedAmount: 1000000, actualAmount: 950000, - currency: "TRY", - fiscalYear: "2025", + currency: 'TRY', + fiscalYear: '2025', isActive: true, - creationTime: new Date("2024-01-15"), - lastModificationTime: new Date("2024-11-28"), + creationTime: new Date('2024-01-15'), + lastModificationTime: new Date('2024-11-28'), subCostCenters: [], }, -]; +] diff --git a/ui/src/mocks/mockEmployees.ts b/ui/src/mocks/mockEmployees.ts index f76cfb07..a7e74dc0 100644 --- a/ui/src/mocks/mockEmployees.ts +++ b/ui/src/mocks/mockEmployees.ts @@ -40,7 +40,7 @@ export const mockEmployees: HrEmployee[] = [ employmentType: EmploymentTypeEnum.FullTime, jobPositionId: "1", jobPosition: mockJobPositions.find((jp) => jp.id === "1")!, - departmantId: "1", + departmentId: "1", department: mockDepartments.find((d) => d.id === "1")!, baseSalary: 65000, currency: "TRY", @@ -99,7 +99,7 @@ export const mockEmployees: HrEmployee[] = [ jobPositionId: "2", jobPosition: mockJobPositions.find((jp) => jp.id === "2")!, - departmantId: "1", + departmentId: "1", department: mockDepartments.find((d) => d.id === "1")!, baseSalary: 72000, currency: "TRY", @@ -158,7 +158,7 @@ export const mockEmployees: HrEmployee[] = [ jobPositionId: "3", jobPosition: mockJobPositions.find((jp) => jp.id === "3")!, - departmantId: "1", + departmentId: "1", department: mockDepartments.find((d) => d.id === "1")!, baseSalary: 85000, currency: "TRY", @@ -217,7 +217,7 @@ export const mockEmployees: HrEmployee[] = [ jobPositionId: "4", jobPosition: mockJobPositions.find((jp) => jp.id === "4")!, - departmantId: "1", + departmentId: "1", department: mockDepartments.find((d) => d.id === "1")!, baseSalary: 60000, currency: "TRY", @@ -276,7 +276,7 @@ export const mockEmployees: HrEmployee[] = [ jobPositionId: "5", jobPosition: mockJobPositions.find((jp) => jp.id === "5")!, - departmantId: "1", + departmentId: "1", department: mockDepartments.find((d) => d.id === "1")!, baseSalary: 95000, currency: "TRY", @@ -335,7 +335,7 @@ export const mockEmployees: HrEmployee[] = [ jobPositionId: "6", jobPosition: mockJobPositions.find((jp) => jp.id === "6")!, - departmantId: "1", + departmentId: "1", department: mockDepartments.find((d) => d.id === "1")!, baseSalary: 15000, currency: "TRY", @@ -394,7 +394,7 @@ export const mockEmployees: HrEmployee[] = [ jobPositionId: "7", jobPosition: mockJobPositions.find((jp) => jp.id === "7")!, - departmantId: "2", + departmentId: "2", department: mockDepartments.find((d) => d.id === "2")!, baseSalary: 75000, currency: "TRY", @@ -453,7 +453,7 @@ export const mockEmployees: HrEmployee[] = [ jobPositionId: "8", jobPosition: mockJobPositions.find((jp) => jp.id === "8")!, - departmantId: "2", + departmentId: "2", department: mockDepartments.find((d) => d.id === "2")!, baseSalary: 130000, currency: "TRY", @@ -512,7 +512,7 @@ export const mockEmployees: HrEmployee[] = [ jobPositionId: "9", jobPosition: mockJobPositions.find((jp) => jp.id === "9")!, - departmantId: "1", + departmentId: "1", department: mockDepartments.find((d) => d.id === "1")!, baseSalary: 50000, currency: "TRY", @@ -571,7 +571,7 @@ export const mockEmployees: HrEmployee[] = [ jobPositionId: "10", jobPosition: mockJobPositions.find((jp) => jp.id === "10")!, - departmantId: "1", + departmentId: "1", department: mockDepartments.find((d) => d.id === "1")!, baseSalary: 250000, currency: "TRY", diff --git a/ui/src/types/hr.ts b/ui/src/types/hr.ts index 89fffca3..156b4940 100644 --- a/ui/src/types/hr.ts +++ b/ui/src/types/hr.ts @@ -22,7 +22,7 @@ export interface HrEmployee { employmentType: EmploymentTypeEnum jobPositionId: string jobPosition?: HrJobPosition - departmantId: string + departmentId: string department?: HrDepartment managerId?: string manager?: HrEmployee diff --git a/ui/src/views/hr/components/Degree360Evaluation.tsx b/ui/src/views/hr/components/Degree360Evaluation.tsx index 64e66a09..4992aa89 100644 --- a/ui/src/views/hr/components/Degree360Evaluation.tsx +++ b/ui/src/views/hr/components/Degree360Evaluation.tsx @@ -350,7 +350,7 @@ const Degree360Evaluation: React.FC = () => { name: targetEmployee.fullName, title: targetEmployee.jobPosition?.name, department: - mockDepartments.find((d) => d.id === targetEmployee.departmantId)?.name || '', + mockDepartments.find((d) => d.id === targetEmployee.departmentId)?.name || '', type: 'employee', }, ] @@ -359,7 +359,7 @@ const Degree360Evaluation: React.FC = () => { case AssessorTypeEnum.Manager: { const managers = mockEmployees.filter( (emp) => - emp.departmantId === targetEmployee.departmantId && + emp.departmentId === targetEmployee.departmentId && (typeof emp.jobPosition?.level === 'number' && typeof targetEmployee.jobPosition?.level === 'number' ? emp.jobPosition?.level > targetEmployee.jobPosition?.level @@ -370,7 +370,7 @@ const Degree360Evaluation: React.FC = () => { id: emp.id, name: emp.fullName, title: emp.jobPosition?.name, - department: mockDepartments.find((d) => d.id === emp.departmantId)?.name || '', + department: mockDepartments.find((d) => d.id === emp.departmentId)?.name || '', type: 'employee', })) } @@ -379,14 +379,14 @@ const Degree360Evaluation: React.FC = () => { const peers = mockEmployees.filter( (emp) => emp.id !== targetEmployeeId && - emp.departmantId === targetEmployee.departmantId && + emp.departmentId === targetEmployee.departmentId && emp.jobPosition?.level === targetEmployee.jobPosition?.level, ) return peers.map((emp) => ({ id: emp.id, name: emp.fullName, title: emp.jobPosition?.name, - department: mockDepartments.find((d) => d.id === emp.departmantId)?.name || '', + department: mockDepartments.find((d) => d.id === emp.departmentId)?.name || '', type: 'employee', })) } @@ -394,7 +394,7 @@ const Degree360Evaluation: React.FC = () => { case AssessorTypeEnum.Subordinate: { const subordinates = mockEmployees.filter( (emp) => - emp.departmantId === targetEmployee.departmantId && + emp.departmentId === targetEmployee.departmentId && (typeof emp.jobPosition?.level === 'number' && typeof targetEmployee.jobPosition?.level === 'number' ? emp.jobPosition?.level < targetEmployee.jobPosition?.level @@ -405,7 +405,7 @@ const Degree360Evaluation: React.FC = () => { id: emp.id, name: emp.fullName, title: emp.jobPosition?.name, - department: mockDepartments.find((d) => d.id === emp.departmantId)?.name || '', + department: mockDepartments.find((d) => d.id === emp.departmentId)?.name || '', type: 'employee', })) } @@ -435,26 +435,26 @@ const Degree360Evaluation: React.FC = () => { case AssessorTypeEnum.HRUpperManagement: { const hrEmployees = mockEmployees.filter( (emp) => - emp.id !== targetEmployeeId && (emp.departmantId === 'hr' || emp.departmantId === '3'), // HR departmanı + emp.id !== targetEmployeeId && (emp.departmentId === 'hr' || emp.departmentId === '3'), // HR departmanı ) return hrEmployees.map((emp) => ({ id: emp.id, name: emp.fullName, title: emp.jobPosition?.name, - department: mockDepartments.find((d) => d.id === emp.departmantId)?.name || '', + department: mockDepartments.find((d) => d.id === emp.departmentId)?.name || '', type: 'employee', })) } case AssessorTypeEnum.OtherDepartment: { const otherDepartmentEmployees = mockEmployees.filter( - (emp) => emp.id !== targetEmployeeId && emp.departmantId !== targetEmployee.departmantId, + (emp) => emp.id !== targetEmployeeId && emp.departmentId !== targetEmployee.departmentId, ) return otherDepartmentEmployees.map((emp) => ({ id: emp.id, name: emp.fullName, title: emp.jobPosition?.name, - department: mockDepartments.find((d) => d.id === emp.departmantId)?.name || '', + department: mockDepartments.find((d) => d.id === emp.departmentId)?.name || '', type: 'employee', })) } @@ -512,7 +512,7 @@ const Degree360Evaluation: React.FC = () => { }) const filteredEmployeesByDepartment = mockEmployees.filter( - (emp) => selectedDepartment === 'all' || emp.departmantId === selectedDepartment, + (emp) => selectedDepartment === 'all' || emp.departmentId === selectedDepartment, ) // Statistics @@ -640,7 +640,7 @@ const Degree360Evaluation: React.FC = () => { const evaluatedEmployee = mockEmployees.find( (e) => e.id === participant.evaluatedEmployeeId, ) - if (!evaluatedEmployee || evaluatedEmployee.departmantId !== selectedResultsDepartment) { + if (!evaluatedEmployee || evaluatedEmployee.departmentId !== selectedResultsDepartment) { return false } } @@ -1519,7 +1519,7 @@ const Degree360Evaluation: React.FC = () => {

{employee.fullName}

{employee.jobPosition?.name}

- {mockDepartments.find((d) => d.id === employee.departmantId)?.name} + {mockDepartments.find((d) => d.id === employee.departmentId)?.name}

diff --git a/ui/src/views/hr/components/DepartmentManagement.tsx b/ui/src/views/hr/components/DepartmentManagement.tsx index 98961f7c..ecd849a7 100644 --- a/ui/src/views/hr/components/DepartmentManagement.tsx +++ b/ui/src/views/hr/components/DepartmentManagement.tsx @@ -144,7 +144,7 @@ const DepartmentManagement: React.FC = () => { render: (department: HrDepartment) => (
- {mockEmployees.filter((a) => a.departmantId == department.id).length || 0} + {mockEmployees.filter((a) => a.departmentId == department.id).length || 0}
), }, @@ -381,7 +381,7 @@ const DepartmentManagement: React.FC = () => {
- {mockEmployees.filter((emp) => emp.departmantId === department.id).length}{' '} + {mockEmployees.filter((emp) => emp.departmentId === department.id).length}{' '} Personel
diff --git a/ui/src/views/hr/components/DepartmentViewModal.tsx b/ui/src/views/hr/components/DepartmentViewModal.tsx index 4905ec6b..205f8d6e 100644 --- a/ui/src/views/hr/components/DepartmentViewModal.tsx +++ b/ui/src/views/hr/components/DepartmentViewModal.tsx @@ -25,10 +25,10 @@ const DepartmentViewModal: React.FC = ({ onEdit, }) => { const employeeCount = mockEmployees.filter( - (emp) => emp.departmantId === department?.id + (emp) => emp.departmentId === department?.id ).length; const departmentEmployees = mockEmployees.filter( - (emp) => emp.departmantId === department?.id + (emp) => emp.departmentId === department?.id ); return ( diff --git a/ui/src/views/hr/components/EmployeeForm.tsx b/ui/src/views/hr/components/EmployeeForm.tsx index c2de1412..80ed8e1f 100644 --- a/ui/src/views/hr/components/EmployeeForm.tsx +++ b/ui/src/views/hr/components/EmployeeForm.tsx @@ -88,7 +88,7 @@ const EmployeeForm: React.FC = () => { hireDate: new Date(), employmentType: EmploymentTypeEnum.FullTime, jobPositionId: '', - departmantId: '', + departmentId: '', baseSalary: 0, currency: 'TRY', payrollGroup: '', @@ -170,7 +170,7 @@ const EmployeeForm: React.FC = () => { if (!formData.hireDate) { newErrors.hireDate = 'İşe giriş tarihi zorunludur' } - if (!formData.departmantId) { + if (!formData.departmentId) { newErrors.departmentId = 'Departman seçilmelidir' } if (!formData.jobPosition) { @@ -539,10 +539,10 @@ const EmployeeForm: React.FC = () => { Departman *