Skip to content

feat: payroll CSV export endpoint#27

Open
EricGrill wants to merge 1 commit into
mainfrom
justobot/heartbeat-justobot-mnkrj0bf
Open

feat: payroll CSV export endpoint#27
EricGrill wants to merge 1 commit into
mainfrom
justobot/heartbeat-justobot-mnkrj0bf

Conversation

@EricGrill
Copy link
Copy Markdown
Contributor

Summary

  • Adds GET /farm/:id/export endpoint returning payroll data as CSV
  • Supports optional from and to query params for date filtering
  • Returns worker_name, shift_date, amount_sats, status, paid_at — required for labor compliance
  • 5 new integration tests (44 total passing)

Closes #11

Test plan

  • All 44 tests pass (node --test test/api.test.js)
  • CSV header correct
  • Payment data rows have 5 fields
  • Date filtering excludes out-of-range shifts
  • 404 for unknown farm
  • Empty CSV (header only) for farm with no payments

🤖 Generated with Claude Code

Adds payroll CSV export endpoint with optional date filtering (from/to query params).
Returns worker_name, shift_date, amount_sats, status, paid_at — required for labor compliance.
Includes 5 integration tests covering happy path, filtering, 404, and empty-farm edge cases.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

Payroll CSV/PDF export

1 participant