Commit Graph

559 Commits

Author SHA1 Message Date
Nut.ไปเรื่อย ab319d5a59 fix(form_1_2): truncate at last word boundary instead of mid-word
continuous-integration/drone/push Build is passing
Replaced the inline Substring-based truncation (which cut mid-word,
e.g. "...เนื่องจากป") with a TruncateAtWord() helper in the report's
ScriptText that backs off to the last space before the length limit
when one exists, falling back to a hard cut only when the text has no
spaces at all within that range (common in run-on Thai text).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0153wBt23EjW125ZsADwWVAs
2026-09-08 20:37:09 +07:00
Nut.ไปเรื่อย ff353b65f9 fix(form_1_2): cap reason/workload text length to prevent page overflow
continuous-integration/drone/push Build is passing
FastReport doesn't support splitting a single growing text object
mid-paragraph across multiple physical pages — an oversized field
just clips at the page boundary instead of flowing to a new page.
Capped the free-text fields most prone to this (reason, old/new
workload) at 200-300 characters with a "..." suffix when truncated,
so pathologically long input degrades gracefully instead of clipping
mid-sentence or overlapping following content.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0153wBt23EjW125ZsADwWVAs
2026-09-08 18:50:07 +07:00
Nut.ไปเรื่อย 2aa1e455e8 fix(form_1_2): keep checklist in same band as reason text so it grows correctly
continuous-integration/drone/push Build is passing
Data1b (the checklist section) was a separate sibling band positioned
right after P1PositionsList. FastReport's CanGrow only reliably shifts
down objects within the SAME band — a long reason text growing past
its declared box didn't push the next sibling band down with it,
causing visible overlap. Merged the checklist into P1PositionsList so
everything shares one growable band.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0153wBt23EjW125ZsADwWVAs
2026-09-08 18:39:17 +07:00
Nut.ไปเรื่อย 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.ไปเรื่อย 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.ไปเรื่อย 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.ไปเรื่อย 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.ไปเรื่อย 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.ไปเรื่อย 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.ไปเรื่อย 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.ไปเรื่อย 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.ไปเรื่อย 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
kamonwan taengsuk d9bc1f742f fix(durable_articles_three): add subject field to model
continuous-integration/drone/push Build is passing
FRX template references [durable_articles_three.subject] but the
model was missing the property, causing FastReport binding to fail
and the report endpoint to return 500.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 20:54:10 +07:00
kamonwan taengsuk 65303d336b feat(durable_articles_three): add ชื่อเรื่อง row under ผลผลิต
continuous-integration/drone/push Build is passing
Bind to durable_articles_three.subject and shift the following
elements (รายการครุภัณฑ์ header, data band, footer, summary band)
down by 28.35 to make room.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 18:16:00 +07:00
Nut.ไปเรื่อย 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
kamonwan taengsuk b896c28643 update font report
continuous-integration/drone/push Build is passing
2026-02-04 16:52:10 +07:00
kamonwan taengsuk c4371d9265 update font report
continuous-integration/drone/push Build is passing
2026-02-04 16:47:37 +07:00
kamonwan taengsuk 910cb84b09 Bug Fixed
continuous-integration/drone/push Build is passing
2025-08-06 16:16:44 +07:00
kamonwan taengsuk 5f3b98cb74 Bug Fixed
continuous-integration/drone/push Build is passing
2025-08-06 13:44:42 +07:00
kamonwan taengsuk 965469e1df Bug Fixed
continuous-integration/drone/push Build is passing
2025-08-06 13:40:31 +07:00
kamonwan taengsuk 6cf455d37b upgrade .net
continuous-integration/drone/push Build is passing
2025-08-06 13:17:28 +07:00
kamonwan taengsuk cf506ae3f9 Fix color
continuous-integration/drone/push Build is passing
2025-06-30 14:00:10 +07:00
kamonwan taengsuk 5d4509b121 Fix color
continuous-integration/drone/push Build is passing
2025-06-30 13:22:35 +07:00
kamonwan taengsuk 266fd83299 Bug Fixed
continuous-integration/drone/push Build is passing
2025-06-19 14:19:31 +07:00
kamonwan taengsuk d18005c6c5 Fix color 2025-06-19 14:15:30 +07:00
kamonwan taengsuk 667609ce73 Fix color
continuous-integration/drone/push Build is passing
2025-06-19 11:17:56 +07:00
kamonwan taengsuk b99b6fbfed Bug Fixed
continuous-integration/drone/push Build is passing
2025-06-16 11:59:40 +07:00
kamonwan taengsuk 1fecc2fb9c Bug Fixed
continuous-integration/drone/push Build is passing
2025-05-28 16:24:55 +07:00
kamonwan taengsuk 208c13e0c3 Bug Fixed
continuous-integration/drone/push Build is passing
2025-05-07 13:32:10 +07:00
kamonwan taengsuk 90e53f8d31 Bug Fixed
continuous-integration/drone/push Build is passing
2025-05-07 13:03:52 +07:00
kamonwan taengsuk 122d54d871 Bug Fixed
continuous-integration/drone/push Build is passing
2025-04-11 14:05:32 +07:00
kamonwan taengsuk f1d1c166bf Bug Fixed
continuous-integration/drone/push Build is passing
2025-03-20 11:57:56 +07:00
kamonwan taengsuk a598c9dbee Bug Fixed
continuous-integration/drone/push Build is passing
2025-03-19 16:23:26 +07:00
kamonwan taengsuk ab9de38b48 Bug Fixed 2025-03-19 16:15:25 +07:00
kamonwan taengsuk 5e9cdba67a Bug Fixed 2025-03-19 16:11:43 +07:00
kamonwan taengsuk 335c760260 Bug Fixed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is passing
2025-03-19 16:02:28 +07:00
kamonwan taengsuk fc127f2ab6 Bug Fixed
continuous-integration/drone/push Build is passing
2025-03-01 14:12:56 +07:00
kamonwan taengsuk c5e56063e2 Bug Fixed
continuous-integration/drone/push Build is passing
2025-02-25 19:09:42 +07:00
kamonwan taengsuk a4b9c896dd Bug Fixed
continuous-integration/drone/push Build is passing
2025-02-21 21:27:34 +07:00
kamonwan taengsuk 5d2d463a8c Bug Fixed
continuous-integration/drone/push Build is passing
2025-02-21 14:46:51 +07:00
kamonwan taengsuk 731803e190 Add สงป 301
continuous-integration/drone/push Build is passing
2025-02-20 11:59:31 +07:00
kamonwan taengsuk 12da4e1939 Bug Fixed
continuous-integration/drone/push Build is passing
2025-02-05 18:07:29 +07:00
kamonwan taengsuk a49490890e Bug Fixed
continuous-integration/drone/push Build is passing
2025-02-05 17:55:31 +07:00