Personen DB Abfragen + Seiten

This commit is contained in:
Simon Martens
2025-02-15 23:33:15 +01:00
parent 0aa8511ef0
commit e8edefa4b4
28 changed files with 949 additions and 65 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 = (*Agent)(nil)
@@ -115,10 +111,3 @@ func (a *Agent) SetEditState(editState string) {
func (a *Agent) Comment() string {
return a.GetString(COMMENT_FIELD)
}
func SortAgentsByName(series []*Agent) {
collator := collate.New(language.German)
slices.SortFunc(series, func(i, j *Agent) int {
return collator.CompareString(i.Name(), j.Name())
})
}