primait/pyxis-components/3.2.0

NOTE: the latest version is 9.0.3

Prima.Pyxis.AtrTable

Creates a specific kind of table, the ATR table component. Uses Prima.Pyxis.Table.Table under the hood.

Warning. This documentation requires knownledge of Insurance domain.

Configuration

type Config

Defines the configuration of an Atr table

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

type Msg

Represents a changing AtrDetail action

Configuration Helpers

init : Bool -> List AtrDetail -> ( Config, 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.

atr : 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.

update : Msg -> Config -> ( Config, Cmd Msg, List AtrDetail )

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

Helpers

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.

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

Render

render : Config -> Html Msg

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