Fixed selecting selected TAN procedure and added a fallback if customersTanProcedures doesn't contain selected TAN procedure
This commit is contained in:
parent
62f56977f9
commit
d0f5ed4902
|
@ -39,7 +39,9 @@ struct EnterTanDialog: View {
|
||||||
|
|
||||||
self.customersTanProcedures = customer.supportedTanProcedures.filter( {$0.type != .chiptanusb } ) // USB tan generators are not supported on iOS
|
self.customersTanProcedures = customer.supportedTanProcedures.filter( {$0.type != .chiptanusb } ) // USB tan generators are not supported on iOS
|
||||||
|
|
||||||
_selectedTanProcedureIndex = State(initialValue: customer.supportedTanProcedures.firstIndex(of: tanChallenge.tanProcedure) ?? 0)
|
_selectedTanProcedureIndex = State(initialValue: customersTanProcedures.firstIndex(where: { $0.type == state.tanChallenge.tanProcedure.type } )
|
||||||
|
?? state.customer.supportedTanProcedures.firstIndex(where: { $0.type != .chiptanmanuell && $0.type != .chiptanusb } )
|
||||||
|
?? 0)
|
||||||
|
|
||||||
self.customersTanMedia = customer.tanMediaSorted
|
self.customersTanMedia = customer.tanMediaSorted
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue