diff --git a/Migrations/25640211101629_AddNextA.Designer.cs b/Migrations/25640211101629_AddNextA.Designer.cs new file mode 100644 index 0000000..d555ff3 --- /dev/null +++ b/Migrations/25640211101629_AddNextA.Designer.cs @@ -0,0 +1,761 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; +using TTSW.EF; + +namespace tb320eva.Migrations +{ + [DbContext(typeof(DataContext))] + [Migration("25640211101629_AddNextA")] + partial class AddNextA + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) + .HasAnnotation("ProductVersion", "2.2.4-servicing-10062") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponementEntity", b => + { + b.Property("id"); + + b.Property("command_no") + .HasMaxLength(4000); + + b.Property("create_evaluation_id"); + + b.Property("created"); + + b.Property("fiscal_year"); + + b.Property("imported_date"); + + b.Property("imported_file") + .HasMaxLength(1000); + + b.Property("isActive"); + + b.Property("limit"); + + b.Property("limit_frame"); + + b.Property("limit_frame_quota"); + + b.Property("limit_quota"); + + b.Property("managed_by"); + + b.Property("percentage"); + + b.Property("report_type") + .HasMaxLength(1000); + + b.Property("theDate"); + + b.Property("theRound"); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("create_evaluation_id"); + + b.ToTable("eva_adjust_postponement"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponement_detailEntity", b => + { + b.Property("id"); + + b.Property("adjust_postponement_id"); + + b.Property("adjust_postponement_quota_id"); + + b.Property("cost_living"); + + b.Property("created"); + + b.Property("employee_id"); + + b.Property("isActive"); + + b.Property("level_this_time") + .HasMaxLength(1000); + + b.Property("middle"); + + b.Property("migration_eva_result") + .HasMaxLength(1000); + + b.Property("migration_total_score"); + + b.Property("new_cost_living"); + + b.Property("new_sarary"); + + b.Property("new_sarary_with_quota"); + + b.Property("order_at_this_time"); + + b.Property("org_at_this_time"); + + b.Property("other_money_at_this_time"); + + b.Property("position_allowance_at_this_time"); + + b.Property("position_this_time") + .HasMaxLength(1000); + + b.Property("promoted_percentage"); + + b.Property("receive_quota"); + + b.Property("remark") + .HasMaxLength(1000); + + b.Property("sarary"); + + b.Property("total_promote"); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("adjust_postponement_id"); + + b.HasIndex("adjust_postponement_quota_id"); + + b.ToTable("eva_adjust_postponement_detail"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluationEntity", b => + { + b.Property("id"); + + b.Property("created"); + + b.Property("employee_id"); + + b.Property("evaluation_group_id"); + + b.Property("isActive"); + + b.Property("performance_plan_id"); + + b.Property("score1"); + + b.Property("score2"); + + b.Property("supervisor1_id"); + + b.Property("supervisor2_id"); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("evaluation_group_id"); + + b.HasIndex("performance_plan_id"); + + b.ToTable("eva_create_evaluation"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluation_detailEntity", b => + { + b.Property("id"); + + b.Property("Final_summary_chief"); + + b.Property("Final_summary_competency_chief"); + + b.Property("Final_summary_competency_supervisor"); + + b.Property("Final_summary_competency_supervisor1A"); + + b.Property("Final_summary_competency_supervisor2A"); + + b.Property("Final_summary_supervisor"); + + b.Property("Final_summary_supervisor1A"); + + b.Property("Final_summary_supervisor2A"); + + b.Property("achievement_chief"); + + b.Property("achievement_supervisor"); + + b.Property("achievement_supervisor1A"); + + b.Property("achievement_supervisor2A"); + + b.Property("chief"); + + b.Property("competency_chief"); + + b.Property("competency_supervisor"); + + b.Property("competency_supervisor1A"); + + b.Property("competency_supervisor2A"); + + b.Property("create_evaluation_id"); + + b.Property("created"); + + b.Property("employee_id"); + + b.Property("isActive"); + + b.Property("level_score_chief") + .HasMaxLength(255); + + b.Property("level_score_supervisor") + .HasMaxLength(255); + + b.Property("level_score_supervisor1A") + .HasMaxLength(255); + + b.Property("level_score_supervisor2A") + .HasMaxLength(255); + + b.Property("score_chief"); + + b.Property("score_supervisor"); + + b.Property("score_supervisor1A"); + + b.Property("score_supervisor2A"); + + b.Property("status_chief") + .HasMaxLength(1); + + b.Property("status_chief_a_click_date"); + + b.Property("status_chief_click_date"); + + b.Property("status_self") + .HasMaxLength(1); + + b.Property("status_self_a") + .HasMaxLength(1); + + b.Property("status_self_a_click_date"); + + b.Property("status_self_click_date"); + + b.Property("status_supervisor") + .HasMaxLength(1); + + b.Property("status_supervisor1A") + .HasMaxLength(1); + + b.Property("status_supervisor1A_click_date"); + + b.Property("status_supervisor2A") + .HasMaxLength(1); + + b.Property("status_supervisor2A_click_date"); + + b.Property("status_supervisor_click_date"); + + b.Property("supervisor1"); + + b.Property("supervisor1A"); + + b.Property("supervisor1A_date"); + + b.Property("supervisor1A_remark") + .HasMaxLength(1000); + + b.Property("supervisor1A_result") + .HasMaxLength(1); + + b.Property("supervisor1_date"); + + b.Property("supervisor1_remark") + .HasMaxLength(1000); + + b.Property("supervisor1_result") + .HasMaxLength(1); + + b.Property("supervisor2"); + + b.Property("supervisor2A"); + + b.Property("supervisor2A_date"); + + b.Property("supervisor2A_remark") + .HasMaxLength(1000); + + b.Property("supervisor2A_result") + .HasMaxLength(1); + + b.Property("supervisor2_date"); + + b.Property("supervisor2_remark") + .HasMaxLength(1000); + + b.Property("supervisor2_result") + .HasMaxLength(1); + + b.Property("total_summary_chief"); + + b.Property("total_summary_competency_chief"); + + b.Property("total_summary_competency_supervisor"); + + b.Property("total_summary_competency_supervisor1A"); + + b.Property("total_summary_competency_supervisor2A"); + + b.Property("total_summary_supervisor"); + + b.Property("total_summary_supervisor1A"); + + b.Property("total_summary_supervisor2A"); + + b.Property("updated"); + + b.HasKey("id"); + + b.ToTable("eva_create_evaluation_detail"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievementEntity", b => + { + b.Property("id"); + + b.Property("achievement") + .HasMaxLength(1000); + + b.Property("create_evaluation_detail_id"); + + b.Property("created"); + + b.Property("isActive"); + + b.Property("score"); + + b.Property("score2"); + + b.Property("score3"); + + b.Property("score4"); + + b.Property("sumary"); + + b.Property("sumary2"); + + b.Property("sumary3"); + + b.Property("sumary4"); + + b.Property("target_score1") + .HasMaxLength(255); + + b.Property("target_score2") + .HasMaxLength(255); + + b.Property("target_score3") + .HasMaxLength(255); + + b.Property("target_score4") + .HasMaxLength(255); + + b.Property("target_score5") + .HasMaxLength(255); + + b.Property("thefile") + .HasMaxLength(1000); + + b.Property("updated"); + + b.Property("weight"); + + b.HasKey("id"); + + b.HasIndex("create_evaluation_detail_id"); + + b.ToTable("eva_evaluation_achievement"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_behaviorEntity", b => + { + b.Property("id"); + + b.Property("behavior") + .HasMaxLength(1000); + + b.Property("create_evaluation_detail_id"); + + b.Property("created"); + + b.Property("isActive"); + + b.Property("score"); + + b.Property("score2"); + + b.Property("score3"); + + b.Property("score4"); + + b.Property("sumary"); + + b.Property("sumary2"); + + b.Property("sumary3"); + + b.Property("sumary4"); + + b.Property("target_score1") + .HasMaxLength(255); + + b.Property("target_score2") + .HasMaxLength(255); + + b.Property("target_score3") + .HasMaxLength(255); + + b.Property("target_score4") + .HasMaxLength(255); + + b.Property("target_score5") + .HasMaxLength(255); + + b.Property("updated"); + + b.Property("weight"); + + b.HasKey("id"); + + b.HasIndex("create_evaluation_detail_id"); + + b.ToTable("eva_evaluation_behavior"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_groupEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("code") + .HasMaxLength(255); + + b.Property("created"); + + b.Property("isActive"); + + b.Property("thegroup") + .HasMaxLength(255); + + b.Property("updated"); + + b.HasKey("id"); + + b.ToTable("eva_evaluation_group"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_group_detailEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("created"); + + b.Property("employee_id"); + + b.Property("evaluation_group_id"); + + b.Property("isActive"); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("evaluation_group_id"); + + b.ToTable("eva_evaluation_group_detail"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_operating_agreementEntity", b => + { + b.Property("id"); + + b.Property("create_evaluation_detail_id"); + + b.Property("created"); + + b.Property("indicators") + .HasMaxLength(4000); + + b.Property("isActive"); + + b.Property("mission_detail") + .HasMaxLength(4000); + + b.Property("mission_no"); + + b.Property("target") + .HasMaxLength(4000); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("create_evaluation_detail_id"); + + b.ToTable("eva_evaluation_operating_agreement"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_idp_planEntity", b => + { + b.Property("id"); + + b.Property("create_evaluation_detail_id"); + + b.Property("created"); + + b.Property("develop") + .HasMaxLength(1000); + + b.Property("development_method") + .HasMaxLength(1000); + + b.Property("end_date"); + + b.Property("isActive"); + + b.Property("period_text") + .HasMaxLength(1000); + + b.Property("start_date"); + + b.Property("updated"); + + b.HasKey("id"); + + b.ToTable("eva_idp_plan"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_level_scoreEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("code") + .HasMaxLength(255); + + b.Property("created"); + + b.Property("detail") + .HasMaxLength(1000); + + b.Property("isActive"); + + b.Property("max_score"); + + b.Property("min_score"); + + b.Property("updated"); + + b.HasKey("id"); + + b.ToTable("eva_level_score"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_performance_planEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("created"); + + b.Property("fiscal_year"); + + b.Property("isActive"); + + b.Property("theTime"); + + b.Property("updated"); + + b.HasKey("id"); + + b.ToTable("eva_performance_plan"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_performance_plan_detailEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("created"); + + b.Property("end_date"); + + b.Property("isActive"); + + b.Property("list_no"); + + b.Property("performance_plan_id"); + + b.Property("remark") + .HasMaxLength(1000); + + b.Property("start_date"); + + b.Property("step") + .HasMaxLength(1000); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("performance_plan_id"); + + b.ToTable("eva_performance_plan_detail"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_promoted_percentageEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("code") + .HasMaxLength(255); + + b.Property("created"); + + b.Property("detail") + .HasMaxLength(1000); + + b.Property("isActive"); + + b.Property("level_score_id"); + + b.Property("max_score"); + + b.Property("min_score"); + + b.Property("promoted_percentage"); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("level_score_id"); + + b.ToTable("eva_promoted_percentage"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_salary_cylinderEntity", b => + { + b.Property("id"); + + b.Property("cost_living"); + + b.Property("created"); + + b.Property("isActive"); + + b.Property("middle"); + + b.Property("position_level"); + + b.Property("position_type"); + + b.Property("temporary_min"); + + b.Property("themax"); + + b.Property("themin"); + + b.Property("updated"); + + b.HasKey("id"); + + b.ToTable("eva_salary_cylinder"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponementEntity", b => + { + b.HasOne("TodoAPI2.Models.eva_create_evaluationEntity", "eva_create_evaluation") + .WithMany() + .HasForeignKey("create_evaluation_id"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponement_detailEntity", b => + { + b.HasOne("TodoAPI2.Models.eva_adjust_postponementEntity", "eva_adjust_postponement") + .WithMany() + .HasForeignKey("adjust_postponement_id"); + + b.HasOne("TodoAPI2.Models.eva_adjust_postponementEntity", "eva_adjust_postponement_quota") + .WithMany() + .HasForeignKey("adjust_postponement_quota_id") + .HasConstraintName("FK_eva_adjust_postponement_detail_eva_adjust_postponement_adj~1"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluationEntity", b => + { + b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group") + .WithMany() + .HasForeignKey("evaluation_group_id"); + + b.HasOne("TodoAPI2.Models.eva_performance_planEntity", "eva_performance_plan") + .WithMany() + .HasForeignKey("performance_plan_id"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievementEntity", b => + { + b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail") + .WithMany() + .HasForeignKey("create_evaluation_detail_id"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_behaviorEntity", b => + { + b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail") + .WithMany() + .HasForeignKey("create_evaluation_detail_id"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_group_detailEntity", b => + { + b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group") + .WithMany() + .HasForeignKey("evaluation_group_id"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_operating_agreementEntity", b => + { + b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail_create_evaluation_detail_id") + .WithMany() + .HasForeignKey("create_evaluation_detail_id"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_performance_plan_detailEntity", b => + { + b.HasOne("TodoAPI2.Models.eva_performance_planEntity", "eva_performance_plan") + .WithMany() + .HasForeignKey("performance_plan_id"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_promoted_percentageEntity", b => + { + b.HasOne("TodoAPI2.Models.eva_level_scoreEntity", "eva_level_score") + .WithMany() + .HasForeignKey("level_score_id"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Migrations/25640211101629_AddNextA.cs b/Migrations/25640211101629_AddNextA.cs new file mode 100644 index 0000000..90f2fbb --- /dev/null +++ b/Migrations/25640211101629_AddNextA.cs @@ -0,0 +1,42 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace tb320eva.Migrations +{ + public partial class AddNextA : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "status_chief_a_click_date", + table: "eva_create_evaluation_detail", + nullable: true); + + migrationBuilder.AddColumn( + name: "status_self_a", + table: "eva_create_evaluation_detail", + maxLength: 1, + nullable: true); + + migrationBuilder.AddColumn( + name: "status_self_a_click_date", + table: "eva_create_evaluation_detail", + nullable: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "status_chief_a_click_date", + table: "eva_create_evaluation_detail"); + + migrationBuilder.DropColumn( + name: "status_self_a", + table: "eva_create_evaluation_detail"); + + migrationBuilder.DropColumn( + name: "status_self_a_click_date", + table: "eva_create_evaluation_detail"); + } + } +} diff --git a/Migrations/25640211102515_AddNextA2.Designer.cs b/Migrations/25640211102515_AddNextA2.Designer.cs new file mode 100644 index 0000000..b19a93c --- /dev/null +++ b/Migrations/25640211102515_AddNextA2.Designer.cs @@ -0,0 +1,764 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; +using TTSW.EF; + +namespace tb320eva.Migrations +{ + [DbContext(typeof(DataContext))] + [Migration("25640211102515_AddNextA2")] + partial class AddNextA2 + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) + .HasAnnotation("ProductVersion", "2.2.4-servicing-10062") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponementEntity", b => + { + b.Property("id"); + + b.Property("command_no") + .HasMaxLength(4000); + + b.Property("create_evaluation_id"); + + b.Property("created"); + + b.Property("fiscal_year"); + + b.Property("imported_date"); + + b.Property("imported_file") + .HasMaxLength(1000); + + b.Property("isActive"); + + b.Property("limit"); + + b.Property("limit_frame"); + + b.Property("limit_frame_quota"); + + b.Property("limit_quota"); + + b.Property("managed_by"); + + b.Property("percentage"); + + b.Property("report_type") + .HasMaxLength(1000); + + b.Property("theDate"); + + b.Property("theRound"); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("create_evaluation_id"); + + b.ToTable("eva_adjust_postponement"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponement_detailEntity", b => + { + b.Property("id"); + + b.Property("adjust_postponement_id"); + + b.Property("adjust_postponement_quota_id"); + + b.Property("cost_living"); + + b.Property("created"); + + b.Property("employee_id"); + + b.Property("isActive"); + + b.Property("level_this_time") + .HasMaxLength(1000); + + b.Property("middle"); + + b.Property("migration_eva_result") + .HasMaxLength(1000); + + b.Property("migration_total_score"); + + b.Property("new_cost_living"); + + b.Property("new_sarary"); + + b.Property("new_sarary_with_quota"); + + b.Property("order_at_this_time"); + + b.Property("org_at_this_time"); + + b.Property("other_money_at_this_time"); + + b.Property("position_allowance_at_this_time"); + + b.Property("position_this_time") + .HasMaxLength(1000); + + b.Property("promoted_percentage"); + + b.Property("receive_quota"); + + b.Property("remark") + .HasMaxLength(1000); + + b.Property("sarary"); + + b.Property("total_promote"); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("adjust_postponement_id"); + + b.HasIndex("adjust_postponement_quota_id"); + + b.ToTable("eva_adjust_postponement_detail"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluationEntity", b => + { + b.Property("id"); + + b.Property("created"); + + b.Property("employee_id"); + + b.Property("evaluation_group_id"); + + b.Property("isActive"); + + b.Property("performance_plan_id"); + + b.Property("score1"); + + b.Property("score2"); + + b.Property("supervisor1_id"); + + b.Property("supervisor2_id"); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("evaluation_group_id"); + + b.HasIndex("performance_plan_id"); + + b.ToTable("eva_create_evaluation"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluation_detailEntity", b => + { + b.Property("id"); + + b.Property("Final_summary_chief"); + + b.Property("Final_summary_competency_chief"); + + b.Property("Final_summary_competency_supervisor"); + + b.Property("Final_summary_competency_supervisor1A"); + + b.Property("Final_summary_competency_supervisor2A"); + + b.Property("Final_summary_supervisor"); + + b.Property("Final_summary_supervisor1A"); + + b.Property("Final_summary_supervisor2A"); + + b.Property("achievement_chief"); + + b.Property("achievement_supervisor"); + + b.Property("achievement_supervisor1A"); + + b.Property("achievement_supervisor2A"); + + b.Property("chief"); + + b.Property("competency_chief"); + + b.Property("competency_supervisor"); + + b.Property("competency_supervisor1A"); + + b.Property("competency_supervisor2A"); + + b.Property("create_evaluation_id"); + + b.Property("created"); + + b.Property("employee_id"); + + b.Property("isActive"); + + b.Property("level_score_chief") + .HasMaxLength(255); + + b.Property("level_score_supervisor") + .HasMaxLength(255); + + b.Property("level_score_supervisor1A") + .HasMaxLength(255); + + b.Property("level_score_supervisor2A") + .HasMaxLength(255); + + b.Property("score_chief"); + + b.Property("score_supervisor"); + + b.Property("score_supervisor1A"); + + b.Property("score_supervisor2A"); + + b.Property("status_chief") + .HasMaxLength(1); + + b.Property("status_chief_a") + .HasMaxLength(1); + + b.Property("status_chief_a_click_date"); + + b.Property("status_chief_click_date"); + + b.Property("status_self") + .HasMaxLength(1); + + b.Property("status_self_a") + .HasMaxLength(1); + + b.Property("status_self_a_click_date"); + + b.Property("status_self_click_date"); + + b.Property("status_supervisor") + .HasMaxLength(1); + + b.Property("status_supervisor1A") + .HasMaxLength(1); + + b.Property("status_supervisor1A_click_date"); + + b.Property("status_supervisor2A") + .HasMaxLength(1); + + b.Property("status_supervisor2A_click_date"); + + b.Property("status_supervisor_click_date"); + + b.Property("supervisor1"); + + b.Property("supervisor1A"); + + b.Property("supervisor1A_date"); + + b.Property("supervisor1A_remark") + .HasMaxLength(1000); + + b.Property("supervisor1A_result") + .HasMaxLength(1); + + b.Property("supervisor1_date"); + + b.Property("supervisor1_remark") + .HasMaxLength(1000); + + b.Property("supervisor1_result") + .HasMaxLength(1); + + b.Property("supervisor2"); + + b.Property("supervisor2A"); + + b.Property("supervisor2A_date"); + + b.Property("supervisor2A_remark") + .HasMaxLength(1000); + + b.Property("supervisor2A_result") + .HasMaxLength(1); + + b.Property("supervisor2_date"); + + b.Property("supervisor2_remark") + .HasMaxLength(1000); + + b.Property("supervisor2_result") + .HasMaxLength(1); + + b.Property("total_summary_chief"); + + b.Property("total_summary_competency_chief"); + + b.Property("total_summary_competency_supervisor"); + + b.Property("total_summary_competency_supervisor1A"); + + b.Property("total_summary_competency_supervisor2A"); + + b.Property("total_summary_supervisor"); + + b.Property("total_summary_supervisor1A"); + + b.Property("total_summary_supervisor2A"); + + b.Property("updated"); + + b.HasKey("id"); + + b.ToTable("eva_create_evaluation_detail"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievementEntity", b => + { + b.Property("id"); + + b.Property("achievement") + .HasMaxLength(1000); + + b.Property("create_evaluation_detail_id"); + + b.Property("created"); + + b.Property("isActive"); + + b.Property("score"); + + b.Property("score2"); + + b.Property("score3"); + + b.Property("score4"); + + b.Property("sumary"); + + b.Property("sumary2"); + + b.Property("sumary3"); + + b.Property("sumary4"); + + b.Property("target_score1") + .HasMaxLength(255); + + b.Property("target_score2") + .HasMaxLength(255); + + b.Property("target_score3") + .HasMaxLength(255); + + b.Property("target_score4") + .HasMaxLength(255); + + b.Property("target_score5") + .HasMaxLength(255); + + b.Property("thefile") + .HasMaxLength(1000); + + b.Property("updated"); + + b.Property("weight"); + + b.HasKey("id"); + + b.HasIndex("create_evaluation_detail_id"); + + b.ToTable("eva_evaluation_achievement"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_behaviorEntity", b => + { + b.Property("id"); + + b.Property("behavior") + .HasMaxLength(1000); + + b.Property("create_evaluation_detail_id"); + + b.Property("created"); + + b.Property("isActive"); + + b.Property("score"); + + b.Property("score2"); + + b.Property("score3"); + + b.Property("score4"); + + b.Property("sumary"); + + b.Property("sumary2"); + + b.Property("sumary3"); + + b.Property("sumary4"); + + b.Property("target_score1") + .HasMaxLength(255); + + b.Property("target_score2") + .HasMaxLength(255); + + b.Property("target_score3") + .HasMaxLength(255); + + b.Property("target_score4") + .HasMaxLength(255); + + b.Property("target_score5") + .HasMaxLength(255); + + b.Property("updated"); + + b.Property("weight"); + + b.HasKey("id"); + + b.HasIndex("create_evaluation_detail_id"); + + b.ToTable("eva_evaluation_behavior"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_groupEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("code") + .HasMaxLength(255); + + b.Property("created"); + + b.Property("isActive"); + + b.Property("thegroup") + .HasMaxLength(255); + + b.Property("updated"); + + b.HasKey("id"); + + b.ToTable("eva_evaluation_group"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_group_detailEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("created"); + + b.Property("employee_id"); + + b.Property("evaluation_group_id"); + + b.Property("isActive"); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("evaluation_group_id"); + + b.ToTable("eva_evaluation_group_detail"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_operating_agreementEntity", b => + { + b.Property("id"); + + b.Property("create_evaluation_detail_id"); + + b.Property("created"); + + b.Property("indicators") + .HasMaxLength(4000); + + b.Property("isActive"); + + b.Property("mission_detail") + .HasMaxLength(4000); + + b.Property("mission_no"); + + b.Property("target") + .HasMaxLength(4000); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("create_evaluation_detail_id"); + + b.ToTable("eva_evaluation_operating_agreement"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_idp_planEntity", b => + { + b.Property("id"); + + b.Property("create_evaluation_detail_id"); + + b.Property("created"); + + b.Property("develop") + .HasMaxLength(1000); + + b.Property("development_method") + .HasMaxLength(1000); + + b.Property("end_date"); + + b.Property("isActive"); + + b.Property("period_text") + .HasMaxLength(1000); + + b.Property("start_date"); + + b.Property("updated"); + + b.HasKey("id"); + + b.ToTable("eva_idp_plan"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_level_scoreEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("code") + .HasMaxLength(255); + + b.Property("created"); + + b.Property("detail") + .HasMaxLength(1000); + + b.Property("isActive"); + + b.Property("max_score"); + + b.Property("min_score"); + + b.Property("updated"); + + b.HasKey("id"); + + b.ToTable("eva_level_score"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_performance_planEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("created"); + + b.Property("fiscal_year"); + + b.Property("isActive"); + + b.Property("theTime"); + + b.Property("updated"); + + b.HasKey("id"); + + b.ToTable("eva_performance_plan"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_performance_plan_detailEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("created"); + + b.Property("end_date"); + + b.Property("isActive"); + + b.Property("list_no"); + + b.Property("performance_plan_id"); + + b.Property("remark") + .HasMaxLength(1000); + + b.Property("start_date"); + + b.Property("step") + .HasMaxLength(1000); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("performance_plan_id"); + + b.ToTable("eva_performance_plan_detail"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_promoted_percentageEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("code") + .HasMaxLength(255); + + b.Property("created"); + + b.Property("detail") + .HasMaxLength(1000); + + b.Property("isActive"); + + b.Property("level_score_id"); + + b.Property("max_score"); + + b.Property("min_score"); + + b.Property("promoted_percentage"); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("level_score_id"); + + b.ToTable("eva_promoted_percentage"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_salary_cylinderEntity", b => + { + b.Property("id"); + + b.Property("cost_living"); + + b.Property("created"); + + b.Property("isActive"); + + b.Property("middle"); + + b.Property("position_level"); + + b.Property("position_type"); + + b.Property("temporary_min"); + + b.Property("themax"); + + b.Property("themin"); + + b.Property("updated"); + + b.HasKey("id"); + + b.ToTable("eva_salary_cylinder"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponementEntity", b => + { + b.HasOne("TodoAPI2.Models.eva_create_evaluationEntity", "eva_create_evaluation") + .WithMany() + .HasForeignKey("create_evaluation_id"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponement_detailEntity", b => + { + b.HasOne("TodoAPI2.Models.eva_adjust_postponementEntity", "eva_adjust_postponement") + .WithMany() + .HasForeignKey("adjust_postponement_id"); + + b.HasOne("TodoAPI2.Models.eva_adjust_postponementEntity", "eva_adjust_postponement_quota") + .WithMany() + .HasForeignKey("adjust_postponement_quota_id") + .HasConstraintName("FK_eva_adjust_postponement_detail_eva_adjust_postponement_adj~1"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluationEntity", b => + { + b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group") + .WithMany() + .HasForeignKey("evaluation_group_id"); + + b.HasOne("TodoAPI2.Models.eva_performance_planEntity", "eva_performance_plan") + .WithMany() + .HasForeignKey("performance_plan_id"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievementEntity", b => + { + b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail") + .WithMany() + .HasForeignKey("create_evaluation_detail_id"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_behaviorEntity", b => + { + b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail") + .WithMany() + .HasForeignKey("create_evaluation_detail_id"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_group_detailEntity", b => + { + b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group") + .WithMany() + .HasForeignKey("evaluation_group_id"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_operating_agreementEntity", b => + { + b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail_create_evaluation_detail_id") + .WithMany() + .HasForeignKey("create_evaluation_detail_id"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_performance_plan_detailEntity", b => + { + b.HasOne("TodoAPI2.Models.eva_performance_planEntity", "eva_performance_plan") + .WithMany() + .HasForeignKey("performance_plan_id"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_promoted_percentageEntity", b => + { + b.HasOne("TodoAPI2.Models.eva_level_scoreEntity", "eva_level_score") + .WithMany() + .HasForeignKey("level_score_id"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Migrations/25640211102515_AddNextA2.cs b/Migrations/25640211102515_AddNextA2.cs new file mode 100644 index 0000000..3f5537a --- /dev/null +++ b/Migrations/25640211102515_AddNextA2.cs @@ -0,0 +1,23 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +namespace tb320eva.Migrations +{ + public partial class AddNextA2 : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "status_chief_a", + table: "eva_create_evaluation_detail", + maxLength: 1, + nullable: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "status_chief_a", + table: "eva_create_evaluation_detail"); + } + } +} diff --git a/Migrations/DataContextModelSnapshot.cs b/Migrations/DataContextModelSnapshot.cs index 1a2052b..09958bd 100644 --- a/Migrations/DataContextModelSnapshot.cs +++ b/Migrations/DataContextModelSnapshot.cs @@ -234,11 +234,21 @@ namespace tb320eva.Migrations b.Property("status_chief") .HasMaxLength(1); + b.Property("status_chief_a") + .HasMaxLength(1); + + b.Property("status_chief_a_click_date"); + b.Property("status_chief_click_date"); b.Property("status_self") .HasMaxLength(1); + b.Property("status_self_a") + .HasMaxLength(1); + + b.Property("status_self_a_click_date"); + b.Property("status_self_click_date"); b.Property("status_supervisor") diff --git a/Models/eva_create_evaluation_detail/eva_create_evaluation_detailEntity.cs b/Models/eva_create_evaluation_detail/eva_create_evaluation_detailEntity.cs index fa460b6..86cb0c1 100644 --- a/Models/eva_create_evaluation_detail/eva_create_evaluation_detailEntity.cs +++ b/Models/eva_create_evaluation_detail/eva_create_evaluation_detailEntity.cs @@ -74,9 +74,15 @@ namespace TodoAPI2.Models public DateTime? supervisor2_date { get; set; } + [MaxLength(1)] + public string status_self_a { get; set; } + [MaxLength(1)] public string status_self { get; set; } + [MaxLength(1)] + public string status_chief_a { get; set; } + [MaxLength(1)] public string status_chief { get; set; } @@ -116,6 +122,10 @@ namespace TodoAPI2.Models // existingEntity.status_supervisor2A = model.status_supervisor2A; public DateTime? status_self_click_date { get; set; } + + public DateTime? status_self_a_click_date { get; set; } + + public DateTime? status_chief_a_click_date { get; set; } public DateTime? status_chief_click_date { get; set; } public DateTime? status_supervisor_click_date { get; set; } public DateTime? status_supervisor1A_click_date { get; set; } diff --git a/Models/eva_create_evaluation_detail_firstdoc/eva_create_evaluation_detail_firstdocService.cs b/Models/eva_create_evaluation_detail_firstdoc/eva_create_evaluation_detail_firstdocService.cs index 5d2c2eb..9a7c0d1 100644 --- a/Models/eva_create_evaluation_detail_firstdoc/eva_create_evaluation_detail_firstdocService.cs +++ b/Models/eva_create_evaluation_detail_firstdoc/eva_create_evaluation_detail_firstdocService.cs @@ -121,11 +121,19 @@ namespace TodoAPI2.Models search_employee_code = fk_external_employee.employee_no, search_employee_fullname = fk_external_employee.fullname, status_self = m_eva_create_evaluation_detail_agreement.status_self, + status_self_a = m_eva_create_evaluation_detail_agreement.status_self_a, status_chief = m_eva_create_evaluation_detail_agreement.status_chief, + status_chief_a = m_eva_create_evaluation_detail_agreement.status_chief_a, status_supervisor = m_eva_create_evaluation_detail_agreement.status_supervisor, org_id_external_linkage_external_name = fk_external_employee.department_name, + status_self_click_date = m_eva_create_evaluation_detail_agreement.status_self_click_date, + status_chief_click_date = m_eva_create_evaluation_detail_agreement.status_chief_click_date, + status_self_a_click_date = m_eva_create_evaluation_detail_agreement.status_self_a_click_date, + status_chief_a_click_date = m_eva_create_evaluation_detail_agreement.status_chief_a_click_date, + status_supervisor_click_date = m_eva_create_evaluation_detail_agreement.status_supervisor_click_date, + remark_hrm_work_record = fk_external_employee.remark_hrm_work_record + GetWorkTimeText(fk_external_employee.packing_date, endDate), @@ -226,13 +234,17 @@ namespace TodoAPI2.Models search_employee_code = fk_external_employee.employee_no, search_employee_fullname = fk_external_employee.fullname, status_self = m_eva_create_evaluation_detail_agreement.status_self, + status_self_a = m_eva_create_evaluation_detail_agreement.status_self_a, status_chief = m_eva_create_evaluation_detail_agreement.status_chief, + status_chief_a = m_eva_create_evaluation_detail_agreement.status_chief_a, status_supervisor = m_eva_create_evaluation_detail_agreement.status_supervisor, org_id_external_linkage_external_name = fk_external_employee.department_name, status_self_click_date = m_eva_create_evaluation_detail_agreement.status_self_click_date, status_chief_click_date = m_eva_create_evaluation_detail_agreement.status_chief_click_date, + status_self_a_click_date = m_eva_create_evaluation_detail_agreement.status_self_a_click_date, + status_chief_a_click_date = m_eva_create_evaluation_detail_agreement.status_chief_a_click_date, status_supervisor_click_date = m_eva_create_evaluation_detail_agreement.status_supervisor_click_date, plan_round_year = checkNull(fk_planResult.theTime) + "/" + checkNull(fk_planResult.fiscal_year), diff --git a/Models/eva_create_evaluation_detail_firstdoc/eva_create_evaluation_detail_firstdocViewModel.cs b/Models/eva_create_evaluation_detail_firstdoc/eva_create_evaluation_detail_firstdocViewModel.cs index 482b36f..eda13d7 100644 --- a/Models/eva_create_evaluation_detail_firstdoc/eva_create_evaluation_detail_firstdocViewModel.cs +++ b/Models/eva_create_evaluation_detail_firstdoc/eva_create_evaluation_detail_firstdocViewModel.cs @@ -42,8 +42,12 @@ namespace TodoAPI2.Models public string org_id_external_linkage_external_name { get; set; } + public string status_self_a { get; set; } + public string status_self { get; set; } + public string status_chief_a { get; set; } + public string status_chief { get; set; } public string status_supervisor { get; set; } @@ -52,7 +56,11 @@ namespace TodoAPI2.Models public string plan_round_year { get; set; } + public DateTime? status_self_a_click_date { get; set; } + public DateTime? status_self_click_date { get; set; } + + public DateTime? status_chief_a_click_date { get; set; } public DateTime? status_chief_click_date { get; set; } public DateTime? status_supervisor_click_date { get; set; } @@ -60,7 +68,12 @@ namespace TodoAPI2.Models public decimal? score2 { get; set; } + public string txt_status_self_a { get { return getStatusText(status_self_a) + MyHelper.GetDateStringForReport(status_self_a_click_date); } } + public string txt_status_self { get { return getStatusText(status_self) + MyHelper.GetDateStringForReport(status_self_click_date); } } + + public string txt_status_chief_a { get { return getStatusText(status_chief_a) + MyHelper.GetDateStringForReport(status_chief_a_click_date); } } + public string txt_status_chief { get { return getStatusText(status_chief) + MyHelper.GetDateStringForReport(status_chief_click_date); } } public string txt_status_supervisor { get { return getStatusText(status_supervisor) + MyHelper.GetDateStringForReport(status_supervisor_click_date); } } diff --git a/Models/eva_create_evaluation_detail_status/eva_create_evaluation_detail_statusInputModel.cs b/Models/eva_create_evaluation_detail_status/eva_create_evaluation_detail_statusInputModel.cs index d6e2bf5..75bd35e 100644 --- a/Models/eva_create_evaluation_detail_status/eva_create_evaluation_detail_statusInputModel.cs +++ b/Models/eva_create_evaluation_detail_status/eva_create_evaluation_detail_statusInputModel.cs @@ -22,6 +22,10 @@ namespace TodoAPI2.Models public string status_chief { get; set; } + public string status_self_a { get; set; } + + public string status_chief_a { get; set; } + public string status_supervisor { get; set; } public string status_supervisor1A { get; set; } diff --git a/Models/eva_create_evaluation_detail_status/eva_create_evaluation_detail_statusService.cs b/Models/eva_create_evaluation_detail_status/eva_create_evaluation_detail_statusService.cs index d809ef2..6777fdf 100644 --- a/Models/eva_create_evaluation_detail_status/eva_create_evaluation_detail_statusService.cs +++ b/Models/eva_create_evaluation_detail_status/eva_create_evaluation_detail_statusService.cs @@ -175,6 +175,8 @@ namespace TodoAPI2.Models existingEntity.create_evaluation_id = model.create_evaluation_id; existingEntity.status_self = model.status_self; existingEntity.status_chief = model.status_chief; + existingEntity.status_self_a = model.status_self_a; + existingEntity.status_chief_a = model.status_chief_a; existingEntity.status_supervisor = model.status_supervisor; existingEntity.status_supervisor1A = model.status_supervisor1A; existingEntity.status_supervisor2A = model.status_supervisor2A; @@ -189,7 +191,35 @@ namespace TodoAPI2.Models string noti_message = "กรุณาตรวจสอบแบบประเมินของ {0}"; string noti_url = "/eva/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d2?id=" + existingEntity.id.ToString(); - if (model.status_mode == "next0") + + if (model.status_mode == "nextA") + { + existingEntity.status_self_a_click_date = MyHelper.RemoveTimeFromDate(DateTime.Now); + noti_to_employee_id = existingEntity.chief; + noti_message = "กรุณาตรวจสอบ ข้อตกลงการประเมิน ของ {0}"; + noti_url = "/eva/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_firstdoc_d?id=" + existingEntity.id.ToString(); + } + else if (model.status_mode == "backB") + { + existingEntity.status_chief_a_click_date = MyHelper.RemoveTimeFromDate(DateTime.Now); + existingEntity.status_self_a_click_date = null; + noti_to_employee_id = existingEntity.employee_id; + noti_message = "ข้อตกลงการประเมินของคุณ ({0}) ถูกตีกลับ"; + noti_url = "/eva/eva_create_evaluation_detail_agreementView/eva_create_evaluation_detail_firstdoc_d?id=" + existingEntity.id.ToString(); + } + else if (model.status_mode == "nextB") + { + existingEntity.status_chief_a_click_date = MyHelper.RemoveTimeFromDate(DateTime.Now); + if (current_eva.employee_id == existingEntity.chief) // หัวหน้าและผู้ประเมินสูงสุด เป็นคนคนเดียวกัน + { + noti_to_employee_id = current_eva.supervisor1_id; + } + else + { + noti_to_employee_id = current_eva.employee_id; + } + } + else if (model.status_mode == "next0") { existingEntity.status_self_click_date = MyHelper.RemoveTimeFromDate(DateTime.Now); noti_to_employee_id = existingEntity.chief; @@ -293,7 +323,7 @@ values('{Guid.NewGuid().ToString()}','App\Notifications\WorkflowNotification','A List para = new List(); para.Add(data); - db.ExecuteNonQueryNpgsql(sql, para); + //db.ExecuteNonQueryNpgsql(sql, para); } public string UpdateMultiple(List model) @@ -308,6 +338,8 @@ values('{Guid.NewGuid().ToString()}','App\Notifications\WorkflowNotification','A existingEntity.create_evaluation_id = i.create_evaluation_id; existingEntity.status_self = i.status_self; existingEntity.status_chief = i.status_chief; + existingEntity.status_self_a = i.status_self_a; + existingEntity.status_chief_a = i.status_chief_a; existingEntity.status_supervisor = i.status_supervisor; existingEntity.status_supervisor1A = i.status_supervisor1A; existingEntity.status_supervisor2A = i.status_supervisor2A; diff --git a/Models/eva_create_evaluation_detail_status/eva_create_evaluation_detail_statusViewModel.cs b/Models/eva_create_evaluation_detail_status/eva_create_evaluation_detail_statusViewModel.cs index b20a201..af25bf2 100644 --- a/Models/eva_create_evaluation_detail_status/eva_create_evaluation_detail_statusViewModel.cs +++ b/Models/eva_create_evaluation_detail_status/eva_create_evaluation_detail_statusViewModel.cs @@ -20,6 +20,10 @@ namespace TodoAPI2.Models public string status_chief { get; set; } + public string status_self_a { get; set; } + + public string status_chief_a { get; set; } + public string status_supervisor { get; set; } public string status_supervisor1A { get; set; } diff --git a/Views/eva_create_evaluation_detail_firstdocView/eva_create_evaluation_detail_firstdoc_d.cshtml b/Views/eva_create_evaluation_detail_firstdocView/eva_create_evaluation_detail_firstdoc_d.cshtml index 0509599..b596b00 100644 --- a/Views/eva_create_evaluation_detail_firstdocView/eva_create_evaluation_detail_firstdoc_d.cshtml +++ b/Views/eva_create_evaluation_detail_firstdocView/eva_create_evaluation_detail_firstdoc_d.cshtml @@ -170,7 +170,7 @@
- +
@@ -201,12 +201,16 @@ + +
- + + +
@@ -222,6 +226,7 @@ -} \ No newline at end of file +} + diff --git a/Views/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d.cshtml b/Views/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d.cshtml index b9bed88..1423dac 100644 --- a/Views/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d.cshtml +++ b/Views/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d.cshtml @@ -335,6 +335,8 @@ + + diff --git a/Views/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d2.cshtml b/Views/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d2.cshtml index f8d6e6a..686270a 100644 --- a/Views/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d2.cshtml +++ b/Views/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d2.cshtml @@ -456,6 +456,8 @@ + + diff --git a/wwwroot/js/eva_create_evaluation_detail_firstdoc/eva_create_evaluation_detail_firstdoc.js b/wwwroot/js/eva_create_evaluation_detail_firstdoc/eva_create_evaluation_detail_firstdoc.js index c400871..17ca1de 100644 --- a/wwwroot/js/eva_create_evaluation_detail_firstdoc/eva_create_evaluation_detail_firstdoc.js +++ b/wwwroot/js/eva_create_evaluation_detail_firstdoc/eva_create_evaluation_detail_firstdoc.js @@ -194,8 +194,8 @@ var eva_create_evaluation_detail_firstdoc_setupTable = function (result) { { "data": "employee_position" }, { "data": "employee_position_level" }, { "data": "org_id_external_linkage_external_name" }, - { "data": "txt_status_self" }, - { "data": "txt_status_chief" }, + { "data": "txt_status_self_a" }, + { "data": "txt_status_chief_a" }, ], "columnDefs": [ @@ -248,4 +248,3 @@ function eva_create_evaluation_detail_firstdoc_GetSelect(f) { //================= Multi-Selection Function ========================================= - diff --git a/wwwroot/js/eva_create_evaluation_detail_firstdoc/eva_create_evaluation_detail_firstdoc_d.js b/wwwroot/js/eva_create_evaluation_detail_firstdoc/eva_create_evaluation_detail_firstdoc_d.js index 5c8b469..97d4e9a 100644 --- a/wwwroot/js/eva_create_evaluation_detail_firstdoc/eva_create_evaluation_detail_firstdoc_d.js +++ b/wwwroot/js/eva_create_evaluation_detail_firstdoc/eva_create_evaluation_detail_firstdoc_d.js @@ -21,7 +21,8 @@ function eva_create_evaluation_detail_firstdoc_FeedDataToForm(data) { $("#remark_hrm_work_record").text(data.remark_hrm_work_record); - status_self = data.status_self; + status_self_a = data.status_self_a; + status_chief_a = data.status_chief_a; CheckPermission(); console.log(data); } @@ -124,4 +125,7 @@ function eva_create_evaluation_detail_firstdoc_GoDelete(a) { //================= Multi-Selection Function ========================================= +function CheckWeightBeforeSubmitStatus() { + return true; +} diff --git a/wwwroot/js/eva_create_evaluation_detail_status/eva_create_evaluation_detail_status_d.js b/wwwroot/js/eva_create_evaluation_detail_status/eva_create_evaluation_detail_status_d.js index d4274f0..41f15cc 100644 --- a/wwwroot/js/eva_create_evaluation_detail_status/eva_create_evaluation_detail_status_d.js +++ b/wwwroot/js/eva_create_evaluation_detail_status/eva_create_evaluation_detail_status_d.js @@ -4,25 +4,29 @@ var eva_create_evaluation_detail_status_API = "/api/eva_create_evaluation_detail //================= Form Data Customizaiton ========================================= function eva_create_evaluation_detail_status_FeedDataToForm(data) { -$("#eva_create_evaluation_detail_status_id").val(data.id); -$("#eva_create_evaluation_detail_status_create_evaluation_id").val(data.create_evaluation_id); -$("#eva_create_evaluation_detail_status_status_self").val(data.status_self); -$("#eva_create_evaluation_detail_status_status_chief").val(data.status_chief); -$("#eva_create_evaluation_detail_status_status_supervisor").val(data.status_supervisor); -$("#eva_create_evaluation_detail_status_status_supervisor1A").val(data.status_supervisor1A); -$("#eva_create_evaluation_detail_status_status_supervisor2A").val(data.status_supervisor2A); + $("#eva_create_evaluation_detail_status_id").val(data.id); + $("#eva_create_evaluation_detail_status_create_evaluation_id").val(data.create_evaluation_id); + $("#eva_create_evaluation_detail_status_status_self").val(data.status_self); + $("#eva_create_evaluation_detail_status_status_chief").val(data.status_chief); + $("#eva_create_evaluation_detail_status_status_self_a").val(data.status_self_a); + $("#eva_create_evaluation_detail_status_status_chief_a").val(data.status_chief_a); + $("#eva_create_evaluation_detail_status_status_supervisor").val(data.status_supervisor); + $("#eva_create_evaluation_detail_status_status_supervisor1A").val(data.status_supervisor1A); + $("#eva_create_evaluation_detail_status_status_supervisor2A").val(data.status_supervisor2A); } function eva_create_evaluation_detail_status_GetFromForm() { var eva_create_evaluation_detail_statusObject = new Object(); -eva_create_evaluation_detail_statusObject.id = $("#eva_create_evaluation_detail_status_id").val(); -eva_create_evaluation_detail_statusObject.create_evaluation_id = $("#eva_create_evaluation_detail_status_create_evaluation_id").val(); -eva_create_evaluation_detail_statusObject.status_self = $("#eva_create_evaluation_detail_status_status_self").val(); -eva_create_evaluation_detail_statusObject.status_chief = $("#eva_create_evaluation_detail_status_status_chief").val(); -eva_create_evaluation_detail_statusObject.status_supervisor = $("#eva_create_evaluation_detail_status_status_supervisor").val(); -eva_create_evaluation_detail_statusObject.status_supervisor1A = $("#eva_create_evaluation_detail_status_status_supervisor1A").val(); -eva_create_evaluation_detail_statusObject.status_supervisor2A = $("#eva_create_evaluation_detail_status_status_supervisor2A").val(); + eva_create_evaluation_detail_statusObject.id = $("#eva_create_evaluation_detail_status_id").val(); + eva_create_evaluation_detail_statusObject.create_evaluation_id = $("#eva_create_evaluation_detail_status_create_evaluation_id").val(); + eva_create_evaluation_detail_statusObject.status_self = $("#eva_create_evaluation_detail_status_status_self").val(); + eva_create_evaluation_detail_statusObject.status_chief = $("#eva_create_evaluation_detail_status_status_chief").val(); + eva_create_evaluation_detail_statusObject.status_self_a = $("#eva_create_evaluation_detail_status_status_self_a").val(); + eva_create_evaluation_detail_statusObject.status_chief_a = $("#eva_create_evaluation_detail_status_status_chief_a").val(); + eva_create_evaluation_detail_statusObject.status_supervisor = $("#eva_create_evaluation_detail_status_status_supervisor").val(); + eva_create_evaluation_detail_statusObject.status_supervisor1A = $("#eva_create_evaluation_detail_status_status_supervisor1A").val(); + eva_create_evaluation_detail_statusObject.status_supervisor2A = $("#eva_create_evaluation_detail_status_status_supervisor2A").val(); return eva_create_evaluation_detail_statusObject; @@ -31,9 +35,9 @@ eva_create_evaluation_detail_statusObject.status_supervisor2A = $("#eva_create_e function eva_create_evaluation_detail_status_InitialForm() { var successFunc = function (result) { eva_create_evaluation_detail_status_FeedDataToForm(result); - endLoad(); + endLoad(); }; - startLoad(); + startLoad(); AjaxGetRequest(apisite + eva_create_evaluation_detail_status_API + "GetBlankItem", successFunc, AlertDanger); } @@ -43,15 +47,15 @@ function eva_create_evaluation_detail_status_SetEditForm(a) { var successFunc = function (result) { eva_create_evaluation_detail_status_editMode = "UPDATE"; eva_create_evaluation_detail_status_FeedDataToForm(result); - endLoad(); + endLoad(); }; - startLoad(); + startLoad(); AjaxGetRequest(apisite + eva_create_evaluation_detail_status_API + a, successFunc, AlertDanger); } function eva_create_evaluation_detail_status_SetCreateForm() { eva_create_evaluation_detail_status_editMode = "CREATE"; - eva_create_evaluation_detail_status_InitialForm(); + eva_create_evaluation_detail_status_InitialForm(); } //================= Update and Delete ========================================= @@ -61,12 +65,11 @@ var eva_create_evaluation_detail_status_customValidation = function (group) { }; function eva_create_evaluation_detail_status_PutUpdate(a) { - if (!ValidateForm('eva_create_evaluation_detail_status', eva_create_evaluation_detail_status_customValidation)) - { + if (!ValidateForm('eva_create_evaluation_detail_status', eva_create_evaluation_detail_status_customValidation)) { return; } - if(CheckWeightBeforeSubmitStatus() === false){ + if (CheckWeightBeforeSubmitStatus() === false) { alert("น้ำหนักแต่ละส่วน ต้องมีค่า 100 จึงจะส่งแบบประเมินได้"); return; } @@ -74,35 +77,44 @@ function eva_create_evaluation_detail_status_PutUpdate(a) { var data = eva_create_evaluation_detail_status_GetFromForm(); data.status_mode = a; - - if(a == "next0"){ + if (a === "nextA") { + data.status_self_a = "Y"; + } + else if (a === "backB") { + data.status_chief_a = "N"; + data.status_self_a = ""; + } + else if (a === "nextB") { + data.status_chief_a = "Y"; + } + else if (a === "next0") { data.status_self = "Y"; } - else if(a == "next1"){ + else if (a === "next1") { data.status_chief = "Y"; } - else if(a == "back1"){ + else if (a === "back1") { data.status_chief = "N"; data.status_self = ""; } - else if(a == "next2"){ + else if (a === "next2") { data.status_supervisor = "Y"; } - else if(a == "back2"){ + else if (a === "back2") { data.status_supervisor = "N"; data.status_chief = ""; } - else if(a == "next3"){ + else if (a === "next3") { data.status_supervisor1A = "Y"; } - else if(a == "back3"){ + else if (a === "back3") { data.status_supervisor = ""; data.status_supervisor1A = "N"; } - else if(a == "next4"){ + else if (a === "next4") { data.status_supervisor2A = "Y"; } - else if(a == "back4"){ + else if (a === "back4") { data.status_supervisor1A = ""; data.status_supervisor2A = "N"; } @@ -110,9 +122,9 @@ function eva_create_evaluation_detail_status_PutUpdate(a) { var successFunc1 = function (result) { AlertSuccess(result.message); window.location.reload(); - endLoad(); + endLoad(); }; - startLoad(); + startLoad(); AjaxPutRequest(apisite + eva_create_evaluation_detail_status_API + data.id, data, successFunc1, AlertDanger); } @@ -121,9 +133,9 @@ function eva_create_evaluation_detail_status_GoDelete(a) { var successFunc = function (result) { AlertSuccess(result.message); eva_create_evaluation_detail_status_RefreshTable(); - endLoad(); + endLoad(); }; - startLoad(); + startLoad(); AjaxDeleteRequest(apisite + eva_create_evaluation_detail_status_API + a, null, successFunc, AlertDanger); } } diff --git a/wwwroot/js/eva_evaluation_operating_agreement/eva_evaluation_operating_agreement.js b/wwwroot/js/eva_evaluation_operating_agreement/eva_evaluation_operating_agreement.js index 8c40e99..62e02e2 100644 --- a/wwwroot/js/eva_evaluation_operating_agreement/eva_evaluation_operating_agreement.js +++ b/wwwroot/js/eva_evaluation_operating_agreement/eva_evaluation_operating_agreement.js @@ -172,7 +172,7 @@ var eva_evaluation_operating_agreement_setupTable = function (result) { "targets": 0, //1, "data": "id", "render": function (data, type, row, meta) { - return " "; + return " "; } }, //{