|
|
|
|
@ -150,8 +150,8 @@ enum class SessionRow : RowRepresentable { |
|
|
|
|
override fun editingDescriptors(map: Map<String, Any?>): ArrayList<RowRepresentableEditDescriptor>? { |
|
|
|
|
return when (this) { |
|
|
|
|
BLINDS -> { |
|
|
|
|
val sb: Double? by map |
|
|
|
|
val bb: Double? by map |
|
|
|
|
val sb: String? by map |
|
|
|
|
val bb: String? by map |
|
|
|
|
arrayListOf( |
|
|
|
|
RowRepresentableEditDescriptor(sb, R.string.smallblind, InputType.TYPE_CLASS_NUMBER |
|
|
|
|
or InputType.TYPE_NUMBER_FLAG_DECIMAL), |
|
|
|
|
@ -190,18 +190,18 @@ enum class SessionRow : RowRepresentable { |
|
|
|
|
data |
|
|
|
|
} |
|
|
|
|
CASHED_OUT, PRIZE, NET_RESULT -> { |
|
|
|
|
val cashout: Double? by map |
|
|
|
|
val defaultValue: String? by map |
|
|
|
|
arrayListOf( |
|
|
|
|
RowRepresentableEditDescriptor( |
|
|
|
|
cashout?.round(), |
|
|
|
|
defaultValue, |
|
|
|
|
inputType = InputType.TYPE_CLASS_NUMBER |
|
|
|
|
or InputType.TYPE_NUMBER_FLAG_DECIMAL |
|
|
|
|
or InputType.TYPE_NUMBER_FLAG_SIGNED |
|
|
|
|
)) |
|
|
|
|
} |
|
|
|
|
COMMENT -> { |
|
|
|
|
val comment : String? by map |
|
|
|
|
arrayListOf(RowRepresentableEditDescriptor(comment, R.string.comment)) |
|
|
|
|
val defaultValue : String? by map |
|
|
|
|
arrayListOf(RowRepresentableEditDescriptor(defaultValue, R.string.comment)) |
|
|
|
|
} |
|
|
|
|
BREAK_TIME -> { |
|
|
|
|
arrayListOf( |
|
|
|
|
@ -220,9 +220,9 @@ enum class SessionRow : RowRepresentable { |
|
|
|
|
RowRepresentableEditDescriptor(defaultValue, data = data)) |
|
|
|
|
} |
|
|
|
|
INITIAL_BUY_IN -> { |
|
|
|
|
val fee : Double? by map |
|
|
|
|
val defaultValue : Double? by map |
|
|
|
|
arrayListOf( |
|
|
|
|
RowRepresentableEditDescriptor(fee?.round(), inputType = InputType.TYPE_CLASS_NUMBER) |
|
|
|
|
RowRepresentableEditDescriptor(defaultValue?.round(), inputType = InputType.TYPE_CLASS_NUMBER) |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
BANKROLL, LOCATION, TOURNAMENT_FEATURE, TOURNAMENT_NAME -> { |
|
|
|
|
@ -233,30 +233,30 @@ enum class SessionRow : RowRepresentable { |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
PLAYERS -> { |
|
|
|
|
val tournamentNumberOfPlayers: Int? by map |
|
|
|
|
val defaultValue: Int? by map |
|
|
|
|
arrayListOf( |
|
|
|
|
RowRepresentableEditDescriptor( |
|
|
|
|
tournamentNumberOfPlayers?.toString(), |
|
|
|
|
defaultValue?.toString(), |
|
|
|
|
inputType = InputType.TYPE_CLASS_NUMBER |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
POSITION -> { |
|
|
|
|
val tournamentFinalPosition : Int? by map |
|
|
|
|
val defaultValue : Int? by map |
|
|
|
|
arrayListOf( |
|
|
|
|
RowRepresentableEditDescriptor( |
|
|
|
|
tournamentFinalPosition, |
|
|
|
|
defaultValue, |
|
|
|
|
inputType = InputType.TYPE_CLASS_NUMBER |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
TABLE_SIZE -> { |
|
|
|
|
val tableSize : Int? by map |
|
|
|
|
arrayListOf(RowRepresentableEditDescriptor(tableSize)) |
|
|
|
|
val defaultValue : Int? by map |
|
|
|
|
arrayListOf(RowRepresentableEditDescriptor(defaultValue)) |
|
|
|
|
} |
|
|
|
|
TIPS -> { |
|
|
|
|
val sb: Double? by map |
|
|
|
|
val bb: Double? by map |
|
|
|
|
val sb: String? by map |
|
|
|
|
val bb: String? by map |
|
|
|
|
val tips: Double? by map |
|
|
|
|
|
|
|
|
|
// Disable the buttons with value = 0, add current value & set the 2 edit texts |
|
|
|
|
|