Skip to content

feat(expenses): Add create work order from expense (Story 11.6)#181

Merged
daveharmswebdev merged 2 commits intomainfrom
feature/11-6-create-work-order-from-expense
Feb 4, 2026
Merged

feat(expenses): Add create work order from expense (Story 11.6)#181
daveharmswebdev merged 2 commits intomainfrom
feature/11-6-create-work-order-from-expense

Conversation

@daveharmswebdev
Copy link
Owner

Summary

  • Add "Create Work Order" button (add_task icon) on expense rows when no work order is linked
  • Dialog pre-populates description and category from the expense, creates WO via API, then auto-links the expense
  • Works in both property expense workspace and all-expenses list (/expenses)
  • Handles partial failure (WO created but link failed) with user-friendly messaging
  • 39 new unit tests, 2,219 total passing, 0 regressions

Test plan

  • Verify add_task button appears on expenses without a linked work order
  • Verify button is hidden on expenses that already have a linked work order
  • Click button and confirm dialog opens with pre-populated description and category
  • Fill in details and click "Create & Link" - verify snackbar and row update
  • Cancel dialog and verify no work order is created
  • Test from all-expenses list at /expenses - same behavior
  • Verify validation: empty description shows error, button disabled
  • Run npm test - all 2,219 tests pass

🤖 Generated with Claude Code

daveharmswebdev and others added 2 commits February 4, 2026 15:32
Add "Create Work Order" action to expense rows in both property workspace
and all-expenses list. Opens a dialog pre-populated with expense data,
creates the work order, and auto-links it to the expense via two-step API.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add 3 missing tests for ExpensesComponent.onCreateWorkOrder (AC-11.6.7)
- Fix no-op test in expense-workspace spec (add assertion for dialog not opened)
- Add keyboard accessibility to expense-list-row create WO icon (role, tabindex, keydown.enter)
- Refactor nested subscribes to flat switchMap/catchError chain in dialog component
- Make onCreateWorkOrder visibility consistent (protected) across components

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@daveharmswebdev daveharmswebdev merged commit d764105 into main Feb 4, 2026
7 checks passed
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