ปรับปรุงหน้า migration ให้ดูง่ายขึ้น และอื่นๆ อีกหลายจุด
This commit is contained in:
@@ -162,6 +162,8 @@ namespace TodoAPI2.Models
|
||||
employee_no_at_this_time = m_eva_adjust_postponement_detail_migration.employee_no_at_this_time,
|
||||
is_for_postponement = m_eva_adjust_postponement_detail_migration.is_for_postponement,
|
||||
|
||||
workingstatus = fk_external_linkageResult3.workingstatus,
|
||||
|
||||
isActive = m_eva_adjust_postponement_detail_migration.isActive,
|
||||
Created = m_eva_adjust_postponement_detail_migration.created,
|
||||
Updated = m_eva_adjust_postponement_detail_migration.updated
|
||||
|
||||
@@ -67,5 +67,9 @@ namespace TodoAPI2.Models
|
||||
public string employee_id_external_linkage_external_name { get; set; }
|
||||
public string org_at_this_time_external_linkage_external_name { get; set; }
|
||||
|
||||
public string workingstatus { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,6 @@ using System.Net;
|
||||
using TTSW.Configure;
|
||||
using Microsoft.Extensions.Options;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
@@ -81,9 +80,18 @@ namespace TodoAPI2.Models
|
||||
public eva_adjust_postponement_migrationWithSelectionViewModel GetWithSelection(int id)
|
||||
{
|
||||
var entity = _repository.Get(id);
|
||||
var i = Mapper.Map<eva_adjust_postponement_migrationWithSelectionViewModel>(entity);
|
||||
i.item_create_evaluation_id = (from x in _repository.Context.eva_create_evaluation select x).ToList();
|
||||
var all_emp = emp.GetAllEmployee();
|
||||
|
||||
var i = Mapper.Map<eva_adjust_postponement_migrationWithSelectionViewModel>(entity);
|
||||
i.item_create_evaluation_id = (from x in _repository.Context.eva_create_evaluation
|
||||
join y in _repository.Context.eva_performance_plan on x.performance_plan_id equals y.id
|
||||
join z in all_emp on x.employee_id equals z.id
|
||||
join g in _repository.Context.eva_evaluation_group on x.evaluation_group_id equals g.id
|
||||
select new external_linkageViewModel {
|
||||
external_id = x.id,
|
||||
external_name = y.theTime.ToString() + "/" + y.fiscal_year.ToString() + " " + g.thegroup + " " + z.fullname
|
||||
}).ToList();
|
||||
|
||||
i.item_managed_by = all_emp.ToList();
|
||||
i.item_report_type = (from x in ext.GetSalaryReportType() select x).ToList();
|
||||
|
||||
@@ -92,8 +100,18 @@ namespace TodoAPI2.Models
|
||||
public eva_adjust_postponement_migrationWithSelectionViewModel GetBlankItem()
|
||||
{
|
||||
var i = new eva_adjust_postponement_migrationWithSelectionViewModel();
|
||||
i.item_create_evaluation_id = (from x in _repository.Context.eva_create_evaluation select x).ToList();
|
||||
var all_emp = emp.GetAllEmployee();
|
||||
|
||||
i.item_create_evaluation_id = (from x in _repository.Context.eva_create_evaluation
|
||||
join y in _repository.Context.eva_performance_plan on x.performance_plan_id equals y.id
|
||||
join z in all_emp on x.employee_id equals z.id
|
||||
join g in _repository.Context.eva_evaluation_group on x.evaluation_group_id equals g.id
|
||||
select new external_linkageViewModel
|
||||
{
|
||||
external_id = x.id,
|
||||
external_name = y.theTime.ToString() + "/" + y.fiscal_year.ToString() + " " + g.thegroup + " " + z.fullname
|
||||
}).ToList();
|
||||
|
||||
i.item_managed_by = all_emp.ToList();
|
||||
i.item_report_type = (from x in ext.GetSalaryReportType() select x).ToList();
|
||||
|
||||
@@ -145,6 +163,7 @@ namespace TodoAPI2.Models
|
||||
imported_file = m_eva_adjust_postponement_migration.imported_file,
|
||||
imported_fileDisplay = m_eva_adjust_postponement_migration.imported_fileDisplay,
|
||||
report_type = m_eva_adjust_postponement_migration.report_type,
|
||||
workingstatus = fk_external_linkageResult11.workingstatus,
|
||||
|
||||
create_evaluation_id_eva_create_evaluation_performance_plan_id = fk_eva_create_evaluationResult4.performance_plan_id,
|
||||
managed_by_external_linkage_external_name = fk_external_linkageResult11.fullname,
|
||||
@@ -322,6 +341,8 @@ namespace TodoAPI2.Models
|
||||
existingEntity.percentage = model.percentage;
|
||||
existingEntity.command_no = model.command_no;
|
||||
existingEntity.managed_by = model.managed_by;
|
||||
existingEntity.report_type = model.report_type;
|
||||
|
||||
if (!string.IsNullOrEmpty(model.imported_file))
|
||||
{
|
||||
if (model.imported_file.StartsWith("Uploads"))
|
||||
|
||||
@@ -55,5 +55,9 @@ namespace TodoAPI2.Models
|
||||
|
||||
public string report_type { get; set; }
|
||||
|
||||
public string workingstatus { get; set; }
|
||||
|
||||
public string txt_data_type { get { if (create_evaluation_id.HasValue) return "ปรับเลื่อนเงินเดือน"; else return "โควต้า"; } }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ namespace TodoAPI2.Models
|
||||
{
|
||||
public class eva_adjust_postponement_migrationWithSelectionViewModel: eva_adjust_postponement_migrationViewModel
|
||||
{
|
||||
public List<eva_create_evaluationEntity> item_create_evaluation_id { get; set; }
|
||||
public List<external_linkageViewModel> item_create_evaluation_id { get; set; }
|
||||
public List<external_employeeViewModel> item_managed_by { get; set; }
|
||||
public List<external_linkageViewModel> item_report_type { get; set; }
|
||||
}
|
||||
|
||||
@@ -301,7 +301,7 @@ namespace TodoAPI2.Models
|
||||
public void Delete(int id)
|
||||
{
|
||||
var details = from i in _repository.Context.eva_adjust_postponement_detail
|
||||
where i.adjust_postponement_id == id
|
||||
where i.adjust_postponement_id == id || i.adjust_postponement_quota_id == id
|
||||
select i;
|
||||
_repository.Context.eva_adjust_postponement_detail.RemoveRange(details);
|
||||
|
||||
|
||||
@@ -150,6 +150,7 @@
|
||||
<th>เครื่องมือ</th>
|
||||
<th><label id='h_eva_adjust_postponement_migration_fiscal_year'>ปีงบประมาณ </label></th>
|
||||
<th><label id='h_eva_adjust_postponement_migration_theRound'>ครั้งที่เลื่อน</label></th>
|
||||
<th><label id='h_eva_adjust_postponement_migration_create_evaluation_id'>txt_data_type</label></th>
|
||||
<th><label id='h_eva_adjust_postponement_migration_limit'>บริหารวงเงิน</label></th>
|
||||
<th><label id='h_eva_adjust_postponement_migration_limit_frame'>กรอบวงเงินร้อยละ</label></th>
|
||||
<th><label id='h_eva_adjust_postponement_migration_limit_quota'>จำนวนเงินที่สามารถบริหารวงเงินหรือวงเงินโควต้าพิเศษ</label></th>
|
||||
|
||||
@@ -302,6 +302,7 @@
|
||||
<th>เครื่องมือ</th>
|
||||
<th><label id='h_eva_adjust_postponement_detail_migration_order_at_this_time'>ลำดับ</label></th>
|
||||
<th><label id='h_eva_adjust_postponement_detail_migration_employee_id'>ผู้รับการประเมิน</label></th>
|
||||
<th><label id='h_eva_adjust_postponement_detail_migration_workingstatus'>workingstatus</label></th>
|
||||
<th><label id='h_eva_adjust_postponement_detail_migration_sarary'>เงินเดือน ก่อนปรับเลื่อน</label></th>
|
||||
<th><label id='h_eva_adjust_postponement_detail_migration_cost_living'>ค่าครองชีพ ก่อนปรับเลื่อน</label></th>
|
||||
<th><label id='h_eva_adjust_postponement_detail_migration_middle'>ค่ากลางฐานในการคำนวณ</label></th>
|
||||
|
||||
@@ -207,6 +207,7 @@ var eva_adjust_postponement_detail_migration_setupTable = function (result) {
|
||||
{ "data": "id" },
|
||||
{ "data": "order_at_this_time" },
|
||||
{ "data": "employee_id_external_linkage_external_name" },
|
||||
{ "data": "workingstatus" },
|
||||
{ "data": "sarary" },
|
||||
{ "data": "cost_living" },
|
||||
{ "data": "middle" },
|
||||
|
||||
@@ -184,6 +184,7 @@ var eva_adjust_postponement_migration_setupTable = function (result) {
|
||||
{ "data": "id" },
|
||||
{ "data": "fiscal_year" },
|
||||
{ "data": "theRound" },
|
||||
{ "data": "txt_data_type" },
|
||||
{ "data": "limit" },
|
||||
{ "data": "limit_frame" },
|
||||
{ "data": "limit_quota" },
|
||||
|
||||
@@ -4,11 +4,12 @@ var eva_adjust_postponement_migration_API = "/api/eva_adjust_postponement_migrat
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function eva_adjust_postponement_migration_FeedDataToForm(data) {
|
||||
//console.log(data);
|
||||
$("#eva_adjust_postponement_migration_id").val(data.id);
|
||||
$("#eva_adjust_postponement_migration_fiscal_year").val(data.fiscal_year);
|
||||
$("#eva_adjust_postponement_migration_theDate").val(formatDate(data.theDate));
|
||||
$("#eva_adjust_postponement_migration_theRound").val(data.theRound);
|
||||
DropDownClearFormAndFeedWithData($("#eva_adjust_postponement_migration_create_evaluation_id"), data, "id", "performance_plan_id", "item_create_evaluation_id", data.create_evaluation_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_adjust_postponement_migration_create_evaluation_id"), data, "external_id", "external_name", "item_create_evaluation_id", data.create_evaluation_id);
|
||||
$("#eva_adjust_postponement_migration_limit").val(data.limit);
|
||||
$("#eva_adjust_postponement_migration_limit_frame").val(data.limit_frame);
|
||||
$("#eva_adjust_postponement_migration_limit_quota").val(data.limit_quota);
|
||||
|
||||
Reference in New Issue
Block a user