ปรับปรุง flow การบันทึกและแสดงคะแนนของทุก actor
This commit is contained in:
687
Migrations/25630817055844_AddSupervisor1A2AField.Designer.cs
generated
Normal file
687
Migrations/25630817055844_AddSupervisor1A2AField.Designer.cs
generated
Normal file
@@ -0,0 +1,687 @@
|
||||
// <auto-generated />
|
||||
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("25630817055844_AddSupervisor1A2AField")]
|
||||
partial class AddSupervisor1A2AField
|
||||
{
|
||||
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<int>("id");
|
||||
|
||||
b.Property<string>("command_no")
|
||||
.HasMaxLength(100);
|
||||
|
||||
b.Property<int?>("create_evaluation_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("fiscal_year");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("limit");
|
||||
|
||||
b.Property<decimal?>("limit_frame");
|
||||
|
||||
b.Property<decimal?>("limit_frame_quota");
|
||||
|
||||
b.Property<decimal?>("limit_quota");
|
||||
|
||||
b.Property<int?>("managed_by");
|
||||
|
||||
b.Property<decimal?>("percentage");
|
||||
|
||||
b.Property<DateTime?>("theDate");
|
||||
|
||||
b.Property<int?>("theRound");
|
||||
|
||||
b.Property<DateTime>("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<int>("id");
|
||||
|
||||
b.Property<int?>("adjust_postponement_id");
|
||||
|
||||
b.Property<int?>("adjust_postponement_quota_id");
|
||||
|
||||
b.Property<decimal?>("cost_living");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("middle");
|
||||
|
||||
b.Property<decimal?>("new_cost_living");
|
||||
|
||||
b.Property<decimal?>("new_sarary");
|
||||
|
||||
b.Property<decimal?>("new_sarary_with_quota");
|
||||
|
||||
b.Property<decimal?>("promoted_percentage");
|
||||
|
||||
b.Property<decimal?>("receive_quota");
|
||||
|
||||
b.Property<string>("remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("sarary");
|
||||
|
||||
b.Property<decimal?>("total_promote");
|
||||
|
||||
b.Property<DateTime>("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<int>("id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<Guid?>("evaluation_group_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<Guid?>("performance_plan_id");
|
||||
|
||||
b.Property<decimal?>("score1");
|
||||
|
||||
b.Property<decimal?>("score2");
|
||||
|
||||
b.Property<int?>("supervisor1_id");
|
||||
|
||||
b.Property<int?>("supervisor2_id");
|
||||
|
||||
b.Property<DateTime>("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<int>("id");
|
||||
|
||||
b.Property<decimal?>("Final_summary_chief");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_chief");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_supervisor");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_supervisor2A");
|
||||
|
||||
b.Property<decimal?>("Final_summary_supervisor");
|
||||
|
||||
b.Property<decimal?>("Final_summary_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("Final_summary_supervisor2A");
|
||||
|
||||
b.Property<decimal?>("achievement_chief");
|
||||
|
||||
b.Property<decimal?>("achievement_supervisor");
|
||||
|
||||
b.Property<decimal?>("achievement_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("achievement_supervisor2A");
|
||||
|
||||
b.Property<int?>("chief");
|
||||
|
||||
b.Property<decimal?>("competency_chief");
|
||||
|
||||
b.Property<decimal?>("competency_supervisor");
|
||||
|
||||
b.Property<decimal?>("competency_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("competency_supervisor2A");
|
||||
|
||||
b.Property<int?>("create_evaluation_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("level_score_chief")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("level_score_supervisor")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("level_score_supervisor1A")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("level_score_supervisor2A")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<decimal?>("score_chief");
|
||||
|
||||
b.Property<decimal?>("score_supervisor");
|
||||
|
||||
b.Property<decimal?>("score_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("score_supervisor2A");
|
||||
|
||||
b.Property<string>("status_chief")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_chief_click_date");
|
||||
|
||||
b.Property<string>("status_self")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_self_click_date");
|
||||
|
||||
b.Property<string>("status_supervisor")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_supervisor1A")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_supervisor1A_click_date");
|
||||
|
||||
b.Property<string>("status_supervisor2A")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_supervisor2A_click_date");
|
||||
|
||||
b.Property<DateTime?>("status_supervisor_click_date");
|
||||
|
||||
b.Property<int?>("supervisor1");
|
||||
|
||||
b.Property<int?>("supervisor1A");
|
||||
|
||||
b.Property<DateTime?>("supervisor1A_date");
|
||||
|
||||
b.Property<string>("supervisor1A_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor1A_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("supervisor1_date");
|
||||
|
||||
b.Property<string>("supervisor1_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor1_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<int?>("supervisor2");
|
||||
|
||||
b.Property<int?>("supervisor2A");
|
||||
|
||||
b.Property<DateTime?>("supervisor2A_date");
|
||||
|
||||
b.Property<string>("supervisor2A_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor2A_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("supervisor2_date");
|
||||
|
||||
b.Property<string>("supervisor2_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor2_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<decimal?>("total_summary_chief");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_chief");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_supervisor");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_supervisor2A");
|
||||
|
||||
b.Property<decimal?>("total_summary_supervisor");
|
||||
|
||||
b.Property<decimal?>("total_summary_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("total_summary_supervisor2A");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_create_evaluation_detail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievementEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<string>("achievement")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("score");
|
||||
|
||||
b.Property<decimal?>("score2");
|
||||
|
||||
b.Property<decimal?>("score3");
|
||||
|
||||
b.Property<decimal?>("score4");
|
||||
|
||||
b.Property<decimal?>("sumary");
|
||||
|
||||
b.Property<decimal?>("sumary2");
|
||||
|
||||
b.Property<decimal?>("sumary3");
|
||||
|
||||
b.Property<decimal?>("sumary4");
|
||||
|
||||
b.Property<string>("target_score1")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score2")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score3")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score4")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score5")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("thefile")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.Property<decimal?>("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<int>("id");
|
||||
|
||||
b.Property<string>("behavior")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("score");
|
||||
|
||||
b.Property<decimal?>("score2");
|
||||
|
||||
b.Property<decimal?>("score3");
|
||||
|
||||
b.Property<decimal?>("score4");
|
||||
|
||||
b.Property<decimal?>("sumary");
|
||||
|
||||
b.Property<decimal?>("sumary2");
|
||||
|
||||
b.Property<decimal?>("sumary3");
|
||||
|
||||
b.Property<decimal?>("sumary4");
|
||||
|
||||
b.Property<string>("target_score1")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score2")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score3")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score4")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score5")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.Property<decimal?>("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<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("code")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("thegroup")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_evaluation_group");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_group_detailEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<Guid?>("evaluation_group_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("evaluation_group_id");
|
||||
|
||||
b.ToTable("eva_evaluation_group_detail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_idp_planEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("develop")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("development_method")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime?>("end_date");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<DateTime?>("start_date");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_idp_plan");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_level_scoreEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("code")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("detail")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("max_score");
|
||||
|
||||
b.Property<decimal?>("min_score");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_level_score");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_performance_planEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("fiscal_year");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<int?>("theTime");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_performance_plan");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_performance_plan_detailEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<DateTime?>("end_date");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<int?>("list_no");
|
||||
|
||||
b.Property<Guid?>("performance_plan_id");
|
||||
|
||||
b.Property<string>("remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime?>("start_date");
|
||||
|
||||
b.Property<string>("step")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime>("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<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("code")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("detail")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<Guid?>("level_score_id");
|
||||
|
||||
b.Property<decimal?>("max_score");
|
||||
|
||||
b.Property<decimal?>("min_score");
|
||||
|
||||
b.Property<decimal?>("promoted_percentage");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("level_score_id");
|
||||
|
||||
b.ToTable("eva_promoted_percentage");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_salary_cylinderEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<decimal?>("cost_living");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("middle");
|
||||
|
||||
b.Property<int?>("position_level");
|
||||
|
||||
b.Property<int?>("position_type");
|
||||
|
||||
b.Property<decimal?>("temporary_min");
|
||||
|
||||
b.Property<decimal?>("themax");
|
||||
|
||||
b.Property<decimal?>("themin");
|
||||
|
||||
b.Property<DateTime>("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_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
|
||||
}
|
||||
}
|
||||
}
|
||||
231
Migrations/25630817055844_AddSupervisor1A2AField.cs
Normal file
231
Migrations/25630817055844_AddSupervisor1A2AField.cs
Normal file
@@ -0,0 +1,231 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace tb320eva.Migrations
|
||||
{
|
||||
public partial class AddSupervisor1A2AField : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "score3",
|
||||
table: "eva_evaluation_behavior",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "score4",
|
||||
table: "eva_evaluation_behavior",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "sumary3",
|
||||
table: "eva_evaluation_behavior",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "sumary4",
|
||||
table: "eva_evaluation_behavior",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "score3",
|
||||
table: "eva_evaluation_achievement",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "score4",
|
||||
table: "eva_evaluation_achievement",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "sumary3",
|
||||
table: "eva_evaluation_achievement",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "sumary4",
|
||||
table: "eva_evaluation_achievement",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "Final_summary_competency_supervisor1A",
|
||||
table: "eva_create_evaluation_detail",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "Final_summary_competency_supervisor2A",
|
||||
table: "eva_create_evaluation_detail",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "Final_summary_supervisor1A",
|
||||
table: "eva_create_evaluation_detail",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "Final_summary_supervisor2A",
|
||||
table: "eva_create_evaluation_detail",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "achievement_supervisor1A",
|
||||
table: "eva_create_evaluation_detail",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "achievement_supervisor2A",
|
||||
table: "eva_create_evaluation_detail",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "competency_supervisor1A",
|
||||
table: "eva_create_evaluation_detail",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "competency_supervisor2A",
|
||||
table: "eva_create_evaluation_detail",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "level_score_supervisor1A",
|
||||
table: "eva_create_evaluation_detail",
|
||||
maxLength: 255,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "level_score_supervisor2A",
|
||||
table: "eva_create_evaluation_detail",
|
||||
maxLength: 255,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "score_supervisor1A",
|
||||
table: "eva_create_evaluation_detail",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "score_supervisor2A",
|
||||
table: "eva_create_evaluation_detail",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "total_summary_competency_supervisor1A",
|
||||
table: "eva_create_evaluation_detail",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "total_summary_competency_supervisor2A",
|
||||
table: "eva_create_evaluation_detail",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "total_summary_supervisor1A",
|
||||
table: "eva_create_evaluation_detail",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "total_summary_supervisor2A",
|
||||
table: "eva_create_evaluation_detail",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "score3",
|
||||
table: "eva_evaluation_behavior");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "score4",
|
||||
table: "eva_evaluation_behavior");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "sumary3",
|
||||
table: "eva_evaluation_behavior");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "sumary4",
|
||||
table: "eva_evaluation_behavior");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "score3",
|
||||
table: "eva_evaluation_achievement");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "score4",
|
||||
table: "eva_evaluation_achievement");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "sumary3",
|
||||
table: "eva_evaluation_achievement");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "sumary4",
|
||||
table: "eva_evaluation_achievement");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Final_summary_competency_supervisor1A",
|
||||
table: "eva_create_evaluation_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Final_summary_competency_supervisor2A",
|
||||
table: "eva_create_evaluation_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Final_summary_supervisor1A",
|
||||
table: "eva_create_evaluation_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Final_summary_supervisor2A",
|
||||
table: "eva_create_evaluation_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "achievement_supervisor1A",
|
||||
table: "eva_create_evaluation_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "achievement_supervisor2A",
|
||||
table: "eva_create_evaluation_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "competency_supervisor1A",
|
||||
table: "eva_create_evaluation_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "competency_supervisor2A",
|
||||
table: "eva_create_evaluation_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "level_score_supervisor1A",
|
||||
table: "eva_create_evaluation_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "level_score_supervisor2A",
|
||||
table: "eva_create_evaluation_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "score_supervisor1A",
|
||||
table: "eva_create_evaluation_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "score_supervisor2A",
|
||||
table: "eva_create_evaluation_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "total_summary_competency_supervisor1A",
|
||||
table: "eva_create_evaluation_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "total_summary_competency_supervisor2A",
|
||||
table: "eva_create_evaluation_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "total_summary_supervisor1A",
|
||||
table: "eva_create_evaluation_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "total_summary_supervisor2A",
|
||||
table: "eva_create_evaluation_detail");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -148,18 +148,34 @@ namespace tb320eva.Migrations
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_supervisor");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_supervisor2A");
|
||||
|
||||
b.Property<decimal?>("Final_summary_supervisor");
|
||||
|
||||
b.Property<decimal?>("Final_summary_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("Final_summary_supervisor2A");
|
||||
|
||||
b.Property<decimal?>("achievement_chief");
|
||||
|
||||
b.Property<decimal?>("achievement_supervisor");
|
||||
|
||||
b.Property<decimal?>("achievement_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("achievement_supervisor2A");
|
||||
|
||||
b.Property<int?>("chief");
|
||||
|
||||
b.Property<decimal?>("competency_chief");
|
||||
|
||||
b.Property<decimal?>("competency_supervisor");
|
||||
|
||||
b.Property<decimal?>("competency_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("competency_supervisor2A");
|
||||
|
||||
b.Property<int?>("create_evaluation_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
@@ -174,10 +190,20 @@ namespace tb320eva.Migrations
|
||||
b.Property<string>("level_score_supervisor")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("level_score_supervisor1A")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("level_score_supervisor2A")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<decimal?>("score_chief");
|
||||
|
||||
b.Property<decimal?>("score_supervisor");
|
||||
|
||||
b.Property<decimal?>("score_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("score_supervisor2A");
|
||||
|
||||
b.Property<string>("status_chief")
|
||||
.HasMaxLength(1);
|
||||
|
||||
@@ -249,8 +275,16 @@ namespace tb320eva.Migrations
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_supervisor");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_supervisor2A");
|
||||
|
||||
b.Property<decimal?>("total_summary_supervisor");
|
||||
|
||||
b.Property<decimal?>("total_summary_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("total_summary_supervisor2A");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
@@ -275,10 +309,18 @@ namespace tb320eva.Migrations
|
||||
|
||||
b.Property<decimal?>("score2");
|
||||
|
||||
b.Property<decimal?>("score3");
|
||||
|
||||
b.Property<decimal?>("score4");
|
||||
|
||||
b.Property<decimal?>("sumary");
|
||||
|
||||
b.Property<decimal?>("sumary2");
|
||||
|
||||
b.Property<decimal?>("sumary3");
|
||||
|
||||
b.Property<decimal?>("sumary4");
|
||||
|
||||
b.Property<string>("target_score1")
|
||||
.HasMaxLength(255);
|
||||
|
||||
@@ -325,10 +367,18 @@ namespace tb320eva.Migrations
|
||||
|
||||
b.Property<decimal?>("score2");
|
||||
|
||||
b.Property<decimal?>("score3");
|
||||
|
||||
b.Property<decimal?>("score4");
|
||||
|
||||
b.Property<decimal?>("sumary");
|
||||
|
||||
b.Property<decimal?>("sumary2");
|
||||
|
||||
b.Property<decimal?>("sumary3");
|
||||
|
||||
b.Property<decimal?>("sumary4");
|
||||
|
||||
b.Property<string>("target_score1")
|
||||
.HasMaxLength(255);
|
||||
|
||||
|
||||
@@ -14,8 +14,6 @@ namespace TodoAPI2.Models
|
||||
{
|
||||
public class eva_create_evaluation_detailEntity : BaseEntity2<int>
|
||||
{
|
||||
|
||||
|
||||
public int? create_evaluation_id { get; set; }
|
||||
|
||||
public int? employee_id { get; set; }
|
||||
@@ -122,5 +120,40 @@ namespace TodoAPI2.Models
|
||||
public DateTime? status_supervisor_click_date { get; set; }
|
||||
public DateTime? status_supervisor1A_click_date { get; set; }
|
||||
public DateTime? status_supervisor2A_click_date { get; set; }
|
||||
|
||||
public decimal? total_summary_supervisor1A { get; set; }
|
||||
|
||||
public decimal? Final_summary_supervisor1A { get; set; }
|
||||
|
||||
public decimal? total_summary_competency_supervisor1A { get; set; }
|
||||
|
||||
public decimal? Final_summary_competency_supervisor1A { get; set; }
|
||||
|
||||
public decimal? achievement_supervisor1A { get; set; }
|
||||
|
||||
public decimal? competency_supervisor1A { get; set; }
|
||||
|
||||
public decimal? score_supervisor1A { get; set; }
|
||||
|
||||
[MaxLength(255)]
|
||||
public string level_score_supervisor1A { get; set; }
|
||||
|
||||
public decimal? total_summary_supervisor2A { get; set; }
|
||||
|
||||
public decimal? Final_summary_supervisor2A { get; set; }
|
||||
|
||||
public decimal? total_summary_competency_supervisor2A { get; set; }
|
||||
|
||||
public decimal? Final_summary_competency_supervisor2A { get; set; }
|
||||
|
||||
public decimal? achievement_supervisor2A { get; set; }
|
||||
|
||||
public decimal? competency_supervisor2A { get; set; }
|
||||
|
||||
public decimal? score_supervisor2A { get; set; }
|
||||
|
||||
[MaxLength(255)]
|
||||
public string level_score_supervisor2A { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace TodoAPI2.Models
|
||||
|
||||
public string level_score_supervisor { get; set; }
|
||||
|
||||
public string who_update { get; set; }
|
||||
|
||||
public string active_mode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,14 +20,14 @@ namespace TodoAPI2.Models
|
||||
public class eva_create_evaluation_detail_summary2Service : Ieva_create_evaluation_detail_summary2Service
|
||||
{
|
||||
private IBaseRepository2<eva_create_evaluation_detailEntity, int> _repository;
|
||||
private IMyDatabase db;
|
||||
private Iexternal_linkageService ext;
|
||||
private IMyDatabase db;
|
||||
private Iexternal_linkageService ext;
|
||||
|
||||
public eva_create_evaluation_detail_summary2Service(IBaseRepository2<eva_create_evaluation_detailEntity, int> repository, IMyDatabase mydb, Iexternal_linkageService inext)
|
||||
{
|
||||
_repository = repository;
|
||||
db = mydb;
|
||||
ext = inext;
|
||||
db = mydb;
|
||||
ext = inext;
|
||||
}
|
||||
|
||||
#region Private Functions
|
||||
@@ -47,7 +47,7 @@ namespace TodoAPI2.Models
|
||||
{
|
||||
return Mapper.Map<List<eva_create_evaluation_detail_summary2ViewModel>>(entities);
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Functions
|
||||
@@ -77,18 +77,18 @@ namespace TodoAPI2.Models
|
||||
|
||||
public List<eva_create_evaluation_detail_summary2ViewModel> GetListBycreate_evaluation_id(int? create_evaluation_id)
|
||||
{
|
||||
var model = new eva_create_evaluation_detail_summary2SearchModel();
|
||||
var model = new eva_create_evaluation_detail_summary2SearchModel();
|
||||
model.create_evaluation_id = create_evaluation_id;
|
||||
return GetListBySearch(model);
|
||||
}
|
||||
|
||||
public List<eva_create_evaluation_detail_summary2ViewModel> GetListBySearch(eva_create_evaluation_detail_summary2SearchModel model)
|
||||
public List<eva_create_evaluation_detail_summary2ViewModel> GetListBySearch(eva_create_evaluation_detail_summary2SearchModel model)
|
||||
{
|
||||
var data = (
|
||||
from m_eva_create_evaluation_detail_summary2 in _repository.Context.eva_create_evaluation_detail
|
||||
|
||||
|
||||
where 1==1
|
||||
where 1 == 1
|
||||
//&& (m_eva_create_evaluation_detail_summary2.id == model.id || !model.id.HasValue)
|
||||
&& (m_eva_create_evaluation_detail_summary2.create_evaluation_id == model.create_evaluation_id || !model.create_evaluation_id.HasValue)
|
||||
|
||||
@@ -98,6 +98,7 @@ namespace TodoAPI2.Models
|
||||
{
|
||||
id = m_eva_create_evaluation_detail_summary2.id,
|
||||
create_evaluation_id = m_eva_create_evaluation_detail_summary2.create_evaluation_id,
|
||||
|
||||
total_summary_supervisor = m_eva_create_evaluation_detail_summary2.total_summary_supervisor,
|
||||
Final_summary_supervisor = m_eva_create_evaluation_detail_summary2.Final_summary_supervisor,
|
||||
total_summary_competency_supervisor = m_eva_create_evaluation_detail_summary2.total_summary_competency_supervisor,
|
||||
@@ -107,6 +108,23 @@ namespace TodoAPI2.Models
|
||||
score_supervisor = m_eva_create_evaluation_detail_summary2.score_supervisor,
|
||||
level_score_supervisor = m_eva_create_evaluation_detail_summary2.level_score_supervisor,
|
||||
|
||||
total_summary_supervisor1A = m_eva_create_evaluation_detail_summary2.total_summary_supervisor1A,
|
||||
Final_summary_supervisor1A = m_eva_create_evaluation_detail_summary2.Final_summary_supervisor1A,
|
||||
total_summary_competency_supervisor1A = m_eva_create_evaluation_detail_summary2.total_summary_competency_supervisor1A,
|
||||
Final_summary_competency_supervisor1A = m_eva_create_evaluation_detail_summary2.Final_summary_competency_supervisor1A,
|
||||
achievement_supervisor1A = m_eva_create_evaluation_detail_summary2.achievement_supervisor1A,
|
||||
competency_supervisor1A = m_eva_create_evaluation_detail_summary2.competency_supervisor1A,
|
||||
score_supervisor1A = m_eva_create_evaluation_detail_summary2.score_supervisor1A,
|
||||
level_score_supervisor1A = m_eva_create_evaluation_detail_summary2.level_score_supervisor1A,
|
||||
|
||||
total_summary_supervisor2A = m_eva_create_evaluation_detail_summary2.total_summary_supervisor2A,
|
||||
Final_summary_supervisor2A = m_eva_create_evaluation_detail_summary2.Final_summary_supervisor2A,
|
||||
total_summary_competency_supervisor2A = m_eva_create_evaluation_detail_summary2.total_summary_competency_supervisor2A,
|
||||
Final_summary_competency_supervisor2A = m_eva_create_evaluation_detail_summary2.Final_summary_competency_supervisor2A,
|
||||
achievement_supervisor2A = m_eva_create_evaluation_detail_summary2.achievement_supervisor2A,
|
||||
competency_supervisor2A = m_eva_create_evaluation_detail_summary2.competency_supervisor2A,
|
||||
score_supervisor2A = m_eva_create_evaluation_detail_summary2.score_supervisor2A,
|
||||
level_score_supervisor2A = m_eva_create_evaluation_detail_summary2.level_score_supervisor2A,
|
||||
|
||||
isActive = m_eva_create_evaluation_detail_summary2.isActive,
|
||||
Created = m_eva_create_evaluation_detail_summary2.created,
|
||||
@@ -126,10 +144,10 @@ namespace TodoAPI2.Models
|
||||
int? newkey = 0;
|
||||
|
||||
var x = (from i in _repository.Context.eva_create_evaluation_detail
|
||||
orderby i.id descending
|
||||
select i).Take(1).ToList();
|
||||
orderby i.id descending
|
||||
select i).Take(1).ToList();
|
||||
|
||||
if(x.Count > 0)
|
||||
if (x.Count > 0)
|
||||
{
|
||||
newkey = x[0].id + 1;
|
||||
}
|
||||
@@ -145,7 +163,7 @@ namespace TodoAPI2.Models
|
||||
|
||||
|
||||
var inserted = _repository.Insert(entity);
|
||||
|
||||
|
||||
return Get(inserted.id);
|
||||
}
|
||||
|
||||
@@ -155,6 +173,7 @@ namespace TodoAPI2.Models
|
||||
if (existingEntity != null)
|
||||
{
|
||||
existingEntity.create_evaluation_id = model.create_evaluation_id;
|
||||
|
||||
existingEntity.total_summary_supervisor = model.total_summary_supervisor;
|
||||
existingEntity.Final_summary_supervisor = model.Final_summary_supervisor;
|
||||
existingEntity.total_summary_competency_supervisor = model.total_summary_competency_supervisor;
|
||||
@@ -169,28 +188,71 @@ namespace TodoAPI2.Models
|
||||
return Get(updated.id);
|
||||
}
|
||||
else
|
||||
throw new NotificationException("No data to update");
|
||||
throw new NotificationException("No data to update");
|
||||
}
|
||||
|
||||
public string UpdateMultiple(List<eva_create_evaluation_detail_summary2InputModel> model)
|
||||
public string UpdateMultiple(List<eva_create_evaluation_detail_summary2InputModel> model)
|
||||
{
|
||||
foreach(var i in model)
|
||||
foreach (var i in model)
|
||||
{
|
||||
if (i.active_mode == "1" && i.id.HasValue) // update
|
||||
{
|
||||
{
|
||||
var existingEntity = _repository.Get(i.id.Value);
|
||||
if (existingEntity != null)
|
||||
{
|
||||
existingEntity.create_evaluation_id = i.create_evaluation_id;
|
||||
existingEntity.total_summary_supervisor = i.total_summary_supervisor;
|
||||
existingEntity.Final_summary_supervisor = i.Final_summary_supervisor;
|
||||
existingEntity.total_summary_competency_supervisor = i.total_summary_competency_supervisor;
|
||||
existingEntity.Final_summary_competency_supervisor = i.Final_summary_competency_supervisor;
|
||||
existingEntity.achievement_supervisor = i.achievement_supervisor;
|
||||
existingEntity.competency_supervisor = i.competency_supervisor;
|
||||
existingEntity.score_supervisor = i.score_supervisor;
|
||||
existingEntity.level_score_supervisor = i.level_score_supervisor;
|
||||
existingEntity.create_evaluation_id = i.create_evaluation_id;
|
||||
|
||||
if(i.who_update == "2")
|
||||
{
|
||||
existingEntity.total_summary_supervisor = i.total_summary_supervisor;
|
||||
existingEntity.Final_summary_supervisor = i.Final_summary_supervisor;
|
||||
existingEntity.total_summary_competency_supervisor = i.total_summary_competency_supervisor;
|
||||
existingEntity.Final_summary_competency_supervisor = i.Final_summary_competency_supervisor;
|
||||
existingEntity.achievement_supervisor = i.achievement_supervisor;
|
||||
existingEntity.competency_supervisor = i.competency_supervisor;
|
||||
existingEntity.score_supervisor = i.score_supervisor;
|
||||
existingEntity.level_score_supervisor = i.level_score_supervisor;
|
||||
|
||||
existingEntity.total_summary_supervisor1A = i.total_summary_supervisor;
|
||||
existingEntity.Final_summary_supervisor1A = i.Final_summary_supervisor;
|
||||
existingEntity.total_summary_competency_supervisor1A = i.total_summary_competency_supervisor;
|
||||
existingEntity.Final_summary_competency_supervisor1A = i.Final_summary_competency_supervisor;
|
||||
existingEntity.achievement_supervisor1A = i.achievement_supervisor;
|
||||
existingEntity.competency_supervisor1A = i.competency_supervisor;
|
||||
existingEntity.score_supervisor1A = i.score_supervisor;
|
||||
existingEntity.level_score_supervisor1A = i.level_score_supervisor;
|
||||
}
|
||||
else if (i.who_update == "3")
|
||||
{
|
||||
existingEntity.total_summary_supervisor1A = i.total_summary_supervisor;
|
||||
existingEntity.Final_summary_supervisor1A = i.Final_summary_supervisor;
|
||||
existingEntity.total_summary_competency_supervisor1A = i.total_summary_competency_supervisor;
|
||||
existingEntity.Final_summary_competency_supervisor1A = i.Final_summary_competency_supervisor;
|
||||
existingEntity.achievement_supervisor1A = i.achievement_supervisor;
|
||||
existingEntity.competency_supervisor1A = i.competency_supervisor;
|
||||
existingEntity.score_supervisor1A = i.score_supervisor;
|
||||
existingEntity.level_score_supervisor1A = i.level_score_supervisor;
|
||||
|
||||
existingEntity.total_summary_supervisor2A = i.total_summary_supervisor;
|
||||
existingEntity.Final_summary_supervisor2A = i.Final_summary_supervisor;
|
||||
existingEntity.total_summary_competency_supervisor2A = i.total_summary_competency_supervisor;
|
||||
existingEntity.Final_summary_competency_supervisor2A = i.Final_summary_competency_supervisor;
|
||||
existingEntity.achievement_supervisor2A = i.achievement_supervisor;
|
||||
existingEntity.competency_supervisor2A = i.competency_supervisor;
|
||||
existingEntity.score_supervisor2A = i.score_supervisor;
|
||||
existingEntity.level_score_supervisor2A = i.level_score_supervisor;
|
||||
}
|
||||
else if (i.who_update == "4")
|
||||
{
|
||||
existingEntity.total_summary_supervisor2A = i.total_summary_supervisor;
|
||||
existingEntity.Final_summary_supervisor2A = i.Final_summary_supervisor;
|
||||
existingEntity.total_summary_competency_supervisor2A = i.total_summary_competency_supervisor;
|
||||
existingEntity.Final_summary_competency_supervisor2A = i.Final_summary_competency_supervisor;
|
||||
existingEntity.achievement_supervisor2A = i.achievement_supervisor;
|
||||
existingEntity.competency_supervisor2A = i.competency_supervisor;
|
||||
existingEntity.score_supervisor2A = i.score_supervisor;
|
||||
existingEntity.level_score_supervisor2A = i.level_score_supervisor;
|
||||
}
|
||||
|
||||
_repository.UpdateWithoutCommit(i.id.Value, existingEntity);
|
||||
}
|
||||
@@ -202,15 +264,15 @@ namespace TodoAPI2.Models
|
||||
_repository.InsertWithoutCommit(entity);
|
||||
}
|
||||
else if (i.active_mode == "0" && i.id.HasValue) // remove
|
||||
{
|
||||
{
|
||||
_repository.DeleteWithoutCommit(i.id.Value);
|
||||
}
|
||||
else if (i.active_mode == "0" && !i.id.HasValue)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
}
|
||||
}
|
||||
_repository.Context.SaveChanges();
|
||||
_repository.Context.SaveChanges();
|
||||
|
||||
return model.Count().ToString();
|
||||
}
|
||||
|
||||
@@ -32,6 +32,36 @@ namespace TodoAPI2.Models
|
||||
|
||||
public string level_score_supervisor { get; set; }
|
||||
|
||||
public decimal? total_summary_supervisor1A { get; set; }
|
||||
|
||||
public decimal? Final_summary_supervisor1A { get; set; }
|
||||
|
||||
public decimal? total_summary_competency_supervisor1A { get; set; }
|
||||
|
||||
public decimal? Final_summary_competency_supervisor1A { get; set; }
|
||||
|
||||
public decimal? achievement_supervisor1A { get; set; }
|
||||
|
||||
public decimal? competency_supervisor1A { get; set; }
|
||||
|
||||
public decimal? score_supervisor1A { get; set; }
|
||||
|
||||
public string level_score_supervisor1A { get; set; }
|
||||
|
||||
public decimal? total_summary_supervisor2A { get; set; }
|
||||
|
||||
public decimal? Final_summary_supervisor2A { get; set; }
|
||||
|
||||
public decimal? total_summary_competency_supervisor2A { get; set; }
|
||||
|
||||
public decimal? Final_summary_competency_supervisor2A { get; set; }
|
||||
|
||||
public decimal? achievement_supervisor2A { get; set; }
|
||||
|
||||
public decimal? competency_supervisor2A { get; set; }
|
||||
|
||||
public decimal? score_supervisor2A { get; set; }
|
||||
|
||||
public string level_score_supervisor2A { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -39,11 +39,13 @@ namespace TodoAPI2.Models
|
||||
}
|
||||
|
||||
public decimal? score { get; set; }
|
||||
|
||||
public decimal? sumary { get; set; }
|
||||
public decimal? score2 { get; set; }
|
||||
|
||||
public decimal? sumary2 { get; set; }
|
||||
public decimal? score3 { get; set; }
|
||||
public decimal? sumary3 { get; set; }
|
||||
public decimal? score4 { get; set; }
|
||||
public decimal? sumary4 { get; set; }
|
||||
|
||||
[MaxLength(255)]
|
||||
public string target_score1 { get; set; }
|
||||
|
||||
@@ -40,6 +40,8 @@ namespace TodoAPI2.Models
|
||||
|
||||
public string target_score5 { get; set; }
|
||||
|
||||
public string who_update { get; set; }
|
||||
|
||||
public string active_mode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,10 +106,16 @@ namespace TodoAPI2.Models
|
||||
weight = m_eva_evaluation_achievement_process2.weight,
|
||||
thefile = m_eva_evaluation_achievement_process2.thefile,
|
||||
thefileDisplay = m_eva_evaluation_achievement_process2.thefileDisplay,
|
||||
|
||||
score = m_eva_evaluation_achievement_process2.score,
|
||||
sumary = m_eva_evaluation_achievement_process2.sumary,
|
||||
score2 = m_eva_evaluation_achievement_process2.score2,
|
||||
sumary2 = m_eva_evaluation_achievement_process2.sumary2,
|
||||
score3 = m_eva_evaluation_achievement_process2.score3,
|
||||
sumary3 = m_eva_evaluation_achievement_process2.sumary3,
|
||||
score4 = m_eva_evaluation_achievement_process2.score4,
|
||||
sumary4 = m_eva_evaluation_achievement_process2.sumary4,
|
||||
|
||||
target_score1 = m_eva_evaluation_achievement_process2.target_score1,
|
||||
target_score2 = m_eva_evaluation_achievement_process2.target_score2,
|
||||
target_score3 = m_eva_evaluation_achievement_process2.target_score3,
|
||||
@@ -220,10 +226,10 @@ namespace TodoAPI2.Models
|
||||
where k.id == existingEntity.create_evaluation_detail_id
|
||||
select k).FirstOrDefault();
|
||||
|
||||
if (current_detail.status_supervisor == "Y")
|
||||
{
|
||||
throw new Exception("ผู้ประเมินสูงสุด ส่งแบบประเมินไปแล้ว บันทึกไม่ได้");
|
||||
}
|
||||
//if (current_detail.status_supervisor == "Y")
|
||||
//{
|
||||
// throw new Exception("ผู้ประเมินสูงสุด ส่งแบบประเมินไปแล้ว บันทึกไม่ได้");
|
||||
//}
|
||||
|
||||
if (existingEntity != null)
|
||||
{
|
||||
@@ -249,8 +255,27 @@ namespace TodoAPI2.Models
|
||||
}
|
||||
|
||||
//existingEntity.score = i.score;
|
||||
existingEntity.score2 = i.score2;
|
||||
existingEntity.sumary2 = i.sumary2;
|
||||
|
||||
if (i.who_update == "2")
|
||||
{
|
||||
existingEntity.score2 = i.score2;
|
||||
existingEntity.sumary2 = i.sumary2;
|
||||
existingEntity.score3 = i.score2;
|
||||
existingEntity.sumary3 = i.sumary2;
|
||||
}
|
||||
else if (i.who_update == "3")
|
||||
{
|
||||
existingEntity.score3 = i.score2;
|
||||
existingEntity.sumary3 = i.sumary2;
|
||||
existingEntity.score4 = i.score2;
|
||||
existingEntity.sumary4 = i.sumary2;
|
||||
}
|
||||
else if (i.who_update == "4")
|
||||
{
|
||||
existingEntity.score4 = i.score2;
|
||||
existingEntity.sumary4 = i.sumary2;
|
||||
}
|
||||
|
||||
//existingEntity.target_score1 = i.target_score1;
|
||||
//existingEntity.target_score2 = i.target_score2;
|
||||
//existingEntity.target_score3 = i.target_score3;
|
||||
|
||||
@@ -39,6 +39,12 @@ namespace TodoAPI2.Models
|
||||
public decimal? score2 { get; set; }
|
||||
|
||||
public decimal? sumary2 { get; set; }
|
||||
public decimal? score3 { get; set; }
|
||||
|
||||
public decimal? sumary3 { get; set; }
|
||||
public decimal? score4 { get; set; }
|
||||
|
||||
public decimal? sumary4 { get; set; }
|
||||
|
||||
public string target_score1 { get; set; }
|
||||
|
||||
|
||||
@@ -26,11 +26,13 @@ namespace TodoAPI2.Models
|
||||
public decimal? weight { get; set; }
|
||||
|
||||
public decimal? score { get; set; }
|
||||
|
||||
public decimal? sumary { get; set; }
|
||||
public decimal? score2 { get; set; }
|
||||
|
||||
public decimal? sumary2 { get; set; }
|
||||
public decimal? score3 { get; set; }
|
||||
public decimal? sumary3 { get; set; }
|
||||
public decimal? score4 { get; set; }
|
||||
public decimal? sumary4 { get; set; }
|
||||
|
||||
[MaxLength(255)]
|
||||
public string target_score1 { get; set; }
|
||||
|
||||
@@ -38,6 +38,8 @@ namespace TodoAPI2.Models
|
||||
|
||||
public string target_score5 { get; set; }
|
||||
|
||||
public string who_update { get; set; }
|
||||
|
||||
public string active_mode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,10 +104,16 @@ namespace TodoAPI2.Models
|
||||
create_evaluation_detail_id = m_eva_evaluation_behavior_process2.create_evaluation_detail_id,
|
||||
behavior = m_eva_evaluation_behavior_process2.behavior_fix,
|
||||
weight = m_eva_evaluation_behavior_process2.weight,
|
||||
|
||||
score = m_eva_evaluation_behavior_process2.score,
|
||||
sumary = m_eva_evaluation_behavior_process2.sumary,
|
||||
score2 = m_eva_evaluation_behavior_process2.score2,
|
||||
sumary2 = m_eva_evaluation_behavior_process2.sumary2,
|
||||
score3 = m_eva_evaluation_behavior_process2.score3,
|
||||
sumary3 = m_eva_evaluation_behavior_process2.sumary3,
|
||||
score4 = m_eva_evaluation_behavior_process2.score4,
|
||||
sumary4 = m_eva_evaluation_behavior_process2.sumary4,
|
||||
|
||||
target_score1 = m_eva_evaluation_behavior_process2.target_score1,
|
||||
target_score2 = m_eva_evaluation_behavior_process2.target_score2,
|
||||
target_score3 = m_eva_evaluation_behavior_process2.target_score3,
|
||||
@@ -195,17 +201,36 @@ namespace TodoAPI2.Models
|
||||
where k.id == existingEntity.create_evaluation_detail_id
|
||||
select k).FirstOrDefault();
|
||||
|
||||
if (current_detail.status_supervisor == "Y")
|
||||
{
|
||||
throw new Exception("ผู้ประเมินสูงสุด ส่งแบบประเมินไปแล้ว บันทึกไม่ได้");
|
||||
}
|
||||
//if (current_detail.status_supervisor == "Y")
|
||||
//{
|
||||
// throw new Exception("ผู้ประเมินสูงสุด ส่งแบบประเมินไปแล้ว บันทึกไม่ได้");
|
||||
//}
|
||||
|
||||
//existingEntity.create_evaluation_detail_id = i.create_evaluation_detail_id;
|
||||
//existingEntity.behavior = i.behavior;
|
||||
existingEntity.weight = i.weight;
|
||||
//existingEntity.score = i.score;
|
||||
existingEntity.score2 = i.score2;
|
||||
existingEntity.sumary2 = i.sumary2;
|
||||
|
||||
if (i.who_update == "2")
|
||||
{
|
||||
existingEntity.score2 = i.score2;
|
||||
existingEntity.sumary2 = i.sumary2;
|
||||
existingEntity.score3 = i.score2;
|
||||
existingEntity.sumary3 = i.sumary2;
|
||||
}
|
||||
else if (i.who_update == "3")
|
||||
{
|
||||
existingEntity.score3 = i.score2;
|
||||
existingEntity.sumary3 = i.sumary2;
|
||||
existingEntity.score4 = i.score2;
|
||||
existingEntity.sumary4 = i.sumary2;
|
||||
}
|
||||
else if (i.who_update == "4")
|
||||
{
|
||||
existingEntity.score4 = i.score2;
|
||||
existingEntity.sumary4 = i.sumary2;
|
||||
}
|
||||
|
||||
existingEntity.target_score1 = i.target_score1;
|
||||
existingEntity.target_score2 = i.target_score2;
|
||||
existingEntity.target_score3 = i.target_score3;
|
||||
|
||||
@@ -28,6 +28,14 @@ namespace TodoAPI2.Models
|
||||
|
||||
public decimal? sumary2 { get; set; }
|
||||
|
||||
public decimal? score3 { get; set; }
|
||||
|
||||
public decimal? sumary3 { get; set; }
|
||||
|
||||
public decimal? score4 { get; set; }
|
||||
|
||||
public decimal? sumary4 { get; set; }
|
||||
|
||||
public string target_score1 { get; set; }
|
||||
|
||||
public string target_score2 { get; set; }
|
||||
|
||||
@@ -592,9 +592,7 @@
|
||||
var id = getUrlParameter("id");
|
||||
if (id) {
|
||||
eva_create_evaluation_detail_process_SetEditForm(id);
|
||||
eva_evaluation_achievement_process2_InitialForm(id);
|
||||
eva_evaluation_behavior_process2_InitialForm(id);
|
||||
eva_create_evaluation_detail_summary2_SetEditForm(id);
|
||||
|
||||
eva_create_evaluation_detail_review01_SetEditForm(id);
|
||||
eva_create_evaluation_detail_review02_SetEditForm(id);
|
||||
eva_create_evaluation_detail_review03_SetEditForm(id);
|
||||
@@ -655,7 +653,7 @@
|
||||
searchVacationObject.start_date = formatDateForGetParameter(getDate($("#date_from").val()));
|
||||
searchVacationObject.end_date = formatDateForGetParameter(getDate($("#date_to").val()));
|
||||
searchVacationObject.employee_id = $("#eva_create_evaluation_detail_process_employee_id").val();
|
||||
console.log(searchVacationObject);
|
||||
//console.log(searchVacationObject);
|
||||
return searchVacationObject;
|
||||
}
|
||||
|
||||
@@ -705,13 +703,17 @@
|
||||
}
|
||||
|
||||
function saveReview03(){
|
||||
//saveAll();
|
||||
eva_create_evaluation_detail_review03_PutUpdate(true);
|
||||
saveAll();
|
||||
setTimeout(function() {
|
||||
eva_create_evaluation_detail_review03_PutUpdate(true);
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
function saveReview04(){
|
||||
//saveAll();
|
||||
eva_create_evaluation_detail_review04_PutUpdate(true);
|
||||
saveAll();
|
||||
setTimeout(function() {
|
||||
eva_create_evaluation_detail_review04_PutUpdate(true);
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
function saveStatus(s){
|
||||
@@ -721,7 +723,8 @@
|
||||
return;
|
||||
}
|
||||
saveAll();
|
||||
setTimeout(function() {
|
||||
eva_create_evaluation_detail_review02_PutUpdate(false);
|
||||
setTimeout(function() {
|
||||
eva_create_evaluation_detail_status_PutUpdate(s);
|
||||
}, 1000);
|
||||
}
|
||||
@@ -730,16 +733,22 @@
|
||||
{
|
||||
return;
|
||||
}
|
||||
saveAll();
|
||||
eva_create_evaluation_detail_review03_PutUpdate(false);
|
||||
eva_create_evaluation_detail_status_PutUpdate(s);
|
||||
setTimeout(function() {
|
||||
eva_create_evaluation_detail_status_PutUpdate(s);
|
||||
}, 1000);
|
||||
}
|
||||
else if(s === "next4"){
|
||||
if (!ValidateForm('eva_create_evaluation_detail_review04', eva_create_evaluation_detail_review04_customValidation))
|
||||
{
|
||||
return;
|
||||
}
|
||||
saveAll();
|
||||
eva_create_evaluation_detail_review04_PutUpdate(false);
|
||||
eva_create_evaluation_detail_status_PutUpdate(s);
|
||||
setTimeout(function() {
|
||||
eva_create_evaluation_detail_status_PutUpdate(s);
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,20 +63,20 @@ $("#w3").text((data.create_evaluation_score1+data.create_evaluation_score2).toFi
|
||||
|
||||
function eva_create_evaluation_detail_process_GetFromForm() {
|
||||
var eva_create_evaluation_detail_processObject = new Object();
|
||||
eva_create_evaluation_detail_processObject.id = $("#eva_create_evaluation_detail_process_id").val();
|
||||
eva_create_evaluation_detail_processObject.evaluation_round = $("#eva_create_evaluation_detail_process_evaluation_round").text();
|
||||
eva_create_evaluation_detail_processObject.employee_code = $("#eva_create_evaluation_detail_process_employee_code").text();
|
||||
eva_create_evaluation_detail_processObject.employee_fullname = $("#eva_create_evaluation_detail_process_employee_fullname").text();
|
||||
eva_create_evaluation_detail_processObject.employee_position = $("#eva_create_evaluation_detail_process_employee_position").text();
|
||||
eva_create_evaluation_detail_processObject.employee_position_type = $("#eva_create_evaluation_detail_process_employee_position_type").text();
|
||||
eva_create_evaluation_detail_processObject.employee_position_level = $("#eva_create_evaluation_detail_process_employee_position_level").text();
|
||||
eva_create_evaluation_detail_processObject.employee_org = $("#eva_create_evaluation_detail_process_employee_org").text();
|
||||
eva_create_evaluation_detail_processObject.chief_fullname = $("#eva_create_evaluation_detail_process_chief_fullname").text();
|
||||
eva_create_evaluation_detail_processObject.chief_position = $("#eva_create_evaluation_detail_process_chief_position").text();
|
||||
eva_create_evaluation_detail_processObject.create_evaluation_id = $("#eva_create_evaluation_detail_process_create_evaluation_id").val();
|
||||
eva_create_evaluation_detail_processObject.org_id = $("#eva_create_evaluation_detail_process_org_id").val();
|
||||
eva_create_evaluation_detail_processObject.search_employee_code = $("#eva_create_evaluation_detail_process_search_employee_code").val();
|
||||
eva_create_evaluation_detail_processObject.search_employee_fullname = $("#eva_create_evaluation_detail_process_search_employee_fullname").val();
|
||||
eva_create_evaluation_detail_processObject.id = $("#eva_create_evaluation_detail_process_id").val();
|
||||
eva_create_evaluation_detail_processObject.evaluation_round = $("#eva_create_evaluation_detail_process_evaluation_round").text();
|
||||
eva_create_evaluation_detail_processObject.employee_code = $("#eva_create_evaluation_detail_process_employee_code").text();
|
||||
eva_create_evaluation_detail_processObject.employee_fullname = $("#eva_create_evaluation_detail_process_employee_fullname").text();
|
||||
eva_create_evaluation_detail_processObject.employee_position = $("#eva_create_evaluation_detail_process_employee_position").text();
|
||||
eva_create_evaluation_detail_processObject.employee_position_type = $("#eva_create_evaluation_detail_process_employee_position_type").text();
|
||||
eva_create_evaluation_detail_processObject.employee_position_level = $("#eva_create_evaluation_detail_process_employee_position_level").text();
|
||||
eva_create_evaluation_detail_processObject.employee_org = $("#eva_create_evaluation_detail_process_employee_org").text();
|
||||
eva_create_evaluation_detail_processObject.chief_fullname = $("#eva_create_evaluation_detail_process_chief_fullname").text();
|
||||
eva_create_evaluation_detail_processObject.chief_position = $("#eva_create_evaluation_detail_process_chief_position").text();
|
||||
eva_create_evaluation_detail_processObject.create_evaluation_id = $("#eva_create_evaluation_detail_process_create_evaluation_id").val();
|
||||
eva_create_evaluation_detail_processObject.org_id = $("#eva_create_evaluation_detail_process_org_id").val();
|
||||
eva_create_evaluation_detail_processObject.search_employee_code = $("#eva_create_evaluation_detail_process_search_employee_code").val();
|
||||
eva_create_evaluation_detail_processObject.search_employee_fullname = $("#eva_create_evaluation_detail_process_search_employee_fullname").val();
|
||||
|
||||
|
||||
return eva_create_evaluation_detail_processObject;
|
||||
@@ -96,9 +96,16 @@ function eva_create_evaluation_detail_process_InitialForm() {
|
||||
function eva_create_evaluation_detail_process_SetEditForm(a) {
|
||||
var successFunc = function (result) {
|
||||
eva_create_evaluation_detail_process_editMode = "UPDATE";
|
||||
eva_create_evaluation_detail_process_FeedDataToForm(result);
|
||||
setPageByRoleAndStatus(result.role_code, result.status_self, result.status_chief, result.status_supervisor, result.status_supervisor1A, result.status_supervisor2A);
|
||||
endLoad();
|
||||
eva_create_evaluation_detail_process_FeedDataToForm(result);
|
||||
|
||||
//startLoad();
|
||||
eva_evaluation_achievement_process2_InitialForm(a, result.role_code);
|
||||
eva_evaluation_behavior_process2_InitialForm(a, result.role_code);
|
||||
eva_create_evaluation_detail_summary2_SetEditForm(a, result.role_code);
|
||||
|
||||
setTimeout(function(){
|
||||
setPageByRoleAndStatus(result.role_code, result.status_self, result.status_chief, result.status_supervisor, result.status_supervisor1A, result.status_supervisor2A);
|
||||
},1000);
|
||||
};
|
||||
startLoad();
|
||||
|
||||
@@ -177,7 +184,11 @@ function setViewOfComment(status_supervisor, status_supervisor1A, status_supervi
|
||||
}
|
||||
}
|
||||
|
||||
var the_role_code = "";
|
||||
|
||||
function setPageByRoleAndStatus(role_code, status_self, status_chief, status_supervisor, status_supervisor1A, status_supervisor2A){
|
||||
endLoad();
|
||||
the_role_code = role_code;
|
||||
|
||||
$(".myeditor").attr("disabled", true);
|
||||
$("#btnb01").hide();
|
||||
@@ -241,6 +252,7 @@ function setPageByRoleAndStatus(role_code, status_self, status_chief, status_sup
|
||||
$("#btnc01").show();
|
||||
$("#btnc02").show();
|
||||
//$("#btnc03").show();
|
||||
$(".myeditor").attr("disabled", false);
|
||||
}else{
|
||||
$("#thestatus1A").text("(ผู้รับการประเมิน หรือ ผู้ประเมิน หรือ ผู้ประเมินสูงสุด ยังไม่ส่งแบบประเมิน คุณจึงไม่สามารถให้ความเห็นได้)");
|
||||
}
|
||||
@@ -253,6 +265,7 @@ function setPageByRoleAndStatus(role_code, status_self, status_chief, status_sup
|
||||
$("#btnc02").hide();
|
||||
$("#btnc03").hide();
|
||||
$("#thestatus1A").text("(ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง ส่งแบบประเมินแล้ว)");
|
||||
$(".myeditor").attr("disabled", true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,6 +280,7 @@ function setPageByRoleAndStatus(role_code, status_self, status_chief, status_sup
|
||||
$("#btnd01").show();
|
||||
$("#btnd02").show();
|
||||
//$("#btnd03").show();
|
||||
$(".myeditor").attr("disabled", false);
|
||||
}else{
|
||||
$("#thestatus2A").text("(ผู้รับการประเมิน หรือ ผู้ประเมิน หรือ ผู้ประเมินสูงสุด หรือ ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง ยังไม่ส่งแบบประเมิน คุณจึงไม่สามารถให้ความเห็นได้)");
|
||||
}
|
||||
@@ -278,11 +292,13 @@ function setPageByRoleAndStatus(role_code, status_self, status_chief, status_sup
|
||||
$("#btnd02").hide();
|
||||
$("#btnd03").hide();
|
||||
$("#thestatus2A").text("(ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด) ส่งแบบประเมินแล้ว)");
|
||||
$(".myeditor").attr("disabled", true);
|
||||
}
|
||||
}
|
||||
else {
|
||||
alert('คุณไม่มีสิทธิเข้าถึงหน้าจอนี้!');
|
||||
window_close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -3,33 +3,56 @@ var eva_create_evaluation_detail_summary2_API = "/api/eva_create_evaluation_deta
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function eva_create_evaluation_detail_summary2_FeedDataToForm(data) {
|
||||
$("#eva_create_evaluation_detail_summary2_id").val(data.id);
|
||||
$("#eva_create_evaluation_detail_summary2_create_evaluation_id").val(data.create_evaluation_id);
|
||||
$("#eva_create_evaluation_detail_summary2_total_summary_supervisor").text(data.total_summary_supervisor);
|
||||
$("#eva_create_evaluation_detail_summary2_Final_summary_supervisor").text(data.Final_summary_supervisor);
|
||||
$("#eva_create_evaluation_detail_summary2_total_summary_competency_supervisor").text(data.total_summary_competency_supervisor);
|
||||
$("#eva_create_evaluation_detail_summary2_Final_summary_competency_supervisor").text(data.Final_summary_competency_supervisor);
|
||||
$("#eva_create_evaluation_detail_summary2_achievement_supervisor").text(data.achievement_supervisor);
|
||||
$("#eva_create_evaluation_detail_summary2_competency_supervisor").text(data.competency_supervisor);
|
||||
$("#eva_create_evaluation_detail_summary2_score_supervisor").text(data.score_supervisor);
|
||||
$("#eva_create_evaluation_detail_summary2_level_score_supervisor").text(data.level_score_supervisor);
|
||||
console.log(data);
|
||||
function eva_create_evaluation_detail_summary2_FeedDataToForm(data, role_code) {
|
||||
$("#eva_create_evaluation_detail_summary2_id").val(data.id);
|
||||
$("#eva_create_evaluation_detail_summary2_create_evaluation_id").val(data.create_evaluation_id);
|
||||
|
||||
if(role_code === "2"){
|
||||
$("#eva_create_evaluation_detail_summary2_total_summary_supervisor").text(data.total_summary_supervisor);
|
||||
$("#eva_create_evaluation_detail_summary2_Final_summary_supervisor").text(data.Final_summary_supervisor);
|
||||
$("#eva_create_evaluation_detail_summary2_total_summary_competency_supervisor").text(data.total_summary_competency_supervisor);
|
||||
$("#eva_create_evaluation_detail_summary2_Final_summary_competency_supervisor").text(data.Final_summary_competency_supervisor);
|
||||
$("#eva_create_evaluation_detail_summary2_achievement_supervisor").text(data.achievement_supervisor);
|
||||
$("#eva_create_evaluation_detail_summary2_competency_supervisor").text(data.competency_supervisor);
|
||||
$("#eva_create_evaluation_detail_summary2_score_supervisor").text(data.score_supervisor);
|
||||
$("#eva_create_evaluation_detail_summary2_level_score_supervisor").text(data.level_score_supervisor);
|
||||
}
|
||||
else if(role_code === "3"){
|
||||
$("#eva_create_evaluation_detail_summary2_total_summary_supervisor").text(data.total_summary_supervisor1A);
|
||||
$("#eva_create_evaluation_detail_summary2_Final_summary_supervisor").text(data.Final_summary_supervisor1A);
|
||||
$("#eva_create_evaluation_detail_summary2_total_summary_competency_supervisor").text(data.total_summary_competency_supervisor1A);
|
||||
$("#eva_create_evaluation_detail_summary2_Final_summary_competency_supervisor").text(data.Final_summary_competency_supervisor1A);
|
||||
$("#eva_create_evaluation_detail_summary2_achievement_supervisor").text(data.achievement_supervisor1A);
|
||||
$("#eva_create_evaluation_detail_summary2_competency_supervisor").text(data.competency_supervisor1A);
|
||||
$("#eva_create_evaluation_detail_summary2_score_supervisor").text(data.score_supervisor1A);
|
||||
$("#eva_create_evaluation_detail_summary2_level_score_supervisor").text(data.level_score_supervisor1A);
|
||||
}
|
||||
else if(role_code === "4"){
|
||||
$("#eva_create_evaluation_detail_summary2_total_summary_supervisor").text(data.total_summary_supervisor2A);
|
||||
$("#eva_create_evaluation_detail_summary2_Final_summary_supervisor").text(data.Final_summary_supervisor2A);
|
||||
$("#eva_create_evaluation_detail_summary2_total_summary_competency_supervisor").text(data.total_summary_competency_supervisor2A);
|
||||
$("#eva_create_evaluation_detail_summary2_Final_summary_competency_supervisor").text(data.Final_summary_competency_supervisor2A);
|
||||
$("#eva_create_evaluation_detail_summary2_achievement_supervisor").text(data.achievement_supervisor2A);
|
||||
$("#eva_create_evaluation_detail_summary2_competency_supervisor").text(data.competency_supervisor2A);
|
||||
$("#eva_create_evaluation_detail_summary2_score_supervisor").text(data.score_supervisor2A);
|
||||
$("#eva_create_evaluation_detail_summary2_level_score_supervisor").text(data.level_score_supervisor2A);
|
||||
}
|
||||
}
|
||||
|
||||
function eva_create_evaluation_detail_summary2_GetFromForm() {
|
||||
var eva_create_evaluation_detail_summary2Object = new Object();
|
||||
eva_create_evaluation_detail_summary2Object.id = $("#eva_create_evaluation_detail_summary2_id").val();
|
||||
eva_create_evaluation_detail_summary2Object.create_evaluation_id = $("#eva_create_evaluation_detail_summary2_create_evaluation_id").val();
|
||||
eva_create_evaluation_detail_summary2Object.total_summary_supervisor = $("#eva_create_evaluation_detail_summary2_total_summary_supervisor").text();
|
||||
eva_create_evaluation_detail_summary2Object.Final_summary_supervisor = $("#eva_create_evaluation_detail_summary2_Final_summary_supervisor").text();
|
||||
eva_create_evaluation_detail_summary2Object.total_summary_competency_supervisor = $("#eva_create_evaluation_detail_summary2_total_summary_competency_supervisor").text();
|
||||
eva_create_evaluation_detail_summary2Object.Final_summary_competency_supervisor = $("#eva_create_evaluation_detail_summary2_Final_summary_competency_supervisor").text();
|
||||
eva_create_evaluation_detail_summary2Object.achievement_supervisor = $("#eva_create_evaluation_detail_summary2_achievement_supervisor").text();
|
||||
eva_create_evaluation_detail_summary2Object.competency_supervisor = $("#eva_create_evaluation_detail_summary2_competency_supervisor").text();
|
||||
eva_create_evaluation_detail_summary2Object.score_supervisor = $("#eva_create_evaluation_detail_summary2_score_supervisor").text();
|
||||
eva_create_evaluation_detail_summary2Object.level_score_supervisor = $("#eva_create_evaluation_detail_summary2_level_score_supervisor").text();
|
||||
eva_create_evaluation_detail_summary2Object.id = $("#eva_create_evaluation_detail_summary2_id").val();
|
||||
eva_create_evaluation_detail_summary2Object.create_evaluation_id = $("#eva_create_evaluation_detail_summary2_create_evaluation_id").val();
|
||||
eva_create_evaluation_detail_summary2Object.total_summary_supervisor = $("#eva_create_evaluation_detail_summary2_total_summary_supervisor").text();
|
||||
eva_create_evaluation_detail_summary2Object.Final_summary_supervisor = $("#eva_create_evaluation_detail_summary2_Final_summary_supervisor").text();
|
||||
eva_create_evaluation_detail_summary2Object.total_summary_competency_supervisor = $("#eva_create_evaluation_detail_summary2_total_summary_competency_supervisor").text();
|
||||
eva_create_evaluation_detail_summary2Object.Final_summary_competency_supervisor = $("#eva_create_evaluation_detail_summary2_Final_summary_competency_supervisor").text();
|
||||
eva_create_evaluation_detail_summary2Object.achievement_supervisor = $("#eva_create_evaluation_detail_summary2_achievement_supervisor").text();
|
||||
eva_create_evaluation_detail_summary2Object.competency_supervisor = $("#eva_create_evaluation_detail_summary2_competency_supervisor").text();
|
||||
eva_create_evaluation_detail_summary2Object.score_supervisor = $("#eva_create_evaluation_detail_summary2_score_supervisor").text();
|
||||
eva_create_evaluation_detail_summary2Object.level_score_supervisor = $("#eva_create_evaluation_detail_summary2_level_score_supervisor").text();
|
||||
|
||||
eva_create_evaluation_detail_summary2Object.who_update = the_role_code;
|
||||
|
||||
return eva_create_evaluation_detail_summary2Object;
|
||||
}
|
||||
@@ -45,10 +68,10 @@ function eva_create_evaluation_detail_summary2_InitialForm() {
|
||||
|
||||
//================= Form Mode Setup and Flow =========================================
|
||||
|
||||
function eva_create_evaluation_detail_summary2_SetEditForm(a) {
|
||||
function eva_create_evaluation_detail_summary2_SetEditForm(a, role_code) {
|
||||
var successFunc = function (result) {
|
||||
eva_create_evaluation_detail_summary2_editMode = "UPDATE";
|
||||
eva_create_evaluation_detail_summary2_FeedDataToForm(result);
|
||||
eva_create_evaluation_detail_summary2_FeedDataToForm(result, role_code);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
|
||||
@@ -1,55 +1,73 @@
|
||||
function eva_evaluation_achievement_process2_ClearForm(i, blankItem) {
|
||||
var data = blankItem;
|
||||
$("#eva_evaluation_achievement_process2_id_" + i).val("");
|
||||
$("#eva_evaluation_achievement_process2_create_evaluation_detail_id_" + i).val("");
|
||||
$("#eva_evaluation_achievement_process2_achievement_" + i).text("");
|
||||
$("#eva_evaluation_achievement_process2_weight_" + i).text("");
|
||||
|
||||
$("#eva_evaluation_achievement_process2_score_" + i).text("");
|
||||
$("#eva_evaluation_achievement_process2_score2_" + i).val("");
|
||||
$("#eva_evaluation_achievement_process2_sumary2_" + i).text("");
|
||||
//$("#eva_evaluation_achievement_process2_target_score1_" + i).val("");
|
||||
//$("#eva_evaluation_achievement_process2_target_score2_" + i).val("");
|
||||
//$("#eva_evaluation_achievement_process2_target_score3_" + i).val("");
|
||||
//$("#eva_evaluation_achievement_process2_target_score4_" + i).val("");
|
||||
//$("#eva_evaluation_achievement_process2_target_score5_" + i).val("");
|
||||
$("#eva_evaluation_achievement_process2_id_" + i).val("");
|
||||
$("#eva_evaluation_achievement_process2_create_evaluation_detail_id_" + i).val("");
|
||||
$("#eva_evaluation_achievement_process2_achievement_" + i).text("");
|
||||
$("#eva_evaluation_achievement_process2_weight_" + i).text("");
|
||||
|
||||
$("#eva_evaluation_achievement_process2_score_" + i).text("");
|
||||
$("#eva_evaluation_achievement_process2_score2_" + i).val("");
|
||||
$("#eva_evaluation_achievement_process2_sumary2_" + i).text("");
|
||||
//$("#eva_evaluation_achievement_process2_target_score1_" + i).val("");
|
||||
//$("#eva_evaluation_achievement_process2_target_score2_" + i).val("");
|
||||
//$("#eva_evaluation_achievement_process2_target_score3_" + i).val("");
|
||||
//$("#eva_evaluation_achievement_process2_target_score4_" + i).val("");
|
||||
//$("#eva_evaluation_achievement_process2_target_score5_" + i).val("");
|
||||
}
|
||||
|
||||
function eva_evaluation_achievement_process2_FeedDataToForm(data, i, blankItem) {
|
||||
function eva_evaluation_achievement_process2_FeedDataToForm(data, i, blankItem, role_code) {
|
||||
|
||||
$("#eva_evaluation_achievement_process2_id_" + i).val(data.id);
|
||||
$("#eva_evaluation_achievement_process2_create_evaluation_detail_id_" + i).val(data.create_evaluation_detail_id);
|
||||
$("#eva_evaluation_achievement_process2_achievement_" + i).text(data.achievement);
|
||||
$("#eva_evaluation_achievement_process2_weight_" + i).text(data.weight);
|
||||
$("#eva_evaluation_achievement_process2_id_" + i).val(data.id);
|
||||
$("#eva_evaluation_achievement_process2_create_evaluation_detail_id_" + i).val(data.create_evaluation_detail_id);
|
||||
$("#eva_evaluation_achievement_process2_achievement_" + i).text(data.achievement);
|
||||
$("#eva_evaluation_achievement_process2_weight_" + i).text(data.weight);
|
||||
|
||||
//console.log(data);
|
||||
|
||||
$("#eva_evaluation_achievement_process2_score_" + i).text(data.score);
|
||||
$("#eva_evaluation_achievement_process2_sumary_" + i).text(data.sumary);
|
||||
$("#eva_evaluation_achievement_process2_score2_" + i).val(data.score2);
|
||||
$("#eva_evaluation_achievement_process2_sumary2_" + i).text(data.sumary2);
|
||||
//$("#eva_evaluation_achievement_process2_target_score1_" + i).val(data.target_score1);
|
||||
//$("#eva_evaluation_achievement_process2_target_score2_" + i).val(data.target_score2);
|
||||
//$("#eva_evaluation_achievement_process2_target_score3_" + i).val(data.target_score3);
|
||||
//$("#eva_evaluation_achievement_process2_target_score4_" + i).val(data.target_score4);
|
||||
//$("#eva_evaluation_achievement_process2_target_score5_" + i).val(data.target_score5);
|
||||
if(role_code === "2"){
|
||||
$("#eva_evaluation_achievement_process2_score_" + i).text(data.score);
|
||||
$("#eva_evaluation_achievement_process2_sumary_" + i).text(data.sumary);
|
||||
$("#eva_evaluation_achievement_process2_score2_" + i).val(data.score2);
|
||||
$("#eva_evaluation_achievement_process2_sumary2_" + i).text(data.sumary2);
|
||||
}
|
||||
else if(role_code === "3"){
|
||||
$("#eva_evaluation_achievement_process2_score_" + i).text(data.score2);
|
||||
$("#eva_evaluation_achievement_process2_sumary_" + i).text(data.sumary2);
|
||||
$("#eva_evaluation_achievement_process2_score2_" + i).val(data.score3);
|
||||
$("#eva_evaluation_achievement_process2_sumary2_" + i).text(data.sumary3);
|
||||
}
|
||||
else if(role_code === "4"){
|
||||
$("#eva_evaluation_achievement_process2_score_" + i).text(data.score3);
|
||||
$("#eva_evaluation_achievement_process2_sumary_" + i).text(data.sumary3);
|
||||
$("#eva_evaluation_achievement_process2_score2_" + i).val(data.score4);
|
||||
$("#eva_evaluation_achievement_process2_sumary2_" + i).text(data.sumary4);
|
||||
}
|
||||
|
||||
//$("#eva_evaluation_achievement_process2_target_score1_" + i).val(data.target_score1);
|
||||
//$("#eva_evaluation_achievement_process2_target_score2_" + i).val(data.target_score2);
|
||||
//$("#eva_evaluation_achievement_process2_target_score3_" + i).val(data.target_score3);
|
||||
//$("#eva_evaluation_achievement_process2_target_score4_" + i).val(data.target_score4);
|
||||
//$("#eva_evaluation_achievement_process2_target_score5_" + i).val(data.target_score5);
|
||||
|
||||
}
|
||||
|
||||
function eva_evaluation_achievement_process2_GetFromForm(obj, i) {
|
||||
var eva_evaluation_achievement_process2Object = new Object();
|
||||
eva_evaluation_achievement_process2Object.id = obj.find("#eva_evaluation_achievement_process2_id_" + i).val();
|
||||
eva_evaluation_achievement_process2Object.create_evaluation_detail_id = obj.find("#eva_evaluation_achievement_process2_create_evaluation_detail_id_" + i).val();
|
||||
eva_evaluation_achievement_process2Object.achievement = obj.find("#eva_evaluation_achievement_process2_achievement_" + i).text();
|
||||
eva_evaluation_achievement_process2Object.weight = obj.find("#eva_evaluation_achievement_process2_weight_" + i).text();
|
||||
eva_evaluation_achievement_process2Object.id = obj.find("#eva_evaluation_achievement_process2_id_" + i).val();
|
||||
eva_evaluation_achievement_process2Object.create_evaluation_detail_id = obj.find("#eva_evaluation_achievement_process2_create_evaluation_detail_id_" + i).val();
|
||||
eva_evaluation_achievement_process2Object.achievement = obj.find("#eva_evaluation_achievement_process2_achievement_" + i).text();
|
||||
eva_evaluation_achievement_process2Object.weight = obj.find("#eva_evaluation_achievement_process2_weight_" + i).text();
|
||||
|
||||
eva_evaluation_achievement_process2Object.score = obj.find("#eva_evaluation_achievement_process2_score_" + i).text();
|
||||
eva_evaluation_achievement_process2Object.score2 = obj.find("#eva_evaluation_achievement_process2_score2_" + i).val();
|
||||
eva_evaluation_achievement_process2Object.sumary2 = obj.find("#eva_evaluation_achievement_process2_sumary2_" + i).text();
|
||||
//eva_evaluation_achievement_process2Object.target_score1 = obj.find("#eva_evaluation_achievement_process2_target_score1_" + i).val();
|
||||
//eva_evaluation_achievement_process2Object.target_score2 = obj.find("#eva_evaluation_achievement_process2_target_score2_" + i).val();
|
||||
//eva_evaluation_achievement_process2Object.target_score3 = obj.find("#eva_evaluation_achievement_process2_target_score3_" + i).val();
|
||||
//eva_evaluation_achievement_process2Object.target_score4 = obj.find("#eva_evaluation_achievement_process2_target_score4_" + i).val();
|
||||
//eva_evaluation_achievement_process2Object.target_score5 = obj.find("#eva_evaluation_achievement_process2_target_score5_" + i).val();
|
||||
eva_evaluation_achievement_process2Object.score = obj.find("#eva_evaluation_achievement_process2_score_" + i).text();
|
||||
eva_evaluation_achievement_process2Object.score2 = obj.find("#eva_evaluation_achievement_process2_score2_" + i).val();
|
||||
eva_evaluation_achievement_process2Object.sumary2 = obj.find("#eva_evaluation_achievement_process2_sumary2_" + i).text();
|
||||
//eva_evaluation_achievement_process2Object.target_score1 = obj.find("#eva_evaluation_achievement_process2_target_score1_" + i).val();
|
||||
//eva_evaluation_achievement_process2Object.target_score2 = obj.find("#eva_evaluation_achievement_process2_target_score2_" + i).val();
|
||||
//eva_evaluation_achievement_process2Object.target_score3 = obj.find("#eva_evaluation_achievement_process2_target_score3_" + i).val();
|
||||
//eva_evaluation_achievement_process2Object.target_score4 = obj.find("#eva_evaluation_achievement_process2_target_score4_" + i).val();
|
||||
//eva_evaluation_achievement_process2Object.target_score5 = obj.find("#eva_evaluation_achievement_process2_target_score5_" + i).val();
|
||||
|
||||
eva_evaluation_achievement_process2Object.who_update = the_role_code;
|
||||
|
||||
eva_evaluation_achievement_process2Object.active_mode = obj.find("#isActive_" + i + "_eva_evaluation_achievement_process2").val();
|
||||
return eva_evaluation_achievement_process2Object;
|
||||
@@ -69,16 +87,16 @@ function eva_evaluation_achievement_process2_Save(id) {
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
console.log(eva_evaluation_achievement_process2);
|
||||
//console.log(eva_evaluation_achievement_process2);
|
||||
AjaxPutRequest(apisite + '/api/eva_evaluation_achievement_process2/UpdateMultiple', eva_evaluation_achievement_process2, successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_evaluation_achievement_process2_Get(a, blankItem) {
|
||||
function eva_evaluation_achievement_process2_Get(a, blankItem, role_code) {
|
||||
|
||||
$('#eva_evaluation_achievement_process2Body').empty();
|
||||
|
||||
var successFunc = function (response) {
|
||||
console.log(response);
|
||||
//console.log(response);
|
||||
$.each(response, function (i, data) {
|
||||
var tag = '<tr>';
|
||||
tag += '<td><label id="rowCount">' + (i + 1) + '</label><input type="hidden" id="isActive_' + (i + 1) + '_eva_evaluation_achievement_process2" value="1" /><input class="form-control" type="hidden" id="eva_evaluation_achievement_process2_id_' + (i + 1)+'" /><input class="form-control" type="hidden" id="eva_evaluation_achievement_process2_create_evaluation_detail_id_' + (i + 1)+'" /></td>';
|
||||
@@ -91,11 +109,11 @@ function eva_evaluation_achievement_process2_Get(a, blankItem) {
|
||||
//tag += '<td><input class="form-control" id="eva_evaluation_achievement_process2_target_score5_' + (i + 1)+'"/></td>';
|
||||
tag += '<td><p id="eva_evaluation_achievement_process2_score_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><p id="eva_evaluation_achievement_process2_sumary_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control myeditor" type="number" min="0" max="5" step=".01" onchange="javascript:Oneva_evaluation_achievement_process2_scoreChange();" id="eva_evaluation_achievement_process2_score2_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="myeditor form-control" type="number" min="0" max="5" step=".01" onchange="javascript:Oneva_evaluation_achievement_process2_scoreChange();" id="eva_evaluation_achievement_process2_score2_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><p id="eva_evaluation_achievement_process2_sumary2_' + (i + 1)+'" /></td>';
|
||||
tag += '</tr>';
|
||||
$('#eva_evaluation_achievement_process2Body').append($(tag));
|
||||
eva_evaluation_achievement_process2_FeedDataToForm(data, (i + 1), blankItem);
|
||||
eva_evaluation_achievement_process2_FeedDataToForm(data, (i + 1), blankItem, role_code);
|
||||
});
|
||||
eva_evaluation_achievement_process2_Summary();
|
||||
Oneva_evaluation_achievement_process2_scoreChange();
|
||||
@@ -162,9 +180,9 @@ function eva_evaluation_achievement_process2_Summary() {
|
||||
$("#score_label").text("ผลรวม: " + sum);
|
||||
}
|
||||
|
||||
function eva_evaluation_achievement_process2_InitialForm(id) {
|
||||
function eva_evaluation_achievement_process2_InitialForm(id, role_code) {
|
||||
var successFunc = function (result) {
|
||||
eva_evaluation_achievement_process2_Get(id, result);
|
||||
eva_evaluation_achievement_process2_Get(id, result, role_code);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
|
||||
@@ -1,57 +1,72 @@
|
||||
function eva_evaluation_behavior_process2_ClearForm(i, blankItem) {
|
||||
var data = blankItem;
|
||||
$("#eva_evaluation_behavior_process2_id_" + i).val("");
|
||||
$("#eva_evaluation_behavior_process2_create_evaluation_detail_id_" + i).val("");
|
||||
$("#eva_evaluation_behavior_process2_behavior_" + i).text("");
|
||||
$("#eva_evaluation_behavior_process2_weight_" + i).val("");
|
||||
$("#eva_evaluation_behavior_process2_score_" + i).text("");
|
||||
$("#eva_evaluation_behavior_process2_score2_" + i).val("");
|
||||
$("#eva_evaluation_behavior_process2_sumary2_" + i).text("");
|
||||
//$("#eva_evaluation_behavior_process2_target_score1_" + i).val("");
|
||||
//$("#eva_evaluation_behavior_process2_target_score2_" + i).val("");
|
||||
//$("#eva_evaluation_behavior_process2_target_score3_" + i).val("");
|
||||
//$("#eva_evaluation_behavior_process2_target_score4_" + i).val("");
|
||||
//$("#eva_evaluation_behavior_process2_target_score5_" + i).val("");
|
||||
|
||||
$("#eva_evaluation_behavior_process2_id_" + i).val("");
|
||||
$("#eva_evaluation_behavior_process2_create_evaluation_detail_id_" + i).val("");
|
||||
$("#eva_evaluation_behavior_process2_behavior_" + i).text("");
|
||||
$("#eva_evaluation_behavior_process2_weight_" + i).val("");
|
||||
$("#eva_evaluation_behavior_process2_score_" + i).text("");
|
||||
$("#eva_evaluation_behavior_process2_score2_" + i).val("");
|
||||
$("#eva_evaluation_behavior_process2_sumary2_" + i).text("");
|
||||
//$("#eva_evaluation_behavior_process2_target_score1_" + i).val("");
|
||||
//$("#eva_evaluation_behavior_process2_target_score2_" + i).val("");
|
||||
//$("#eva_evaluation_behavior_process2_target_score3_" + i).val("");
|
||||
//$("#eva_evaluation_behavior_process2_target_score4_" + i).val("");
|
||||
//$("#eva_evaluation_behavior_process2_target_score5_" + i).val("");
|
||||
}
|
||||
|
||||
function eva_evaluation_behavior_process2_FeedDataToForm(data, i, blankItem) {
|
||||
$("#eva_evaluation_behavior_process2_id_" + i).val(data.id);
|
||||
$("#eva_evaluation_behavior_process2_create_evaluation_detail_id_" + i).val(data.create_evaluation_detail_id);
|
||||
$("#eva_evaluation_behavior_process2_behavior_" + i).text(data.behavior);
|
||||
$("#eva_evaluation_behavior_process2_weight_" + i).val(data.weight);
|
||||
$("#eva_evaluation_behavior_process2_score_" + i).text(data.score);
|
||||
$("#eva_evaluation_behavior_process2_sumary_" + i).text(data.sumary);
|
||||
$("#eva_evaluation_behavior_process2_score2_" + i).val(data.score2);
|
||||
$("#eva_evaluation_behavior_process2_sumary2_" + i).text(data.sumary2);
|
||||
//$("#eva_evaluation_behavior_process2_target_score1_" + i).val(data.target_score1);
|
||||
//$("#eva_evaluation_behavior_process2_target_score2_" + i).val(data.target_score2);
|
||||
//$("#eva_evaluation_behavior_process2_target_score3_" + i).val(data.target_score3);
|
||||
//$("#eva_evaluation_behavior_process2_target_score4_" + i).val(data.target_score4);
|
||||
//$("#eva_evaluation_behavior_process2_target_score5_" + i).val(data.target_score5);
|
||||
function eva_evaluation_behavior_process2_FeedDataToForm(data, i, blankItem, role_code) {
|
||||
$("#eva_evaluation_behavior_process2_id_" + i).val(data.id);
|
||||
$("#eva_evaluation_behavior_process2_create_evaluation_detail_id_" + i).val(data.create_evaluation_detail_id);
|
||||
$("#eva_evaluation_behavior_process2_behavior_" + i).text(data.behavior);
|
||||
$("#eva_evaluation_behavior_process2_weight_" + i).val(data.weight);
|
||||
|
||||
if(role_code === "2"){
|
||||
$("#eva_evaluation_behavior_process2_score_" + i).text(data.score);
|
||||
$("#eva_evaluation_behavior_process2_sumary_" + i).text(data.sumary);
|
||||
$("#eva_evaluation_behavior_process2_score2_" + i).val(data.score2);
|
||||
$("#eva_evaluation_behavior_process2_sumary2_" + i).text(data.sumary2);
|
||||
}
|
||||
else if(role_code === "3"){
|
||||
$("#eva_evaluation_behavior_process2_score_" + i).text(data.score2);
|
||||
$("#eva_evaluation_behavior_process2_sumary_" + i).text(data.sumary2);
|
||||
$("#eva_evaluation_behavior_process2_score2_" + i).val(data.score3);
|
||||
$("#eva_evaluation_behavior_process2_sumary2_" + i).text(data.sumary3);
|
||||
}
|
||||
else if(role_code === "4"){
|
||||
$("#eva_evaluation_behavior_process2_score_" + i).text(data.score3);
|
||||
$("#eva_evaluation_behavior_process2_sumary_" + i).text(data.sumary3);
|
||||
$("#eva_evaluation_behavior_process2_score2_" + i).val(data.score4);
|
||||
$("#eva_evaluation_behavior_process2_sumary2_" + i).text(data.sumary4);
|
||||
}
|
||||
|
||||
//$("#eva_evaluation_behavior_process2_target_score1_" + i).val(data.target_score1);
|
||||
//$("#eva_evaluation_behavior_process2_target_score2_" + i).val(data.target_score2);
|
||||
//$("#eva_evaluation_behavior_process2_target_score3_" + i).val(data.target_score3);
|
||||
//$("#eva_evaluation_behavior_process2_target_score4_" + i).val(data.target_score4);
|
||||
//$("#eva_evaluation_behavior_process2_target_score5_" + i).val(data.target_score5);
|
||||
|
||||
}
|
||||
|
||||
function eva_evaluation_behavior_process2_GetFromForm(obj, i) {
|
||||
var eva_evaluation_behavior_process2Object = new Object();
|
||||
eva_evaluation_behavior_process2Object.id = obj.find("#eva_evaluation_behavior_process2_id_" + i).val();
|
||||
eva_evaluation_behavior_process2Object.create_evaluation_detail_id = obj.find("#eva_evaluation_behavior_process2_create_evaluation_detail_id_" + i).val();
|
||||
eva_evaluation_behavior_process2Object.behavior = obj.find("#eva_evaluation_behavior_process2_behavior_" + i).text();
|
||||
eva_evaluation_behavior_process2Object.weight = obj.find("#eva_evaluation_behavior_process2_weight_" + i).val();
|
||||
eva_evaluation_behavior_process2Object.score = obj.find("#eva_evaluation_behavior_process2_score_" + i).text();
|
||||
eva_evaluation_behavior_process2Object.sumary = obj.find("#eva_evaluation_behavior_process2_sumary_" + i).text();
|
||||
eva_evaluation_behavior_process2Object.score2 = obj.find("#eva_evaluation_behavior_process2_score2_" + i).val();
|
||||
eva_evaluation_behavior_process2Object.sumary2 = obj.find("#eva_evaluation_behavior_process2_sumary2_" + i).text();
|
||||
//eva_evaluation_behavior_process2Object.target_score1 = obj.find("#eva_evaluation_behavior_process2_target_score1_" + i).val();
|
||||
//eva_evaluation_behavior_process2Object.target_score2 = obj.find("#eva_evaluation_behavior_process2_target_score2_" + i).val();
|
||||
//eva_evaluation_behavior_process2Object.target_score3 = obj.find("#eva_evaluation_behavior_process2_target_score3_" + i).val();
|
||||
//eva_evaluation_behavior_process2Object.target_score4 = obj.find("#eva_evaluation_behavior_process2_target_score4_" + i).val();
|
||||
//eva_evaluation_behavior_process2Object.target_score5 = obj.find("#eva_evaluation_behavior_process2_target_score5_" + i).val();
|
||||
eva_evaluation_behavior_process2Object.id = obj.find("#eva_evaluation_behavior_process2_id_" + i).val();
|
||||
eva_evaluation_behavior_process2Object.create_evaluation_detail_id = obj.find("#eva_evaluation_behavior_process2_create_evaluation_detail_id_" + i).val();
|
||||
eva_evaluation_behavior_process2Object.behavior = obj.find("#eva_evaluation_behavior_process2_behavior_" + i).text();
|
||||
eva_evaluation_behavior_process2Object.weight = obj.find("#eva_evaluation_behavior_process2_weight_" + i).val();
|
||||
eva_evaluation_behavior_process2Object.score = obj.find("#eva_evaluation_behavior_process2_score_" + i).text();
|
||||
eva_evaluation_behavior_process2Object.sumary = obj.find("#eva_evaluation_behavior_process2_sumary_" + i).text();
|
||||
eva_evaluation_behavior_process2Object.score2 = obj.find("#eva_evaluation_behavior_process2_score2_" + i).val();
|
||||
eva_evaluation_behavior_process2Object.sumary2 = obj.find("#eva_evaluation_behavior_process2_sumary2_" + i).text();
|
||||
//eva_evaluation_behavior_process2Object.target_score1 = obj.find("#eva_evaluation_behavior_process2_target_score1_" + i).val();
|
||||
//eva_evaluation_behavior_process2Object.target_score2 = obj.find("#eva_evaluation_behavior_process2_target_score2_" + i).val();
|
||||
//eva_evaluation_behavior_process2Object.target_score3 = obj.find("#eva_evaluation_behavior_process2_target_score3_" + i).val();
|
||||
//eva_evaluation_behavior_process2Object.target_score4 = obj.find("#eva_evaluation_behavior_process2_target_score4_" + i).val();
|
||||
//eva_evaluation_behavior_process2Object.target_score5 = obj.find("#eva_evaluation_behavior_process2_target_score5_" + i).val();
|
||||
|
||||
eva_evaluation_behavior_process2Object.who_update = the_role_code;
|
||||
|
||||
eva_evaluation_behavior_process2Object.active_mode = obj.find("#isActive_" + i + "_eva_evaluation_behavior_process2").val();
|
||||
|
||||
console.log(eva_evaluation_behavior_process2Object);
|
||||
|
||||
return eva_evaluation_behavior_process2Object;
|
||||
}
|
||||
|
||||
@@ -78,12 +93,12 @@ function eva_evaluation_behavior_process2_Save(id) {
|
||||
AjaxPutRequest(apisite + '/api/eva_evaluation_behavior_process2/UpdateMultiple', eva_evaluation_behavior_process2, successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_evaluation_behavior_process2_Get(a, blankItem) {
|
||||
function eva_evaluation_behavior_process2_Get(a, blankItem, role_code) {
|
||||
|
||||
$('#eva_evaluation_behavior_process2Body').empty();
|
||||
|
||||
var successFunc = function (response) {
|
||||
console.log(response);
|
||||
//console.log(response);
|
||||
$.each(response, function (i, data) {
|
||||
var tag = '<tr>';
|
||||
tag += '<td><label id="rowCount">' + (i + 1) + '</label><input type="hidden" id="isActive_' + (i + 1) + '_eva_evaluation_behavior_process2" value="1" /><input class="form-control" type="hidden" id="eva_evaluation_behavior_process2_id_' + (i + 1)+'" /><input class="form-control" type="hidden" id="eva_evaluation_behavior_process2_create_evaluation_detail_id_' + (i + 1)+'" /></td>';
|
||||
@@ -102,7 +117,7 @@ tag += '<td><input min="0" max="5" step=".01" onchange="Oneva_evaluation_behavio
|
||||
|
||||
tag += '</tr>';
|
||||
$('#eva_evaluation_behavior_process2Body').append($(tag));
|
||||
eva_evaluation_behavior_process2_FeedDataToForm(data, (i + 1), blankItem);
|
||||
eva_evaluation_behavior_process2_FeedDataToForm(data, (i + 1), blankItem, role_code);
|
||||
});
|
||||
eva_evaluation_behavior_process2_Summary();
|
||||
Oneva_evaluation_behavior_process2_scoreChange();
|
||||
@@ -166,9 +181,9 @@ function eva_evaluation_behavior_process2_Summary() {
|
||||
$("#score_label").text("ผลรวม: " + sum);
|
||||
}
|
||||
|
||||
function eva_evaluation_behavior_process2_InitialForm(id) {
|
||||
function eva_evaluation_behavior_process2_InitialForm(id, role_code) {
|
||||
var successFunc = function (result) {
|
||||
eva_evaluation_behavior_process2_Get(id, result);
|
||||
eva_evaluation_behavior_process2_Get(id, result, role_code);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
|
||||
Reference in New Issue
Block a user