ปรับปรุงเพิ่มเติม ตามที่้น้องเพลงแจ้ง
This commit is contained in:
@@ -146,7 +146,7 @@ namespace TodoAPI2.Models
|
|||||||
into eva_evaluation_groupResult5
|
into eva_evaluation_groupResult5
|
||||||
from fk_eva_evaluation_groupResult5 in eva_evaluation_groupResult5.DefaultIfEmpty()
|
from fk_eva_evaluation_groupResult5 in eva_evaluation_groupResult5.DefaultIfEmpty()
|
||||||
|
|
||||||
where 1==1
|
where 1 == 1
|
||||||
&& avaliable_eva.Contains(m_eva_adjust_postponement_normal.create_evaluation_id.Value)
|
&& avaliable_eva.Contains(m_eva_adjust_postponement_normal.create_evaluation_id.Value)
|
||||||
//&& (m_eva_adjust_postponement_normal.id == model.id || !model.id.HasValue)
|
//&& (m_eva_adjust_postponement_normal.id == model.id || !model.id.HasValue)
|
||||||
&& (m_eva_adjust_postponement_normal.fiscal_year == model.fiscal_year || !model.fiscal_year.HasValue)
|
&& (m_eva_adjust_postponement_normal.fiscal_year == model.fiscal_year || !model.fiscal_year.HasValue)
|
||||||
@@ -195,7 +195,7 @@ namespace TodoAPI2.Models
|
|||||||
orderby i.id descending
|
orderby i.id descending
|
||||||
select i).Take(1).ToList();
|
select i).Take(1).ToList();
|
||||||
|
|
||||||
if(x.Count > 0)
|
if (x.Count > 0)
|
||||||
{
|
{
|
||||||
newkey = x[0].id + 1;
|
newkey = x[0].id + 1;
|
||||||
}
|
}
|
||||||
@@ -242,7 +242,7 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
public string UpdateMultiple(List<eva_adjust_postponement_normalInputModel> model)
|
public string UpdateMultiple(List<eva_adjust_postponement_normalInputModel> model)
|
||||||
{
|
{
|
||||||
foreach(var i in model)
|
foreach (var i in model)
|
||||||
{
|
{
|
||||||
if (i.active_mode == "1" && i.id.HasValue) // update
|
if (i.active_mode == "1" && i.id.HasValue) // update
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ namespace TodoAPI2.Models
|
|||||||
int? owner_eva_employee_id = existingEntity.employee_id;
|
int? owner_eva_employee_id = existingEntity.employee_id;
|
||||||
string noti_message = "กรุณาตรวจสอบแบบประเมินของ {0}";
|
string noti_message = "กรุณาตรวจสอบแบบประเมินของ {0}";
|
||||||
string noti_url = "/eva/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d2?id=" + existingEntity.id.ToString();
|
string noti_url = "/eva/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d2?id=" + existingEntity.id.ToString();
|
||||||
|
bool need_noti = true;
|
||||||
|
|
||||||
if (model.status_mode == "nextA")
|
if (model.status_mode == "nextA")
|
||||||
{
|
{
|
||||||
@@ -198,7 +198,7 @@ namespace TodoAPI2.Models
|
|||||||
existingEntity.status_chief_a_click_date = null;
|
existingEntity.status_chief_a_click_date = null;
|
||||||
noti_to_employee_id = existingEntity.chief;
|
noti_to_employee_id = existingEntity.chief;
|
||||||
noti_message = "กรุณาตรวจสอบ ข้อตกลงการประเมิน ของ {0}";
|
noti_message = "กรุณาตรวจสอบ ข้อตกลงการประเมิน ของ {0}";
|
||||||
noti_url = "/eva/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_firstdoc_d?id=" + existingEntity.id.ToString();
|
noti_url = "/eva/eva_create_evaluation_detail_firstdocView/eva_create_evaluation_detail_firstdoc_d?id=" + existingEntity.id.ToString();
|
||||||
}
|
}
|
||||||
else if (model.status_mode == "backB")
|
else if (model.status_mode == "backB")
|
||||||
{
|
{
|
||||||
@@ -206,7 +206,7 @@ namespace TodoAPI2.Models
|
|||||||
existingEntity.status_self_a_click_date = null;
|
existingEntity.status_self_a_click_date = null;
|
||||||
noti_to_employee_id = existingEntity.employee_id;
|
noti_to_employee_id = existingEntity.employee_id;
|
||||||
noti_message = "ข้อตกลงการประเมินของคุณ ({0}) ถูกตีกลับ";
|
noti_message = "ข้อตกลงการประเมินของคุณ ({0}) ถูกตีกลับ";
|
||||||
noti_url = "/eva/eva_create_evaluation_detail_agreementView/eva_create_evaluation_detail_firstdoc_d?id=" + existingEntity.id.ToString();
|
noti_url = "/eva/eva_create_evaluation_detail_firstdocView/eva_create_evaluation_detail_firstdoc_d?id=" + existingEntity.id.ToString();
|
||||||
}
|
}
|
||||||
else if (model.status_mode == "nextB")
|
else if (model.status_mode == "nextB")
|
||||||
{
|
{
|
||||||
@@ -219,6 +219,7 @@ namespace TodoAPI2.Models
|
|||||||
{
|
{
|
||||||
noti_to_employee_id = current_eva.employee_id;
|
noti_to_employee_id = current_eva.employee_id;
|
||||||
}
|
}
|
||||||
|
need_noti = false;
|
||||||
}
|
}
|
||||||
else if (model.status_mode == "next0")
|
else if (model.status_mode == "next0")
|
||||||
{
|
{
|
||||||
@@ -286,7 +287,10 @@ namespace TodoAPI2.Models
|
|||||||
noti_url = "/eva/eva_create_evaluation_detail_agreementView/eva_create_evaluation_detail_agreement_d2?id=" + existingEntity.id.ToString();
|
noti_url = "/eva/eva_create_evaluation_detail_agreementView/eva_create_evaluation_detail_agreement_d2?id=" + existingEntity.id.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (need_noti)
|
||||||
|
{
|
||||||
SendNotification(noti_to_employee_id, owner_eva_employee_id, existingEntity.id, noti_message, noti_url);
|
SendNotification(noti_to_employee_id, owner_eva_employee_id, existingEntity.id, noti_message, noti_url);
|
||||||
|
}
|
||||||
|
|
||||||
var updated = _repository.Update(id, existingEntity);
|
var updated = _repository.Update(id, existingEntity);
|
||||||
return Get(updated.id);
|
return Get(updated.id);
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ namespace TodoAPI2.Controllers
|
|||||||
{
|
{
|
||||||
private ILogger<eva_create_evaluation_detail_firstdocController> _logger;
|
private ILogger<eva_create_evaluation_detail_firstdocController> _logger;
|
||||||
private Ieva_create_evaluation_detail_firstdocService _repository;
|
private Ieva_create_evaluation_detail_firstdocService _repository;
|
||||||
|
private Iexternal_employeeService emp;
|
||||||
private IConfiguration Configuration { get; set; }
|
private IConfiguration Configuration { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -23,22 +24,27 @@ namespace TodoAPI2.Controllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="repository"></param>
|
/// <param name="repository"></param>
|
||||||
/// <param name="configuration"></param>
|
/// <param name="configuration"></param>
|
||||||
|
/// <param name="inemp"></param>
|
||||||
/// <param name="logger"></param>
|
/// <param name="logger"></param>
|
||||||
public eva_create_evaluation_detail_firstdocViewController(ILogger<eva_create_evaluation_detail_firstdocController> logger, Ieva_create_evaluation_detail_firstdocService repository, IConfiguration configuration)
|
public eva_create_evaluation_detail_firstdocViewController(ILogger<eva_create_evaluation_detail_firstdocController> logger,
|
||||||
|
Ieva_create_evaluation_detail_firstdocService repository, IConfiguration configuration, Iexternal_employeeService inemp)
|
||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_repository = repository;
|
_repository = repository;
|
||||||
Configuration = configuration;
|
Configuration = configuration;
|
||||||
|
emp = inemp;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IActionResult eva_create_evaluation_detail_firstdoc()
|
public IActionResult eva_create_evaluation_detail_firstdoc()
|
||||||
{
|
{
|
||||||
|
MyHelper.get_login(HttpContext, emp, Response);
|
||||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
|
|
||||||
public IActionResult eva_create_evaluation_detail_firstdoc_d()
|
public IActionResult eva_create_evaluation_detail_firstdoc_d()
|
||||||
{
|
{
|
||||||
|
MyHelper.get_login(HttpContext, emp, Response);
|
||||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -263,7 +263,7 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-md-12">
|
<div class="form-group col-md-12">
|
||||||
<button type="button" class="btn btn-danger" onclick="javascript:window_close()"><i class="fa fa-repeat"></i> กลับ</button>
|
<button type="button" class="btn btn-danger" onclick="javascript:window_open_from_root('@MyHelper.GetConfig(Configuration, "SiteInformation:mainsite")');"><i class="fa fa-repeat"></i> กลับ</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -154,7 +154,7 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-md-12">
|
<div class="form-group col-md-12">
|
||||||
<button type="button" class="btn btn-danger" onclick="javascript:window_close()"><i class="fa fa-repeat"></i> กลับ</button>
|
<button type="button" class="btn btn-danger" onclick="javascript:window_open_from_root('@MyHelper.GetConfig(Configuration, "SiteInformation:mainsite")');"><i class="fa fa-repeat"></i> กลับ</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-md-12">
|
<div class="form-group col-md-12">
|
||||||
<button type="button" class="btn btn-danger" onclick="javascript:window_close()"><i class="fa fa-repeat"></i> กลับ</button>
|
<button type="button" class="btn btn-danger" onclick="javascript:window_open_from_root('@MyHelper.GetConfig(Configuration, "SiteInformation:mainsite")');"><i class="fa fa-repeat"></i> กลับ</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,7 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-md-12">
|
<div class="form-group col-md-12">
|
||||||
<button type="button" class="btn btn-danger" onclick="javascript:window_close()"><i class="fa fa-repeat"></i> กลับ</button>
|
<button type="button" class="btn btn-danger" onclick="javascript:window_open_from_root('@MyHelper.GetConfig(Configuration, "SiteInformation:mainsite")');"><i class="fa fa-repeat"></i> กลับ</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,88 +0,0 @@
|
|||||||
@using Microsoft.Extensions.Configuration
|
|
||||||
@inject IConfiguration Configuration
|
|
||||||
@{
|
|
||||||
ViewData["Title"] = "eva_create_evaluation_detail_review0A";
|
|
||||||
Layout = "_LayoutDirect";
|
|
||||||
}
|
|
||||||
|
|
||||||
<div class="row page-title">
|
|
||||||
<div class="col-md-5">
|
|
||||||
<div class="page-title">
|
|
||||||
@Configuration["SiteInformation:modulename"]
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-7">
|
|
||||||
<ol class="breadcrumb" style="">
|
|
||||||
<li class="breadcrumb-item "><a href="@Configuration["SiteInformation:mainsite"]">หน้าแรก</a></li>
|
|
||||||
<li class="breadcrumb-item "><a href="@Configuration["SiteInformation:mainsite"]@Configuration["SiteInformation:appsite"]">@Configuration["SiteInformation:modulename"]</a></li>
|
|
||||||
<li class="breadcrumb-item active">eva_create_evaluation_detail_review0A</li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<section class="wrapper">
|
|
||||||
<div class="title col-md-12"><div class="line"></div>บันทึกข้อมูล eva_create_evaluation_detail_review0A</div>
|
|
||||||
|
|
||||||
<section class="card no-border">
|
|
||||||
<header class="card-header">
|
|
||||||
กรุณากรอกข้อมูลลงในแบบฟอร์ม
|
|
||||||
</header>
|
|
||||||
<div class="card-body" style="">
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
|
|
||||||
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review0A_id" />
|
|
||||||
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review0A_create_evaluation_id" />
|
|
||||||
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review0A_chief_a" />
|
|
||||||
|
|
||||||
<div class='row'></div>
|
|
||||||
<div class='row'></div>
|
|
||||||
<div class='row'>
|
|
||||||
<div class="form-group col-md-6">
|
|
||||||
<label id="lab_eva_create_evaluation_detail_review0A_chief_a_result" for="eva_create_evaluation_detail_review0A_chief_a_result">ผลการประเมิน</label>
|
|
||||||
<select class="form-control" id="eva_create_evaluation_detail_review0A_chief_a_result" iLabel="ผลการประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review0A"></select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-6">
|
|
||||||
<label id="lab_eva_create_evaluation_detail_review0A_chief_a_date" for="eva_create_evaluation_detail_review0A_chief_a_date">วันที่ประเมิน</label>
|
|
||||||
<input class="form-control" type="text" id="eva_create_evaluation_detail_review0A_chief_a_date" data-provide="datepicker" data-date-language="th-th" iLabel="วันที่ประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review0A" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class='row'>
|
|
||||||
<div class="form-group col-md-12">
|
|
||||||
<label id="lab_eva_create_evaluation_detail_review0A_chief_a_remark" for="eva_create_evaluation_detail_review0A_chief_a_remark">ความเห็นผู้ประเมินสูงสุด</label>
|
|
||||||
<textarea class="form-control" rows="4" cols="50" id="eva_create_evaluation_detail_review0A_chief_a_remark" iLabel="ความเห็นผู้ประเมินสูงสุด" iRequire="true" iGroup="eva_create_evaluation_detail_review0A"></textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="form-group col-md-12">
|
|
||||||
<button type="button" class="btn btn-outline" onclick="javascript:window_close()" style="background-color: #fff;">ยกเลิก</button>
|
|
||||||
<button type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_review0A_PutUpdate()">บันทึก</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</section>
|
|
||||||
|
|
||||||
@section FooterPlaceHolder{
|
|
||||||
<script src="~/js/eva_create_evaluation_detail_review0A/eva_create_evaluation_detail_review0A_d.js"></script>
|
|
||||||
<script>
|
|
||||||
$(document).ready(function () {
|
|
||||||
var id = getUrlParameter("id");
|
|
||||||
if (id) {
|
|
||||||
eva_create_evaluation_detail_review0A_SetEditForm(id);
|
|
||||||
} else {
|
|
||||||
eva_create_evaluation_detail_review0A_SetCreateForm();
|
|
||||||
}
|
|
||||||
SetupValidationRemark("eva_create_evaluation_detail_review0A");
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -70,7 +70,6 @@
|
|||||||
<Folder Include="Seed\" CopyToOutputDirectory="Always" />
|
<Folder Include="Seed\" CopyToOutputDirectory="Always" />
|
||||||
<None Include="Views\eva_create_evaluation_detail_firstdocView\eva_create_evaluation_detail_firstdoc.cshtml" />
|
<None Include="Views\eva_create_evaluation_detail_firstdocView\eva_create_evaluation_detail_firstdoc.cshtml" />
|
||||||
<None Include="Views\eva_create_evaluation_detail_firstdocView\eva_create_evaluation_detail_firstdoc_d.cshtml" />
|
<None Include="Views\eva_create_evaluation_detail_firstdocView\eva_create_evaluation_detail_firstdoc_d.cshtml" />
|
||||||
<None Include="Views\eva_create_evaluation_detail_review0AView\eva_create_evaluation_detail_review0A_d.cshtml" />
|
|
||||||
<None Include="Views\eva_evaluation_operating_agreementView\eva_evaluation_operating_agreement.cshtml" />
|
<None Include="Views\eva_evaluation_operating_agreementView\eva_evaluation_operating_agreement.cshtml" />
|
||||||
<None Include="wwwroot\js\eva_adjust_postponement_detail_migration\eva_adjust_postponement_detail_migration.js" />
|
<None Include="wwwroot\js\eva_adjust_postponement_detail_migration\eva_adjust_postponement_detail_migration.js" />
|
||||||
<None Include="wwwroot\js\eva_adjust_postponement_migration\eva_adjust_postponement_migration.js" />
|
<None Include="wwwroot\js\eva_adjust_postponement_migration\eva_adjust_postponement_migration.js" />
|
||||||
|
|||||||
@@ -4461,12 +4461,13 @@
|
|||||||
<param name="logger"></param>
|
<param name="logger"></param>
|
||||||
<param name="inemp"></param>
|
<param name="inemp"></param>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:TodoAPI2.Controllers.eva_create_evaluation_detail_firstdocViewController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.eva_create_evaluation_detail_firstdocController},TodoAPI2.Models.Ieva_create_evaluation_detail_firstdocService,Microsoft.Extensions.Configuration.IConfiguration)">
|
<member name="M:TodoAPI2.Controllers.eva_create_evaluation_detail_firstdocViewController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.eva_create_evaluation_detail_firstdocController},TodoAPI2.Models.Ieva_create_evaluation_detail_firstdocService,Microsoft.Extensions.Configuration.IConfiguration,TodoAPI2.Models.Iexternal_employeeService)">
|
||||||
<summary>
|
<summary>
|
||||||
Default constructure for dependency injection
|
Default constructure for dependency injection
|
||||||
</summary>
|
</summary>
|
||||||
<param name="repository"></param>
|
<param name="repository"></param>
|
||||||
<param name="configuration"></param>
|
<param name="configuration"></param>
|
||||||
|
<param name="inemp"></param>
|
||||||
<param name="logger"></param>
|
<param name="logger"></param>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:TodoAPI2.Controllers.eva_create_evaluation_detail_processViewController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.eva_create_evaluation_detail_processController},TodoAPI2.Models.Iexternal_employeeService,TodoAPI2.Models.Ieva_create_evaluation_detail_processService,Microsoft.Extensions.Configuration.IConfiguration)">
|
<member name="M:TodoAPI2.Controllers.eva_create_evaluation_detail_processViewController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.eva_create_evaluation_detail_processController},TodoAPI2.Models.Iexternal_employeeService,TodoAPI2.Models.Ieva_create_evaluation_detail_processService,Microsoft.Extensions.Configuration.IConfiguration)">
|
||||||
|
|||||||
Reference in New Issue
Block a user