ปรับปรุงหลายข้อ
This commit is contained in:
@@ -357,6 +357,8 @@ namespace TodoAPI2.Controllers
|
||||
|
||||
i.leave_period = MyHelper.GetDateStringForReport(p.leave_start_date) + " ถึง " + MyHelper.GetDateStringForReport(p.leave_end_date);
|
||||
i.selected_round = p.selected_round;
|
||||
i.plan_remark = p.plan_remark;
|
||||
i.eva_detail_remark = p.eva_detail_remark;
|
||||
|
||||
var context = _process.GetDataContext();
|
||||
var all_eva = (from x in context.eva_performance_plan
|
||||
@@ -422,6 +424,8 @@ namespace TodoAPI2.Controllers
|
||||
i.txt_status_chief_a_click_date = MyHelper.GetDateStringForReport(p.status_chief_a_click_date);
|
||||
if (i.txt_status_chief_a_click_date == "") i.txt_status_chief_a_click_date = "..................................";
|
||||
|
||||
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
1089
Migrations/20210914074108_UpdateRemarkToPlan.Designer.cs
generated
Normal file
1089
Migrations/20210914074108_UpdateRemarkToPlan.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
23
Migrations/20210914074108_UpdateRemarkToPlan.cs
Normal file
23
Migrations/20210914074108_UpdateRemarkToPlan.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace tb320eva.Migrations
|
||||
{
|
||||
public partial class UpdateRemarkToPlan : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "remark",
|
||||
table: "eva_performance_plan",
|
||||
maxLength: 500,
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "remark",
|
||||
table: "eva_performance_plan");
|
||||
}
|
||||
}
|
||||
}
|
||||
1092
Migrations/20210914083030_UpdateRemarkToEvaDetail.Designer.cs
generated
Normal file
1092
Migrations/20210914083030_UpdateRemarkToEvaDetail.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
23
Migrations/20210914083030_UpdateRemarkToEvaDetail.cs
Normal file
23
Migrations/20210914083030_UpdateRemarkToEvaDetail.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace tb320eva.Migrations
|
||||
{
|
||||
public partial class UpdateRemarkToEvaDetail : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "remark",
|
||||
table: "eva_create_evaluation_detail",
|
||||
maxLength: 1000,
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "remark",
|
||||
table: "eva_create_evaluation_detail");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -298,6 +298,9 @@ namespace tb320eva.Migrations
|
||||
|
||||
b.Property<int?>("order_of_data");
|
||||
|
||||
b.Property<string>("remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("score_chief");
|
||||
|
||||
b.Property<decimal?>("score_supervisor");
|
||||
@@ -851,6 +854,9 @@ namespace tb320eva.Migrations
|
||||
|
||||
b.Property<decimal?>("percent");
|
||||
|
||||
b.Property<string>("remark")
|
||||
.HasMaxLength(500);
|
||||
|
||||
b.Property<DateTime?>("start_leave");
|
||||
|
||||
b.Property<int?>("theTime");
|
||||
|
||||
@@ -191,6 +191,9 @@ namespace TodoAPI2.Models
|
||||
public int? order_of_data { get; set; }
|
||||
|
||||
public int? help_org_id { get; set; }
|
||||
|
||||
[MaxLength(1000)]
|
||||
public string remark { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace TodoAPI2.Models
|
||||
|
||||
public int? help_org_id { get; set; }
|
||||
|
||||
public string remark { get; set; }
|
||||
|
||||
public string active_mode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ namespace TodoAPI2.Models
|
||||
employee_no = fk_external_linkageResult2.employee_no,
|
||||
position_number = fk_external_linkageResult2.position_number,
|
||||
position_name = fk_external_linkageResult2.position_name,
|
||||
remark = null,
|
||||
remark = m_eva_create_evaluation_detail.remark,
|
||||
|
||||
status_self_click_date = m_eva_create_evaluation_detail.status_self_click_date,
|
||||
status_chief_click_date = m_eva_create_evaluation_detail.status_chief_click_date,
|
||||
@@ -275,6 +275,7 @@ namespace TodoAPI2.Models
|
||||
existingEntity.work_period = model.work_period;
|
||||
existingEntity.order_of_data = model.order_of_data;
|
||||
existingEntity.help_org_id = model.help_org_id;
|
||||
existingEntity.remark = model.remark;
|
||||
|
||||
var updated = _repository.Update(id, existingEntity);
|
||||
return Get(updated.id);
|
||||
@@ -301,6 +302,7 @@ namespace TodoAPI2.Models
|
||||
existingEntity.work_period = i.work_period;
|
||||
existingEntity.order_of_data = i.order_of_data;
|
||||
existingEntity.help_org_id = i.help_org_id;
|
||||
existingEntity.remark = i.remark;
|
||||
|
||||
_repository.UpdateWithoutCommit(i.id.Value, existingEntity);
|
||||
}
|
||||
|
||||
@@ -122,6 +122,7 @@ namespace TodoAPI2.Models
|
||||
public string txt_status_supervisor2A { get { return getStatusText(status_supervisor2A) + MyHelper.GetDateStringForReport(status_supervisor2A_click_date); } }
|
||||
|
||||
public string help_org_id_external_linkage_external_name { get; set; }
|
||||
|
||||
private string getStatusText(string s)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(s))
|
||||
|
||||
@@ -252,9 +252,14 @@ namespace TodoAPI2.Models
|
||||
orderby x.fullname
|
||||
select new external_linkageViewModel { external_id = x.id, external_name = x.fullname }
|
||||
).ToList();
|
||||
i.item_evaluation_round_search = option_all.Union((from x in _repository.Context.eva_performance_plan
|
||||
orderby x.fiscal_year descending, x.theTime descending
|
||||
select new external_linkageViewModel { id_guid = x.id, external_name = checkNull(x.theTime) + "/" + checkNull(x.fiscal_year) }
|
||||
|
||||
var allround = (from y in _repository.Context.eva_create_evaluation
|
||||
select y.performance_plan_id).ToList();
|
||||
|
||||
i.item_evaluation_round_search = option_all.Union((from x in _repository.Context.eva_performance_plan
|
||||
where allround.Contains(x.id)
|
||||
orderby x.fiscal_year descending, x.theTime descending
|
||||
select new external_linkageViewModel { id_guid = x.id, external_name = checkNull(x.theTime) + "/" + checkNull(x.fiscal_year) }
|
||||
)).ToList();
|
||||
return i;
|
||||
}
|
||||
@@ -292,9 +297,14 @@ namespace TodoAPI2.Models
|
||||
orderby x.fullname
|
||||
select new external_linkageViewModel { external_id = x.id, external_name = x.fullname }
|
||||
).ToList();
|
||||
|
||||
var allround = (from y in _repository.Context.eva_create_evaluation
|
||||
select y.performance_plan_id).ToList();
|
||||
|
||||
i.item_evaluation_round_search = option_all.Union((from x in _repository.Context.eva_performance_plan
|
||||
orderby x.fiscal_year descending, x.theTime descending
|
||||
select new external_linkageViewModel { id_guid = x.id, external_name = checkNull(x.theTime) + "/" + checkNull(x.fiscal_year) }
|
||||
where allround.Contains(x.id)
|
||||
orderby x.fiscal_year descending, x.theTime descending
|
||||
select new external_linkageViewModel { id_guid = x.id, external_name = checkNull(x.theTime) + "/" + checkNull(x.fiscal_year) }
|
||||
)).ToList();
|
||||
return i;
|
||||
}
|
||||
|
||||
@@ -95,6 +95,13 @@ namespace TodoAPI2.Models
|
||||
|
||||
var leave_start_date = plan.start_leave;
|
||||
var leave_end_date = plan.end_leave;
|
||||
var plan_remark = plan.remark;
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(plan_remark))
|
||||
{
|
||||
plan_remark = "หมายเหตุ " + plan_remark;
|
||||
}
|
||||
|
||||
var data = (
|
||||
from m_eva_create_evaluation_detail_process in _repository.Context.eva_create_evaluation_detail
|
||||
@@ -123,7 +130,7 @@ namespace TodoAPI2.Models
|
||||
into external_supervisor2AResult
|
||||
from fk_external_supervisor2A in external_supervisor2AResult.DefaultIfEmpty()
|
||||
|
||||
|
||||
|
||||
|
||||
where m_eva_create_evaluation_detail_process.id == id
|
||||
|
||||
@@ -209,7 +216,9 @@ namespace TodoAPI2.Models
|
||||
chief_position_level_text = fk_external_chief.position_level_text,
|
||||
|
||||
leave_start_date = leave_start_date,
|
||||
leave_end_date = leave_end_date
|
||||
leave_end_date = leave_end_date,
|
||||
plan_remark = plan_remark,
|
||||
eva_detail_remark = m_eva_create_evaluation_detail_process.remark
|
||||
}
|
||||
).ToList();
|
||||
|
||||
|
||||
@@ -41,5 +41,8 @@ namespace TodoAPI2.Models
|
||||
public DateTime? leave_start_date { get; set; }
|
||||
|
||||
public DateTime? leave_end_date { get; set; }
|
||||
|
||||
public string plan_remark { get; set; }
|
||||
public string eva_detail_remark { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,9 @@ namespace TodoAPI2.Models
|
||||
|
||||
public DateTime? end_leave { get; set; }
|
||||
|
||||
[MaxLength(500)]
|
||||
public string remark { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string display_text
|
||||
{
|
||||
|
||||
@@ -26,6 +26,8 @@ namespace TodoAPI2.Models
|
||||
|
||||
public DateTime? end_leave { get; set; }
|
||||
|
||||
public string remark { get; set; }
|
||||
|
||||
public string active_mode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,6 +101,7 @@ namespace TodoAPI2.Models
|
||||
percent = m_eva_performance_plan.percent,
|
||||
start_leave = m_eva_performance_plan.start_leave,
|
||||
end_leave = m_eva_performance_plan.end_leave,
|
||||
remark = m_eva_performance_plan.remark,
|
||||
|
||||
isActive = m_eva_performance_plan.isActive,
|
||||
Created = m_eva_performance_plan.created,
|
||||
@@ -128,6 +129,7 @@ namespace TodoAPI2.Models
|
||||
percent = m_eva_performance_plan.percent,
|
||||
start_leave = m_eva_performance_plan.start_leave,
|
||||
end_leave = m_eva_performance_plan.end_leave,
|
||||
remark = m_eva_performance_plan.remark,
|
||||
|
||||
isActive = m_eva_performance_plan.isActive,
|
||||
Created = m_eva_performance_plan.created,
|
||||
@@ -149,7 +151,7 @@ namespace TodoAPI2.Models
|
||||
&& (m_eva_performance_plan.theTime == model.theTime || !model.theTime.HasValue)
|
||||
|
||||
|
||||
orderby m_eva_performance_plan.created descending
|
||||
orderby m_eva_performance_plan.fiscal_year descending, m_eva_performance_plan.theTime descending
|
||||
select new eva_performance_planViewModel()
|
||||
{
|
||||
id = m_eva_performance_plan.id,
|
||||
@@ -158,6 +160,7 @@ namespace TodoAPI2.Models
|
||||
percent = m_eva_performance_plan.percent,
|
||||
start_leave = m_eva_performance_plan.start_leave,
|
||||
end_leave = m_eva_performance_plan.end_leave,
|
||||
remark = m_eva_performance_plan.remark,
|
||||
|
||||
isActive = m_eva_performance_plan.isActive,
|
||||
Created = m_eva_performance_plan.created,
|
||||
@@ -193,6 +196,7 @@ namespace TodoAPI2.Models
|
||||
existingEntity.percent = model.percent;
|
||||
existingEntity.start_leave = model.start_leave;
|
||||
existingEntity.end_leave = model.end_leave;
|
||||
existingEntity.remark = model.remark;
|
||||
|
||||
var updated = _repository.Update(id, existingEntity);
|
||||
return Get(updated.id);
|
||||
@@ -215,6 +219,7 @@ namespace TodoAPI2.Models
|
||||
existingEntity.percent = i.percent;
|
||||
existingEntity.start_leave = i.start_leave;
|
||||
existingEntity.end_leave = i.end_leave;
|
||||
existingEntity.remark = i.remark;
|
||||
|
||||
_repository.UpdateWithoutCommit(i.id.Value, existingEntity);
|
||||
}
|
||||
|
||||
@@ -28,6 +28,6 @@ namespace TodoAPI2.Models
|
||||
|
||||
public string txt_end_leave { get { return MyHelper.GetDateStringForReport(this.end_leave); } }
|
||||
|
||||
|
||||
public string remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -60,6 +60,10 @@ namespace TodoAPI2.Models
|
||||
|
||||
public string txt_status_self_a_click_date { get; set; }
|
||||
public string txt_status_chief_a_click_date { get; set; }
|
||||
|
||||
public string plan_remark { get; set; }
|
||||
|
||||
public string eva_detail_remark { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -60,13 +60,19 @@
|
||||
<label id="lab_eva_create_evaluation_detail_create_evaluation_id" for="eva_create_evaluation_detail_create_evaluation_id">แบบประเมิน</label>
|
||||
<select class="form-control" id="eva_create_evaluation_detail_create_evaluation_id" iLabel="แบบประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail"></select>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_create_evaluation_detail_help_org_id" for="eva_create_evaluation_detail_help_org_id">ช่วยปฏิบัติงานที่</label>
|
||||
<select class="form-control" id="eva_create_evaluation_detail_help_org_id" iLabel="ช่วยปฏิบัติงานที่" iRequire="false" iGroup="eva_create_evaluation_detail"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-12">
|
||||
<label id="lab_eva_create_evaluation_detail_remark" for="eva_create_evaluation_detail_remark">หมายเหตุ (การไปช่วยปฏิบัติงานและทดลองงาน)</label>
|
||||
<textarea class="form-control" rows="4" cols="50" id="eva_create_evaluation_detail_remark" iLabel="หมายเหตุ (การไปช่วยปฏิบัติงานและทดลองงาน)" iRequire="false" iGroup="eva_create_evaluation_detail"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -44,7 +44,12 @@
|
||||
<input class="form-control" type="text" id="eva_performance_plan_end_leave" data-provide="datepicker" data-date-language="th-th" iLabel="ข้อมูลการลาสิ้นสุด" iRequire="true" iGroup="eva_performance_plan" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-12">
|
||||
<label id="lab_eva_performance_plan_remark" for="eva_performance_plan_remark">หมายเหตุ</label>
|
||||
<textarea class="form-control" rows="4" cols="50" id="eva_performance_plan_remark" iLabel="หมายเหตุ" iRequire="false" iGroup="eva_performance_plan"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -115,7 +115,12 @@
|
||||
<input class="form-control" type="text" id="eva_performance_plan_end_leave" data-provide="datepicker" data-date-language="th-th" iLabel="ข้อมูลการลาสิ้นสุด" iRequire="true" iGroup="eva_performance_plan" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-12">
|
||||
<label id="lab_eva_performance_plan_remark" for="eva_performance_plan_remark">หมายเหตุ</label>
|
||||
<textarea class="form-control" rows="4" cols="50" id="eva_performance_plan_remark" iLabel="หมายเหตุ" iRequire="false" iGroup="eva_performance_plan"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -28,7 +28,7 @@ function eva_create_evaluation_detail_FeedDataToForm(data) {
|
||||
$("#eva_create_evaluation_detail_work_period").val(data.work_period);
|
||||
$("#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);
|
||||
|
||||
$("#eva_create_evaluation_detail_remark").val(data.remark);
|
||||
}
|
||||
|
||||
function eva_create_evaluation_detail_GetFromForm() {
|
||||
@@ -43,6 +43,7 @@ function eva_create_evaluation_detail_GetFromForm() {
|
||||
eva_create_evaluation_detailObject.work_period = $("#eva_create_evaluation_detail_work_period").val();
|
||||
eva_create_evaluation_detailObject.order_of_data = $("#eva_create_evaluation_detail_order_of_data").val();
|
||||
eva_create_evaluation_detailObject.help_org_id = $("#eva_create_evaluation_detail_help_org_id").val();
|
||||
eva_create_evaluation_detailObject.remark = $("#eva_create_evaluation_detail_remark").val();
|
||||
|
||||
return eva_create_evaluation_detailObject;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ function eva_performance_plan_FeedDataToForm(data) {
|
||||
$("#eva_performance_plan_percent").val(data.percent);
|
||||
$("#eva_performance_plan_start_leave").val(formatDate(data.start_leave));
|
||||
$("#eva_performance_plan_end_leave").val(formatDate(data.end_leave));
|
||||
$("#eva_performance_plan_remark").val(data.remark);
|
||||
}
|
||||
|
||||
function eva_performance_plan_GetFromForm() {
|
||||
@@ -36,6 +37,7 @@ function eva_performance_plan_GetFromForm() {
|
||||
eva_performance_planObject.percent = $("#eva_performance_plan_percent").val();
|
||||
eva_performance_planObject.start_leave = getDate($("#eva_performance_plan_start_leave").val());
|
||||
eva_performance_planObject.end_leave = getDate($("#eva_performance_plan_end_leave").val());
|
||||
eva_performance_planObject.remark = $("#eva_performance_plan_remark").val();
|
||||
|
||||
return eva_performance_planObject;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ function eva_performance_plan_FeedDataToForm(data) {
|
||||
$("#eva_performance_plan_percent").val(data.percent);
|
||||
$("#eva_performance_plan_start_leave").val(formatDate(data.start_leave));
|
||||
$("#eva_performance_plan_end_leave").val(formatDate(data.end_leave));
|
||||
$("#eva_performance_plan_remark").val(data.remark);
|
||||
}
|
||||
|
||||
function eva_performance_plan_GetFromForm() {
|
||||
@@ -20,6 +21,7 @@ function eva_performance_plan_GetFromForm() {
|
||||
eva_performance_planObject.percent = $("#eva_performance_plan_percent").val();
|
||||
eva_performance_planObject.start_leave = getDate($("#eva_performance_plan_start_leave").val());
|
||||
eva_performance_planObject.end_leave = getDate($("#eva_performance_plan_end_leave").val());
|
||||
eva_performance_planObject.remark = $("#eva_performance_plan_remark").val();
|
||||
|
||||
return eva_performance_planObject;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user