From eebd1a8beeb61fcc75727b89a6e95153a8362a65 Mon Sep 17 00:00:00 2001 From: "LAPTOP-KB8JC2K2\\acer" Date: Sun, 28 Mar 2021 15:48:02 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20op=20=E0=B8=AB?= =?UTF-8?q?=E0=B8=A5=E0=B8=B2=E0=B8=A2=E0=B8=82=E0=B9=89=E0=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EXCEL/eva_performance_plan.xlsx | Bin 10206 -> 10263 bytes .../20210328084209_UpdatePlan.Designer.cs | 962 ++++++++++++++++++ Migrations/20210328084209_UpdatePlan.cs | 22 + Migrations/DataContextModelSnapshot.cs | 2 + .../eva_performance_planEntity.cs | 2 + .../eva_performance_planInputModel.cs | 2 + .../eva_performance_planService.cs | 46 +- .../eva_performance_planViewModel.cs | 2 +- ..._create_evaluation_detail_agreement.cshtml | 2 +- .../eva_performance_plan.cshtml | 8 +- .../eva_performance_plan_d.cshtml | 7 +- .../eva_performance_plan.js | 74 +- .../eva_performance_plan_d.js | 41 +- 13 files changed, 1085 insertions(+), 85 deletions(-) create mode 100644 Migrations/20210328084209_UpdatePlan.Designer.cs create mode 100644 Migrations/20210328084209_UpdatePlan.cs diff --git a/EXCEL/eva_performance_plan.xlsx b/EXCEL/eva_performance_plan.xlsx index 96c6f63266e48c7ca0e5812e77c00375a3f59739..aa1a030a7454873d50d7fec4d1fb548c45e52bbd 100644 GIT binary patch delta 4331 zcmZ8lXH*l+whg@oLg)}WNfeMK9qAne0i_GlI|K+Cq(zDWA%qe^no>ojiIgB!ks?is zfYg9A0i{UqaP_VG-uLdEKQn8cv)7t+W@hhwX7<)I)2b;-v@CUjWQoYDy?k_L(iUD!^7y8)W}PRIt40i zazM{&|HBrS=9Em>>Xg9m&btb#hqH@DTO)+-Bw5z9ZE4M;4qeJ?%rB~gm~Ou0j$ba7 zW_Gv(kaAJHeJFcHIz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tc5zsezw5|V*UO|Rj(;OX?*S6?gxULGId#N8}!JEeZG74?Ww>>UqBX4F&A-q-v$e4CAA`+22gCHGcg7-q-Qvi+i> zU{d87q=4rKzK!aTwqK;))y)HfQSwk@xdBVrz#`wF{D^|p9q1Y)6KINd8lTN8c>Akz zKmW6d(C1>RTED@gJZ*hMVy!+xibi>);hhDgekPsin4JmKps}ugyp&+Q2CJ25EuR@p5!WhYCv=vtDdR)`j?0;z3c=D8lsViRF7uZlTa=u-y# zX7>lv9Py#02 zyV$Lr+}juLE_HLJHg5VkXXjeN9$|Cit&J4c7$J1y-6zuGS%6QRzzzy)9LfKBCr}FK zu}a(WL1mWndec~=*nN@CR^H*w0$LTiP+GN@>-?+km%C;n55#yR7?Ned&g{Lu*(2bK zb-tWK#8PCK!q64%UM*OlMaMZ=FN$AfbWQ1su3P5so5iJZFc6W=Ls_O?;qGz^6CsZ{ zspoFV&B;@TVr{i#4k~PklKma^i|q2Mz){$wpA!kSqhFnarsGzE0?yR6tvKav4iZPZ z4Wn1{naD_Qxw0O;u3xyQKM}kRW_0;(7or0s>aMvwfx17_OY9?J0n%462tTmUj;@Uu zS`1rl(_!>+jGAdqt8~ta$aKn)r$B=5_V34_NTBcXK57-Ki1B_1JX;u%pAMzv^zZFz zvk2DhyXP9^S%S|Rq_mJ+x?h&kv1JeCCm(cIp#MI3hF1l!(FEf>{5-T-Xi{%b>;w@^;S&RwPjCd3dbW$X-_Tu~N(?Zj!tw~Tdf{(Fx9jr;GqqCki8asmH6 zKmBhS0H~ruf8tXi4x>R|=a&NhvFI-30KnL70D$oy(C-L!1Fgr$3;eea{|Cd#f{x?k z1pZq<{{h6`L|@|*1pZ&6{{DBM|0nx9f^ncL_<7LE{5Oe5Zlf*v<$!;)?srqu|5jwW S|A$@XLgV?lujPaPoc;$(quJpA diff --git a/Migrations/20210328084209_UpdatePlan.Designer.cs b/Migrations/20210328084209_UpdatePlan.Designer.cs new file mode 100644 index 0000000..4346f16 --- /dev/null +++ b/Migrations/20210328084209_UpdatePlan.Designer.cs @@ -0,0 +1,962 @@ +// +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("id"); + + b.Property("command_no") + .HasMaxLength(4000); + + b.Property("create_evaluation_id"); + + b.Property("created"); + + b.Property("fiscal_year"); + + b.Property("imported_date"); + + b.Property("imported_file") + .HasMaxLength(1000); + + b.Property("isActive"); + + b.Property("limit"); + + b.Property("limit_frame"); + + b.Property("limit_frame_quota"); + + b.Property("limit_quota"); + + b.Property("managed_by"); + + b.Property("percentage"); + + b.Property("report_type") + .HasMaxLength(1000); + + b.Property("theDate"); + + b.Property("theRound"); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("create_evaluation_id"); + + b.ToTable("eva_adjust_postponement"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponement_detailEntity", b => + { + b.Property("id"); + + b.Property("achievement_final"); + + b.Property("adjust_postponement_id"); + + b.Property("adjust_postponement_quota_id"); + + b.Property("competency_final"); + + b.Property("cost_living"); + + b.Property("created"); + + b.Property("employee_id"); + + b.Property("isActive"); + + b.Property("level_score_final") + .HasMaxLength(255); + + b.Property("level_this_time") + .HasMaxLength(1000); + + b.Property("middle"); + + b.Property("migration_eva_result") + .HasMaxLength(1000); + + b.Property("migration_total_score"); + + b.Property("new_cost_living"); + + b.Property("new_sarary"); + + b.Property("new_sarary_with_quota"); + + b.Property("order_at_this_time"); + + b.Property("org_at_this_time"); + + b.Property("other_money_at_this_time"); + + b.Property("position_allowance_at_this_time"); + + b.Property("position_this_time") + .HasMaxLength(1000); + + b.Property("promoted_percentage"); + + b.Property("receive_quota"); + + b.Property("remark") + .HasMaxLength(1000); + + b.Property("sarary"); + + b.Property("score_final"); + + b.Property("total_promote"); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("adjust_postponement_id"); + + b.HasIndex("adjust_postponement_quota_id"); + + b.ToTable("eva_adjust_postponement_detail"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluationEntity", b => + { + b.Property("id"); + + b.Property("created"); + + b.Property("employee_id"); + + b.Property("evaluation_group_id"); + + b.Property("isActive"); + + b.Property("performance_plan_id"); + + b.Property("score1"); + + b.Property("score2"); + + b.Property("supervisor1_id"); + + b.Property("supervisor2_id"); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("evaluation_group_id"); + + b.HasIndex("performance_plan_id"); + + b.ToTable("eva_create_evaluation"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluation_detailEntity", b => + { + b.Property("id"); + + b.Property("Final_summary_chief"); + + b.Property("Final_summary_competency_chief"); + + b.Property("Final_summary_competency_supervisor"); + + b.Property("Final_summary_competency_supervisor1A"); + + b.Property("Final_summary_competency_supervisor2A"); + + b.Property("Final_summary_supervisor"); + + b.Property("Final_summary_supervisor1A"); + + b.Property("Final_summary_supervisor2A"); + + b.Property("achievement_chief"); + + b.Property("achievement_supervisor"); + + b.Property("achievement_supervisor1A"); + + b.Property("achievement_supervisor2A"); + + b.Property("chief"); + + b.Property("chief_a"); + + b.Property("chief_a_date"); + + b.Property("chief_a_reject_reason") + .HasMaxLength(1000); + + b.Property("chief_a_remark") + .HasMaxLength(1000); + + b.Property("chief_a_result") + .HasMaxLength(1); + + b.Property("competency_chief"); + + b.Property("competency_supervisor"); + + b.Property("competency_supervisor1A"); + + b.Property("competency_supervisor2A"); + + b.Property("create_evaluation_id"); + + b.Property("created"); + + b.Property("employee_id"); + + b.Property("eva_employee_id"); + + b.Property("help_org_id"); + + b.Property("isActive"); + + b.Property("level_score_chief") + .HasMaxLength(255); + + b.Property("level_score_supervisor") + .HasMaxLength(255); + + b.Property("level_score_supervisor1A") + .HasMaxLength(255); + + b.Property("level_score_supervisor2A") + .HasMaxLength(255); + + b.Property("order_of_data"); + + b.Property("score_chief"); + + b.Property("score_supervisor"); + + b.Property("score_supervisor1A"); + + b.Property("score_supervisor2A"); + + b.Property("status_chief") + .HasMaxLength(1); + + b.Property("status_chief_a") + .HasMaxLength(1); + + b.Property("status_chief_a_click_date"); + + b.Property("status_chief_click_date"); + + b.Property("status_self") + .HasMaxLength(1); + + b.Property("status_self_a") + .HasMaxLength(1); + + b.Property("status_self_a_click_date"); + + b.Property("status_self_click_date"); + + b.Property("status_supervisor") + .HasMaxLength(1); + + b.Property("status_supervisor1A") + .HasMaxLength(1); + + b.Property("status_supervisor1A_click_date"); + + b.Property("status_supervisor2A") + .HasMaxLength(1); + + b.Property("status_supervisor2A_click_date"); + + b.Property("status_supervisor_click_date"); + + b.Property("supervisor1"); + + b.Property("supervisor1A"); + + b.Property("supervisor1A_date"); + + b.Property("supervisor1A_remark") + .HasMaxLength(1000); + + b.Property("supervisor1A_result") + .HasMaxLength(1); + + b.Property("supervisor1_date"); + + b.Property("supervisor1_id"); + + b.Property("supervisor1_remark") + .HasMaxLength(1000); + + b.Property("supervisor1_result") + .HasMaxLength(1); + + b.Property("supervisor2"); + + b.Property("supervisor2A"); + + b.Property("supervisor2A_date"); + + b.Property("supervisor2A_remark") + .HasMaxLength(1000); + + b.Property("supervisor2A_result") + .HasMaxLength(1); + + b.Property("supervisor2_date"); + + b.Property("supervisor2_id"); + + b.Property("supervisor2_remark") + .HasMaxLength(1000); + + b.Property("supervisor2_result") + .HasMaxLength(1); + + b.Property("total_summary_chief"); + + b.Property("total_summary_competency_chief"); + + b.Property("total_summary_competency_supervisor"); + + b.Property("total_summary_competency_supervisor1A"); + + b.Property("total_summary_competency_supervisor2A"); + + b.Property("total_summary_supervisor"); + + b.Property("total_summary_supervisor1A"); + + b.Property("total_summary_supervisor2A"); + + b.Property("updated"); + + b.Property("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("id"); + + b.Property("achievement") + .HasMaxLength(8000); + + b.Property("create_evaluation_detail_id"); + + b.Property("created"); + + b.Property("isActive"); + + b.Property("score"); + + b.Property("score2"); + + b.Property("score3"); + + b.Property("score4"); + + b.Property("sumary"); + + b.Property("sumary2"); + + b.Property("sumary3"); + + b.Property("sumary4"); + + b.Property("target_score1") + .HasMaxLength(255); + + b.Property("target_score2") + .HasMaxLength(255); + + b.Property("target_score3") + .HasMaxLength(255); + + b.Property("target_score4") + .HasMaxLength(255); + + b.Property("target_score5") + .HasMaxLength(255); + + b.Property("thefile") + .HasMaxLength(1000); + + b.Property("updated"); + + b.Property("weight"); + + b.HasKey("id"); + + b.HasIndex("create_evaluation_detail_id"); + + b.ToTable("eva_evaluation_achievement"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_behaviorEntity", b => + { + b.Property("id"); + + b.Property("behavior") + .HasMaxLength(1000); + + b.Property("create_evaluation_detail_id"); + + b.Property("created"); + + b.Property("isActive"); + + b.Property("score"); + + b.Property("score2"); + + b.Property("score3"); + + b.Property("score4"); + + b.Property("sumary"); + + b.Property("sumary2"); + + b.Property("sumary3"); + + b.Property("sumary4"); + + b.Property("target_score1") + .HasMaxLength(255); + + b.Property("target_score2") + .HasMaxLength(255); + + b.Property("target_score3") + .HasMaxLength(255); + + b.Property("target_score4") + .HasMaxLength(255); + + b.Property("target_score5") + .HasMaxLength(255); + + b.Property("updated"); + + b.Property("weight"); + + b.HasKey("id"); + + b.HasIndex("create_evaluation_detail_id"); + + b.ToTable("eva_evaluation_behavior"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_groupEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("code") + .HasMaxLength(255); + + b.Property("created"); + + b.Property("isActive"); + + b.Property("main_dept_id"); + + b.Property("percentage"); + + b.Property("thegroup") + .HasMaxLength(255); + + b.Property("updated"); + + b.HasKey("id"); + + b.ToTable("eva_evaluation_group"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_group_detailEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("created"); + + b.Property("employee_id"); + + b.Property("evaluation_group_id"); + + b.Property("isActive"); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("evaluation_group_id"); + + b.ToTable("eva_evaluation_group_detail"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_operating_agreementEntity", b => + { + b.Property("id"); + + b.Property("create_evaluation_detail_id"); + + b.Property("created"); + + b.Property("indicators") + .HasMaxLength(4000); + + b.Property("isActive"); + + b.Property("mission_detail") + .HasMaxLength(4000); + + b.Property("mission_no"); + + b.Property("target") + .HasMaxLength(4000); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("create_evaluation_detail_id"); + + b.ToTable("eva_evaluation_operating_agreement"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_idp_planEntity", b => + { + b.Property("id"); + + b.Property("create_evaluation_detail_id"); + + b.Property("created"); + + b.Property("develop") + .HasMaxLength(1000); + + b.Property("development_method") + .HasMaxLength(1000); + + b.Property("end_date"); + + b.Property("isActive"); + + b.Property("period_text") + .HasMaxLength(1000); + + b.Property("start_date"); + + b.Property("updated"); + + b.HasKey("id"); + + b.ToTable("eva_idp_plan"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_level_scoreEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("code") + .HasMaxLength(255); + + b.Property("created"); + + b.Property("detail") + .HasMaxLength(1000); + + b.Property("isActive"); + + b.Property("max_score"); + + b.Property("min_score"); + + b.Property("updated"); + + b.HasKey("id"); + + b.ToTable("eva_level_score"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_employeeEntity", b => + { + b.Property("id"); + + b.Property("cost_of_living"); + + b.Property("created"); + + b.Property("employee_id"); + + b.Property("frame_group_guid"); + + b.Property("help_org_id"); + + b.Property("isActive"); + + b.Property("level_text") + .HasMaxLength(1000); + + b.Property("monthly_remuneration"); + + b.Property("order_of_data"); + + b.Property("org_id"); + + b.Property("position_allowance"); + + b.Property("position_text") + .HasMaxLength(1000); + + b.Property("salary"); + + b.Property("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("id"); + + b.Property("created"); + + b.Property("frame_plan_guid"); + + b.Property("group_guid"); + + b.Property("isActive"); + + b.Property("limit_frame_295"); + + b.Property("main_dept_id"); + + b.Property("remark") + .HasMaxLength(4000); + + b.Property("total_salary"); + + b.Property("total_salary_limit"); + + b.Property("total_salary_limit_rounded"); + + b.Property("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("id"); + + b.Property("created"); + + b.Property("executed_date"); + + b.Property("isActive"); + + b.Property("limit_frame_005"); + + b.Property("limit_frame_005_total"); + + b.Property("limit_frame_005_total_rounded"); + + b.Property("plan_guid"); + + b.Property("salary_adjustment_date"); + + b.Property("status_chief") + .HasMaxLength(1); + + b.Property("status_self") + .HasMaxLength(1); + + b.Property("supervisor1"); + + b.Property("supervisor1_date"); + + b.Property("supervisor1_remark") + .HasMaxLength(1000); + + b.Property("supervisor1_result") + .HasMaxLength(1); + + b.Property("total_salary"); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("plan_guid"); + + b.ToTable("eva_limit_frame_plan"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_performance_planEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("created"); + + b.Property("fiscal_year"); + + b.Property("isActive"); + + b.Property("percent"); + + b.Property("theTime"); + + b.Property("updated"); + + b.HasKey("id"); + + b.ToTable("eva_performance_plan"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_performance_plan_detailEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("created"); + + b.Property("end_date"); + + b.Property("isActive"); + + b.Property("list_no"); + + b.Property("performance_plan_id"); + + b.Property("remark") + .HasMaxLength(1000); + + b.Property("start_date"); + + b.Property("step") + .HasMaxLength(1000); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("performance_plan_id"); + + b.ToTable("eva_performance_plan_detail"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_promoted_percentageEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("code") + .HasMaxLength(255); + + b.Property("created"); + + b.Property("detail") + .HasMaxLength(1000); + + b.Property("isActive"); + + b.Property("level_score_id"); + + b.Property("max_score"); + + b.Property("min_score"); + + b.Property("promoted_percentage"); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("level_score_id"); + + b.ToTable("eva_promoted_percentage"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_salary_cylinderEntity", b => + { + b.Property("id"); + + b.Property("cost_living"); + + b.Property("created"); + + b.Property("isActive"); + + b.Property("middle"); + + b.Property("position_level"); + + b.Property("position_type"); + + b.Property("temporary_min"); + + b.Property("themax"); + + b.Property("themin"); + + b.Property("updated"); + + b.HasKey("id"); + + b.ToTable("eva_salary_cylinder"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponementEntity", b => + { + b.HasOne("TodoAPI2.Models.eva_create_evaluationEntity", "eva_create_evaluation") + .WithMany() + .HasForeignKey("create_evaluation_id"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponement_detailEntity", b => + { + b.HasOne("TodoAPI2.Models.eva_adjust_postponementEntity", "eva_adjust_postponement") + .WithMany() + .HasForeignKey("adjust_postponement_id"); + + b.HasOne("TodoAPI2.Models.eva_adjust_postponementEntity", "eva_adjust_postponement_quota") + .WithMany() + .HasForeignKey("adjust_postponement_quota_id") + .HasConstraintName("FK_eva_adjust_postponement_detail_eva_adjust_postponement_adj~1"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluationEntity", b => + { + b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group") + .WithMany() + .HasForeignKey("evaluation_group_id"); + + b.HasOne("TodoAPI2.Models.eva_performance_planEntity", "eva_performance_plan") + .WithMany() + .HasForeignKey("performance_plan_id"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_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 + } + } +} diff --git a/Migrations/20210328084209_UpdatePlan.cs b/Migrations/20210328084209_UpdatePlan.cs new file mode 100644 index 0000000..2269636 --- /dev/null +++ b/Migrations/20210328084209_UpdatePlan.cs @@ -0,0 +1,22 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +namespace tb320eva.Migrations +{ + public partial class UpdatePlan : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "percent", + table: "eva_performance_plan", + nullable: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "percent", + table: "eva_performance_plan"); + } + } +} diff --git a/Migrations/DataContextModelSnapshot.cs b/Migrations/DataContextModelSnapshot.cs index 48d3c0c..f23c1f2 100644 --- a/Migrations/DataContextModelSnapshot.cs +++ b/Migrations/DataContextModelSnapshot.cs @@ -747,6 +747,8 @@ namespace tb320eva.Migrations b.Property("isActive"); + b.Property("percent"); + b.Property("theTime"); b.Property("updated"); diff --git a/Models/eva_performance_plan/eva_performance_planEntity.cs b/Models/eva_performance_plan/eva_performance_planEntity.cs index 726d0e2..f77b9ac 100644 --- a/Models/eva_performance_plan/eva_performance_planEntity.cs +++ b/Models/eva_performance_plan/eva_performance_planEntity.cs @@ -19,6 +19,8 @@ namespace TodoAPI2.Models public int? theTime { get; set; } + public decimal? percent { get; set; } + [NotMapped] public string display_text { diff --git a/Models/eva_performance_plan/eva_performance_planInputModel.cs b/Models/eva_performance_plan/eva_performance_planInputModel.cs index a638ec7..c4d4220 100644 --- a/Models/eva_performance_plan/eva_performance_planInputModel.cs +++ b/Models/eva_performance_plan/eva_performance_planInputModel.cs @@ -20,6 +20,8 @@ namespace TodoAPI2.Models public int? theTime { get; set; } + public decimal? percent { get; set; } + public string active_mode { get; set; } } } diff --git a/Models/eva_performance_plan/eva_performance_planService.cs b/Models/eva_performance_plan/eva_performance_planService.cs index df6e808..2395646 100644 --- a/Models/eva_performance_plan/eva_performance_planService.cs +++ b/Models/eva_performance_plan/eva_performance_planService.cs @@ -20,14 +20,14 @@ namespace TodoAPI2.Models public class eva_performance_planService : Ieva_performance_planService { private IBaseRepository _repository; - private IMyDatabase db; - private Iexternal_linkageService ext; + private IMyDatabase db; + private Iexternal_linkageService ext; public eva_performance_planService(IBaseRepository 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>(entities); } - + private List GetListWithoutBase64Fields(IQueryable 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 GetListBySearch(eva_performance_planSearchModel model) + public List 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 model) + public string UpdateMultiple(List 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(); } diff --git a/Models/eva_performance_plan/eva_performance_planViewModel.cs b/Models/eva_performance_plan/eva_performance_planViewModel.cs index d812004..7a1fc8d 100644 --- a/Models/eva_performance_plan/eva_performance_planViewModel.cs +++ b/Models/eva_performance_plan/eva_performance_planViewModel.cs @@ -18,6 +18,6 @@ namespace TodoAPI2.Models public int? theTime { get; set; } - + public decimal? percent { get; set; } } } \ No newline at end of file diff --git a/Views/eva_create_evaluation_detail_agreementView/eva_create_evaluation_detail_agreement.cshtml b/Views/eva_create_evaluation_detail_agreementView/eva_create_evaluation_detail_agreement.cshtml index 1795b2b..ad6b317 100644 --- a/Views/eva_create_evaluation_detail_agreementView/eva_create_evaluation_detail_agreement.cshtml +++ b/Views/eva_create_evaluation_detail_agreementView/eva_create_evaluation_detail_agreement.cshtml @@ -68,7 +68,7 @@ - + diff --git a/Views/eva_performance_planView/eva_performance_plan.cshtml b/Views/eva_performance_planView/eva_performance_plan.cshtml index 61f6c7e..9ae5f7e 100644 --- a/Views/eva_performance_planView/eva_performance_plan.cshtml +++ b/Views/eva_performance_planView/eva_performance_plan.cshtml @@ -29,6 +29,12 @@ +
+
+ + +
+
@@ -87,7 +93,7 @@ เครื่องมือ - + diff --git a/Views/eva_performance_planView/eva_performance_plan_d.cshtml b/Views/eva_performance_planView/eva_performance_plan_d.cshtml index 5e1b655..5d5d337 100644 --- a/Views/eva_performance_planView/eva_performance_plan_d.cshtml +++ b/Views/eva_performance_planView/eva_performance_plan_d.cshtml @@ -100,7 +100,12 @@ - +
+
+ + +
+
diff --git a/wwwroot/js/eva_performance_plan/eva_performance_plan.js b/wwwroot/js/eva_performance_plan/eva_performance_plan.js index d80104e..250c6e6 100644 --- a/wwwroot/js/eva_performance_plan/eva_performance_plan.js +++ b/wwwroot/js/eva_performance_plan/eva_performance_plan.js @@ -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) { diff --git a/wwwroot/js/eva_performance_plan/eva_performance_plan_d.js b/wwwroot/js/eva_performance_plan/eva_performance_plan_d.js index aa32e75..272e5a0 100644 --- a/wwwroot/js/eva_performance_plan/eva_performance_plan_d.js +++ b/wwwroot/js/eva_performance_plan/eva_performance_plan_d.js @@ -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); } }