Commit Graph
17 Commits
Author SHA1 Message Date
Nut.ไปเรื่อยandClaude Sonnet 5 7ba816ca90 fix(form_1_2): pull "โดยมีเหตุผลและความจำเป็นดังนี้" from per-position reason
continuous-integration/drone/push Build is passing
overall_reason is never populated on this record (or apparently any
real one) — the actual "เหตุผลความจำเป็น" data users fill in on the web
form lives on form_1_2_positions.reason (the same field already shown
on page 2). Moved the heading+value into the position-list band so it
reads from there instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0153wBt23EjW125ZsADwWVAs
2026-09-08 18:20:52 +07:00
Nut.ไปเรื่อยandClaude Sonnet 5 bd567443fd fix(form_1_2): move position list right after สังกัด งาน, per sample
continuous-integration/drone/push Build is passing
Split the page-1 band into Data1a (header through สังกัด งาน + the
list heading) and Data1b (เหตุผล.../checklist), with the repeating
position list band in between — matching the reference form's actual
ordering instead of pushing the list to the bottom of the page.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0153wBt23EjW125ZsADwWVAs
2026-09-08 13:48:00 +07:00
Nut.ไปเรื่อยandClaude Sonnet 5 932eb26791 fix(form_1_2): keep page 1's position summary on the same physical page
continuous-integration/drone/push Build is passing
Data1's declared Height (1000) consumed nearly the whole A4 page,
pushing the sibling P1PositionsList band onto its own extra page.
Trimmed to 810 (just past the last real content) so both bands share
page 1 as intended. Also widened the "ที่ อว 0653." label — it was
being clipped at the old narrow width.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0153wBt23EjW125ZsADwWVAs
2026-09-08 13:37:36 +07:00
Nut.ไปเรื่อยandClaude Sonnet 5 62fbf99073 feat(form_1_2): add New2570 fields to local model, fix report template
continuous-integration/drone/push Build is passing
Two fixes needed together to make the new 3-page เอกสารแนบ ร.1 template
actually render:

1. rmutr_report keeps its own separate copy of the form_1_2 C# model
   (Models/RoReport/form_1_2.cs), which never got the New2570-spec
   fields (division_name, request_count, overall_reason, signer_*,
   approver_*) or the form_1_2_positions child list that rmutr-api's
   model already has. FastReport's RegisterData binds by reflecting
   the actual runtime object, so any Dictionary column not present on
   this local class silently fails to compile ("does not exist in
   current context") for every field on it.

2. Nested BusinessObjectDataSource fields must be referenced by their
   full dotted path from the report root ([form_1_2.form_1_2_positions.
   field]), not the bare child name ([form_1_2_positions.field]) —
   confirmed against another working report (academic_position.frx)
   in this same codebase that uses the identical nesting pattern
   correctly.

Verified locally: report now compiles and reaches PDF export (the
only remaining local failure is a NullReferenceException in libgdiplus
font handling specific to this macOS dev machine, unrelated to the
report itself — production runs Linux where this already works for
every other report using TH Sarabun New).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0153wBt23EjW125ZsADwWVAs
2026-09-08 13:32:39 +07:00
Nut.ไปเรื่อยandClaude Sonnet 5 9292bc2782 feat(form_1_2): rebuild report as 3-page เอกสารแนบ ร.1 attachment form
continuous-integration/drone/push Build is passing
Replaces the old 1-page บันทึกข้อความ memo layout (which didn't match
the actual paper form used) with the real 3-page แนบ ร.1 attachment:
page 1 summary + position list, page 2 old/new position detail table
(repeats once per position via form_1_2_positions, one A4 sheet per
อัตรา), page 3 signatures + หัวหน้าหน่วยงาน decision. All blanks bound
to existing form_1_2 / form_1_2_positions fields (no new backend
fields needed — the New2570 spec fields were already there, just
never wired into a template).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0153wBt23EjW125ZsADwWVAs
2026-09-08 13:12:20 +07:00
Nut.ไปเรื่อยandClaude Sonnet 5 540130f52c fix(form_1_2): guard null date/start_working before .Value to prevent 500
continuous-integration/drone/push Build is passing
GetForm2Report ("ร1. แบบฟอร์มเสนอขอปรับเปลี่ยนชื่อตำแหน่ง") called
.Value on nullable DateTime fields unconditionally, crashing with
InvalidOperationException whenever a record's date or start_working
was null — exactly what happened for form_1_2_uid
377a46dc-7131-4b58-ac7e-c9b54900ac34 (date is null in production).
Mirrors the null-check pattern the sibling GetForm3Report already
uses for the same kind of field.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0153wBt23EjW125ZsADwWVAs
2026-09-08 12:48:44 +07:00
Nut.ไปเรื่อยandClaude Sonnet 5 3ce12e73fc feat(agency_report): แสดงข้อ 13.1-13.4 วิสัยทัศน์/ค่านิยม/เอกลักษณ์/อัตลักษณ์ ในรายงาน
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
2026-09-02 07:27:13 +07:00
Nut.ไปเรื่อย 1dbec66fb2 style(kpi-finance): use colored ✅/❌ emoji for บรรลุ/ไม่บรรลุ
continuous-integration/drone/push Build is passing
Requested a rounder icon-badge look closer to a reference screenshot;
color glyph emoji render that way natively in Excel without needing
manual font-color styling (which colored ✓/✗ can't fully replicate).
2026-09-01 15:50:39 +07:00
Nut.ไปเรื่อย 413f141593 style(kpi-finance): make the บรรลุ/ไม่บรรลุ mark bolder and colored
continuous-integration/drone/push Build is passing
Was a plain black "√"/"X" at the same 16pt as the rest of the row.
Now: green ✓ (#2E7D32) for achieved, red ✗ (#C62828) for not achieved,
bold, 20pt.
2026-09-01 15:41:43 +07:00
Nut.ไปเรื่อย 400f0dbfd1 chore: retrigger CI (webhook missed previous push)
continuous-integration/drone/push Build is passing
2026-09-01 12:16:25 +07:00
Nut.ไปเรื่อย ebb67d536f style(kpi): change strategic-issue header band color to #CAD1EB
Was XLColor.PurpleX11; requested lighter blue-purple for the
kpi_performance_result Excel export section header bars.
2026-09-01 12:10:46 +07:00
Nut.ไปเรื่อย 966d34d1fe fix(kpi): don't number vision/values/uniqueness/identity as strategic issues
continuous-integration/drone/push Build is passing
Add is_reference_section flag to header_data/detail_kpi_data so the
kpi_performance_result and detail_kpi Excel exports render the 4
reference-indicator sections (วิสัยทัศน์/ค่านิยม/เอกลักษณ์/อัตลักษณ์)
with their bare category name instead of a "ประเด็นยุทธ์ศาสตร์ที่ N"
prefix, and skip them in the real strategic-issue numbering.
2026-08-31 15:34:23 +07:00
Nut.ไปเรื่อย 076f8ed4d7 fix(kpi): move vision/values/uniqueness/identity sections above the strategic indicator table
continuous-integration/drone/push Build is passing
Matches the field order on the budget policy form itself, where these
4 categories are entered before ประเด็นยุทธศาสตร์/เป้าหมายหลัก/ตัวชี้วัดกลยุทธ์.
2026-08-27 11:20:40 +07:00
Nut.ไปเรื่อย bbfcaa088e feat(kpi): render vision/values/uniqueness/identity indicator sections in budget policy Excel export
continuous-integration/drone/push Build is passing
Mirrors the existing indicator table layout for the 4 new reference
sections coming from rmutr-api (unit, target value, 3 responsible-role
columns), reusing the same 8-column styling as the strategic indicators.
2026-08-26 19:15:26 +07:00
Nut.ไปเรื่อยandClaude Sonnet 5 e2fcd26b8f feat: emit live Excel formulas for operating-expense subtotal rows
continuous-integration/drone/push Build is passing
Switch the xls/xlsx export in GetExpensesReport from FastReport's
Excel2007Export (which always writes static numbers) to a ClosedXML-
built workbook, so subtotal/header rows get real =SUM-style FormulaA1
formulas instead of pre-computed values. Row hierarchy is inferred
generically from the "no" field's dot-depth and the expenditure_budget
indentation prefix, so it works for any request, not just one record.
pdf/doc export still uses the FastReport .frx template, unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LvxSgUzvZcd4mXfDWGssxm
2026-08-26 12:04:26 +07:00
Nut.ไปเรื่อยandClaude Sonnet 5 ec4b99f53e feat: emit live Excel formulas for ร.15 revenue-estimate semester rows
continuous-integration/drone/push Build is passing
Replace static computed values for F/H/J/L/N/P/R with FormulaA1 cell
formulas (=B-D, =(F*10)/100, etc.) so the exported report is auditable
and recalculates in Excel, matching a reference ร15.xlsx. P/R now use
the per-row contribution/framework percent passed from rmutr-api
instead of a fixed 40%.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KhYYmBPw4LhYXoDnTNz2xV
2026-08-05 11:27:28 +07:00
Nut.ไปเรื่อยandClaude Sonnet 4.6 a9172dd5ef Add Excel SUM formulas for header rows in equipment five-year report
continuous-integration/drone/push Build is passing
Replace hardcoded aggregated values with Excel SUM formulas at each
hierarchy level: พื้นที่ (area) sums detail rows, คณะ (faculty) sums
area rows, ผลผลิต (output) sums faculty rows, แผนงาน (plan) sums
output rows — for columns I-M (price_1 through price_5).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 11:24:07 +07:00