แก้ op หลายข้อ
This commit is contained in:
Binary file not shown.
962
Migrations/20210328084209_UpdatePlan.Designer.cs
generated
Normal file
962
Migrations/20210328084209_UpdatePlan.Designer.cs
generated
Normal file
@@ -0,0 +1,962 @@
|
||||
// <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("20210328084209_UpdatePlan")]
|
||||
partial class UpdatePlan
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
|
||||
.HasAnnotation("ProductVersion", "2.2.6-servicing-10079")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponementEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<string>("command_no")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<int?>("create_evaluation_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("fiscal_year");
|
||||
|
||||
b.Property<DateTime?>("imported_date");
|
||||
|
||||
b.Property<string>("imported_file")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
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<string>("report_type")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
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<decimal?>("achievement_final");
|
||||
|
||||
b.Property<int?>("adjust_postponement_id");
|
||||
|
||||
b.Property<int?>("adjust_postponement_quota_id");
|
||||
|
||||
b.Property<decimal?>("competency_final");
|
||||
|
||||
b.Property<decimal?>("cost_living");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("level_score_final")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("level_this_time")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("middle");
|
||||
|
||||
b.Property<string>("migration_eva_result")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("migration_total_score");
|
||||
|
||||
b.Property<decimal?>("new_cost_living");
|
||||
|
||||
b.Property<decimal?>("new_sarary");
|
||||
|
||||
b.Property<decimal?>("new_sarary_with_quota");
|
||||
|
||||
b.Property<int?>("order_at_this_time");
|
||||
|
||||
b.Property<int?>("org_at_this_time");
|
||||
|
||||
b.Property<decimal?>("other_money_at_this_time");
|
||||
|
||||
b.Property<decimal?>("position_allowance_at_this_time");
|
||||
|
||||
b.Property<string>("position_this_time")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("promoted_percentage");
|
||||
|
||||
b.Property<decimal?>("receive_quota");
|
||||
|
||||
b.Property<string>("remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("sarary");
|
||||
|
||||
b.Property<decimal?>("score_final");
|
||||
|
||||
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<int?>("chief_a");
|
||||
|
||||
b.Property<DateTime?>("chief_a_date");
|
||||
|
||||
b.Property<string>("chief_a_reject_reason")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("chief_a_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("chief_a_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
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<int?>("eva_employee_id");
|
||||
|
||||
b.Property<int?>("help_org_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<int?>("order_of_data");
|
||||
|
||||
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<string>("status_chief_a")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_chief_a_click_date");
|
||||
|
||||
b.Property<DateTime?>("status_chief_click_date");
|
||||
|
||||
b.Property<string>("status_self")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_self_a")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_self_a_click_date");
|
||||
|
||||
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<int?>("supervisor1_id");
|
||||
|
||||
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<int?>("supervisor2_id");
|
||||
|
||||
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.Property<decimal?>("work_period");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("create_evaluation_id");
|
||||
|
||||
b.ToTable("eva_create_evaluation_detail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievementEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<string>("achievement")
|
||||
.HasMaxLength(8000);
|
||||
|
||||
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<int?>("main_dept_id");
|
||||
|
||||
b.Property<decimal?>("percentage");
|
||||
|
||||
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_evaluation_operating_agreementEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("indicators")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("mission_detail")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<int?>("mission_no");
|
||||
|
||||
b.Property<string>("target")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("create_evaluation_detail_id");
|
||||
|
||||
b.ToTable("eva_evaluation_operating_agreement");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_idp_planEntity", b =>
|
||||
{
|
||||
b.Property<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<string>("period_text")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
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_limit_frame_employeeEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id");
|
||||
|
||||
b.Property<decimal?>("cost_of_living");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<Guid?>("frame_group_guid");
|
||||
|
||||
b.Property<int?>("help_org_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("level_text")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("monthly_remuneration");
|
||||
|
||||
b.Property<int?>("order_of_data");
|
||||
|
||||
b.Property<int?>("org_id");
|
||||
|
||||
b.Property<decimal?>("position_allowance");
|
||||
|
||||
b.Property<string>("position_text")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("salary");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("frame_group_guid");
|
||||
|
||||
b.ToTable("eva_limit_frame_employee");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_groupEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<Guid?>("frame_plan_guid");
|
||||
|
||||
b.Property<Guid?>("group_guid");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("limit_frame_295");
|
||||
|
||||
b.Property<int?>("main_dept_id");
|
||||
|
||||
b.Property<string>("remark")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<decimal?>("total_salary");
|
||||
|
||||
b.Property<decimal?>("total_salary_limit");
|
||||
|
||||
b.Property<decimal?>("total_salary_limit_rounded");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("frame_plan_guid");
|
||||
|
||||
b.HasIndex("group_guid");
|
||||
|
||||
b.ToTable("eva_limit_frame_group");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_planEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<DateTime?>("executed_date");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("limit_frame_005");
|
||||
|
||||
b.Property<decimal?>("limit_frame_005_total");
|
||||
|
||||
b.Property<decimal?>("limit_frame_005_total_rounded");
|
||||
|
||||
b.Property<Guid?>("plan_guid");
|
||||
|
||||
b.Property<DateTime?>("salary_adjustment_date");
|
||||
|
||||
b.Property<string>("status_chief")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_self")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<int?>("supervisor1");
|
||||
|
||||
b.Property<DateTime?>("supervisor1_date");
|
||||
|
||||
b.Property<string>("supervisor1_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor1_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<decimal?>("total_salary");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("plan_guid");
|
||||
|
||||
b.ToTable("eva_limit_frame_plan");
|
||||
});
|
||||
|
||||
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<decimal?>("percent");
|
||||
|
||||
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_create_evaluation_detailEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluationEntity", "eva_create_evaluation_create_evaluation_id")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievementEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_detail_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_behaviorEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_detail_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_group_detailEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group")
|
||||
.WithMany()
|
||||
.HasForeignKey("evaluation_group_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_operating_agreementEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail_create_evaluation_detail_id")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_detail_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_employeeEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_limit_frame_groupEntity", "eva_limit_frame_group_frame_group_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("frame_group_guid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_groupEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_limit_frame_planEntity", "eva_limit_frame_plan_frame_plan_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("frame_plan_guid");
|
||||
|
||||
b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group_group_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("group_guid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_planEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_performance_planEntity", "eva_performance_plan_plan_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("plan_guid");
|
||||
});
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
22
Migrations/20210328084209_UpdatePlan.cs
Normal file
22
Migrations/20210328084209_UpdatePlan.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace tb320eva.Migrations
|
||||
{
|
||||
public partial class UpdatePlan : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "percent",
|
||||
table: "eva_performance_plan",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "percent",
|
||||
table: "eva_performance_plan");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -747,6 +747,8 @@ namespace tb320eva.Migrations
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("percent");
|
||||
|
||||
b.Property<int?>("theTime");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
@@ -19,6 +19,8 @@ namespace TodoAPI2.Models
|
||||
|
||||
public int? theTime { get; set; }
|
||||
|
||||
public decimal? percent { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string display_text
|
||||
{
|
||||
|
||||
@@ -20,6 +20,8 @@ namespace TodoAPI2.Models
|
||||
|
||||
public int? theTime { get; set; }
|
||||
|
||||
public decimal? percent { get; set; }
|
||||
|
||||
public string active_mode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,14 +20,14 @@ namespace TodoAPI2.Models
|
||||
public class eva_performance_planService : Ieva_performance_planService
|
||||
{
|
||||
private IBaseRepository<eva_performance_planEntity, Guid> _repository;
|
||||
private IMyDatabase db;
|
||||
private Iexternal_linkageService ext;
|
||||
private IMyDatabase db;
|
||||
private Iexternal_linkageService ext;
|
||||
|
||||
public eva_performance_planService(IBaseRepository<eva_performance_planEntity, Guid> 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_performance_planViewModel>>(entities);
|
||||
}
|
||||
|
||||
|
||||
private List<eva_performance_planEntity> GetListWithoutBase64Fields(IQueryable<eva_performance_planEntity> listQuery)
|
||||
{
|
||||
return listQuery.Select(c => new eva_performance_planEntity()
|
||||
@@ -98,7 +98,7 @@ namespace TodoAPI2.Models
|
||||
id = m_eva_performance_plan.id,
|
||||
fiscal_year = m_eva_performance_plan.fiscal_year,
|
||||
theTime = m_eva_performance_plan.theTime,
|
||||
|
||||
percent = m_eva_performance_plan.percent,
|
||||
|
||||
isActive = m_eva_performance_plan.isActive,
|
||||
Created = m_eva_performance_plan.created,
|
||||
@@ -115,7 +115,7 @@ namespace TodoAPI2.Models
|
||||
from m_eva_performance_plan in _repository.Context.eva_performance_plan
|
||||
|
||||
|
||||
where m_eva_performance_plan.fiscal_year == fiscal_year || !fiscal_year.HasValue
|
||||
where m_eva_performance_plan.fiscal_year == fiscal_year || !fiscal_year.HasValue
|
||||
|
||||
orderby m_eva_performance_plan.created descending
|
||||
select new eva_performance_planViewModel()
|
||||
@@ -123,7 +123,7 @@ namespace TodoAPI2.Models
|
||||
id = m_eva_performance_plan.id,
|
||||
fiscal_year = m_eva_performance_plan.fiscal_year,
|
||||
theTime = m_eva_performance_plan.theTime,
|
||||
|
||||
percent = m_eva_performance_plan.percent,
|
||||
|
||||
isActive = m_eva_performance_plan.isActive,
|
||||
Created = m_eva_performance_plan.created,
|
||||
@@ -134,13 +134,13 @@ namespace TodoAPI2.Models
|
||||
return data;
|
||||
}
|
||||
|
||||
public List<eva_performance_planViewModel> GetListBySearch(eva_performance_planSearchModel model)
|
||||
public List<eva_performance_planViewModel> GetListBySearch(eva_performance_planSearchModel model)
|
||||
{
|
||||
var data = (
|
||||
from m_eva_performance_plan in _repository.Context.eva_performance_plan
|
||||
|
||||
|
||||
where 1==1
|
||||
where 1 == 1
|
||||
&& (m_eva_performance_plan.fiscal_year == model.fiscal_year || !model.fiscal_year.HasValue)
|
||||
&& (m_eva_performance_plan.theTime == model.theTime || !model.theTime.HasValue)
|
||||
|
||||
@@ -151,7 +151,7 @@ namespace TodoAPI2.Models
|
||||
id = m_eva_performance_plan.id,
|
||||
fiscal_year = m_eva_performance_plan.fiscal_year,
|
||||
theTime = m_eva_performance_plan.theTime,
|
||||
|
||||
percent = m_eva_performance_plan.percent,
|
||||
|
||||
isActive = m_eva_performance_plan.isActive,
|
||||
Created = m_eva_performance_plan.created,
|
||||
@@ -173,7 +173,7 @@ namespace TodoAPI2.Models
|
||||
|
||||
|
||||
var inserted = _repository.Insert(entity);
|
||||
|
||||
|
||||
return Get(inserted.id);
|
||||
}
|
||||
|
||||
@@ -184,27 +184,27 @@ namespace TodoAPI2.Models
|
||||
{
|
||||
existingEntity.fiscal_year = model.fiscal_year;
|
||||
existingEntity.theTime = model.theTime;
|
||||
|
||||
existingEntity.percent = model.percent;
|
||||
|
||||
var updated = _repository.Update(id, existingEntity);
|
||||
return Get(updated.id);
|
||||
}
|
||||
else
|
||||
throw new NotificationException("No data to update");
|
||||
throw new NotificationException("No data to update");
|
||||
}
|
||||
|
||||
public string UpdateMultiple(List<eva_performance_planInputModel> model)
|
||||
public string UpdateMultiple(List<eva_performance_planInputModel> 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.fiscal_year = i.fiscal_year;
|
||||
existingEntity.theTime = i.theTime;
|
||||
|
||||
existingEntity.fiscal_year = i.fiscal_year;
|
||||
existingEntity.theTime = i.theTime;
|
||||
existingEntity.percent = i.percent;
|
||||
|
||||
_repository.UpdateWithoutCommit(i.id.Value, existingEntity);
|
||||
}
|
||||
@@ -216,15 +216,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();
|
||||
}
|
||||
|
||||
@@ -18,6 +18,6 @@ namespace TodoAPI2.Models
|
||||
|
||||
public int? theTime { get; set; }
|
||||
|
||||
|
||||
public decimal? percent { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -68,7 +68,7 @@
|
||||
<th><label>สถานะทำแบบประเมิน<br />(ผู้ประเมิน)</label></th>
|
||||
<th><label>สถานะทำแบบประเมิน<br />(ผู้ประเมินสูงสุด)</label></th>
|
||||
|
||||
<th><label>Action</label></th>
|
||||
<th><label>ดูแบบประเมิน</label></th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -29,6 +29,12 @@
|
||||
<input class="form-control" type="number" id="eva_performance_plan_theTime" iLabel="รอบการประเมินที่" iRequire="true" iGroup="eva_performance_plan" />
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_performance_plan_percent" for="eva_performance_plan_percent">กรอบวงเงินในส่วนที่กันไว้</label>
|
||||
<input class="form-control" type="number" id="eva_performance_plan_percent" iLabel="กรอบวงเงินในส่วนที่กันไว้" iRequire="true" iGroup="eva_performance_plan" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
@@ -87,7 +93,7 @@
|
||||
<th>เครื่องมือ</th>
|
||||
<th><label id='h_eva_performance_plan_fiscal_year'>ปีงบประมาณ</label></th>
|
||||
<th><label id='h_eva_performance_plan_theTime'>รอบการประเมินที่</label></th>
|
||||
|
||||
<th><label id='h_eva_performance_plan_percent'>กรอบวงเงินในส่วนที่กันไว้</label></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
|
||||
@@ -100,7 +100,12 @@
|
||||
<input class="form-control" type="number" id="eva_performance_plan_theTime" iLabel="รอบการประเมินที่" iRequire="true" iGroup="eva_performance_plan" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_performance_plan_percent" for="eva_performance_plan_percent">กรอบวงเงินในส่วนที่กันไว้</label>
|
||||
<input class="form-control" type="number" id="eva_performance_plan_percent" iLabel="กรอบวงเงินในส่วนที่กันไว้" iRequire="true" iGroup="eva_performance_plan" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5,33 +5,33 @@ var eva_performance_plan_API = "/api/eva_performance_plan/";
|
||||
|
||||
function eva_performance_plan_GetSearchParameter() {
|
||||
var eva_performance_planSearchObject = new Object();
|
||||
eva_performance_planSearchObject.fiscal_year = $("#s_eva_performance_plan_fiscal_year").val();
|
||||
eva_performance_planSearchObject.theTime = $("#s_eva_performance_plan_theTime").val();
|
||||
eva_performance_planSearchObject.fiscal_year = $("#s_eva_performance_plan_fiscal_year").val();
|
||||
eva_performance_planSearchObject.theTime = $("#s_eva_performance_plan_theTime").val();
|
||||
|
||||
return eva_performance_planSearchObject;
|
||||
}
|
||||
|
||||
function eva_performance_plan_FeedDataToSearchForm(data) {
|
||||
$("#s_eva_performance_plan_fiscal_year").val(data.fiscal_year);
|
||||
$("#s_eva_performance_plan_theTime").val(data.theTime);
|
||||
$("#s_eva_performance_plan_fiscal_year").val(data.fiscal_year);
|
||||
$("#s_eva_performance_plan_theTime").val(data.theTime);
|
||||
|
||||
}
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function eva_performance_plan_FeedDataToForm(data) {
|
||||
$("#eva_performance_plan_id").val(data.id);
|
||||
$("#eva_performance_plan_fiscal_year").val(data.fiscal_year);
|
||||
$("#eva_performance_plan_theTime").val(data.theTime);
|
||||
|
||||
$("#eva_performance_plan_id").val(data.id);
|
||||
$("#eva_performance_plan_fiscal_year").val(data.fiscal_year);
|
||||
$("#eva_performance_plan_theTime").val(data.theTime);
|
||||
$("#eva_performance_plan_percent").val(data.percent);
|
||||
}
|
||||
|
||||
function eva_performance_plan_GetFromForm() {
|
||||
var eva_performance_planObject = new Object();
|
||||
eva_performance_planObject.id = $("#eva_performance_plan_id").val();
|
||||
eva_performance_planObject.fiscal_year = $("#eva_performance_plan_fiscal_year").val();
|
||||
eva_performance_planObject.theTime = $("#eva_performance_plan_theTime").val();
|
||||
|
||||
eva_performance_planObject.id = $("#eva_performance_plan_id").val();
|
||||
eva_performance_planObject.fiscal_year = $("#eva_performance_plan_fiscal_year").val();
|
||||
eva_performance_planObject.theTime = $("#eva_performance_plan_theTime").val();
|
||||
eva_performance_planObject.percent = $("#eva_performance_plan_percent").val();
|
||||
|
||||
return eva_performance_planObject;
|
||||
}
|
||||
@@ -39,14 +39,14 @@ eva_performance_planObject.theTime = $("#eva_performance_plan_theTime").val();
|
||||
function eva_performance_plan_InitialForm(s) {
|
||||
var successFunc = function (result) {
|
||||
eva_performance_plan_FeedDataToForm(result);
|
||||
eva_performance_plan_FeedDataToSearchForm(result);
|
||||
eva_performance_plan_FeedDataToSearchForm(result);
|
||||
if (s) {
|
||||
// Incase model popup
|
||||
$("#eva_performance_planModel").modal("show");
|
||||
}
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_performance_plan_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
@@ -73,15 +73,15 @@ function eva_performance_plan_SetEditForm(a) {
|
||||
eva_performance_plan_editMode = "UPDATE";
|
||||
eva_performance_plan_FeedDataToForm(result);
|
||||
$("#eva_performance_planModel").modal("show");
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_performance_plan_API + a, successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_performance_plan_SetCreateForm(s) {
|
||||
eva_performance_plan_editMode = "CREATE";
|
||||
eva_performance_plan_InitialForm(s);
|
||||
eva_performance_plan_InitialForm(s);
|
||||
}
|
||||
|
||||
function eva_performance_plan_RefreshTable() {
|
||||
@@ -99,8 +99,7 @@ var eva_performance_plan_customValidation = function (group) {
|
||||
};
|
||||
|
||||
function eva_performance_plan_PutUpdate() {
|
||||
if (!ValidateForm('eva_performance_plan', eva_performance_plan_customValidation))
|
||||
{
|
||||
if (!ValidateForm('eva_performance_plan', eva_performance_plan_customValidation)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -112,9 +111,9 @@ function eva_performance_plan_PutUpdate() {
|
||||
$("#eva_performance_planModel").modal("hide");
|
||||
AlertSuccess(result.message);
|
||||
eva_performance_plan_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxPutRequest(apisite + eva_performance_plan_API + data.id, data, successFunc1, AlertDanger);
|
||||
}
|
||||
// Create mode
|
||||
@@ -123,9 +122,9 @@ function eva_performance_plan_PutUpdate() {
|
||||
$("#eva_performance_planModel").modal("hide");
|
||||
AlertSuccess(result.message);
|
||||
eva_performance_plan_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxPostRequest(apisite + eva_performance_plan_API, data, successFunc2, AlertDanger);
|
||||
}
|
||||
}
|
||||
@@ -136,9 +135,9 @@ function eva_performance_plan_GoDelete(a) {
|
||||
$("#eva_performance_planModel").modal("hide");
|
||||
AlertSuccess(result.message);
|
||||
eva_performance_plan_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxDeleteRequest(apisite + eva_performance_plan_API + a, null, successFunc, AlertDanger);
|
||||
}
|
||||
}
|
||||
@@ -148,16 +147,17 @@ function eva_performance_plan_GoDelete(a) {
|
||||
var eva_performance_planTableV;
|
||||
|
||||
var eva_performance_plan_setupTable = function (result) {
|
||||
tmp = '"';
|
||||
tmp = '"';
|
||||
eva_performance_planTableV = $('#eva_performance_planTable').DataTable({
|
||||
"processing": true,
|
||||
"serverSide": false,
|
||||
"data": result,
|
||||
"select": false,
|
||||
"select": false,
|
||||
"columns": [
|
||||
{ "data": "id" },
|
||||
{ "data": "fiscal_year" },
|
||||
{ "data": "theTime" },
|
||||
{ "data": "id" },
|
||||
{ "data": "fiscal_year" },
|
||||
{ "data": "theTime" },
|
||||
{ "data": "percent" },
|
||||
],
|
||||
"columnDefs": [
|
||||
{
|
||||
@@ -171,13 +171,13 @@ var eva_performance_plan_setupTable = function (result) {
|
||||
"url": appsite + "/DataTables-1.10.16/thai.json"
|
||||
},
|
||||
"paging": true,
|
||||
"searching": false
|
||||
"searching": false
|
||||
});
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
|
||||
function eva_performance_plan_InitiateDataTable() {
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_performance_plan/GetListBySearch", eva_performance_plan_setupTable, AlertDanger);
|
||||
}
|
||||
|
||||
@@ -186,10 +186,10 @@ function eva_performance_plan_DoSearch() {
|
||||
var eva_performance_plan_reload = function (result) {
|
||||
eva_performance_planTableV.destroy();
|
||||
eva_performance_plan_setupTable(result);
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_performance_plan/GetListBySearch?"+p, eva_performance_plan_reload, AlertDanger);
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_performance_plan/GetListBySearch?" + p, eva_performance_plan_reload, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_performance_plan_GetSelect(f) {
|
||||
|
||||
@@ -4,18 +4,18 @@ var eva_performance_plan_API = "/api/eva_performance_plan/";
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function eva_performance_plan_FeedDataToForm(data) {
|
||||
$("#eva_performance_plan_id").val(data.id);
|
||||
$("#eva_performance_plan_fiscal_year").val(data.fiscal_year);
|
||||
$("#eva_performance_plan_theTime").val(data.theTime);
|
||||
|
||||
$("#eva_performance_plan_id").val(data.id);
|
||||
$("#eva_performance_plan_fiscal_year").val(data.fiscal_year);
|
||||
$("#eva_performance_plan_theTime").val(data.theTime);
|
||||
$("#eva_performance_plan_percent").val(data.percent);
|
||||
}
|
||||
|
||||
function eva_performance_plan_GetFromForm() {
|
||||
var eva_performance_planObject = new Object();
|
||||
eva_performance_planObject.id = $("#eva_performance_plan_id").val();
|
||||
eva_performance_planObject.fiscal_year = $("#eva_performance_plan_fiscal_year").val();
|
||||
eva_performance_planObject.theTime = $("#eva_performance_plan_theTime").val();
|
||||
|
||||
eva_performance_planObject.id = $("#eva_performance_plan_id").val();
|
||||
eva_performance_planObject.fiscal_year = $("#eva_performance_plan_fiscal_year").val();
|
||||
eva_performance_planObject.theTime = $("#eva_performance_plan_theTime").val();
|
||||
eva_performance_planObject.percent = $("#eva_performance_plan_percent").val();
|
||||
|
||||
return eva_performance_planObject;
|
||||
}
|
||||
@@ -23,9 +23,9 @@ eva_performance_planObject.theTime = $("#eva_performance_plan_theTime").val();
|
||||
function eva_performance_plan_InitialForm() {
|
||||
var successFunc = function (result) {
|
||||
eva_performance_plan_FeedDataToForm(result);
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_performance_plan_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
@@ -35,15 +35,15 @@ function eva_performance_plan_SetEditForm(a) {
|
||||
var successFunc = function (result) {
|
||||
eva_performance_plan_editMode = "UPDATE";
|
||||
eva_performance_plan_FeedDataToForm(result);
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_performance_plan_API + a, successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_performance_plan_SetCreateForm() {
|
||||
eva_performance_plan_editMode = "CREATE";
|
||||
eva_performance_plan_InitialForm();
|
||||
eva_performance_plan_InitialForm();
|
||||
}
|
||||
|
||||
//================= Update and Delete =========================================
|
||||
@@ -53,8 +53,7 @@ var eva_performance_plan_customValidation = function (group) {
|
||||
};
|
||||
|
||||
function eva_performance_plan_PutUpdate() {
|
||||
if (!ValidateForm('eva_performance_plan', eva_performance_plan_customValidation))
|
||||
{
|
||||
if (!ValidateForm('eva_performance_plan', eva_performance_plan_customValidation)) {
|
||||
return;
|
||||
}
|
||||
var data = eva_performance_plan_GetFromForm();
|
||||
@@ -63,18 +62,18 @@ function eva_performance_plan_PutUpdate() {
|
||||
if (eva_performance_plan_editMode === "UPDATE") {
|
||||
var successFunc1 = function (result) {
|
||||
AlertSuccess(result.message);
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxPutRequest(apisite + eva_performance_plan_API + data.id, data, successFunc1, AlertDanger);
|
||||
}
|
||||
// Create mode
|
||||
else {
|
||||
var successFunc2 = function (result) {
|
||||
AlertSuccess(result.message);
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxPostRequest(apisite + eva_performance_plan_API, data, successFunc2, AlertDanger);
|
||||
}
|
||||
}
|
||||
@@ -84,9 +83,9 @@ function eva_performance_plan_GoDelete(a) {
|
||||
var successFunc = function (result) {
|
||||
AlertSuccess(result.message);
|
||||
eva_performance_plan_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxDeleteRequest(apisite + eva_performance_plan_API + a, null, successFunc, AlertDanger);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user