Remove unused contact kind

This commit is contained in:
eikek 2021-08-31 21:57:40 +02:00
parent b2589b9104
commit 9dfe7f30a0
3 changed files with 11 additions and 27 deletions

View File

@ -16,22 +16,20 @@ sealed trait ContactKind { self: Product =>
object ContactKind {
val all = List()
case object Phone extends ContactKind
case object Mobile extends ContactKind
case object Fax extends ContactKind
case object Email extends ContactKind
case object Docspell extends ContactKind
case object Website extends ContactKind
case object Phone extends ContactKind
case object Mobile extends ContactKind
case object Fax extends ContactKind
case object Email extends ContactKind
case object Website extends ContactKind
def fromString(s: String): Either[String, ContactKind] =
s.toLowerCase match {
case "phone" => Right(Phone)
case "mobile" => Right(Mobile)
case "fax" => Right(Fax)
case "email" => Right(Email)
case "docspell" => Right(Docspell)
case "website" => Right(Website)
case _ => Left(s"Not a state value: $s")
case "phone" => Right(Phone)
case "mobile" => Right(Mobile)
case "fax" => Right(Fax)
case "email" => Right(Email)
case "website" => Right(Website)
case _ => Left(s"Not a state value: $s")
}
def unsafe(str: String): ContactKind =

View File

@ -18,7 +18,6 @@ type ContactType
| Mobile
| Fax
| Email
| Docspell
| Website
@ -37,9 +36,6 @@ fromString str =
"email" ->
Just Email
"docspell" ->
Just Docspell
"website" ->
Just Website
@ -62,9 +58,6 @@ toString ct =
Email ->
"Email"
Docspell ->
"Docspell"
Website ->
"Website"
@ -76,5 +69,4 @@ all =
, Email
, Website
, Fax
, Docspell
]

View File

@ -28,9 +28,6 @@ gb ct =
Email ->
"Email"
Docspell ->
"Docspell"
Website ->
"Website"
@ -50,8 +47,5 @@ de ct =
Email ->
"E-Mail"
Docspell ->
"Docspell"
Website ->
"Webseite"