Dev #2
@@ -811,11 +811,33 @@ func (s *Store) UpdateThoughtTriage(userID, thoughtID, action, convertTo, target
|
||||
if len(title) > 72 {
|
||||
title = title[:72] + "…"
|
||||
}
|
||||
blocks := []domain.DocumentBlock{
|
||||
{ID: domain.NewID("blk"), Type: "callout", Content: "Ursprünglicher Gedanke aus deiner Inbox vom " + thought.CreatedAt[:10]},
|
||||
{ID: domain.NewID("blk"), Type: "paragraph", Content: thought.Content},
|
||||
{ID: domain.NewID("blk"), Type: "h2", Content: "Nächste Schritte"},
|
||||
{ID: domain.NewID("blk"), Type: "todo", Content: "Ersten Meilenstein definieren", Checked: false},
|
||||
blocks := make([]domain.DocumentBlock, 0)
|
||||
if strings.TrimSpace(thought.Notes) != "" {
|
||||
blocks = append(blocks, domain.DocumentBlock{
|
||||
ID: domain.NewID("blk"),
|
||||
Type: "bullet",
|
||||
Content: strings.TrimSpace(thought.Notes),
|
||||
Level: 0,
|
||||
})
|
||||
}
|
||||
if len(thought.Subtasks) > 0 {
|
||||
for _, st := range thought.Subtasks {
|
||||
blocks = append(blocks, domain.DocumentBlock{
|
||||
ID: domain.NewID("blk"),
|
||||
Type: "todo",
|
||||
Content: st.Title,
|
||||
Checked: st.IsCompleted,
|
||||
Level: 0,
|
||||
})
|
||||
}
|
||||
}
|
||||
if len(blocks) == 0 {
|
||||
blocks = append(blocks, domain.DocumentBlock{
|
||||
ID: domain.NewID("blk"),
|
||||
Type: "bullet",
|
||||
Content: "",
|
||||
Level: 0,
|
||||
})
|
||||
}
|
||||
doc, err := s.CreateDocument(userID, "", title, "📄", "", blocks, thought.Tags, false)
|
||||
if err == nil && doc != nil {
|
||||
|
||||
Reference in new issue
Block a user