strat-gameplay-webapp/frontend-sba/components
Cal Corum 4bdadeca07 CLAUDE: Refactor offensive decisions - replace approach with action field
Frontend refactor complete - updated TypeScript interfaces and OffensiveApproach
component to use new action-based system with smart filtering.

Changes:
- TypeScript interfaces: Replaced approach/hit_and_run/bunt_attempt with action field
- OffensiveApproach.vue: Complete refactor with 6 action choices and smart filtering
- Smart filtering: Automatically disables invalid actions based on game state
- Auto-reset: If current action becomes invalid, resets to swing_away

TypeScript updates (types/game.ts, types/websocket.ts):
- OffensiveDecision.action: 6 valid choices (swing_away, steal, check_jump,
  hit_and_run, sac_bunt, squeeze_bunt)
- Removed deprecated fields: approach, hit_and_run, bunt_attempt
- OffensiveDecisionRequest updated to match

Component features:
- Smart filtering based on game state (runners, outs)
- Visual feedback for disabled actions with explanatory text
- Special handling notes for steal and squeeze_bunt
- Auto-reset to swing_away when actions become invalid
- Clean, modern UI with action icons and descriptions

Action requirements enforced in UI:
- check_jump: requires runner on base
- hit_and_run: requires runner on base
- sac_bunt: disabled with 2 outs
- squeeze_bunt: requires R3, disabled with 2 outs
- steal/swing_away: always available

Files modified:
- types/game.ts
- types/websocket.ts
- components/Decisions/OffensiveApproach.vue

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 15:13:34 -06:00
..
Decisions CLAUDE: Refactor offensive decisions - replace approach with action field 2025-11-14 15:13:34 -06:00
Game CLAUDE: Phase F3 Complete - Decision Input Workflow with Comprehensive Testing 2025-11-13 13:47:36 -06:00
Gameplay CLAUDE: Fix hit location requirements in ManualOutcomeEntry 2025-11-14 12:56:27 -06:00
Substitutions CLAUDE: Phases 3.5, F1-F5 Complete - Statistics & Frontend Components 2025-11-14 09:52:30 -06:00
UI CLAUDE: Phase F3 Complete - Decision Input Workflow with Comprehensive Testing 2025-11-13 13:47:36 -06:00