SPARK-1240, SPARK-1239: Hide Synthetic, Remove duplicate symbols
This commit is contained in:
1 parent
427d03d340
commit
e2e78d91c3
1 file changed
+21
-6
@@ -101,7 +101,12 @@ let clipLimitsView model dispatch =
|
||||
header = None
|
||||
}
|
||||
|
||||
let symbolArray = Array.concat [| [| model.AllValueDisplay |]; Array.map<bts.api.Product, string> (fun a -> a.symbol ) model.mdRelayProductData |]
|
||||
let symbolArray = [|
|
||||
[| model.AllValueDisplay |];
|
||||
Array.map<bts.api.Product, string> (fun a -> a.symbol ) model.mdRelayProductData
|
||||
|]
|
||||
|> Array.concat
|
||||
|> Array.distinct
|
||||
|
||||
let getSecurityMap (limit:AccountSecurityClipLimitUnit) =
|
||||
let allOption = {
|
||||
@@ -165,7 +170,7 @@ let clipLimitsView model dispatch =
|
||||
TableControl.Cell (Fields.enumSelect<string>
|
||||
""
|
||||
(EnumUtils.toHuman<bts.api.SecurityType> false securityTypes limit.security.securityType)
|
||||
(EnumUtils.allToHuman<bts.api.SecurityType> false securityTypes)
|
||||
(EnumUtils.allToHuman<bts.api.SecurityType> false (Array.filter (fun a -> a <> bts.api.SecurityType.SYNTHETIC) securityTypes))
|
||||
[]
|
||||
((changeType limit) >> ClipLimits >> dispatch)
|
||||
)
|
||||
@@ -223,7 +228,12 @@ let productLimits model dispatch =
|
||||
header = None
|
||||
}
|
||||
|
||||
let symbolArray = Array.concat [| [| model.AllValueDisplay |]; Array.map<bts.api.Product, string> (fun a -> a.symbol ) model.mdRelayProductData |]
|
||||
let symbolArray = [|
|
||||
[| model.AllValueDisplay |];
|
||||
Array.map<bts.api.Product, string> (fun a -> a.symbol ) model.mdRelayProductData
|
||||
|]
|
||||
|> Array.concat
|
||||
|> Array.distinct
|
||||
|
||||
let modifyRow (oldRow:AccountProductPositionLimitUnit) (newRow:AccountProductPositionLimitUnit) =
|
||||
let i = Array.findIndex (fun l -> oldRow = l) model.scratch.productPositionLimits
|
||||
@@ -268,7 +278,7 @@ let productLimits model dispatch =
|
||||
TableControl.Cell (Fields.enumSelect<string>
|
||||
""
|
||||
(EnumUtils.toHuman<bts.api.SecurityType> false securityTypes limit.product.securityType)
|
||||
(EnumUtils.allToHuman<bts.api.SecurityType> false securityTypes)
|
||||
(EnumUtils.allToHuman<bts.api.SecurityType> false (Array.filter (fun a -> a <> bts.api.SecurityType.SYNTHETIC) securityTypes))
|
||||
[]
|
||||
((changeType limit) >> ProductLimits >> dispatch)
|
||||
)
|
||||
@@ -334,7 +344,12 @@ let securityLimits model dispatch =
|
||||
header = None
|
||||
}
|
||||
|
||||
let symbolArray = Array.concat [| [| model.AllValueDisplay |]; Array.map<bts.api.Product, string> (fun a -> a.symbol ) model.mdRelayProductData |]
|
||||
let symbolArray = [|
|
||||
[| model.AllValueDisplay |];
|
||||
Array.map<bts.api.Product, string> (fun a -> a.symbol ) model.mdRelayProductData
|
||||
|]
|
||||
|> Array.concat
|
||||
|> Array.distinct
|
||||
|
||||
let getSecurityMap (limit:AccountSecurityPositionLimitUnit) =
|
||||
let allOption = {
|
||||
@@ -401,7 +416,7 @@ let securityLimits model dispatch =
|
||||
TableControl.Cell (Fields.enumSelect<string>
|
||||
""
|
||||
(EnumUtils.toHuman<bts.api.SecurityType> false securityTypes limit.security.securityType)
|
||||
(EnumUtils.allToHuman<bts.api.SecurityType> false securityTypes)
|
||||
(EnumUtils.allToHuman<bts.api.SecurityType> false (Array.filter (fun a -> a <> bts.api.SecurityType.SYNTHETIC) securityTypes))
|
||||
[]
|
||||
((changeType limit) >> SecurityLimits >> dispatch)
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user