mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Add a use colum to metadata entities
This commit is contained in:
@ -414,7 +414,8 @@ trait Conversions {
|
||||
v.notes,
|
||||
now,
|
||||
now,
|
||||
v.shortName.map(_.trim)
|
||||
v.shortName.map(_.trim),
|
||||
OrgUse.Correspondent
|
||||
)
|
||||
} yield OOrganization.OrgAndContacts(org, cont)
|
||||
}
|
||||
@ -439,7 +440,8 @@ trait Conversions {
|
||||
v.notes,
|
||||
v.created,
|
||||
now,
|
||||
v.shortName.map(_.trim)
|
||||
v.shortName.map(_.trim),
|
||||
OrgUse.Correspondent
|
||||
)
|
||||
} yield OOrganization.OrgAndContacts(org, cont)
|
||||
}
|
||||
@ -632,13 +634,13 @@ trait Conversions {
|
||||
|
||||
def newEquipment[F[_]: Sync](e: Equipment, cid: Ident): F[REquipment] =
|
||||
timeId.map({ case (id, now) =>
|
||||
REquipment(id, cid, e.name.trim, now, now, e.notes)
|
||||
REquipment(id, cid, e.name.trim, now, now, e.notes, EquipmentUse.Concerning)
|
||||
})
|
||||
|
||||
def changeEquipment[F[_]: Sync](e: Equipment, cid: Ident): F[REquipment] =
|
||||
Timestamp
|
||||
.current[F]
|
||||
.map(now => REquipment(e.id, cid, e.name.trim, e.created, now, e.notes))
|
||||
.map(now => REquipment(e.id, cid, e.name.trim, e.created, now, e.notes, EquipmentUse.Concerning))
|
||||
|
||||
// idref
|
||||
|
||||
|
Reference in New Issue
Block a user