Files
orion/clients
Samir Boulahtit 02652ee8c6 feat(android-terminal): Phase D.2 — action sheets (stamp/earn/redeem)
The four right-pane buttons now work end-to-end (online happy path).
Each opens an AlertDialog wired to a ViewModel action; on success the
sheet closes and the customer card refreshes from the server.

- TerminalViewModel: + categories cache load (via CategoryRepository),
  + activeAction / actionInProgress / actionResult on the state. Action
  methods (submitStamp, submitEarnPoints, submitRedeemStamps,
  submitRedeemReward) all funnel through a runAction helper that toggles
  in-progress, calls the LoyaltyApi, refreshes the customer on success,
  surfaces failures inline.
- ActionSheets.kt (new): one ActionSheet entrypoint that dispatches by
  ActionKind. Category multi-select via FlowRow + FilterChip pills.
  EarnPoints accepts "12.50" / "12,50" → cents. Reward picker shows
  available_rewards from the lookup response.
- TerminalScreen: action buttons enabled per state — stamp/earn stay
  active offline (Phase E will queue them), redeem is hard-disabled when
  offline per the plan ("redemption requires an internet connection").

Categories list comes from the cache filled at pairing; fresh refresh
runs in the background so newly-added categories show up next launch
without a manual sync.

Verified by ./gradlew assembleDebug — clean build.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 21:13:31 +02:00
..