Files
sure/app/views/enable_banking_items/_enable_banking_item.html.erb
Alessio Cappa dd461faf84 feat: Allow account linking for Enable Banking accounts (#428)
* feat: Allow account linking for Enable Banking accounts

* fix: Typo in function name

* fix: naming issue

* fix: Add missing Enable Banking route

* feat: Add ability to link Enable Banking when adding a new account

* Mispelling

* fix: typo in method call

* fix: typo in column name

* Review suggestions

* Linter noise

* Small copy changes to avoid mobile UI blowout

* Provider generator (#364)

* Move provider config to family

* Update schema.rb

* Add provier generator

* Add table creation also

* FIX generator namespace

* Add support for global providers also

* Remove over-engineered stuff

* FIX parser

* FIX linter

* Some generator fixes

* Update generator with fixes

* Update item_model.rb.tt

* Add missing linkable concern

* Add missing routes

* Update adapter.rb.tt

* Update connectable_concern.rb.tt

* Update unlinking_concern.rb.tt

* Update family_generator.rb

* Update family_generator.rb

* Delete .claude/settings.local.json

Signed-off-by: soky srm <sokysrm@gmail.com>

* Move docs under API related folder

* Rename Rails generator doc

* Light edits to LLM generated doc

* Small Lunch Flow config panel regressions.

---------

Signed-off-by: soky srm <sokysrm@gmail.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>

* Skip generators autoloading (#430)

* Include Enable Banking items in Syncer (#434)

* feat: Include Enable Banking items in Syncer

* feat: include only active Enable Banking accounts

* Fix budgets page UI (#427)

* fix: Budget UI improvements

* feat: Reduce padding for sub-categories

* fix: Adjust padding for sub-category arrow

* Revert "feat: Reduce padding for sub-categories"

This reverts commit 7516c5a8e0.

* Revert "fix: Adjust padding for sub-category arrow"

This reverts commit ebc82542cf.

* fix: adjust padding for sub-categories

* fix: Add padding to uncategorized budget

* fix: Remove unnecessary HTML tag

* feat: Add translation keys for budgeted/actual

* feat(lang): add all brazilian portuguese translations (#416)

* feat(lang): add all brazilian portuguese translations

* feat: update pt-BR errors on translation

* fix: atualizar fix base

* feat: add reports translations

* feat: finish translation to brazilian portuguese

* fix: add to supported locales

* fix: number of translations

* fix: errors on translations

* fix: error on rubocop lint

---------

Co-authored-by: Leonardo Ralph <theleoralph@gmail.com>

* Add exclude transaction rule action (#437)

* Initial plan

* Add ExcludeTransaction rule action executor with tests

Co-authored-by: jjmata <187772+jjmata@users.noreply.github.com>

* Copy clarification

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jjmata <187772+jjmata@users.noreply.github.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>

* Preparing for v0.6.6-alpha.3

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>

* fix: remove account_id clearing for Enable Banking accounts

* fix: Remove unexisting available_balance attribute and rename variable for consistency

---------

Signed-off-by: soky srm <sokysrm@gmail.com>
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
Co-authored-by: soky srm <sokysrm@gmail.com>
Co-authored-by: Marcon Neves <marconwillian@icloud.com>
Co-authored-by: Leonardo Ralph <theleoralph@gmail.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jjmata <187772+jjmata@users.noreply.github.com>
2025-12-12 11:19:50 +01:00

110 lines
4.8 KiB
Plaintext

<%# locals: (enable_banking_item:) %>
<%= tag.div id: dom_id(enable_banking_item) do %>
<details open class="group bg-container p-4 shadow-border-xs rounded-xl">
<summary class="flex items-center justify-between gap-2 focus-visible:outline-hidden">
<div class="flex items-center gap-2">
<%= icon "chevron-right", class: "group-open:transform group-open:rotate-90" %>
<div class="flex items-center justify-center h-8 w-8 bg-success/10 rounded-full">
<% if enable_banking_item.logo.attached? %>
<%= image_tag enable_banking_item.logo, class: "rounded-full h-full w-full", loading: "lazy" %>
<% else %>
<div class="flex items-center justify-center">
<%= tag.p enable_banking_item.institution_display_name.first.upcase, class: "text-success text-xs font-medium" %>
</div>
<% end %>
</div>
<div class="pl-1 text-sm">
<div class="flex items-center gap-2">
<%= tag.p enable_banking_item.institution_display_name, class: "font-medium text-primary" %>
<% if enable_banking_item.scheduled_for_deletion? %>
<p class="text-destructive text-sm animate-pulse">Deletion in progress</p>
<% end %>
</div>
<p class="text-xs text-secondary">Enable Banking</p>
<% if enable_banking_item.syncing? %>
<div class="text-secondary flex items-center gap-1">
<%= icon "loader", size: "sm", class: "animate-spin" %>
<%= tag.span "Syncing..." %>
</div>
<% elsif enable_banking_item.requires_update? %>
<div class="text-warning flex items-center gap-1">
<%= icon "alert-triangle", size: "sm", color: "warning" %>
<%= tag.span "Reconnect" %>
</div>
<% else %>
<p class="text-secondary">
<% if enable_banking_item.last_synced_at %>
Last synced <%= time_ago_in_words(enable_banking_item.last_synced_at) %> ago
<% if enable_banking_item.sync_status_summary %>
· <%= enable_banking_item.sync_status_summary %>
<% end %>
<% else %>
Never synced
<% end %>
</p>
<% end %>
</div>
</div>
<div class="flex items-center gap-2">
<% if enable_banking_item.requires_update? %>
<%= button_to reauthorize_enable_banking_item_path(enable_banking_item),
method: :post,
class: "inline-flex items-center gap-1 px-3 py-1.5 text-sm font-medium rounded-lg text-white bg-warning hover:opacity-90 transition-colors",
data: { turbo: false } do %>
<%= icon "refresh-cw", size: "sm" %>
Update
<% end %>
<% elsif Rails.env.development? %>
<%= icon(
"refresh-cw",
as_button: true,
href: sync_enable_banking_item_path(enable_banking_item)
) %>
<% end %>
<%= render DS::Menu.new do |menu| %>
<% menu.with_item(
variant: "button",
text: "Delete",
icon: "trash-2",
href: enable_banking_item_path(enable_banking_item),
method: :delete,
confirm: CustomConfirm.for_resource_deletion(enable_banking_item.institution_display_name, high_severity: true)
) %>
<% end %>
</div>
</summary>
<% unless enable_banking_item.scheduled_for_deletion? %>
<div class="space-y-4 mt-4">
<% if enable_banking_item.accounts.any? %>
<%= render "accounts/index/account_groups", accounts: enable_banking_item.accounts %>
<% end %>
<% if enable_banking_item.unlinked_accounts_count > 0 %>
<div class="p-4 flex flex-col gap-3 items-center justify-center">
<p class="text-primary font-medium text-sm">Setup needed</p>
<p class="text-secondary text-sm"><%= pluralize(enable_banking_item.unlinked_accounts_count, "account") %> imported from Enable Banking need to be set up</p>
<%= render DS::Link.new(
text: "Set up accounts",
icon: "settings",
variant: "primary",
href: setup_accounts_enable_banking_item_path(enable_banking_item),
frame: :modal
) %>
</div>
<% elsif enable_banking_item.accounts.empty? && enable_banking_item.enable_banking_accounts.empty? %>
<div class="p-4 flex flex-col gap-3 items-center justify-center">
<p class="text-primary font-medium text-sm">No accounts found</p>
<p class="text-secondary text-sm">No accounts were found from Enable Banking. Try syncing again.</p>
</div>
<% end %>
</div>
<% end %>
</details>
<% end %>