feat: Added worked before in Net Control
This commit is contained in:
+10
-2
@@ -122,12 +122,20 @@ func (a *App) QSLGenerateProposals(photoPaths []string) ([]string, error) {
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// QSLListTemplates returns all saved templates (defaults first).
|
||||
// QSLListTemplates returns the templates for the ACTIVE profile (its own plus any
|
||||
// shared/global ones), defaults first — so the default is per-profile, not a
|
||||
// single global list shared by every profile.
|
||||
func (a *App) QSLListTemplates() ([]QSLTemplateInfo, error) {
|
||||
if a.qslTemplates == nil {
|
||||
return nil, fmt.Errorf("db not initialized")
|
||||
}
|
||||
recs, err := a.qslTemplates.List(a.ctx)
|
||||
var recs []qslcard.Record
|
||||
var err error
|
||||
if p, e := a.profiles.Active(a.ctx); e == nil {
|
||||
recs, err = a.qslTemplates.ListFor(a.ctx, p.ID)
|
||||
} else {
|
||||
recs, err = a.qslTemplates.List(a.ctx)
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user