diff --git a/src/web/ui/src/Accounts/State.fs b/src/web/ui/src/Accounts/State.fs index b996cbe79..b05a48d3f 100644 --- a/src/web/ui/src/Accounts/State.fs +++ b/src/web/ui/src/Accounts/State.fs @@ -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 = 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 = | 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 diff --git a/src/web/ui/src/Accounts/View.fs b/src/web/ui/src/Accounts/View.fs index ef6d6142d..2b1ff549e 100644 --- a/src/web/ui/src/Accounts/View.fs +++ b/src/web/ui/src/Accounts/View.fs @@ -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 diff --git a/src/web/ui/src/ui.fsproj b/src/web/ui/src/ui.fsproj index 387e7b4c8..1cabe4ccf 100644 --- a/src/web/ui/src/ui.fsproj +++ b/src/web/ui/src/ui.fsproj @@ -33,7 +33,6 @@ -