ปรับปรุงหลายอย่าง
This commit is contained in:
@@ -298,6 +298,11 @@ namespace TodoAPI2.Controllers
|
|||||||
else if (string.IsNullOrEmpty(p1.supervisor3A_fullname))
|
else if (string.IsNullOrEmpty(p1.supervisor3A_fullname))
|
||||||
{
|
{
|
||||||
url = $"{mainurl}{reportsite}/rep_eva_x{k}C.{model.filetype}?{MyHelper.GetParameterForJasperReport(p1)}&j_username={username}&j_password={password}";
|
url = $"{mainurl}{reportsite}/rep_eva_x{k}C.{model.filetype}?{MyHelper.GetParameterForJasperReport(p1)}&j_username={username}&j_password={password}";
|
||||||
|
|
||||||
|
if (p1.supervisor1A_fullname == p1.supervisor2A_fullname || string.IsNullOrEmpty(p1.supervisor2A_fullname))
|
||||||
|
{
|
||||||
|
url = $"{mainurl}{reportsite}/rep_eva_x{k}C2.{model.filetype}?{MyHelper.GetParameterForJasperReport(p1)}&j_username={username}&j_password={password}";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1239
Migrations/20220319035041_AddSpecialCompensation.Designer.cs
generated
Normal file
1239
Migrations/20220319035041_AddSpecialCompensation.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
31
Migrations/20220319035041_AddSpecialCompensation.cs
Normal file
31
Migrations/20220319035041_AddSpecialCompensation.cs
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace tb320eva.Migrations
|
||||||
|
{
|
||||||
|
public partial class AddSpecialCompensation : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<decimal>(
|
||||||
|
name: "new_special_compensation",
|
||||||
|
table: "eva_adjust_postponement_detail",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<decimal>(
|
||||||
|
name: "special_compensation",
|
||||||
|
table: "eva_adjust_postponement_detail",
|
||||||
|
nullable: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "new_special_compensation",
|
||||||
|
table: "eva_adjust_postponement_detail");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "special_compensation",
|
||||||
|
table: "eva_adjust_postponement_detail");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1235
Migrations/20220319042956_RemoveSpecialCom.Designer.cs
generated
Normal file
1235
Migrations/20220319042956_RemoveSpecialCom.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
31
Migrations/20220319042956_RemoveSpecialCom.cs
Normal file
31
Migrations/20220319042956_RemoveSpecialCom.cs
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace tb320eva.Migrations
|
||||||
|
{
|
||||||
|
public partial class RemoveSpecialCom : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "new_special_compensation",
|
||||||
|
table: "eva_adjust_postponement_detail");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "special_compensation",
|
||||||
|
table: "eva_adjust_postponement_detail");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<decimal>(
|
||||||
|
name: "new_special_compensation",
|
||||||
|
table: "eva_adjust_postponement_detail",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<decimal>(
|
||||||
|
name: "special_compensation",
|
||||||
|
table: "eva_adjust_postponement_detail",
|
||||||
|
nullable: true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -384,6 +384,13 @@ namespace TodoAPI2.Models
|
|||||||
return GetListBySearch(model, emp_id, path);
|
return GetListBySearch(model, emp_id, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string GetOnlyDep(string input)
|
||||||
|
{
|
||||||
|
var i = input.Split('-');
|
||||||
|
if (i.Length == 2) return i[1].Trim();
|
||||||
|
return input;
|
||||||
|
}
|
||||||
|
|
||||||
public List<eva_create_evaluation_detail_processViewModel> GetListBySearch(eva_create_evaluation_detail_processSearchModel model, int? emp_id, string path)
|
public List<eva_create_evaluation_detail_processViewModel> GetListBySearch(eva_create_evaluation_detail_processSearchModel model, int? emp_id, string path)
|
||||||
{
|
{
|
||||||
object special_person = (from x in _repository.Context.eva_setup_permission
|
object special_person = (from x in _repository.Context.eva_setup_permission
|
||||||
@@ -474,7 +481,7 @@ namespace TodoAPI2.Models
|
|||||||
search_employee_code = fk_external_employee.employee_no,
|
search_employee_code = fk_external_employee.employee_no,
|
||||||
search_employee_fullname = fk_external_employee.fullname,
|
search_employee_fullname = fk_external_employee.fullname,
|
||||||
|
|
||||||
org_id_external_linkage_external_name = !string.IsNullOrEmpty(fk_external_linkageResult11.external_name) ? fk_external_linkageResult11.external_name : fk_external_employee.department_name,
|
org_id_external_linkage_external_name = !string.IsNullOrEmpty(fk_external_linkageResult11.external_name) ? GetOnlyDep(fk_external_linkageResult11.external_name) : fk_external_employee.department_name,
|
||||||
|
|
||||||
status_self = m_eva_create_evaluation_detail_process.status_self,
|
status_self = m_eva_create_evaluation_detail_process.status_self,
|
||||||
status_chief = m_eva_create_evaluation_detail_process.status_chief,
|
status_chief = m_eva_create_evaluation_detail_process.status_chief,
|
||||||
|
|||||||
@@ -232,10 +232,10 @@ namespace TodoAPI2.Models
|
|||||||
where i.id == model.create_evaluation_detail_id
|
where i.id == model.create_evaluation_detail_id
|
||||||
select i).FirstOrDefault();
|
select i).FirstOrDefault();
|
||||||
|
|
||||||
if (current_detail.status_self == "Y")
|
//if (current_detail.status_self == "Y")
|
||||||
{
|
//{
|
||||||
throw new Exception("คุณนำส่งข้อตกลงการประเมินไปแล้ว ไม่สามารถบันทึกได้");
|
// throw new Exception("คุณนำส่งข้อตกลงการประเมินไปแล้ว ไม่สามารถบันทึกได้");
|
||||||
}
|
//}
|
||||||
|
|
||||||
var existingEntity = _repository.Get(id);
|
var existingEntity = _repository.Get(id);
|
||||||
if (existingEntity != null)
|
if (existingEntity != null)
|
||||||
|
|||||||
@@ -455,6 +455,11 @@
|
|||||||
function CheckPermission() {
|
function CheckPermission() {
|
||||||
if (status_self === "Y") {
|
if (status_self === "Y") {
|
||||||
$(".status_self").hide();
|
$(".status_self").hide();
|
||||||
|
var isEdit = getUrlParameter("e");
|
||||||
|
console.log(isEdit);
|
||||||
|
if (!isEdit) {
|
||||||
|
$(".status_self2").hide();
|
||||||
|
}
|
||||||
$(".status_self_text").attr("disabled", true);
|
$(".status_self_text").attr("disabled", true);
|
||||||
$("#status").text("คุณส่งแบบประเมินไปแล้ว");
|
$("#status").text("คุณส่งแบบประเมินไปแล้ว");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,19 +17,40 @@ function eva_create_evaluation_detail_FeedDataToSearchForm(data) {
|
|||||||
|
|
||||||
//================= Form Data Customizaiton =========================================
|
//================= Form Data Customizaiton =========================================
|
||||||
|
|
||||||
|
function DropDownClearFormAndFeedWithDataHead(d, result, x, y, z, i) {
|
||||||
|
$(d).html('');
|
||||||
|
$(d).append($("<option></option>")
|
||||||
|
.attr("value", "")
|
||||||
|
.text("อ้างอิงตามแบบประเมิน"));
|
||||||
|
if (z !== "") {
|
||||||
|
$.each(result[z], function (key, value) {
|
||||||
|
$(d).append($("<option></option>")
|
||||||
|
.attr("value", value[x])
|
||||||
|
.text(value[y]));
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$.each(result, function (key, value) {
|
||||||
|
$(d).append($("<option></option>")
|
||||||
|
.attr("value", value[x])
|
||||||
|
.text(value[y]));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
$(d).val(i);
|
||||||
|
}
|
||||||
|
|
||||||
function eva_create_evaluation_detail_FeedDataToForm(data) {
|
function eva_create_evaluation_detail_FeedDataToForm(data) {
|
||||||
$("#eva_create_evaluation_detail_id").val(data.id);
|
$("#eva_create_evaluation_detail_id").val(data.id);
|
||||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_create_evaluation_id"), data, "external_id", "external_name", "item_create_evaluation_id", data.create_evaluation_id);
|
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_create_evaluation_id"), data, "external_id", "external_name", "item_create_evaluation_id", data.create_evaluation_id);
|
||||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_employee_id"), data, "id", "fullname", "item_employee_id", data.employee_id);
|
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_employee_id"), data, "id", "fullname", "item_employee_id", data.employee_id);
|
||||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_chief"), data, "id", "fullname", "item_chief", data.chief);
|
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_chief"), data, "id", "fullname", "item_chief", data.chief);
|
||||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_eva_employee_id"), data, "id", "fullname", "item_eva_employee_id", data.eva_employee_id);
|
DropDownClearFormAndFeedWithDataHead($("#eva_create_evaluation_detail_eva_employee_id"), data, "id", "fullname", "item_eva_employee_id", data.eva_employee_id);
|
||||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_supervisor1_id"), data, "id", "fullname", "item_supervisor1_id", data.supervisor1_id);
|
DropDownClearFormAndFeedWithDataHead($("#eva_create_evaluation_detail_supervisor1_id"), data, "id", "fullname", "item_supervisor1_id", data.supervisor1_id);
|
||||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_supervisor2_id"), data, "id", "fullname", "item_supervisor2_id", data.supervisor2_id);
|
DropDownClearFormAndFeedWithDataHead($("#eva_create_evaluation_detail_supervisor2_id"), data, "id", "fullname", "item_supervisor2_id", data.supervisor2_id);
|
||||||
$("#eva_create_evaluation_detail_work_period").val(data.work_period);
|
$("#eva_create_evaluation_detail_work_period").val(data.work_period);
|
||||||
$("#eva_create_evaluation_detail_order_of_data").val(data.order_of_data);
|
$("#eva_create_evaluation_detail_order_of_data").val(data.order_of_data);
|
||||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_help_org_id"), data, "id", "external_name", "item_help_org_id", data.help_org_id);
|
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_help_org_id"), data, "id", "external_name", "item_help_org_id", data.help_org_id);
|
||||||
$("#eva_create_evaluation_detail_remark").val(data.remark);
|
$("#eva_create_evaluation_detail_remark").val(data.remark);
|
||||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_supervisor3_id"), data, "id", "fullname", "item_supervisor3_id", data.supervisor3_id);
|
DropDownClearFormAndFeedWithDataHead($("#eva_create_evaluation_detail_supervisor3_id"), data, "id", "fullname", "item_supervisor3_id", data.supervisor3_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
function eva_create_evaluation_detail_GetFromForm() {
|
function eva_create_evaluation_detail_GetFromForm() {
|
||||||
|
|||||||
@@ -88,6 +88,10 @@ function eva_create_evaluation_detail_status_PutUpdate(a) {
|
|||||||
else if (a === "nextB") {
|
else if (a === "nextB") {
|
||||||
data.status_chief_a = "Y";
|
data.status_chief_a = "Y";
|
||||||
}
|
}
|
||||||
|
else if (a === "backC") {
|
||||||
|
data.status_supervisor_a = "N";
|
||||||
|
data.status_chief_a = "";
|
||||||
|
}
|
||||||
else if (a === "nextC") {
|
else if (a === "nextC") {
|
||||||
data.status_supervisor_a = "Y";
|
data.status_supervisor_a = "Y";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ var eva_evaluation_achievement_setupTable = function (result) {
|
|||||||
"targets": 0,
|
"targets": 0,
|
||||||
"data": "id",
|
"data": "id",
|
||||||
"render": function (data, type, row, meta) {
|
"render": function (data, type, row, meta) {
|
||||||
return "<button type='button' class='btn btn-warning btn-sm status_self' onclick='javascript:eva_evaluation_achievement_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> <button type='button' class='btn btn-danger btn-sm status_self' onclick='javascript:eva_evaluation_achievement_GoDelete(" + tmp + data + tmp + ")'><i class='fa fa-trash-o '></i></button> ";
|
return "<button type='button' class='btn btn-warning btn-sm status_self2' onclick='javascript:eva_evaluation_achievement_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> <button type='button' class='btn btn-danger btn-sm status_self' onclick='javascript:eva_evaluation_achievement_GoDelete(" + tmp + data + tmp + ")'><i class='fa fa-trash-o '></i></button> ";
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
targets: [3, 4, 5, 6, 7],
|
targets: [3, 4, 5, 6, 7],
|
||||||
|
|||||||
Reference in New Issue
Block a user