Remove old ui code in frontend

This commit is contained in:
Eike Kettner
2021-03-09 20:16:05 +01:00
parent ee694dc719
commit b95338e744
90 changed files with 50 additions and 11038 deletions

View File

@ -3,7 +3,6 @@ module Comp.PersonTable exposing
, Msg(..)
, emptyModel
, update
, view
, view2
)
@ -13,11 +12,8 @@ import Data.Flags exposing (Flags)
import Data.PersonUse
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (onClick)
import Styles as S
import Util.Address
import Util.Contact
import Util.Html
type alias Model =
@ -52,62 +48,6 @@ update _ msg model =
( { model | selected = Nothing }, Cmd.none )
view : Model -> Html Msg
view model =
table [ class "ui very basic aligned table" ]
[ thead []
[ tr []
[ th [ class "collapsing" ] []
, th [ class "collapsing center aligned" ] [ text "Use" ]
, th [] [ text "Name" ]
, th [] [ text "Organization" ]
, th [] [ text "Address" ]
, th [] [ text "Contact" ]
]
]
, tbody []
(List.map (renderPersonLine model) model.equips)
]
renderPersonLine : Model -> Person -> Html Msg
renderPersonLine model person =
tr
[ classList [ ( "active", model.selected == Just person ) ]
]
[ td [ class "collapsing" ]
[ a
[ href "#"
, class "ui basic small blue label"
, onClick (Select person)
]
[ i [ class "edit icon" ] []
, text "Edit"
]
]
, td [ class "center aligned" ]
[ Data.PersonUse.fromString person.use
|> Maybe.withDefault Data.PersonUse.Both
|> Data.PersonUse.label
|> text
]
, td []
[ text person.name
]
, td []
[ Maybe.map .name person.organization
|> Maybe.withDefault "-"
|> text
]
, td []
[ Util.Address.toString person.address |> text
]
, td []
[ Util.Contact.toString person.contacts |> text
]
]
--- View2