Allow to search for custom field values

This commit is contained in:
Eike Kettner
2020-11-22 18:25:27 +01:00
parent c5ab663091
commit 066c856981
4 changed files with 58 additions and 4 deletions

View File

@ -143,9 +143,13 @@ trait Conversions {
m.itemSubset
.map(_.ids.flatMap(i => Ident.fromString(i).toOption).toSet)
.filter(_.nonEmpty),
m.customValues.map(mkCustomValue),
None
)
def mkCustomValue(v: CustomFieldValue): OItemSearch.CustomValue =
OItemSearch.CustomValue(v.field, v.value)
def mkItemList(v: Vector[OItemSearch.ListItem]): ItemLightList = {
val groups = v.groupBy(item => item.date.toUtcDate.toString.substring(0, 7))