Alle Abfragen für Reihen-Seite

This commit is contained in:
Simon Martens
2025-02-15 16:43:09 +01:00
parent 6aeb4c0548
commit d1b3e69aed
11 changed files with 605 additions and 172 deletions

View File

@@ -1,11 +1,7 @@
package dbmodels
import (
"slices"
"github.com/pocketbase/pocketbase/core"
"golang.org/x/text/collate"
"golang.org/x/text/language"
)
var _ core.RecordProxy = (*Series)(nil)
@@ -91,10 +87,3 @@ func (s *Series) Frequency() string {
func (s *Series) SetFrequency(frequency string) {
s.Set(SERIES_FREQUENCY_FIELD, frequency)
}
func SortSeriesByTitle(series []*Series) {
collator := collate.New(language.German)
slices.SortFunc(series, func(i, j *Series) int {
return collator.CompareString(i.Title(), j.Title())
})
}