Skip to content

release: develop → main (2026-10-29d) - #1200

Merged
waritctd merged 8 commits into
mainfrom
release/2026-10-29d-develop-to-main
Oct 29, 2026
Merged

waritctd merged 8 commits into
mainfrom
release/2026-10-29d-develop-to-main

Conversation

@waritctd

Copy link
Copy Markdown
Owner

This PR forwards develop to main: everything merged to develop since #1197.

Carries

Deploy

  • No Flyway migrations.
  • The backend changed (ImportRequestService, ImportRequestRequests, FactoryConfigController, FxRateController), so a new image is needed. render.yaml now points at ghcr.io/waritctd/glr-hr-backend:v2026-10-29c.
  • Before merging: push v2026-10-29c, switch Render to it, and check health. A merge to main deploys the frontend only (Vercel).
  • Order matters for fix(import): creating the IR issues one per factory at once; lead-time popup #1199: the new frontend sends leadTimes and expects create to issue. Against the old backend (v2026-10-29b), create would leave DRAFTs and ignore the popup values. So switch Render first.

🤖 Generated with Claude Code

waritctd and others added 8 commits October 29, 2026 12:00
…0-29c

chore: forward-port main into develop (release 2026-10-29, third)
… main

- RC-01: GET /api/fx-rates read widens to sales_manager (owner ruling
  2026-10-29) so the deal page converts SM's foreign-currency prices to THB.
  Writes stay CEO-only.
- RC-02: import's S17 completion toast reads its own projection
  (GET /api/import/deals/{id}) instead of GET /api/tickets/{id}, which
  TicketService#get refuses for import. No ticket access widened.
- RC-03: the /catalog factory filter reads the names-only
  GET /api/factory-configs/names (sales + sales_manager can read it) instead
  of the ceo/import-only /api/price-import/factories, which stays unwidened.
- RC-04: the HR landing sends the current Bangkok payrollMonth to
  GET /api/payroll (400 without it), under its own query key so it never
  overwrites PayrollPage's differently-shaped cache entry for that month.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- account can read GET /api/factory-configs/names (owner ruling
  2026-10-29): it can open /catalog, whose factory filter reads it.
- Import's RECEIVED toast decides from the rows GET /api/import/deals/{id}
  already carries; the duplicate listForTicket fetch is gone.
- PayrollPage opens on the Bangkok month (was UTC), matching the HR landing.
- The HR landing shows "โหลดรอบเงินเดือนไม่สำเร็จ" when the payroll read
  fails instead of claiming the period has not started.
- Stale fx-rates comment in PricingRequestDetailPage; catalog test collapsed
  to one case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(rolecheck): FX read for SM, import toast, catalog factory filter, HR payroll month (RC-01..04)
…e popup

Owner rulings 2026-10-29: no DRAFT step for a new import request.
สร้างใบขอซื้อ (IR) now creates AND issues one IR per factory in a single
transaction, so the deal moves to ขั้น 12 and every factory shows on the import
fulfilment page right away, in sync with the deal's จัดซื้อ-ส่งมอบ tab.

- createDrafts checks every new factory before any write (items, lead time,
  deposit gate) and issues each through the extracted issueStoredDraft; a
  failure writes nothing.
- A factory with no lead time from the quotation or country default gets a
  popup (like the new-factory country popup) asking min-max days; the 409
  lists only those factories and the retry carries the values (1-365, min<=max).
- Revisions keep their edit DRAFT; leftover DRAFT rows still issue as before.
- Button and toast wording now says ออกใบขอซื้อ (IR).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…or the deposit

Code review of #1199:
- createDrafts checks requireImportRequestIssuable right after the stage
  check, so an unpaid deal is refused at the first press instead of after
  the country and lead-time popups.
- The deal tab's ออกใบขอซื้อ (IR) button is disabled with the hint
  "ออกใบขอซื้อ (IR) ได้หลังรับชำระมัดจำแล้ว" until the deal is deposit-ready
  (depositReadyForIr mirrors TicketService#requireImportRequestIssuable); the
  imperative entry point refuses early with the same message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(import): creating the IR issues one per factory at once; lead-time popup
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
demo-glr Ready Ready Preview Oct 29, 2026 7:13am UTC

Request Review

@waritctd
waritctd merged commit e196678 into main Oct 29, 2026
7 checks passed

This branch was successfully deployed

1 active deployment
Preview — c3828974 Deployed Oct 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant