ปรับปรุงเพิ่มเติม ตามที่้น้องเพลงแจ้ง

This commit is contained in:
Nakorn Rientrakrunchai
2021-02-15 18:52:16 +07:00
parent bba1429925
commit 2825bdde24
10 changed files with 62 additions and 140 deletions

View File

@@ -190,7 +190,7 @@ namespace TodoAPI2.Models
int? owner_eva_employee_id = existingEntity.employee_id;
string noti_message = "กรุณาตรวจสอบแบบประเมินของ {0}";
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")
{
@@ -198,7 +198,7 @@ namespace TodoAPI2.Models
existingEntity.status_chief_a_click_date = null;
noti_to_employee_id = existingEntity.chief;
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")
{
@@ -206,7 +206,7 @@ namespace TodoAPI2.Models
existingEntity.status_self_a_click_date = null;
noti_to_employee_id = existingEntity.employee_id;
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")
{
@@ -219,6 +219,7 @@ namespace TodoAPI2.Models
{
noti_to_employee_id = current_eva.employee_id;
}
need_noti = false;
}
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();
}
if (need_noti)
{
SendNotification(noti_to_employee_id, owner_eva_employee_id, existingEntity.id, noti_message, noti_url);
}
var updated = _repository.Update(id, existingEntity);
return Get(updated.id);

View File

@@ -16,6 +16,7 @@ namespace TodoAPI2.Controllers
{
private ILogger<eva_create_evaluation_detail_firstdocController> _logger;
private Ieva_create_evaluation_detail_firstdocService _repository;
private Iexternal_employeeService emp;
private IConfiguration Configuration { get; set; }
/// <summary>
@@ -23,22 +24,27 @@ namespace TodoAPI2.Controllers
/// </summary>
/// <param name="repository"></param>
/// <param name="configuration"></param>
/// <param name="inemp"></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;
_repository = repository;
Configuration = configuration;
emp = inemp;
}
public IActionResult eva_create_evaluation_detail_firstdoc()
{
MyHelper.get_login(HttpContext, emp, Response);
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
return View();
}
public IActionResult eva_create_evaluation_detail_firstdoc_d()
{
MyHelper.get_login(HttpContext, emp, Response);
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
return View();
}

View File

@@ -263,7 +263,7 @@
<div class="row">
<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>

View File

@@ -154,7 +154,7 @@
<div class="row">
<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>

View File

@@ -69,7 +69,7 @@
<div class="row">
<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>

View File

@@ -118,7 +118,7 @@
<div class="row">
<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>

View File

@@ -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>
}

View File

@@ -70,7 +70,6 @@
<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_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="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" />

View File

@@ -4461,12 +4461,13 @@
<param name="logger"></param>
<param name="inemp"></param>
</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>
Default constructure for dependency injection
</summary>
<param name="repository"></param>
<param name="configuration"></param>
<param name="inemp"></param>
<param name="logger"></param>
</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)">