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,41 @@
module Data.ContactType exposing (..)
type ContactType
= Phone
| Mobile
| Fax
| Email
| Docspell
| Website
fromString: String -> Maybe ContactType
fromString str =
case String.toLower str of
"phone" -> Just Phone
"mobile" -> Just Mobile
"fax" -> Just Fax
"email" -> Just Email
"docspell" -> Just Docspell
"website" -> Just Website
_ -> Nothing
toString: ContactType -> String
toString ct =
case ct of
Phone -> "Phone"
Mobile -> "Mobile"
Fax -> "Fax"
Email -> "Email"
Docspell -> "Docspell"
Website -> "Website"
all: List ContactType
all =
[ Mobile
, Phone
, Email
, Website
, Fax
, Docspell
]

View File

@ -0,0 +1,45 @@
module Data.Direction exposing (..)
type Direction
= Incoming
| Outgoing
fromString: String -> Maybe Direction
fromString str =
case String.toLower str of
"outgoing" -> Just Outgoing
"incoming" -> Just Incoming
_ -> Nothing
all: List Direction
all =
[ Incoming
, Outgoing
]
toString: Direction -> String
toString dir =
case dir of
Incoming -> "Incoming"
Outgoing -> "Outgoing"
icon: Direction -> String
icon dir =
case dir of
Incoming -> "level down alternate icon"
Outgoing -> "level up alternate icon"
unknownIcon: String
unknownIcon =
"question circle outline icon"
iconFromString: String -> String
iconFromString dir =
fromString dir
|> Maybe.map icon
|> Maybe.withDefault unknownIcon
iconFromMaybe: Maybe String -> String
iconFromMaybe ms =
Maybe.map iconFromString ms
|> Maybe.withDefault unknownIcon

View File

@ -5,6 +5,7 @@ import Api.Model.AuthResult exposing (AuthResult)
type alias Config =
{ appName: String
, baseUrl: String
, signupMode: String
}
type alias Flags =
@ -20,3 +21,7 @@ getToken flags =
withAccount: Flags -> AuthResult -> Flags
withAccount flags acc =
{ flags | account = Just acc }
withoutAccount: Flags -> Flags
withoutAccount flags =
{ flags | account = Nothing }

View File

@ -0,0 +1,27 @@
module Data.Language exposing (..)
type Language
= German
| English
fromString: String -> Maybe Language
fromString str =
if str == "deu" || str == "de" || str == "german" then Just German
else if str == "eng" || str == "en" || str == "english" then Just English
else Nothing
toIso3: Language -> String
toIso3 lang =
case lang of
German -> "deu"
English -> "eng"
toName: Language -> String
toName lang =
case lang of
German -> "German"
English -> "English"
all: List Language
all =
[ German, English ]

View File

@ -0,0 +1,25 @@
module Data.Priority exposing (..)
type Priority
= High
| Low
fromString: String -> Maybe Priority
fromString str =
let
s = String.toLower str
in
case s of
"low" -> Just Low
"high" -> Just High
_ -> Nothing
toName: Priority -> String
toName lang =
case lang of
Low -> "Low"
High-> "High"
all: List Priority
all =
[ Low, High ]

View File

@ -0,0 +1,24 @@
module Data.SourceState exposing (..)
type SourceState
= Active
| Disabled
fromString: String -> Maybe SourceState
fromString str =
case String.toLower str of
"active" -> Just Active
"disabled" -> Just Disabled
_ -> Nothing
all: List SourceState
all =
[ Active
, Disabled
]
toString: SourceState -> String
toString dir =
case dir of
Active -> "Active"
Disabled -> "Disabled"

View File

@ -0,0 +1,24 @@
module Data.UserState exposing (..)
type UserState
= Active
| Disabled
fromString: String -> Maybe UserState
fromString str =
case String.toLower str of
"active" -> Just Active
"disabled" -> Just Disabled
_ -> Nothing
all: List UserState
all =
[ Active
, Disabled
]
toString: UserState -> String
toString dir =
case dir of
Active -> "Active"
Disabled -> "Disabled"