Merge branch 'ice_exec3' of bitbucket.org:bluetradesys/spark into ice_exec3
This commit is contained in:
commit
dea95455a0
6 files changed
+35
-13
No files matched your search
@@ -66,8 +66,11 @@ let applyCMEUpdate (data:CMEAccountData) = function
|
||||
let applyICEUpdate (data:ICEAccountData) = function
|
||||
| ICEExchangeField.CTI v -> { data with cti = v }
|
||||
| ICEExchangeField.Origin v -> { data with origin = v }
|
||||
| ICEExchangeField.ClearingFirm v -> { data with clearingFirm = v }
|
||||
| ICEExchangeField.ClearingAccount v -> { data with clearingAccount = v }
|
||||
| ICEExchangeField.MiscTagMapping mp -> { data with miscTags = mp }
|
||||
| ICEExchangeField.CustomerAccountRefId v -> { data with customerAccountRefId = v }
|
||||
| ICEExchangeField.AccountCode v -> { data with accountCode = v }
|
||||
|
||||
let applySIMUpdate (data:SIMAccountData) = function
|
||||
| CTI v -> { data with cti = v }
|
||||
|
||||
@@ -36,6 +36,9 @@ type ICEExchangeField =
|
||||
| CTI of CTICode
|
||||
| Origin of CustomerOrFirm
|
||||
| ClearingAccount of string
|
||||
| ClearingFirm of string
|
||||
| CustomerAccountRefId of string
|
||||
| AccountCode of string
|
||||
| MiscTagMapping of JSMap<string>
|
||||
|
||||
type SIMExchangeField =
|
||||
|
||||
@@ -743,7 +743,10 @@ let exchangeSettings model dispatch =
|
||||
h2 [Class "is-size-3"] [ str "ICE" ]
|
||||
Fields.enumSelect "CTI" (toHuman false CTICode.values ice.cti) (allToHuman false CTICode.values) [] (fromHuman CTICode.values>>ICEExchangeField.CTI>>sendICE)
|
||||
Fields.enumSelect "Origin" (toHuman false CustomerOrFirm.values ice.origin) (allToHuman false CustomerOrFirm.values) [] (fromHuman CustomerOrFirm.values>>ICEExchangeField.Origin>>sendICE)
|
||||
Fields.text "Clearing Firm" ice.clearingFirm [] (ICEExchangeField.ClearingFirm>>sendICE)
|
||||
Fields.text "Clearing Account" ice.clearingAccount [MaxLength 12.0] (ICEExchangeField.ClearingAccount>>sendICE)
|
||||
Fields.text "Customer Account Ref ID" ice.customerAccountRefId [] (ICEExchangeField.CustomerAccountRefId>>sendICE)
|
||||
Fields.text "Account Code" ice.accountCode [] (ICEExchangeField.AccountCode>>sendICE)
|
||||
|
||||
h2 [Class "is-size-3"] [ str "SIM" ]
|
||||
Fields.enumSelect "CTI" (toHuman false CTICode.values sim.cti) (allToHuman false CTICode.values) [] (fromHuman CTICode.values>>SIMExchangeField.CTI>>sendSim)
|
||||
|
||||
@@ -202,7 +202,11 @@ let applyUpdate (field:UserField) (user:BTSUser) =
|
||||
| IsActive ia -> { user with isActive = ia }
|
||||
| CanCreate cr -> { user with canCreate = cr }
|
||||
| CMEOperatorID oid -> updateCMEExchangeUserData user { user.userData.exchangeUserData.cmeData with operatorId = oid }
|
||||
| ICECompanyID oid -> updateICEExchangeUserData user { user.userData.exchangeUserData.iceData with companyId = oid }
|
||||
| ICEOperatorID oid -> updateICEExchangeUserData user { user.userData.exchangeUserData.iceData with operatorId = oid }
|
||||
| ICEAuthorizedTrader oid -> updateICEExchangeUserData user { user.userData.exchangeUserData.iceData with authorizedTrader = oid }
|
||||
| ICEAuthorizedGroup oid -> updateICEExchangeUserData user { user.userData.exchangeUserData.iceData with authorizedGroup = oid }
|
||||
| ICEPassword oid -> updateICEExchangeUserData user { user.userData.exchangeUserData.iceData with password = oid }
|
||||
| SimOperatorID oid -> updateSIMExchangeUserData user { user.userData.exchangeUserData.simData with operatorId = oid }
|
||||
| SMPID smpid -> updateCMEExchangeUserData user { user.userData.exchangeUserData.cmeData with smpId = smpid }
|
||||
| CMELocation loc -> updateCMEExchangeUserData user { user.userData.exchangeUserData.cmeData with location = loc }
|
||||
|
||||
@@ -19,6 +19,10 @@ type UserField =
|
||||
| CMEOperatorID of string
|
||||
| CMEATSOperatorID of string
|
||||
| ICEOperatorID of string
|
||||
| ICECompanyID of int
|
||||
| ICEAuthorizedTrader of string
|
||||
| ICEAuthorizedGroup of string
|
||||
| ICEPassword of string
|
||||
| SimOperatorID of string
|
||||
| SMPID of string
|
||||
| CMELocation of string
|
||||
@@ -70,16 +74,17 @@ type Model = {
|
||||
}
|
||||
|
||||
|
||||
let CMEMicMap:Map<string, bts.api.CMEMics> = Map.empty
|
||||
.Add("XCME", bts.api.CMEMics.CME)
|
||||
.Add("XNYM", bts.api.CMEMics.NYMEX)
|
||||
.Add("XCBT", bts.api.CMEMics.CBT)
|
||||
.Add("XCEC", bts.api.CMEMics.COMEX)
|
||||
let CMEMicMap:Map<string, bts.api.CMEMics> = [
|
||||
("XCME", bts.api.CMEMics.CME);
|
||||
("XNYM", bts.api.CMEMics.NYMEX);
|
||||
("XCBT", bts.api.CMEMics.CBT);
|
||||
("XCEC", bts.api.CMEMics.COMEX)
|
||||
] |> Map.ofList
|
||||
|
||||
let ICEMicMap:Map<string, bts.api.ICEMics> = Map.empty
|
||||
.Add("IFCA", bts.api.ICEMics.IFCA)
|
||||
.Add("IFEN", bts.api.ICEMics.IFEN)
|
||||
.Add("IFEU", bts.api.ICEMics.IFEU)
|
||||
.Add("IFLL", bts.api.ICEMics.IFLL)
|
||||
.Add("IFUnset", bts.api.ICEMics.IfUnset)
|
||||
.Add("IFUS", bts.api.ICEMics.IFUS)
|
||||
let ICEMicMap:Map<string, bts.api.ICEMics> = [
|
||||
("IFCA", bts.api.ICEMics.IFCA);
|
||||
("IFEN", bts.api.ICEMics.IFEN);
|
||||
("IFEU", bts.api.ICEMics.IFEU);
|
||||
("IFLL", bts.api.ICEMics.IFLL);
|
||||
("IFUS", bts.api.ICEMics.IFUS)
|
||||
] |> Map.ofList
|
||||
@@ -278,7 +278,11 @@ let orderRoutingTabView (model:Model) (dispatch:Msg->Unit) (readonly:bool) =
|
||||
br []
|
||||
h2 [Class "is-size-3"] [ str "ICE" ]
|
||||
div [] [
|
||||
Fields.text "Operator ID" iceData.operatorId [ MaxLength 18.0 ; Disabled readonly ] (ICEOperatorID >> UpdateField >> dispatch)
|
||||
Fields.number "Company ID" iceData.companyId [ MaxLength 18.0 ] (ICECompanyID >> UpdateField >> dispatch)
|
||||
Fields.text "Operator ID" iceData.operatorId [ MaxLength 18.0 ] (ICEOperatorID >> UpdateField >> dispatch)
|
||||
Fields.text "Authorized Trader" iceData.authorizedTrader [ MaxLength 18.0 ] (ICEAuthorizedTrader >> UpdateField >> dispatch)
|
||||
Fields.text "Authorized Group" iceData.authorizedGroup [ MaxLength 18.0 ] (ICEAuthorizedGroup >> UpdateField >> dispatch)
|
||||
Fields.text "Password" iceData.password [ MaxLength 18.0 ] (ICEPassword >> UpdateField >> dispatch)
|
||||
]
|
||||
br []
|
||||
h2 [Class "is-size-3"] [ str "Sim" ]
|
||||
|
||||
Reference in new issue
Block a user