feat: period report export (#22)#24
Merged
Merged
Conversation
Generates a Markdown report for the current week/month period: - Daily rows: date, tracked hours, on-call hours, amount, OC amount - Period subtotals: regular and on-call separately - Grand total - Amount columns shown only when income tracking is enabled - Saved as .md via NSSavePanel New file: Sources/TimeTrackerCore/ReportGenerator.swift Closes #22
- ReportPickerSheet: choose This Week / This Month / Custom date range before exporting; defaults to current Stats period - Custom option shows From/To DatePickers - Stats tab: Report button opens picker sheet instead of exporting immediately - Move Export/Import (JSON backup) from Stats tab to On-call Settings section
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ReportGenerator(pure logic inTimeTrackerCore) that produces per-day rowswith tracked hours, on-call hours, and amounts (when income tracking is enabled)
ReportPickerSheet— a period selector sheet shown before the save dialogOn-call Settings page
.mdfile viaNSSavePanelwith a period-based filenamePeriod options
time-report-jun-23-29-2026.mdtime-report-jun-16-22-2026.mdtime-report-june-2026.mdtime-report-may-2026.mdtime-report-jun-1-jun-30-2026.mdReport format
Amount columns appear only when income tracking is enabled. On-call columns are
optional via a toggle in the picker. Days with no tracked time and no on-call are omitted.
New files
Sources/TimeTrackerCore/ReportGenerator.swift—ReportRow,ReportData,ReportGenerator.generateSources/TimeTracker/ReportPickerSheet.swift— period picker sheet (5 options + custom date range + on-call toggle)Modified files
Sources/TimeTracker/StatsView.swift— Report button opens picker; Export/Import removedSources/TimeTracker/OnCallSettingsSection.swift— Export/Import (JSON backup) moved hereTest plan
swift buildclean.mdfile opens in any Markdown viewer