Files
sapl/backend
Ajay SableandClaude Opus 4.8 9f03ce3874 feat(tna): P1 authoring flow — Create TNA from a no-TNA order → edit → approve → push
Adds the merchant authoring flow on top of the existing recommender:
- POST /tna/draft: propose a TNA for a no-TNA order, with optional template
  override + fabric-lead-time override (recommender extended for both).
- PUT /tna/recommend/{key}/schedule: persist planner date/owner edits (frozen
  once accepted); sets edited flag.
- POST /tna/push/{key}: push an approved plan's template to Stitch, gated on
  Template-Readiness — returns blocked + missing tasks when the tenant isn't
  seeded (no silent failure). Distinct path avoids the /{decision} route clash.
- TnaRecommendation gains pcd_date/edited/stitch_template_id/push_status/
  push_detail (idempotent migration + boot self-heal in services/tna_authoring).
- Frontend: TnaCreate page (proposal + template picker + fabric-lead-time input +
  editable milestone table + approve→push with readiness gate), wired from the
  "Create TNA" action on the no-TNA cards.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 16:01:06 +05:30
..