mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-23 02:48:26 +00:00
Allow to change use enum for org/equipment
This commit is contained in:
@ -8,6 +8,7 @@ module Comp.EquipmentTable exposing
|
||||
|
||||
import Api.Model.Equipment exposing (Equipment)
|
||||
import Comp.Basic as B
|
||||
import Data.EquipmentUse
|
||||
import Data.Flags exposing (Flags)
|
||||
import Html exposing (..)
|
||||
import Html.Attributes exposing (..)
|
||||
@ -57,6 +58,9 @@ view2 model =
|
||||
[ thead []
|
||||
[ tr []
|
||||
[ th [ class "" ] []
|
||||
, th [ class "text-left pr-1 md:px-2 w-20" ]
|
||||
[ text "Use"
|
||||
]
|
||||
, th [ class "text-left" ] [ text "Name" ]
|
||||
]
|
||||
]
|
||||
@ -72,6 +76,14 @@ renderEquipmentLine2 model equip =
|
||||
, class S.tableRow
|
||||
]
|
||||
[ B.editLinkTableCell (Select equip)
|
||||
, td [ class "text-left pr-1 md:px-2" ]
|
||||
[ div [ class "label inline-flex text-sm" ]
|
||||
[ Data.EquipmentUse.fromString equip.use
|
||||
|> Maybe.withDefault Data.EquipmentUse.Concerning
|
||||
|> Data.EquipmentUse.label
|
||||
|> text
|
||||
]
|
||||
]
|
||||
, td [ class "text-left" ]
|
||||
[ text equip.name
|
||||
]
|
||||
|
Reference in New Issue
Block a user