mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-02 20:15:22 +02:00
Basic Plaid Integration (#1433)
* Basic plaid data model and linking * Remove institutions, add plaid items * Improve schema and Plaid provider * Add webhook verification sketch * Webhook verification * Item accounts and balances sync setup * Provide test encryption keys * Fix test * Only provide encryption keys in prod * Try defining keys in test env * Consolidate account sync logic * Add back plaid account initialization * Plaid transaction sync * Sync UI overhaul for Plaid * Add liability and investment syncing * Handle investment webhooks and process current day holdings * Remove logs * Remove "all" period select for performance * fix amount calc * Remove todo comment * Coming soon for investment historical data * Document Plaid configuration * Listen for holding updates
This commit is contained in:
parent
3bc9da4105
commit
cbba2ba675
127 changed files with 1537 additions and 841 deletions
|
@ -1 +1,25 @@
|
|||
<%# locals: (account:) %>
|
||||
|
||||
<% period = Period.from_param(params[:period]) %>
|
||||
<% series = account.series(period: period) %>
|
||||
<% trend = series.trend %>
|
||||
|
||||
<div class="bg-white shadow-xs rounded-xl border border-alpha-black-25 rounded-lg">
|
||||
<div class="p-4 flex justify-between">
|
||||
<div class="space-y-2">
|
||||
<div class="flex items-center gap-1">
|
||||
<%= tag.p t(".value"), class: "text-sm font-medium text-gray-500" %>
|
||||
</div>
|
||||
|
||||
<%= tag.p format_money(account.value), class: "text-gray-900 text-3xl font-medium" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="relative h-64 flex items-center justify-center">
|
||||
<%= image_tag "placeholder-graph.svg", class: "w-full h-full object-cover rounded-bl-lg rounded-br-lg opacity-50" %>
|
||||
<div class="absolute top-0 left-0 w-full h-full flex flex-col items-center justify-center space-y-1">
|
||||
<p class="text-gray-900 text-sm">Historical investment data coming soon.</p>
|
||||
<p class="text-gray-500 text-sm">We're working to bring you the full picture.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% if params[:step] == "method_select" %>
|
||||
<%= render "accounts/new/method_selector", path: new_investment_path(institution_id: params[:institution_id], return_to: params[:return_to]) %>
|
||||
<%= render "accounts/new/method_selector", path: new_investment_path(return_to: params[:return_to]), link_token: @link_token %>
|
||||
<% else %>
|
||||
<%= modal_form_wrapper title: t(".title") do %>
|
||||
<%= render "investments/form", account: @account, url: investments_path %>
|
||||
|
|
|
@ -4,7 +4,10 @@
|
|||
<%= tag.div class: "space-y-4" do %>
|
||||
<%= render "accounts/show/header", account: @account %>
|
||||
|
||||
<%= render "accounts/show/chart",
|
||||
<% if @account.plaid_account_id.present? %>
|
||||
<%= render "investments/chart", account: @account %>
|
||||
<% else %>
|
||||
<%= render "accounts/show/chart",
|
||||
account: @account,
|
||||
title: t(".chart_title"),
|
||||
tooltip: render(
|
||||
|
@ -12,6 +15,7 @@
|
|||
value: @account.value,
|
||||
cash: @account.balance_money
|
||||
) %>
|
||||
<% end %>
|
||||
|
||||
<div class="min-h-[800px]">
|
||||
<%= render "accounts/show/tabs", account: @account, tabs: [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue