mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-10-08 12:07:14 +00:00
Allow to add remaining metadata in item edit view
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
module Api exposing
|
||||
( addCorrOrg
|
||||
( addConcEquip
|
||||
, addConcPerson
|
||||
, addCorrOrg
|
||||
, addCorrPerson
|
||||
, addTag
|
||||
, cancelJob
|
||||
, changePassword
|
||||
@@ -1107,6 +1110,16 @@ setCorrPerson flags item id receive =
|
||||
}
|
||||
|
||||
|
||||
addCorrPerson : Flags -> String -> Person -> (Result Http.Error BasicResult -> msg) -> Cmd msg
|
||||
addCorrPerson flags item person receive =
|
||||
Http2.authPost
|
||||
{ url = flags.config.baseUrl ++ "/api/v1/sec/item/" ++ item ++ "/corrPerson"
|
||||
, account = getAccount flags
|
||||
, body = Http.jsonBody (Api.Model.Person.encode person)
|
||||
, expect = Http.expectJson receive Api.Model.BasicResult.decoder
|
||||
}
|
||||
|
||||
|
||||
setConcPerson : Flags -> String -> OptionalId -> (Result Http.Error BasicResult -> msg) -> Cmd msg
|
||||
setConcPerson flags item id receive =
|
||||
Http2.authPut
|
||||
@@ -1117,6 +1130,16 @@ setConcPerson flags item id receive =
|
||||
}
|
||||
|
||||
|
||||
addConcPerson : Flags -> String -> Person -> (Result Http.Error BasicResult -> msg) -> Cmd msg
|
||||
addConcPerson flags item person receive =
|
||||
Http2.authPost
|
||||
{ url = flags.config.baseUrl ++ "/api/v1/sec/item/" ++ item ++ "/concPerson"
|
||||
, account = getAccount flags
|
||||
, body = Http.jsonBody (Api.Model.Person.encode person)
|
||||
, expect = Http.expectJson receive Api.Model.BasicResult.decoder
|
||||
}
|
||||
|
||||
|
||||
setConcEquip : Flags -> String -> OptionalId -> (Result Http.Error BasicResult -> msg) -> Cmd msg
|
||||
setConcEquip flags item id receive =
|
||||
Http2.authPut
|
||||
@@ -1127,6 +1150,16 @@ setConcEquip flags item id receive =
|
||||
}
|
||||
|
||||
|
||||
addConcEquip : Flags -> String -> Equipment -> (Result Http.Error BasicResult -> msg) -> Cmd msg
|
||||
addConcEquip flags item equip receive =
|
||||
Http2.authPost
|
||||
{ url = flags.config.baseUrl ++ "/api/v1/sec/item/" ++ item ++ "/concEquipment"
|
||||
, account = getAccount flags
|
||||
, body = Http.jsonBody (Api.Model.Equipment.encode equip)
|
||||
, expect = Http.expectJson receive Api.Model.BasicResult.decoder
|
||||
}
|
||||
|
||||
|
||||
setItemName : Flags -> String -> OptionalText -> (Result Http.Error BasicResult -> msg) -> Cmd msg
|
||||
setItemName flags item text receive =
|
||||
Http2.authPut
|
||||
|
Reference in New Issue
Block a user