From 96b8cbd1596995aaeddad7a43465984ef176bf3f Mon Sep 17 00:00:00 2001 From: Nakorn Rientrakrunchai Date: Wed, 17 Feb 2021 16:44:40 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84=E0=B8=82?= =?UTF-8?q?=E0=B8=95=E0=B8=B2=E0=B8=A1=20feedback=20=E0=B9=83=E0=B8=99?= =?UTF-8?q?=E0=B8=AB=E0=B9=89=E0=B8=AD=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ApiControllers/rep_eva_xControllers.cs | 38 +++++++++++++------ ...create_evaluation_detail_processService.cs | 3 ++ ...eate_evaluation_detail_processViewModel.cs | 6 +++ ...evaluation_operating_agreementViewModel.cs | 15 ++++++++ Models/rep_eva_x/rep_eva_xInputModel2.cs | 3 ++ .../eva_create_evaluation.cshtml | 6 +-- .../eva_create_evaluation_d.cshtml | 6 +-- ..._create_evaluation_detail_agreement.cshtml | 4 +- ...reate_evaluation_detail_agreement_d.cshtml | 6 +-- .../eva_evaluation_operating_agreement.js | 7 ++-- 10 files changed, 68 insertions(+), 26 deletions(-) diff --git a/ApiControllers/rep_eva_xControllers.cs b/ApiControllers/rep_eva_xControllers.cs index e678458..cce21f9 100644 --- a/ApiControllers/rep_eva_xControllers.cs +++ b/ApiControllers/rep_eva_xControllers.cs @@ -287,7 +287,10 @@ namespace TodoAPI2.Controllers i.employee_code = p.employee_code; i.employee_position_type = p.employee_position_type; i.employee_position_level = p.employee_position_level; - i.employee_org = p.employee_org; + i.employee_org = p.employee_org; + + if (i.employee_org != null) i.employee_org = i.employee_org.Replace("แผนก", ""); + i.employee_position = p.employee_position; if (!string.IsNullOrEmpty(p.employee_profile_picture)) { @@ -315,6 +318,9 @@ namespace TodoAPI2.Controllers i.supervisor2A_fullname = p.supervisor2A_fullname; i.supervisor2A_position = p.supervisor2A_position; i.main_dept = p.employee_main_dept; + + if (i.main_dept != null) i.main_dept = i.main_dept.Replace("กอง",""); + i.leave_period = MyHelper.GetDateStringForReport(p.start_date) + " ถึง " + MyHelper.GetDateStringForReport(p.end_date); i.selected_round = p.selected_round; @@ -360,17 +366,25 @@ namespace TodoAPI2.Controllers i.w1 = p.create_evaluation_score1; i.w2 = p.create_evaluation_score2; - var q = emp.GetLeaveOfEmployee(p.employee_id.Value, p.start_date, p.end_date); - i.sum_day_sick_leave = q.sum_day_sick_leave; - i.count_sick_leave = q.count_sick_leave; - i.sum_day_personal_leave = q.sum_day_personal_leave; - i.count_personal_leave = q.count_personal_leave; - i.sum_day_vacation_leave = q.sum_day_vacation_leave; - i.count_stop_working = q.count_stop_working; - i.count_late_tad_processing_time_results = q.count_late_tad_processing_time_results; - i.count_absence_tad_processing_time_results = q.count_absence_tad_processing_time_results; - i.sum_day_sick_personal_leave = q.sum_day_sick_personal_leave; - i.count_sick_personal_leave = q.count_sick_personal_leave; + if(p.start_date.HasValue && p.end_date.HasValue) + { + var q = emp.GetLeaveOfEmployee(p.employee_id.Value, p.start_date, p.end_date); + i.sum_day_sick_leave = q.sum_day_sick_leave; + i.count_sick_leave = q.count_sick_leave; + i.sum_day_personal_leave = q.sum_day_personal_leave; + i.count_personal_leave = q.count_personal_leave; + i.sum_day_vacation_leave = q.sum_day_vacation_leave; + i.count_stop_working = q.count_stop_working; + i.count_late_tad_processing_time_results = q.count_late_tad_processing_time_results; + i.count_absence_tad_processing_time_results = q.count_absence_tad_processing_time_results; + i.sum_day_sick_personal_leave = q.sum_day_sick_personal_leave; + i.count_sick_personal_leave = q.count_sick_personal_leave; + } + + i.txt_status_self_a_click_date = MyHelper.GetDateStringForReport(p.status_self_a_click_date); + if (i.txt_status_self_a_click_date == "") i.txt_status_self_a_click_date = ".................................."; + i.txt_status_chief_a_click_date = MyHelper.GetDateStringForReport(p.status_chief_a_click_date); + if (i.txt_status_chief_a_click_date == "") i.txt_status_chief_a_click_date = ".................................."; return i; } diff --git a/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processService.cs b/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processService.cs index 63d3a78..d132d9d 100644 --- a/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processService.cs +++ b/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processService.cs @@ -180,6 +180,9 @@ namespace TodoAPI2.Models start_date = start_date, end_date = end_date, + status_self_a_click_date = m_eva_create_evaluation_detail_process.status_self_a_click_date, + status_chief_a_click_date = m_eva_create_evaluation_detail_process.status_chief_a_click_date, + isActive = m_eva_create_evaluation_detail_process.isActive, Created = m_eva_create_evaluation_detail_process.created, Updated = m_eva_create_evaluation_detail_process.updated diff --git a/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processViewModel.cs b/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processViewModel.cs index ea39eb7..be97079 100644 --- a/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processViewModel.cs +++ b/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processViewModel.cs @@ -81,6 +81,9 @@ namespace TodoAPI2.Models public DateTime? status_self_click_date { get; set; } public DateTime? status_chief_click_date { get; set; } + + public DateTime? status_self_a_click_date { get; set; } + public DateTime? status_chief_a_click_date { get; set; } public DateTime? status_supervisor_click_date { get; set; } public DateTime? status_supervisor1A_click_date { get; set; } public DateTime? status_supervisor2A_click_date { get; set; } @@ -106,6 +109,9 @@ namespace TodoAPI2.Models } return " "; } + + public string txt_status_self_a_click_date { get { return MyHelper.GetDateStringForReport(status_self_a_click_date); } } + public string txt_status_chief_a_click_date { get { return MyHelper.GetDateStringForReport(status_chief_a_click_date); } } } } diff --git a/Models/eva_evaluation_operating_agreement/eva_evaluation_operating_agreementViewModel.cs b/Models/eva_evaluation_operating_agreement/eva_evaluation_operating_agreementViewModel.cs index 4b99a6b..e690d41 100644 --- a/Models/eva_evaluation_operating_agreement/eva_evaluation_operating_agreementViewModel.cs +++ b/Models/eva_evaluation_operating_agreement/eva_evaluation_operating_agreementViewModel.cs @@ -26,5 +26,20 @@ namespace TodoAPI2.Models public int? create_evaluation_detail_id_eva_create_evaluation_detail_create_evaluation_id { get; set; } + public string mission_detail_with_enter { get { return replace_with_enter(mission_detail); } } + + public string target_with_enter { get { return replace_with_enter(target); } } + + public string indicators_with_enter { get { return replace_with_enter(indicators); } } + + private string replace_with_enter(string data) + { + if (!string.IsNullOrEmpty(data)) + { + return data.Replace("\n", "
"); + } + return data; + } + } } \ No newline at end of file diff --git a/Models/rep_eva_x/rep_eva_xInputModel2.cs b/Models/rep_eva_x/rep_eva_xInputModel2.cs index b3a8058..161961e 100644 --- a/Models/rep_eva_x/rep_eva_xInputModel2.cs +++ b/Models/rep_eva_x/rep_eva_xInputModel2.cs @@ -56,6 +56,9 @@ namespace TodoAPI2.Models public decimal? count_absence_tad_processing_time_results { get; set; } public decimal? sum_day_sick_personal_leave { get; set; } public decimal? count_sick_personal_leave { get; set; } + + public string txt_status_self_a_click_date { get; set; } + public string txt_status_chief_a_click_date { get; set; } } } diff --git a/Views/eva_create_evaluationView/eva_create_evaluation.cshtml b/Views/eva_create_evaluationView/eva_create_evaluation.cshtml index 1b6cef5..a528028 100644 --- a/Views/eva_create_evaluationView/eva_create_evaluation.cshtml +++ b/Views/eva_create_evaluationView/eva_create_evaluation.cshtml @@ -31,19 +31,19 @@
- +
- +
- +
diff --git a/Views/eva_create_evaluationView/eva_create_evaluation_d.cshtml b/Views/eva_create_evaluationView/eva_create_evaluation_d.cshtml index c89be89..a9899e7 100644 --- a/Views/eva_create_evaluationView/eva_create_evaluation_d.cshtml +++ b/Views/eva_create_evaluationView/eva_create_evaluation_d.cshtml @@ -104,19 +104,19 @@
- +
- +
- +
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 800ee54..1795b2b 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 @@ -15,7 +15,7 @@ @@ -23,7 +23,7 @@
-
แบบประเมินผลสัมฤทธิ์ของงานสมรรถนะ +
แบบประเมินผลสัมฤทธิ์ของงาน/สมรรถนะ
diff --git a/Views/eva_create_evaluation_detail_agreementView/eva_create_evaluation_detail_agreement_d.cshtml b/Views/eva_create_evaluation_detail_agreementView/eva_create_evaluation_detail_agreement_d.cshtml index 3b0cfa9..c949d0c 100644 --- a/Views/eva_create_evaluation_detail_agreementView/eva_create_evaluation_detail_agreement_d.cshtml +++ b/Views/eva_create_evaluation_detail_agreementView/eva_create_evaluation_detail_agreement_d.cshtml @@ -205,7 +205,7 @@
@@ -214,7 +214,7 @@
-
แบบประเมินผลสัมฤทธิ์ของงานสมรรถนะ
+
แบบประเมินผลสัมฤทธิ์ของงาน/สมรรถนะ
@@ -368,7 +368,7 @@
-
ส่งข้อตกลงการประเมิน
+
ส่งแบบประเมิน
diff --git a/wwwroot/js/eva_evaluation_operating_agreement/eva_evaluation_operating_agreement.js b/wwwroot/js/eva_evaluation_operating_agreement/eva_evaluation_operating_agreement.js index 7ece2e6..88786f2 100644 --- a/wwwroot/js/eva_evaluation_operating_agreement/eva_evaluation_operating_agreement.js +++ b/wwwroot/js/eva_evaluation_operating_agreement/eva_evaluation_operating_agreement.js @@ -151,6 +151,7 @@ function eva_evaluation_operating_agreement_GoDelete(a) { var eva_evaluation_operating_agreementTableV; var eva_evaluation_operating_agreement_setupTable = function (result) { + console.log(result); tmp = '"'; eva_evaluation_operating_agreementTableV = $('#eva_evaluation_operating_agreementTable').DataTable({ "processing": true, @@ -163,9 +164,9 @@ var eva_evaluation_operating_agreement_setupTable = function (result) { //{ "data": "" }, { "data": "id" }, { "data": "mission_no" }, - { "data": "mission_detail" }, - { "data": "target" }, - { "data": "indicators" }, + { "data": "mission_detail_with_enter" }, + { "data": "target_with_enter" }, + { "data": "indicators_with_enter" }, ], "columnDefs": [ {