diff options
author | T <t@tjp.lol> | 2025-08-13 15:25:23 -0600 |
---|---|---|
committer | T <t@tjp.lol> | 2025-08-13 16:02:05 -0600 |
commit | e9e6eb4e456ee53da5a6ef743251410d4d3d8381 (patch) | |
tree | d722145a5f7a3dd07623e96045078983b3a14e4c /internal/tui/modal.go | |
parent | d6781f3e5b431057c23b2deaa943f273699e37f5 (diff) |
report generation modal
Diffstat (limited to 'internal/tui/modal.go')
-rw-r--r-- | internal/tui/modal.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/internal/tui/modal.go b/internal/tui/modal.go index badc658..7660243 100644 --- a/internal/tui/modal.go +++ b/internal/tui/modal.go @@ -23,6 +23,7 @@ const ( ModalTypeDeleteConfirmation ModalTypeEntry ModalTypeHistoryFilter + ModalTypeGenerateReport ) func (mt ModalType) newForm() Form { @@ -35,6 +36,8 @@ func (mt ModalType) newForm() Form { return NewProjectForm() case ModalTypeHistoryFilter: return NewHistoryFilterForm() + case ModalTypeGenerateReport: + return NewGenerateReportForm() } return Form{} @@ -91,6 +94,8 @@ func (m ModalBoxModel) Render() string { return m.RenderFormModal("📂 Project") case ModalTypeHistoryFilter: return m.RenderFormModal("🔍 History Filter") + case ModalTypeGenerateReport: + return m.RenderFormModal("📄 Generate Report") default: // REMOVE ME return "DEFAULT CONTENT" } @@ -274,6 +279,14 @@ func (m *ModalBoxModel) SubmitForm(am AppModel) tea.Cmd { // Return filter update message return func() tea.Msg { return updateHistoryFilter(newFilter) } + + case ModalTypeGenerateReport: + if err := m.form.Error(); err != nil { + return reOpenModal() + } + + return generateReport(m, am) + } return nil |