primait / pyxis-components / Prima.Pyxis.AtrTable

Configuration


type State

Defines the configuration of an Atr table


type AtrDetail

Represents a detail for an ATR which contains information about the number of accidents in a specific year.


type Msg

Represents the AtrTable's Msg.

Configuration Methods

state : Basics.Bool -> List AtrDetail -> ( State, Platform.Cmd.Cmd Msg )

Returns a Tuple containing the Config and a possible batch of side effects to be managed by parent application. Requires a list of AtrDetail.

update : Msg -> State -> ( State, Platform.Cmd.Cmd Msg, List AtrDetail )

Updates the configuration of the Atr table. Returns a tuple containing the new Config.

atr : Basics.Int -> AtrDetail

Creates an empty AtrDetail. Each detail is identified by an year and representation of accidents occurred during it. All setters methods are pipeable.

paritaria : Maybe String -> AtrDetail -> AtrDetail

Sets the Responsabilità Paritaria value for a specific AtrDetail.

paritariaMista : Maybe String -> AtrDetail -> AtrDetail

Sets the Responsabilità Paritaria Mista value for a specific AtrDetail.

paritariaCose : Maybe String -> AtrDetail -> AtrDetail

Sets the Responsabilità Paritaria Cose value for a specific AtrDetail.

paritariaPersone : Maybe String -> AtrDetail -> AtrDetail

Sets the Responsabilità Paritaria Persone value for a specific AtrDetail.

principale : Maybe String -> AtrDetail -> AtrDetail

Sets the Responsabilità Principale value for a specific AtrDetail.

principaleMista : Maybe String -> AtrDetail -> AtrDetail

Sets the Responsabilità Principale Mista value for a specific AtrDetail.

principaleCose : Maybe String -> AtrDetail -> AtrDetail

Sets the Responsabilità Principale Cose value for a specific AtrDetail.

principalePersone : Maybe String -> AtrDetail -> AtrDetail

Sets the Responsabilità Principale Persone value for a specific AtrDetail.

Rendering

render : State -> Html Msg

Renders the table by receiving a Configuration. The columns of this table are expressed by the length of the AtrDetail list.

Options

withClass : String -> State -> State

Adds a class to the AtrTable.