summaryrefslogtreecommitdiff
path: root/internal/tui/projects_box.go
diff options
context:
space:
mode:
authorT <t@tjp.lol>2025-08-06 16:56:46 -0600
committerT <t@tjp.lol>2025-08-07 08:33:49 -0600
commit4843deb9cfa6d91282c5124ec025c636137e9e94 (patch)
tree180dc226e7dcdbbba8ea6ecabba821f4bdb64949 /internal/tui/projects_box.go
parentd75bd93385bf3b54ada84c3d45011d7f8efc1f80 (diff)
Enhanced date range parsing with more flexible input formats
- Added support for 'this week' and 'this month' date ranges - Added support for month names (e.g., 'february', 'july') with automatic year detection - Added support for 'month year' format (e.g., 'july 2023', 'feb 2022') - Enhanced help text and examples for all report commands - Added comprehensive test coverage for date range parsing - Fixed timezone handling in TUI history display - Minor code style improvements
Diffstat (limited to 'internal/tui/projects_box.go')
-rw-r--r--internal/tui/projects_box.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/internal/tui/projects_box.go b/internal/tui/projects_box.go
index 38fd96a..f40cbd0 100644
--- a/internal/tui/projects_box.go
+++ b/internal/tui/projects_box.go
@@ -112,7 +112,7 @@ func (m *ClientsProjectsModel) changeSelectionForward() {
// starting with a client selected
if len(projects) > 0 {
// can jump into the first project
- var zero int = 0
+ zero := 0
m.selectedProject = &zero
return
}
@@ -147,7 +147,6 @@ func (m *ClientsProjectsModel) changeSelectionForward() {
func (m *ClientsProjectsModel) changeSelectionBackward() {
selectedClient := m.clients[m.selectedClient]
- projects := m.projects[selectedClient.ID]
if m.selectedProject == nil {
// starting with a client selected
@@ -158,7 +157,7 @@ func (m *ClientsProjectsModel) changeSelectionBackward() {
m.selectedClient--
selectedClient = m.clients[m.selectedClient]
- projects = m.projects[selectedClient.ID]
+ projects := m.projects[selectedClient.ID]
if len(projects) > 0 {
// previous client has projects, jump to last one