feat(workspace): format origin callout date and time when converting thought to document
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 47s
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 47s
This commit is contained in:
1 parent
1ada978f9e
commit
dccf1a91e3
2 files changed
+64
-1
No files matched your search
@@ -812,6 +812,17 @@ func (s *Store) UpdateThoughtTriage(userID, thoughtID, action, convertTo, target
|
||||
title = title[:72] + "…"
|
||||
}
|
||||
blocks := make([]domain.DocumentBlock, 0)
|
||||
formattedDate := domain.FormatGermanDateTime(thought.CreatedAt)
|
||||
calloutText := "Ursprünglicher Gedanke aus deiner Inbox"
|
||||
if formattedDate != "" {
|
||||
calloutText += " vom " + formattedDate
|
||||
}
|
||||
blocks = append(blocks, domain.DocumentBlock{
|
||||
ID: domain.NewID("blk"),
|
||||
Type: "callout",
|
||||
Content: calloutText,
|
||||
Level: 0,
|
||||
})
|
||||
if strings.TrimSpace(thought.Notes) != "" {
|
||||
blocks = append(blocks, domain.DocumentBlock{
|
||||
ID: domain.NewID("blk"),
|
||||
@@ -831,7 +842,7 @@ func (s *Store) UpdateThoughtTriage(userID, thoughtID, action, convertTo, target
|
||||
})
|
||||
}
|
||||
}
|
||||
if len(blocks) == 0 {
|
||||
if len(blocks) == 1 {
|
||||
blocks = append(blocks, domain.DocumentBlock{
|
||||
ID: domain.NewID("blk"),
|
||||
Type: "bullet",
|
||||
|
||||
Reference in new issue
Block a user