Lunchflow fix (#307)

* Fix lunch flow pre-loading and UX

* Small UX fixes

- Proper closing of modal on cancel
- Preload on new account already

* Review comments

* Fix json error

* Delete .claude/settings.local.json

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

* Lunch Flow brand (again :-)

* FIX process only linked accounts

* FIX disable accounts with no name

* Fix string normalization

---------

Signed-off-by: soky srm <sokysrm@gmail.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
This commit is contained in:
soky srm
2025-11-10 21:32:55 +01:00
committed by GitHub
parent eae532714b
commit c6771ebaab
15 changed files with 271 additions and 73 deletions

View File

@@ -15,8 +15,12 @@ en:
one: "The selected account (%{names}) is already linked"
other: "All %{count} selected accounts are already linked: %{names}"
api_error: "API error: %{message}"
invalid_account_names:
one: "Cannot link account with blank name"
other: "Cannot link %{count} accounts with blank names"
link_failed: Failed to link accounts
no_accounts_selected: Please select at least one account
partial_invalid: "Successfully linked %{created_count} account(s), %{already_linked_count} were already linked, %{invalid_count} account(s) had invalid names"
partial_success: "Successfully linked %{created_count} account(s). %{already_linked_count} account(s) were already linked: %{already_linked_names}"
success:
one: "Successfully linked %{count} account"
@@ -34,25 +38,30 @@ en:
accounts_selected: accounts selected
api_error: "API error: %{message}"
cancel: Cancel
configure_name_in_lunchflow: Cannot import - please configure account name in Lunchflow
description: Select the accounts you want to link to your Sure account.
link_accounts: Link selected accounts
no_accounts_found: No accounts found. Please check your API key configuration.
no_api_key: Lunch Flow API key is not configured. Please configure it in Settings.
no_name_placeholder: "(No name)"
title: Select Lunch Flow Accounts
select_existing_account:
account_already_linked: This account is already linked to a provider
all_accounts_already_linked: All Lunch Flow accounts are already linked
api_error: "API error: %{message}"
cancel: Cancel
configure_name_in_lunchflow: Cannot import - please configure account name in Lunchflow
description: Select a Lunch Flow account to link with this account. Transactions will be synced and deduplicated automatically.
link_account: Link account
no_account_specified: No account specified
no_accounts_found: No Lunch Flow accounts found. Please check your API key configuration.
no_api_key: Lunch Flow API key is not configured. Please configure it in Settings.
no_name_placeholder: "(No name)"
title: "Link %{account_name} with Lunch Flow"
link_existing_account:
account_already_linked: This account is already linked to a provider
api_error: "API error: %{message}"
invalid_account_name: Cannot link account with blank name
lunchflow_account_already_linked: This Lunch Flow account is already linked to another account
lunchflow_account_not_found: Lunch Flow account not found
missing_parameters: Missing required parameters

View File

@@ -292,6 +292,7 @@ Rails.application.routes.draw do
resources :lunchflow_items, only: %i[index new create show edit update destroy] do
collection do
get :preload_accounts
get :select_accounts
post :link_accounts
get :select_existing_account