module Decisions.Model exposing (..) import Dict import InputTable.Model type alias Model = { tableState : InputTable.Model.TableState RowData Person , decisionFilter : DecisionFilter , postMessage : String , incompleteColumnAndText : Maybe ( Int, String ) , isLoadingInitialRows : Bool , hasBulkDecisions : Bool , showBulkDecisions : Bool , bulkDecisionsText : String , bulkDecisionsOptions : List NestedOption , focussedBulkDecisionOption : Maybe String , showBulkDecisionsDropdown : Bool , urlQuery : String } type DecisionFilter = DecidedFilter | UndecidedFilter | NoFilter type alias RowData = { boolDictData : Dict.Dict String Bool , decision : String , nestedStringDictData : Dict.Dict String NestedCell , presentationType : Maybe String , stringDictData : Dict.Dict String Cell } type alias Cell = { value : String , link : Maybe String } type alias NestedCell = { parent : String , child : Maybe String } type alias CellUpdate = { rowId : String , columnId : String , value : String } type alias NestedCellUpdate = { rowId : String , columnId : String , parent : String , child : String } type alias BoolCellUpdate = { rowId : String , columnId : String , value : Bool } type alias DataFromServer = { headers : List HeaderData , rows : List ApiRowData , stageId : Int , hasBulkDecisions : Bool , bulkDecisionsOptions : List NestedOption } type alias HeaderData = { id : String , title : String , subType : String , visible : Bool , options : List String , displayedTextOptions : List String , nestedOptions : List NestedOption , hasNumericalValues : Bool , description : Maybe String } type alias NestedOption = { parent : String , isSelectable : Bool , childHeader : Maybe String , children : List String } type alias ApiRowData = { id : String , decision : String , presentationType : Maybe String , cells : Dict.Dict String Cell , boolCells : Dict.Dict String Bool , nestedCells : Dict.Dict String NestedCell } type HeaderDataSubType = TextSubType | DisplaySubType type alias Person = { name : String , email : String }