mirror of
https://github.com/we-promise/sure.git
synced 2026-04-08 23:04:49 +00:00
* Implement recurring transactions support * Amount fix * Hide section when any filter is applied * Add automatic identify feature Automatic identification runs after: - CSV Import completes (TransactionImport, TradeImport, AccountImport, MintImport) - Plaid sync completes - SimpleFIN sync completes - LunchFlow sync completes - Any new provider that we create. * Fix linter and tests * Fix address review * FIX proper text sizing * Fix further linter Use circular distance to handle month-boundary wrapping * normalize to a circular representation before computing the median * Better tests validation * Added some UI info Fix pattern identification, last recurrent transaction needs to happened within the last 45 days. * Fix styling * Revert text subdued look * Match structure of the other sections * Styling * Restore positive amounts styling * Shorten label for UI styling --------- Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
68 lines
2.6 KiB
Plaintext
68 lines
2.6 KiB
Plaintext
<div id="<%= dom_id import %>" class="flex items-center justify-between mx-4 py-4">
|
|
|
|
<div class="flex items-center gap-2 mb-1">
|
|
<%= link_to import_path(import), class: "text-sm text-primary hover:underline" do %>
|
|
<% if import.account.present? %>
|
|
<%= import.account.name + " " %>
|
|
<% end %>
|
|
|
|
<%= t(".label", type: import.type.titleize, datetime: import.updated_at.strftime("%b %-d, %Y at %l:%M %p")) %>
|
|
<% end %>
|
|
|
|
<% if import.pending? %>
|
|
<span class="px-1 py text-xs rounded-full bg-gray-500/5 text-secondary border border-alpha-black-50">
|
|
<%= t(".in_progress") %>
|
|
</span>
|
|
<% elsif import.importing? %>
|
|
<span class="px-1 py text-xs animate-pulse rounded-full bg-orange-500/5 text-orange-500 border border-alpha-black-50">
|
|
<%= t(".uploading") %>
|
|
</span>
|
|
<% elsif import.failed? %>
|
|
<span class="px-1 py text-xs rounded-full bg-red-500/5 text-red-500 border border-alpha-black-50">
|
|
<%= t(".failed") %>
|
|
</span>
|
|
<% elsif import.reverting? %>
|
|
<span class="px-1 py text-xs rounded-full bg-orange-500/5 text-orange-500 border border-alpha-black-50">
|
|
<%= t(".reverting") %>
|
|
</span>
|
|
<% elsif import.revert_failed? %>
|
|
<span class="px-1 py text-xs rounded-full bg-red-500/5 text-red-500 border border-alpha-black-50">
|
|
<%= t(".revert_failed") %>
|
|
</span>
|
|
<% elsif import.complete? %>
|
|
<span class="px-1 py text-xs rounded-full bg-green-500/5 text-green-500 border border-alpha-black-50">
|
|
<%= t(".complete") %>
|
|
</span>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="flex items-center gap-2">
|
|
|
|
<% if import.complete? || import.revert_failed? %>
|
|
<%= button_to revert_import_path(import),
|
|
method: :put,
|
|
class: "flex items-center gap-2 text-orange-500 hover:text-orange-600",
|
|
data: {
|
|
turbo_confirm: "This will delete transactions that were imported, but you will still be able to review and re-import your data at any time."
|
|
} do %>
|
|
<%= icon "rotate-ccw", class: "w-5 h-5 text-destructive" %>
|
|
<% end %>
|
|
|
|
<% else %>
|
|
<%= button_to import_path(import),
|
|
method: :delete,
|
|
class: "flex items-center gap-2 text-destructive hover:text-destructive-hover",
|
|
data: {
|
|
turbo_confirm: CustomConfirm.for_resource_deletion("import")
|
|
} do %>
|
|
<%= icon "trash-2", class: "w-5 h-5 text-destructive" %>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<%= link_to import_path(import),
|
|
class: "flex items-center gap-2 text-primary hover:text-primary-hover" do %>
|
|
<%= icon "eye", class: "w-5 h-5" %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|