fix web build after merge

This commit is contained in:
Michael Harding committed 2019-08-02 15:24:21 -04:00
1 parent 1bb4ce91cf
commit db234c7d06
3 files changed
+15 -13

No files matched your search

+4 -3
View File
@@ -162,7 +162,8 @@ let saveAccount (admin:IAdminService) (account:BTSAccount) (manualFillData:Manua
let result6Msg = result6.response |> Array.tryFind (fun i -> (not i.ok))
let result7Msg = result7.response |> Array.tryFind (fun i -> (not i.ok))
match result.isSuccess, && result2.success && result3.success && result4.success, result5Msg, result6Msg, result7Msg with
//match result.isSuccess, result2.success, result3.success, result4.success, result5Msg, result6Msg, result7Msg with
match result.isSuccess, true, true, true, result5Msg, result6Msg, result7Msg with
| false, _, _, _, _, _, _ ->
return ErrorOccured (sprintf "Error saving account: %s" result.errorText)
| _, false, _, _, _, _, _ ->
@@ -315,7 +316,7 @@ let update msg (model:Model) : Model * Cmd<Msg> =
tempSODFillData = emptyTempManualFill
tempDayFillData = emptyTempManualFill
}
marginScratch = emptyMargin
marginScratch = emptyMargin
}, GetPositionData |> Cmd.ofMsg
| GetMarginData ->
{ model with ShowLoading = false}, (getMarginData model.marginService model.scratch.name UpdateMarginData (box>>ErrorOccured))
@@ -354,7 +355,7 @@ let update msg (model:Model) : Model * Cmd<Msg> =
| SaveScratch ->
match isNewAccount model.scratch with
| true -> model, Cmd.ofExistingPromise (createAccount model.admin model.scratch model ) id (box>>ErrorOccured)
| false -> { model with marginScratch = model.marginData }, Cmd.ofExistingPromise (saveAccount model.admin model.scratch model ) id (box>>ErrorOccured)
| false -> { model with marginScratch = model.marginData }, Cmd.ofExistingPromise (saveAccount model.admin model.scratch model.ManualFillData model) id (box>>ErrorOccured)
| ErrorOccured msg ->
Global.alert Global.Error (string msg)
Browser.console.log msg
+11 -9
View File
@@ -115,6 +115,7 @@ let marginView model dispatch =
]
className = ""
header = None
onClick = None
}
let rws:TableControl.row =
@@ -134,6 +135,7 @@ let marginView model dispatch =
]
className = ""
header = None
onClick = None
}
div [][
@@ -1308,15 +1310,15 @@ let tabContent model dispatch =
div [Key (string model.scratch.id); ClassName "is-tab-content"] [
// (match model.tab with
(match model.tab, (accountIsSelected model.scratch Access.Accounts.empty) with
| _ , false -> p [Style [ Color "Red" ]] [ str "You are not authorized to view this data" ]
| General, _ -> generalView model dispatch
| LimitsTab, _ -> LimitsView model dispatch
| ConnectionsTab, _ -> ConnectionsView model dispatch
| CreditLimitsTab, _ -> creditLimitsView model dispatch
| ExchangeSettingsTab, _ -> exchangeSettings model dispatch
| OrdersTab, _ -> ordersView model dispatch
| PositionManagementTab, _ -> PositionManagementView model dispatch)
| marginTab, _ -> marginView model dispatch)
| _ , false -> p [Style [ Color "Red" ]] [ str "You are not authorized to view this data" ]
| General, _ -> generalView model dispatch
| LimitsTab, _ -> LimitsView model dispatch
| ConnectionsTab, _ -> ConnectionsView model dispatch
| CreditLimitsTab, _ -> creditLimitsView model dispatch
| ExchangeSettingsTab, _ -> exchangeSettings model dispatch
| OrdersTab, _ -> ordersView model dispatch
| PositionManagementTab, _ -> PositionManagementView model dispatch
| marginTab, _ -> marginView model dispatch)
]
let isActive account = function
-1
View File
@@ -33,7 +33,6 @@
<Compile Include="$(API)/fable/MarginService.fable.fs" />
<Compile Include="$(API)/fable/co2.fable.fs" />
<Compile Include="$(API)/fable/MarketDataRelay.fable.fs" />
<Compile Include="$(API)/fable/PositionService.fable.fs" />
<!-- Global to the app -->
<Compile Include="Lens.fs" />
<Compile Include="Global.fs" />