Hr EmploymenTypes, JobPositions, Department, Badge, CostCenters
This commit is contained in:
parent
e6a6ad2fe6
commit
b16391468c
22 changed files with 1782 additions and 298 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -24,9 +24,10 @@ public class CostCenter : FullAuditedEntity<Guid>, 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; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public class Department : FullAuditedEntity<Guid>, 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()
|
||||
|
|
|
|||
|
|
@ -35,25 +35,31 @@ public class Employee : FullAuditedEntity<Guid>, 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; }
|
||||
|
|
|
|||
|
|
@ -11,11 +11,13 @@ public class JobPosition : FullAuditedEntity<Guid>, 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; }
|
||||
|
|
|
|||
|
|
@ -148,6 +148,15 @@ public class PlatformDbContext :
|
|||
public DbSet<Question> Questions { get; set; }
|
||||
public DbSet<QuestionOption> QuestionOptions { get; set; }
|
||||
|
||||
#region Hr
|
||||
public DbSet<Employee> Employees { get; set; }
|
||||
public DbSet<Department> Departments { get; set; }
|
||||
public DbSet<JobPosition> JobPositions { get; set; }
|
||||
public DbSet<EmploymentType> EmploymentTypes { get; set; }
|
||||
public DbSet<Badge> Badges { get; set; }
|
||||
public DbSet<CostCenter> CostCenters { get; set; }
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region Entities from the modules
|
||||
|
|
@ -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<Badge>(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()
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
|||
namespace Kurs.Platform.Migrations
|
||||
{
|
||||
[DbContext(typeof(PlatformDbContext))]
|
||||
[Migration("20251021144156_Initial")]
|
||||
[Migration("20251022080448_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -920,7 +920,6 @@ namespace Kurs.Platform.Migrations
|
|||
modelBuilder.Entity("Kurs.Platform.Entities.Badge", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("BackgroundColor")
|
||||
|
|
@ -2300,14 +2299,15 @@ namespace Kurs.Platform.Migrations
|
|||
modelBuilder.Entity("Kurs.Platform.Entities.CostCenter", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("ActualAmount")
|
||||
.HasColumnType("int");
|
||||
b.Property<decimal>("ActualAmount")
|
||||
.HasPrecision(18, 4)
|
||||
.HasColumnType("decimal(18,4)");
|
||||
|
||||
b.Property<int>("BudgetedAmount")
|
||||
.HasColumnType("int");
|
||||
b.Property<decimal>("BudgetedAmount")
|
||||
.HasPrecision(18, 4)
|
||||
.HasColumnType("decimal(18,4)");
|
||||
|
||||
b.Property<string>("Code")
|
||||
.IsRequired()
|
||||
|
|
@ -2325,7 +2325,7 @@ namespace Kurs.Platform.Migrations
|
|||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid>("CurrencyId")
|
||||
b.Property<Guid?>("CurrencyId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("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<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("Budget")
|
||||
b.Property<decimal>("Budget")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasDefaultValue(0);
|
||||
.HasPrecision(18, 4)
|
||||
.HasColumnType("decimal(18,4)")
|
||||
.HasDefaultValue(0m);
|
||||
|
||||
b.Property<string>("Code")
|
||||
.IsRequired()
|
||||
|
|
@ -3329,7 +3331,6 @@ namespace Kurs.Platform.Migrations
|
|||
modelBuilder.Entity("Kurs.Platform.Entities.Employee", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Address1")
|
||||
|
|
@ -3342,14 +3343,15 @@ namespace Kurs.Platform.Migrations
|
|||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<Guid>("BadgeId")
|
||||
b.Property<Guid?>("BadgeId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("BankAccountId")
|
||||
b.Property<Guid?>("BankAccountId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("BaseSalary")
|
||||
.HasColumnType("int");
|
||||
b.Property<decimal>("BaseSalary")
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<DateTime>("BirthDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
|
@ -3373,7 +3375,7 @@ namespace Kurs.Platform.Migrations
|
|||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid>("CurrencyId")
|
||||
b.Property<Guid?>("CurrencyId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
|
|
@ -3384,7 +3386,7 @@ namespace Kurs.Platform.Migrations
|
|||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<Guid>("DepartmantId")
|
||||
b.Property<Guid?>("DepartmentId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("District")
|
||||
|
|
@ -3406,7 +3408,7 @@ namespace Kurs.Platform.Migrations
|
|||
b.Property<string>("EmployeeStatus")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<Guid>("EmploymentTypeId")
|
||||
b.Property<Guid?>("EmploymentTypeId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("FullName")
|
||||
|
|
@ -3430,7 +3432,7 @@ namespace Kurs.Platform.Migrations
|
|||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<Guid>("JobPositionId")
|
||||
b.Property<Guid?>("JobPositionId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime?>("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<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
|
|
@ -4050,7 +4055,6 @@ namespace Kurs.Platform.Migrations
|
|||
modelBuilder.Entity("Kurs.Platform.Entities.JobPosition", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Code")
|
||||
|
|
@ -4066,7 +4070,7 @@ namespace Kurs.Platform.Migrations
|
|||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid>("CurrencyId")
|
||||
b.Property<Guid?>("CurrencyId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
|
|
@ -4077,7 +4081,7 @@ namespace Kurs.Platform.Migrations
|
|||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<Guid>("DepartmentId")
|
||||
b.Property<Guid?>("DepartmentId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Description")
|
||||
|
|
@ -4107,11 +4111,13 @@ namespace Kurs.Platform.Migrations
|
|||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("MaxSalary")
|
||||
.HasColumnType("int");
|
||||
b.Property<decimal>("MaxSalary")
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<int>("MinSalary")
|
||||
.HasColumnType("int");
|
||||
b.Property<decimal>("MinSalary")
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("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")
|
||||
|
|
@ -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<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Code = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||
Name = table.Column<string>(type: "nvarchar(150)", maxLength: 150, nullable: false),
|
||||
Description = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||
DepartmentId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Level = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
|
||||
MinSalary = table.Column<int>(type: "int", nullable: false),
|
||||
MaxSalary = table.Column<int>(type: "int", nullable: false),
|
||||
CurrencyId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
RequiredSkills = table.Column<string>(type: "text", nullable: true),
|
||||
Responsibilities = table.Column<string>(type: "text", nullable: true),
|
||||
Qualifications = table.Column<string>(type: "text", nullable: true),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_T_Hr_JobPosition", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "T_P_Activity",
|
||||
columns: table => new
|
||||
|
|
@ -3770,9 +3739,9 @@ namespace Kurs.Platform.Migrations
|
|||
ResponsibleEmployeeId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DepartmentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
CostCenterType = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
BudgetedAmount = table.Column<int>(type: "int", nullable: false),
|
||||
ActualAmount = table.Column<int>(type: "int", nullable: false),
|
||||
CurrencyId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
BudgetedAmount = table.Column<decimal>(type: "decimal(18,4)", precision: 18, scale: 4, nullable: false),
|
||||
ActualAmount = table.Column<decimal>(type: "decimal(18,4)", precision: 18, scale: 4, nullable: false),
|
||||
CurrencyId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
FiscalYear = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: true),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
|
||||
CreationTime = table.Column<DateTime>(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<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
ManagerId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
CostCenterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Budget = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
|
||||
Budget = table.Column<decimal>(type: "decimal(18,4)", precision: 18, scale: 4, nullable: false, defaultValue: 0m),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(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<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Code = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||
Name = table.Column<string>(type: "nvarchar(150)", maxLength: 150, nullable: false),
|
||||
Description = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||
DepartmentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Level = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
|
||||
MinSalary = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
|
||||
MaxSalary = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
|
||||
CurrencyId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
RequiredSkills = table.Column<string>(type: "text", nullable: true),
|
||||
Responsibilities = table.Column<string>(type: "text", nullable: true),
|
||||
Qualifications = table.Column<string>(type: "text", nullable: true),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_T_Hr_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<string>(type: "nvarchar(max)", nullable: true),
|
||||
HireDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
TerminationDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
EmploymentTypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
JobPositionId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
DepartmantId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
EmploymentTypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
JobPositionId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DepartmentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
WorkLocation = table.Column<string>(type: "nvarchar(150)", maxLength: 150, nullable: true),
|
||||
ManagerId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
BaseSalary = table.Column<int>(type: "int", nullable: false),
|
||||
CurrencyId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
BaseSalary = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
|
||||
CurrencyId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
PayrollGroup = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
|
||||
BankAccountId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
BadgeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
BankAccountId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
BadgeId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
EmployeeStatus = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
|
||||
CreationTime = table.Column<DateTime>(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");
|
||||
}
|
||||
|
|
@ -917,7 +917,6 @@ namespace Kurs.Platform.Migrations
|
|||
modelBuilder.Entity("Kurs.Platform.Entities.Badge", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("BackgroundColor")
|
||||
|
|
@ -2297,14 +2296,15 @@ namespace Kurs.Platform.Migrations
|
|||
modelBuilder.Entity("Kurs.Platform.Entities.CostCenter", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("ActualAmount")
|
||||
.HasColumnType("int");
|
||||
b.Property<decimal>("ActualAmount")
|
||||
.HasPrecision(18, 4)
|
||||
.HasColumnType("decimal(18,4)");
|
||||
|
||||
b.Property<int>("BudgetedAmount")
|
||||
.HasColumnType("int");
|
||||
b.Property<decimal>("BudgetedAmount")
|
||||
.HasPrecision(18, 4)
|
||||
.HasColumnType("decimal(18,4)");
|
||||
|
||||
b.Property<string>("Code")
|
||||
.IsRequired()
|
||||
|
|
@ -2322,7 +2322,7 @@ namespace Kurs.Platform.Migrations
|
|||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid>("CurrencyId")
|
||||
b.Property<Guid?>("CurrencyId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("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<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("Budget")
|
||||
b.Property<decimal>("Budget")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasDefaultValue(0);
|
||||
.HasPrecision(18, 4)
|
||||
.HasColumnType("decimal(18,4)")
|
||||
.HasDefaultValue(0m);
|
||||
|
||||
b.Property<string>("Code")
|
||||
.IsRequired()
|
||||
|
|
@ -3326,7 +3328,6 @@ namespace Kurs.Platform.Migrations
|
|||
modelBuilder.Entity("Kurs.Platform.Entities.Employee", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Address1")
|
||||
|
|
@ -3339,14 +3340,15 @@ namespace Kurs.Platform.Migrations
|
|||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<Guid>("BadgeId")
|
||||
b.Property<Guid?>("BadgeId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("BankAccountId")
|
||||
b.Property<Guid?>("BankAccountId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("BaseSalary")
|
||||
.HasColumnType("int");
|
||||
b.Property<decimal>("BaseSalary")
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<DateTime>("BirthDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
|
@ -3370,7 +3372,7 @@ namespace Kurs.Platform.Migrations
|
|||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid>("CurrencyId")
|
||||
b.Property<Guid?>("CurrencyId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
|
|
@ -3381,7 +3383,7 @@ namespace Kurs.Platform.Migrations
|
|||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<Guid>("DepartmantId")
|
||||
b.Property<Guid?>("DepartmentId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("District")
|
||||
|
|
@ -3403,7 +3405,7 @@ namespace Kurs.Platform.Migrations
|
|||
b.Property<string>("EmployeeStatus")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<Guid>("EmploymentTypeId")
|
||||
b.Property<Guid?>("EmploymentTypeId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("FullName")
|
||||
|
|
@ -3427,7 +3429,7 @@ namespace Kurs.Platform.Migrations
|
|||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<Guid>("JobPositionId")
|
||||
b.Property<Guid?>("JobPositionId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime?>("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<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
|
|
@ -4047,7 +4052,6 @@ namespace Kurs.Platform.Migrations
|
|||
modelBuilder.Entity("Kurs.Platform.Entities.JobPosition", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Code")
|
||||
|
|
@ -4063,7 +4067,7 @@ namespace Kurs.Platform.Migrations
|
|||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid>("CurrencyId")
|
||||
b.Property<Guid?>("CurrencyId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
|
|
@ -4074,7 +4078,7 @@ namespace Kurs.Platform.Migrations
|
|||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<Guid>("DepartmentId")
|
||||
b.Property<Guid?>("DepartmentId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Description")
|
||||
|
|
@ -4104,11 +4108,13 @@ namespace Kurs.Platform.Migrations
|
|||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("MaxSalary")
|
||||
.HasColumnType("int");
|
||||
b.Property<decimal>("MaxSalary")
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<int>("MinSalary")
|
||||
.HasColumnType("int");
|
||||
b.Property<decimal>("MinSalary")
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("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")
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -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<QuestionTag, Guid> _tagRepository;
|
||||
private readonly IRepository<QuestionPool, Guid> _questionPoolRepository;
|
||||
private readonly IRepository<Question, Guid> _questionRepository;
|
||||
private readonly IRepository<EmploymentType, Guid> _employeeTypeRepository;
|
||||
private readonly IRepository<JobPosition, Guid> _jobPositionRepository;
|
||||
private readonly IRepository<Currency, Guid> _currencyRepository;
|
||||
private readonly IRepository<Department, Guid> _departmentRepository;
|
||||
private readonly IRepository<Badge, Guid> _badgeRepository;
|
||||
private readonly IRepository<CostCenter, Guid> _costCenterRepository;
|
||||
private readonly IRepository<Employee, Guid> _employeeRepository;
|
||||
private readonly IRepository<Bank, Guid> _bankRepository;
|
||||
private readonly IRepository<BankAccount, Guid> _bankAccountRepository;
|
||||
|
||||
public TenantDataSeeder(
|
||||
IRepository<IdentityUser, Guid> repositoryUser,
|
||||
|
|
@ -102,7 +110,16 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
IRepository<ForumCategory, Guid> forumCategoryRepository,
|
||||
IRepository<QuestionTag, Guid> tagRepository,
|
||||
IRepository<QuestionPool, Guid> questionPoolRepository,
|
||||
IRepository<Question, Guid> questionRepository
|
||||
IRepository<Question, Guid> questionRepository,
|
||||
IRepository<EmploymentType, Guid> employeeTypeRepository,
|
||||
IRepository<JobPosition, Guid> jobPositionRepository,
|
||||
IRepository<Currency, Guid> currencyRepository,
|
||||
IRepository<Department, Guid> departmentRepository,
|
||||
IRepository<CostCenter, Guid> costCenterRepository,
|
||||
IRepository<Employee, Guid> employeeRepository,
|
||||
IRepository<Badge, Guid> badgeRepository,
|
||||
IRepository<Bank, Guid> bankRepository,
|
||||
IRepository<BankAccount, Guid> 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,6 +49,122 @@ public class TenantSeederDto
|
|||
public List<SourceSeedDto> Sources { get; set; }
|
||||
public List<InterestingSeedDto> Interesting { get; set; }
|
||||
public List<ProgramSeedDto> Programs { get; set; }
|
||||
|
||||
//Hr
|
||||
public List<EmployeeTypeSeedDto> EmployeeTypes { get; set; }
|
||||
public List<JobPositionSeedDto> JobPositions { get; set; }
|
||||
public List<DepartmentSeedDto> Departments { get; set; }
|
||||
public List<BadgeSeedDto> Badges { get; set; }
|
||||
public List<CostCenterSeedDto> CostCenters { get; set; }
|
||||
public List<EmployeeSeedDto> 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<string> 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<string> RequiredSkills { get; set; }
|
||||
public List<string> Responsibilities { get; set; }
|
||||
public List<string> Qualifications { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
|
||||
public class EmployeeTypeSeedDto
|
||||
{
|
||||
public string Name { get; set; }
|
||||
}
|
||||
|
||||
public class GlobalSearchSeedDto
|
||||
|
|
|
|||
|
|
@ -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: [],
|
||||
},
|
||||
];
|
||||
]
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ export interface HrEmployee {
|
|||
employmentType: EmploymentTypeEnum
|
||||
jobPositionId: string
|
||||
jobPosition?: HrJobPosition
|
||||
departmantId: string
|
||||
departmentId: string
|
||||
department?: HrDepartment
|
||||
managerId?: string
|
||||
manager?: HrEmployee
|
||||
|
|
|
|||
|
|
@ -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 = () => {
|
|||
<h4 className="font-medium text-gray-900">{employee.fullName}</h4>
|
||||
<p className="text-gray-600">{employee.jobPosition?.name}</p>
|
||||
<p className="text-gray-600">
|
||||
{mockDepartments.find((d) => d.id === employee.departmantId)?.name}
|
||||
{mockDepartments.find((d) => d.id === employee.departmentId)?.name}
|
||||
</p>
|
||||
</div>
|
||||
<FaUsers className="w-4 h-4 text-gray-400" />
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ const DepartmentManagement: React.FC = () => {
|
|||
render: (department: HrDepartment) => (
|
||||
<div className="flex items-center gap-1">
|
||||
<FaUsers className="w-4 h-4 text-gray-500" />
|
||||
<span>{mockEmployees.filter((a) => a.departmantId == department.id).length || 0}</span>
|
||||
<span>{mockEmployees.filter((a) => a.departmentId == department.id).length || 0}</span>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
|
|
@ -381,7 +381,7 @@ const DepartmentManagement: React.FC = () => {
|
|||
<div className="flex items-center text-xs text-gray-600">
|
||||
<FaUsers className="w-4 h-4 mr-2 text-gray-400" />
|
||||
<span>
|
||||
{mockEmployees.filter((emp) => emp.departmantId === department.id).length}{' '}
|
||||
{mockEmployees.filter((emp) => emp.departmentId === department.id).length}{' '}
|
||||
Personel
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -25,10 +25,10 @@ const DepartmentViewModal: React.FC<DepartmentViewModalProps> = ({
|
|||
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 (
|
||||
|
|
|
|||
|
|
@ -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 *
|
||||
</label>
|
||||
<select
|
||||
value={formData.departmantId}
|
||||
onChange={(e) => handleInputChange('departmantId', e.target.value)}
|
||||
value={formData.departmentId}
|
||||
onChange={(e) => handleInputChange('departmentId', e.target.value)}
|
||||
className={`block w-full px-2 py-1 text-sm border rounded-md shadow-sm focus:outline-none focus:ring-1 ${
|
||||
errors.departmantId
|
||||
errors.departmentId
|
||||
? 'border-red-300 focus:border-red-500 focus:ring-red-500'
|
||||
: 'border-gray-300 focus:border-blue-500 focus:ring-blue-500'
|
||||
}`}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ const LeaveManagement: React.FC = () => {
|
|||
|
||||
// Get employees by department
|
||||
const getEmployeesByDepartment = (departmentId: string) => {
|
||||
return mockEmployees.filter((emp) => emp.departmantId === departmentId)
|
||||
return mockEmployees.filter((emp) => emp.departmentId === departmentId)
|
||||
}
|
||||
|
||||
// Get selected employee object
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ const generateOrganizationData = (): OrgChart[] => {
|
|||
|
||||
// Çalışanları işle
|
||||
mockEmployees.forEach((employee) => {
|
||||
const department = mockDepartments.find((d) => d.id === employee.departmantId)
|
||||
const department = mockDepartments.find((d) => d.id === employee.departmentId)
|
||||
|
||||
let level = 3 // Varsayılan seviye (normal çalışan)
|
||||
let parentId: string | undefined = undefined
|
||||
|
|
@ -155,7 +155,7 @@ const OrganizationChart: React.FC = () => {
|
|||
const result: TreeNode[] = []
|
||||
for (const node of nodes) {
|
||||
const filteredChildren = filterTree(node.children)
|
||||
if (node.employee.departmantId === selectedDepartment || filteredChildren.length > 0) {
|
||||
if (node.employee.departmentId === selectedDepartment || filteredChildren.length > 0) {
|
||||
result.push({ ...node, children: filteredChildren })
|
||||
}
|
||||
}
|
||||
|
|
@ -169,7 +169,7 @@ const OrganizationChart: React.FC = () => {
|
|||
if (selectedDepartment === 'all') {
|
||||
return employees
|
||||
}
|
||||
return employees.filter((emp) => emp.departmantId === selectedDepartment)
|
||||
return employees.filter((emp) => emp.departmentId === selectedDepartment)
|
||||
}, [employees, selectedDepartment])
|
||||
|
||||
const toggleNode = (nodeId: string) => {
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ const OvertimeManagement: React.FC = () => {
|
|||
|
||||
// Get employees by department
|
||||
const getEmployeesByDepartment = (departmentId: string) => {
|
||||
return mockEmployees.filter((emp) => emp.departmantId === departmentId)
|
||||
return mockEmployees.filter((emp) => emp.departmentId === departmentId)
|
||||
}
|
||||
|
||||
// Get selected employee object
|
||||
|
|
|
|||
Loading…
Reference in a new issue