Skip to content

armgit / maybe

Public Imported from GitHub
0

The personal finance app for everyone

Link to CSV imports (#1273)

Zach Gollwitzerb4d0fdbe0d58
diff --git a/app/views/accounts/new.html.erb b/app/views/accounts/new.html.erb
index 2beba399..bb544e85 100644
--- a/app/views/accounts/new.html.erb
+++ b/app/views/accounts/new.html.erb
@@ -46,8 +46,13 @@
<button hidden data-controller="hotkey" data-hotkey="k,K,ArrowUp,ArrowLeft" data-action="list-keyboard-navigation#focusPrevious">Previous</button>
<button hidden data-controller="hotkey" data-hotkey="j,J,ArrowDown,ArrowRight" data-action="list-keyboard-navigation#focusNext">Next</button>
<%= render "entry_method", type: @account.accountable, text: "Enter account balance manually", icon: "keyboard" %>
+ <%= link_to new_import_path, class: "flex items-center gap-4 w-full text-center focus:outline-none focus:bg-gray-50 border border-transparent focus:border focus:border-gray-200 px-2 hover:bg-gray-50 rounded-lg p-2" do %>
+ <span class="flex w-8 h-8 shrink-0 grow-0 items-center justify-center rounded-lg bg-alpha-black-50 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.02)]">
+ <%= lucide_icon("sheet", class: "text-gray-500 w-5 h-5") %>
+ </span>
+ Upload CSV
+ <% end %>
<%= render "entry_method", type: @account.accountable, text: "Securely link bank account with data provider (coming soon)", icon: "link-2", disabled: true %>
- <%= render "entry_method", type: @account.accountable, text: "Upload spreadsheet (coming soon)", icon: "sheet", disabled: true %>
</div>
<div class="border-t border-alpha-black-25 p-4 text-gray-500 text-sm flex justify-between">
<div class="flex space-x-5">
diff --git a/app/views/accounts/show.html.erb b/app/views/accounts/show.html.erb
index c3f5fd6f..78825eec 100644
--- a/app/views/accounts/show.html.erb
+++ b/app/views/accounts/show.html.erb
@@ -27,7 +27,7 @@
<span><%= t(".edit") %></span>
<% end %>
- <%= link_to new_import_path(account_id: @account.id),
+ <%= link_to new_import_path,
class: "block w-full py-2 px-3 space-x-2 text-gray-900 hover:bg-gray-50 flex items-center rounded-lg" do %>
<%= lucide_icon "download", class: "w-5 h-5 text-gray-500" %>
diff --git a/app/views/imports/_empty.html.erb b/app/views/imports/_empty.html.erb
index 41b98a06..bf0f1e70 100644
--- a/app/views/imports/_empty.html.erb
+++ b/app/views/imports/_empty.html.erb
@@ -1,7 +1,7 @@
<div class="flex justify-center items-center py-20">
<div class="text-center flex flex-col items-center max-w-[300px] gap-4">
<p class="text-gray-900 mb-1 font-medium text-sm"><%= t(".message") %></p>
- <%= link_to new_import_path(enable_type_selector: true), class: "btn btn--primary flex items-center gap-2", data: { turbo_frame: "modal" } do %>
+ <%= link_to new_import_path, class: "btn btn--primary flex items-center gap-2", data: { turbo_frame: "modal" } do %>
<%= lucide_icon("plus", class: "w-5 h-5") %>
<span><%= t(".new") %></span>
<% end %>
diff --git a/app/views/transactions/_header.html.erb b/app/views/transactions/_header.html.erb
index 6e47a265..3e532fad 100644
--- a/app/views/transactions/_header.html.erb
+++ b/app/views/transactions/_header.html.erb
@@ -11,7 +11,7 @@
</div>
<% end %>
- <%= link_to new_import_path(enable_type_selector: true), class: "btn btn--outline flex items-center gap-2", data: { turbo_frame: "modal" } do %>
+ <%= link_to new_import_path, class: "btn btn--outline flex items-center gap-2", data: { turbo_frame: "modal" } do %>
<%= lucide_icon("download", class: "text-gray-500 w-4 h-4") %>
<p class="text-sm font-medium text-gray-900"><%= t(".import") %></p>
<% end %>