mirror of
https://github.com/we-promise/sure.git
synced 2026-05-12 23:25:00 +00:00
Expand financial providers (#1407)
* Initial implementation * Tiingo fixes * Adds 2 providers, remove 2 * Add extra checks * FIX a big hotwire race condition // Fix hotwire_combobox race condition: when typing quickly, a slow response for // an early query (e.g. "A") can overwrite the correct results for the final query // (e.g. "AAPL"). We abort the previous in-flight request whenever a new one fires, // so stale Turbo Stream responses never reach the DOM. * pipelock * Update price_test.rb * Reviews * i8n * fixes * fixes * Update tiingo.rb * fixes * Improvements * Big revamp * optimisations * Update 20260408151837_add_offline_reason_to_securities.rb * Add missing tests, fixes * small rank tests * FIX tests * Update show.html.erb * Update resolver.rb * Update usd_converter.rb * Update holdings_controller.rb * Update holdings_controller.rb * Update holdings_controller.rb * Update holdings_controller.rb * Update holdings_controller.rb * Update _yahoo_finance_settings.html.erb
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
}} %>
|
||||
|
||||
<% if %w[buy sell].include?(type) %>
|
||||
<% if Security.provider.present? %>
|
||||
<% if Security.providers.any? %>
|
||||
<div class="form-field combobox">
|
||||
<%= form.combobox :ticker,
|
||||
securities_path(country_code: Current.family.country),
|
||||
|
||||
@@ -8,6 +8,14 @@
|
||||
<% trade = @entry.trade %>
|
||||
<% dialog.with_body do %>
|
||||
<%= render "entries/protection_indicator", entry: @entry, unlock_path: unlock_trade_path(trade) %>
|
||||
<% if trade.security&.provider_status == :provider_unavailable %>
|
||||
<div class="px-3 py-2">
|
||||
<%= render DS::Alert.new(
|
||||
message: t(".provider_disabled_warning", provider: trade.security.price_provider&.humanize || "Unknown"),
|
||||
variant: :warning
|
||||
) %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% dialog.with_section(title: t(".details"), open: true) do %>
|
||||
<div class="pb-4">
|
||||
<%= styled_form_with model: @entry,
|
||||
|
||||
Reference in New Issue
Block a user