fix(contracts): TOMs are available once the released TOM is listed #133

Merged
sharang merged 1 commits from fix/toms-status-available into main 2026-11-16 22:00:02 +00:00
Owner

Found while checking #132 on stage: the TOM card on "Vertragsunterlagen" said Status: Wird bereitgestellt directly above the released TOM 1.0.0 with "Ansehen" and "Herunterladen".

  • Cause: listTenantContracts set toms to "pending" unconditionally, from before the TOM was released.
  • Fix: it's now "available" when a TOM document is listed for the tenant. That means released and CONTRACT_DOCUMENTS on, so prod (switch off) keeps showing "pending". The portal already maps available to "Verfügbar".
  • Tests: the gate-off test asserts pending; the gate-on test asserts available. go vet and the server and contractdocs tests pass.

🤖 Generated with Claude Code

Found while checking #132 on stage: the TOM card on "Vertragsunterlagen" said **Status: Wird bereitgestellt** directly above the released TOM 1.0.0 with "Ansehen" and "Herunterladen". - **Cause:** `listTenantContracts` set `toms` to `"pending"` unconditionally, from before the TOM was released. - **Fix:** it's now `"available"` when a TOM document is listed for the tenant. That means released and `CONTRACT_DOCUMENTS` on, so prod (switch off) keeps showing "pending". The portal already maps `available` to "Verfügbar". - **Tests:** the gate-off test asserts `pending`; the gate-on test asserts `available`. `go vet` and the server and contractdocs tests pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
sharang added 1 commit 2026-11-16 21:38:11 +00:00
fix(contracts): TOMs are available once the released TOM is listed
ci / shared (pull_request) Successful in 12s
ci / test (pull_request) Successful in 7m24s
ci / image (pull_request) Skipped
2921fa0663
The contracts overview reported the TOMs as "pending" unconditionally,
from before the TOM was released, so the portal showed "Wird
bereitgestellt" above the released TOM 1.0.0 on stage. The status is
now "available" when a TOM document is listed for the tenant (i.e.
released and CONTRACT_DOCUMENTS on), and stays "pending" otherwise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sharang merged commit 8a72469e18 into main 2026-11-16 22:00:02 +00:00
Sign in to join this conversation.