diff --git a/Models/eva_evaluation_behavior_process2/eva_evaluation_behavior_process2Service.cs b/Models/eva_evaluation_behavior_process2/eva_evaluation_behavior_process2Service.cs index 864f1ad..9840ab6 100644 --- a/Models/eva_evaluation_behavior_process2/eva_evaluation_behavior_process2Service.cs +++ b/Models/eva_evaluation_behavior_process2/eva_evaluation_behavior_process2Service.cs @@ -163,15 +163,15 @@ namespace TodoAPI2.Models { //existingEntity.create_evaluation_detail_id = model.create_evaluation_detail_id; //existingEntity.behavior = model.behavior; - //existingEntity.weight = model.weight; + existingEntity.weight = model.weight; //existingEntity.score = model.score; existingEntity.score2 = model.score2; existingEntity.sumary2 = model.sumary2; - //existingEntity.target_score1 = model.target_score1; - //existingEntity.target_score2 = model.target_score2; - //existingEntity.target_score3 = model.target_score3; - //existingEntity.target_score4 = model.target_score4; - //existingEntity.target_score5 = model.target_score5; + existingEntity.target_score1 = model.target_score1; + existingEntity.target_score2 = model.target_score2; + existingEntity.target_score3 = model.target_score3; + existingEntity.target_score4 = model.target_score4; + existingEntity.target_score5 = model.target_score5; var updated = _repository.Update(id, existingEntity); @@ -201,15 +201,15 @@ namespace TodoAPI2.Models //existingEntity.create_evaluation_detail_id = i.create_evaluation_detail_id; //existingEntity.behavior = i.behavior; - //existingEntity.weight = i.weight; + existingEntity.weight = i.weight; //existingEntity.score = i.score; existingEntity.score2 = i.score2; existingEntity.sumary2 = i.sumary2; - //existingEntity.target_score1 = i.target_score1; - //existingEntity.target_score2 = i.target_score2; - //existingEntity.target_score3 = i.target_score3; - //existingEntity.target_score4 = i.target_score4; - //existingEntity.target_score5 = i.target_score5; + existingEntity.target_score1 = i.target_score1; + existingEntity.target_score2 = i.target_score2; + existingEntity.target_score3 = i.target_score3; + existingEntity.target_score4 = i.target_score4; + existingEntity.target_score5 = i.target_score5; _repository.UpdateWithoutCommit(i.id.Value, existingEntity); diff --git a/Models/rep_eva01/rep_eva01SearchModel.cs b/Models/rep_eva01/rep_eva01SearchModel.cs index d9c5c14..a5c1156 100644 --- a/Models/rep_eva01/rep_eva01SearchModel.cs +++ b/Models/rep_eva01/rep_eva01SearchModel.cs @@ -14,7 +14,7 @@ namespace TodoAPI2.Models public class rep_eva01SearchModel { - public int? org_id { get; set; } + public string org_id { get; set; } public int? round_id { get; set; } diff --git a/ViewControllers/homeViewController.cs b/ViewControllers/homeViewController.cs index 0d1ada5..dd76e1d 100644 --- a/ViewControllers/homeViewController.cs +++ b/ViewControllers/homeViewController.cs @@ -29,6 +29,17 @@ namespace TodoAPI2.Controllers emp = inemp; } + public IActionResult logout() + { + Response.Cookies.Delete("emp_name"); + Response.Cookies.Delete("user_id"); + Response.Cookies.Delete("emp_id"); + + string mainsite = Configuration["SiteInformation:mainsite"]; + + return Redirect(mainsite + "/logout"); + } + public IActionResult index() { MyHelper.get_login(HttpContext, emp, Response); diff --git a/Views/Shared/_Layout.cshtml b/Views/Shared/_Layout.cshtml index 453c518..cf6b779 100644 --- a/Views/Shared/_Layout.cshtml +++ b/Views/Shared/_Layout.cshtml @@ -83,13 +83,6 @@ A -
- - - - -
-
no user 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 3019154..f058e3b 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 @@ -31,28 +31,28 @@
-
+ -
+
@@ -108,28 +108,28 @@
- +
- +
- +
- +
- +
diff --git a/Views/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d2.cshtml b/Views/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d2.cshtml index 8e685e0..01dedd9 100644 --- a/Views/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d2.cshtml +++ b/Views/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d2.cshtml @@ -297,7 +297,6 @@
-
diff --git a/Views/rep_eva01View/rep_eva01_report.cshtml b/Views/rep_eva01View/rep_eva01_report.cshtml index d0e947b..aa8de2a 100644 --- a/Views/rep_eva01View/rep_eva01_report.cshtml +++ b/Views/rep_eva01View/rep_eva01_report.cshtml @@ -26,9 +26,9 @@
-
+
- +
diff --git a/Views/rep_position_salaryView/rep_position_salary_report.cshtml b/Views/rep_position_salaryView/rep_position_salary_report.cshtml index 56a0904..2b34e52 100644 --- a/Views/rep_position_salaryView/rep_position_salary_report.cshtml +++ b/Views/rep_position_salaryView/rep_position_salary_report.cshtml @@ -28,17 +28,17 @@
- +
- +
- +
diff --git a/wwwroot/js/eva_evaluation_behavior_process/eva_evaluation_behavior_process_inline.js b/wwwroot/js/eva_evaluation_behavior_process/eva_evaluation_behavior_process_inline.js index 1ce41f7..f323928 100644 --- a/wwwroot/js/eva_evaluation_behavior_process/eva_evaluation_behavior_process_inline.js +++ b/wwwroot/js/eva_evaluation_behavior_process/eva_evaluation_behavior_process_inline.js @@ -76,11 +76,11 @@ function eva_evaluation_behavior_process_Get(a, blankItem) { tag += '

'; tag += '

'; - tag += '

จำเป็นต้องพัฒนาอย่างยิ่ง

'; - tag += '

ต้องพัฒนา

'; - tag += '

พอใช้

'; - tag += '

ดี

'; - tag += '

ดีเยี่ยม

'; + tag += '

'; + tag += '

'; + tag += '

'; + tag += '

'; + tag += '

'; tag += ''; tag += '

'; diff --git a/wwwroot/js/eva_evaluation_behavior_process2/eva_evaluation_behavior_process2_inline.js b/wwwroot/js/eva_evaluation_behavior_process2/eva_evaluation_behavior_process2_inline.js index 14abfb2..de50a6a 100644 --- a/wwwroot/js/eva_evaluation_behavior_process2/eva_evaluation_behavior_process2_inline.js +++ b/wwwroot/js/eva_evaluation_behavior_process2/eva_evaluation_behavior_process2_inline.js @@ -3,15 +3,15 @@ $("#eva_evaluation_behavior_process2_id_" + i).val(""); $("#eva_evaluation_behavior_process2_create_evaluation_detail_id_" + i).val(""); $("#eva_evaluation_behavior_process2_behavior_" + i).text(""); -$("#eva_evaluation_behavior_process2_weight_" + i).text(""); +$("#eva_evaluation_behavior_process2_weight_" + i).val(""); $("#eva_evaluation_behavior_process2_score_" + i).text(""); $("#eva_evaluation_behavior_process2_score2_" + i).val(""); $("#eva_evaluation_behavior_process2_sumary2_" + i).text(""); -$("#eva_evaluation_behavior_process2_target_score1_" + i).text(""); -$("#eva_evaluation_behavior_process2_target_score2_" + i).text(""); -$("#eva_evaluation_behavior_process2_target_score3_" + i).text(""); -$("#eva_evaluation_behavior_process2_target_score4_" + i).text(""); -$("#eva_evaluation_behavior_process2_target_score5_" + i).text(""); +$("#eva_evaluation_behavior_process2_target_score1_" + i).val(""); +$("#eva_evaluation_behavior_process2_target_score2_" + i).val(""); +$("#eva_evaluation_behavior_process2_target_score3_" + i).val(""); +$("#eva_evaluation_behavior_process2_target_score4_" + i).val(""); +$("#eva_evaluation_behavior_process2_target_score5_" + i).val(""); } @@ -19,15 +19,15 @@ function eva_evaluation_behavior_process2_FeedDataToForm(data, i, blankItem) { $("#eva_evaluation_behavior_process2_id_" + i).val(data.id); $("#eva_evaluation_behavior_process2_create_evaluation_detail_id_" + i).val(data.create_evaluation_detail_id); $("#eva_evaluation_behavior_process2_behavior_" + i).text(data.behavior); -$("#eva_evaluation_behavior_process2_weight_" + i).text(data.weight); +$("#eva_evaluation_behavior_process2_weight_" + i).val(data.weight); $("#eva_evaluation_behavior_process2_score_" + i).text(data.score); $("#eva_evaluation_behavior_process2_score2_" + i).val(data.score2); $("#eva_evaluation_behavior_process2_sumary2_" + i).text(data.sumary2); -//$("#eva_evaluation_behavior_process2_target_score1_" + i).text(data.target_score1); -//$("#eva_evaluation_behavior_process2_target_score2_" + i).text(data.target_score2); -//$("#eva_evaluation_behavior_process2_target_score3_" + i).text(data.target_score3); -//$("#eva_evaluation_behavior_process2_target_score4_" + i).text(data.target_score4); -//$("#eva_evaluation_behavior_process2_target_score5_" + i).text(data.target_score5); +$("#eva_evaluation_behavior_process2_target_score1_" + i).val(data.target_score1); +$("#eva_evaluation_behavior_process2_target_score2_" + i).val(data.target_score2); +$("#eva_evaluation_behavior_process2_target_score3_" + i).val(data.target_score3); +$("#eva_evaluation_behavior_process2_target_score4_" + i).val(data.target_score4); +$("#eva_evaluation_behavior_process2_target_score5_" + i).val(data.target_score5); } @@ -36,21 +36,30 @@ function eva_evaluation_behavior_process2_GetFromForm(obj, i) { eva_evaluation_behavior_process2Object.id = obj.find("#eva_evaluation_behavior_process2_id_" + i).val(); eva_evaluation_behavior_process2Object.create_evaluation_detail_id = obj.find("#eva_evaluation_behavior_process2_create_evaluation_detail_id_" + i).val(); eva_evaluation_behavior_process2Object.behavior = obj.find("#eva_evaluation_behavior_process2_behavior_" + i).text(); -eva_evaluation_behavior_process2Object.weight = obj.find("#eva_evaluation_behavior_process2_weight_" + i).text(); +eva_evaluation_behavior_process2Object.weight = obj.find("#eva_evaluation_behavior_process2_weight_" + i).val(); eva_evaluation_behavior_process2Object.score = obj.find("#eva_evaluation_behavior_process2_score_" + i).text(); eva_evaluation_behavior_process2Object.score2 = obj.find("#eva_evaluation_behavior_process2_score2_" + i).val(); eva_evaluation_behavior_process2Object.sumary2 = obj.find("#eva_evaluation_behavior_process2_sumary2_" + i).text(); -eva_evaluation_behavior_process2Object.target_score1 = obj.find("#eva_evaluation_behavior_process2_target_score1_" + i).text(); -eva_evaluation_behavior_process2Object.target_score2 = obj.find("#eva_evaluation_behavior_process2_target_score2_" + i).text(); -eva_evaluation_behavior_process2Object.target_score3 = obj.find("#eva_evaluation_behavior_process2_target_score3_" + i).text(); -eva_evaluation_behavior_process2Object.target_score4 = obj.find("#eva_evaluation_behavior_process2_target_score4_" + i).text(); -eva_evaluation_behavior_process2Object.target_score5 = obj.find("#eva_evaluation_behavior_process2_target_score5_" + i).text(); +eva_evaluation_behavior_process2Object.target_score1 = obj.find("#eva_evaluation_behavior_process2_target_score1_" + i).val(); +eva_evaluation_behavior_process2Object.target_score2 = obj.find("#eva_evaluation_behavior_process2_target_score2_" + i).val(); +eva_evaluation_behavior_process2Object.target_score3 = obj.find("#eva_evaluation_behavior_process2_target_score3_" + i).val(); +eva_evaluation_behavior_process2Object.target_score4 = obj.find("#eva_evaluation_behavior_process2_target_score4_" + i).val(); +eva_evaluation_behavior_process2Object.target_score5 = obj.find("#eva_evaluation_behavior_process2_target_score5_" + i).val(); eva_evaluation_behavior_process2Object.active_mode = obj.find("#isActive_" + i + "_eva_evaluation_behavior_process2").val(); + +console.log(eva_evaluation_behavior_process2Object); + return eva_evaluation_behavior_process2Object; } function eva_evaluation_behavior_process2_Save(id) { + + if(parseInt($("#h_eva_evaluation_behavior_process2_weight").text())>100){ + alert('กรุณาระบุค่าน้ำหนัก ไม่เกิน 100'); + return false; + } + //Insert eva_evaluation_behavior_process2 List var eva_evaluation_behavior_process2 = []; $('#eva_evaluation_behavior_process2Body tr').each(function () { @@ -78,12 +87,12 @@ function eva_evaluation_behavior_process2_Get(a, blankItem) { tag += ''; tag += '

'; - tag += '

'; - tag += '

จำเป็นต้องพัฒนาอย่างยิ่ง

'; - tag += '

ต้องพัฒนา

'; - tag += '

พอใช้

'; - tag += '

ดี

'; - tag += '

ดีเยี่ยม

'; + tag += ''; + tag += ''; + tag += ''; + tag += ''; + tag += ''; + tag += ''; tag += '

'; tag += ''; tag += '

'; @@ -121,7 +130,7 @@ function Oneva_evaluation_behavior_process2_scoreChange(){ var i = $(this).find("#rowCount").text(); var score = $("#eva_evaluation_behavior_process2_score2_" + i).val(); var score_old = $("#eva_evaluation_behavior_process2_score_" + i).text(); - var weight = $("#eva_evaluation_behavior_process2_weight_" + i).text(); + var weight = $("#eva_evaluation_behavior_process2_weight_" + i).val(); var total = (score * weight / 100).toFixed(2); $("#eva_evaluation_behavior_process2_sumary2_" + i).text(total); total_behavior += parseFloat(total); diff --git a/wwwroot/js/rep_eva01/rep_eva01_report.js b/wwwroot/js/rep_eva01/rep_eva01_report.js index d1e509d..cd6a0aa 100644 --- a/wwwroot/js/rep_eva01/rep_eva01_report.js +++ b/wwwroot/js/rep_eva01/rep_eva01_report.js @@ -1,10 +1,19 @@ var rep_eva01_API = "/api/rep_eva01/"; +function array_to_string_comma(a){ + var x = ""; + $.each(a, function( index, value ) { + if(x !== "") x+=","; + x+=value; + }); + return x; +} + //================= Search Customizaiton ========================================= function rep_eva01_GetSearchParameter(fileType) { var rep_eva01SearchObject = new Object(); -rep_eva01SearchObject.org_id = $("#s_rep_eva01_org_id").val(); +rep_eva01SearchObject.org_id = array_to_string_comma($("#s_rep_eva01_org_id").val()); rep_eva01SearchObject.round_id = $("#s_rep_eva01_round_id").val(); @@ -48,6 +57,8 @@ function rep_eva01_DoSearch(fileType) { var report_url = apisite + "/api/rep_eva01/rep_eva01_report?" + p; +console.log(report_url); + if (fileType === "pdf") { $("#report_result").attr("src", report_url); $("#report_result").show();