feat(agency_report): แสดงข้อ 13.1-13.4 วิสัยทัศน์/ค่านิยม/เอกลักษณ์/อัตลักษณ์ ในรายงาน
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
เดิมรายงานยังผูกกับ checkbox แบบเก่า 7 ตัวเลือก (bool_13_1-7) ที่หน้าเว็บไม่ได้ใช้แล้ว เปลี่ยนเป็นแสดงชื่อ+ตัวชี้วัดที่เลือกจริงของแต่ละหมวด (รวมข้อความด้วยขึ้นบรรทัดใหม่) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FyqMVwbVZLfTe8QJSmrUjQ
This commit is contained in:
@@ -25,6 +25,13 @@ namespace rmutr_report.Controllers
|
||||
this._setting = setting;
|
||||
}
|
||||
|
||||
private static string JoinNames(IEnumerable<string> names)
|
||||
{
|
||||
return names == null
|
||||
? ""
|
||||
: string.Join("\n", names.Where(n => !string.IsNullOrWhiteSpace(n)));
|
||||
}
|
||||
|
||||
[HttpPost, Route("reports/agency_result_report/{type}")]
|
||||
[ApiExplorerSettings(GroupName = "reports")]
|
||||
public IActionResult GetAgencyReport([FromRoute] string type, [FromBody] List<agency_report> agencyReports)
|
||||
@@ -61,6 +68,15 @@ namespace rmutr_report.Controllers
|
||||
|
||||
agencyReport.text_25_1 = agencyReport.bool_25_1 == true ? "X" : "";
|
||||
agencyReport.text_25_2 = agencyReport.bool_25_2 == true ? "X" : "";
|
||||
|
||||
agencyReport.vision_names_text = JoinNames(agencyReport.agency_report_visions?.Select(c => c.vision_name_th));
|
||||
agencyReport.vision_indicators_text = JoinNames(agencyReport.agency_report_vision_indicators?.Select(c => c.vision_indicator_name));
|
||||
agencyReport.popularity_names_text = JoinNames(agencyReport.agency_report_popularities?.Select(c => c.popularity_name_th));
|
||||
agencyReport.popularity_indicators_text = JoinNames(agencyReport.agency_report_popularity_indicators?.Select(c => c.popularity_indicator_name));
|
||||
agencyReport.uniqueness_names_text = JoinNames(agencyReport.agency_report_uniquenesses?.Select(c => c.uniqueness_name_th));
|
||||
agencyReport.uniqueness_indicators_text = JoinNames(agencyReport.agency_report_uniqueness_indicators?.Select(c => c.uniqueness_indicator_name));
|
||||
agencyReport.identity_names_text = JoinNames(agencyReport.agency_report_identities?.Select(c => c.identity_name_th));
|
||||
agencyReport.identity_indicators_text = JoinNames(agencyReport.agency_report_identity_indicators?.Select(c => c.identity_indicator_name));
|
||||
}
|
||||
|
||||
if (_setting == null || string.IsNullOrEmpty(_setting.report_path))
|
||||
|
||||
Reference in New Issue
Block a user