feat: node search picker, ByNode grouping fix, PDF export

- node picker: Search/Path on Repository, SearchNodes binding,
  debounced search dropdown showing title + full path
- ByNode summary groups by nodeID with NodePath as label (not NodeTitle)
- PDF export for worklog reports with embedded DejaVuSans fonts
- ExportWorklogPDF binding + button on Journal screen
- Removed unused Section field from ReportFilter
- ListReport now calls BuildReportPaths so nodePath is available
- go.sum: +github.com/signintech/gopdf dependency
This commit is contained in:
2026-06-03 10:56:13 +08:00
parent 5732264fc5
commit d34100e2ed
17 changed files with 512 additions and 32 deletions
+28
View File
@@ -907,6 +907,34 @@ func (a *App) rollbackFileMoves(moves []fileMoveInfo) error {
return nil
}
type SearchNodeResult struct {
ID string `json:"id"`
Title string `json:"title"`
Path string `json:"path"`
Type string `json:"type"`
}
func (a *App) SearchNodes(query string) ([]SearchNodeResult, error) {
nodes, err := a.nodes.Search(query, 20)
if err != nil {
return nil, err
}
results := make([]SearchNodeResult, 0, len(nodes))
for i := range nodes {
if nodes[i].IsDeleted() {
continue
}
path := a.nodes.Path(nodes[i].ID)
results = append(results, SearchNodeResult{
ID: nodes[i].ID,
Title: nodes[i].Title,
Path: path,
Type: nodes[i].Type,
})
}
return results, nil
}
func (a *App) OpenNodeFolder(nodeID string) (string, error) {
n, err := a.nodes.GetActive(nodeID)
if err != nil {
+5
View File
@@ -61,6 +61,11 @@ func (a *App) ExportWorklogMarkdown(dateFrom, dateTo, nodeID string, includeChil
return a.worklog.ExportMarkdown(f)
}
func (a *App) ExportWorklogPDF(dateFrom, dateTo, nodeID string, includeChildren bool, billableFilter, approxFilter string) ([]byte, error) {
f := buildWorklogFilter(dateFrom, dateTo, nodeID, includeChildren, billableFilter, approxFilter)
return a.worklog.ExportPDF(f)
}
func boolPtr(s string) *bool {
switch s {
case "yes":
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -16,8 +16,8 @@
background: #13131f;
}
</style>
<script type="module" crossorigin src="/assets/main-DU1CFPIY.js"></script>
<link rel="stylesheet" crossorigin href="/assets/main-B4G76NhT.css">
<script type="module" crossorigin src="/assets/main-BYxU8Qbt.js"></script>
<link rel="stylesheet" crossorigin href="/assets/main-C7UPiZtQ.css">
</head>
<body>
<div id="app"></div>