Initial version.

Features:

- Upload PDF files let them analyze

- Manage meta data and items

- See processing in webapp
This commit is contained in:
Eike Kettner
2019-07-23 00:53:30 +02:00
parent 6154e6a387
commit 831cd8b655
341 changed files with 23634 additions and 484 deletions

View File

@ -0,0 +1,27 @@
module Page.NewInvite.Update exposing (update)
import Api
import Data.Flags exposing (Flags)
import Page.NewInvite.Data exposing (..)
import Api.Model.GenInvite exposing (GenInvite)
import Api.Model.InviteResult
import Util.Http
update: Flags -> Msg -> Model -> (Model, Cmd Msg)
update flags msg model =
case msg of
SetPassword str ->
({model|password = str}, Cmd.none)
Reset ->
(emptyModel, Cmd.none)
GenerateInvite ->
(model, Api.newInvite flags (GenInvite model.password) InviteResp)
InviteResp (Ok res) ->
if res.success then ({model | result = (Success res)}, Cmd.none)
else ({model | result = (Failed res.message)}, Cmd.none)
InviteResp (Err err) ->
({model|result = Failed (Util.Http.errorToString err)}, Cmd.none)