mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-05 13:35:21 +02:00
Account namespace updates: part 4 (transfers, singular namespacing) (#896)
* Move Transfer to Account namespace * Fix partial resolution due to namespacing plurality * Make category and tag controllers consistent with namespacing convention * Update stale partial reference
This commit is contained in:
parent
dc3147c101
commit
bddaab0192
50 changed files with 227 additions and 127 deletions
28
config/locales/views/account/transfers/en.yml
Normal file
28
config/locales/views/account/transfers/en.yml
Normal file
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
en:
|
||||
account:
|
||||
transfers:
|
||||
create:
|
||||
success: Transfer created
|
||||
destroy:
|
||||
success: Transfer removed
|
||||
form:
|
||||
amount: Amount
|
||||
date: Date
|
||||
description: Description
|
||||
description_placeholder: Transfer from Checking to Savings
|
||||
expense: Expense
|
||||
from: From
|
||||
income: Income
|
||||
select_account: Select account
|
||||
submit: Create transfer
|
||||
to: To
|
||||
transfer: Transfer
|
||||
new:
|
||||
title: New transfer
|
||||
transfer:
|
||||
remove_body: This will NOT delete the underlying transactions. It will just
|
||||
remove the transfer.
|
||||
remove_confirm: Confirm
|
||||
remove_title: Remove transfer?
|
||||
transfer_name: Transfer from %{from_account} to %{to_account}
|
|
@ -3,27 +3,6 @@ en:
|
|||
categories:
|
||||
create:
|
||||
success: New transaction category created successfully
|
||||
deletions:
|
||||
create:
|
||||
success: Transaction category deleted successfully
|
||||
new:
|
||||
category: Category
|
||||
delete_and_leave_uncategorized: Delete "%{category_name}" and leave uncategorized
|
||||
delete_and_recategorize: Delete "%{category_name}" and assign new category
|
||||
delete_category: Delete category?
|
||||
explanation: By deleting this category, every transaction that has the "%{category_name}"
|
||||
category will be uncategorized. Instead of leaving them uncategorized, you
|
||||
can also assign a new category below.
|
||||
replacement_category_prompt: Select category
|
||||
dropdowns:
|
||||
row:
|
||||
delete: Delete category
|
||||
edit: Edit category
|
||||
show:
|
||||
add_new: Add new
|
||||
clear: Clear
|
||||
no_categories: No categories found
|
||||
search_placeholder: Search
|
||||
edit:
|
||||
edit: Edit category
|
||||
form:
|
||||
|
|
15
config/locales/views/category/deletions/en.yml
Normal file
15
config/locales/views/category/deletions/en.yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
en:
|
||||
category:
|
||||
deletions:
|
||||
create:
|
||||
success: Transaction category deleted successfully
|
||||
new:
|
||||
category: Category
|
||||
delete_and_leave_uncategorized: Delete "%{category_name}" and leave uncategorized
|
||||
delete_and_recategorize: Delete "%{category_name}" and assign new category
|
||||
delete_category: Delete category?
|
||||
explanation: By deleting this category, every transaction that has the "%{category_name}"
|
||||
category will be uncategorized. Instead of leaving them uncategorized, you
|
||||
can also assign a new category below.
|
||||
replacement_category_prompt: Select category
|
12
config/locales/views/category/dropdowns/en.yml
Normal file
12
config/locales/views/category/dropdowns/en.yml
Normal file
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
en:
|
||||
category:
|
||||
dropdowns:
|
||||
row:
|
||||
delete: Delete category
|
||||
edit: Edit category
|
||||
show:
|
||||
add_new: Add new
|
||||
clear: Clear
|
||||
no_categories: No categories found
|
||||
search_placeholder: Search
|
15
config/locales/views/tag/deletions/en.yml
Normal file
15
config/locales/views/tag/deletions/en.yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
en:
|
||||
tag:
|
||||
deletions:
|
||||
create:
|
||||
deleted: Tag deleted
|
||||
new:
|
||||
delete_and_leave_uncategorized: Delete "%{tag_name}"
|
||||
delete_and_recategorize: Delete "%{tag_name}" and assign new tag
|
||||
delete_tag: Delete tag?
|
||||
explanation: "%{tag_name} will be removed from transactions and other taggable
|
||||
entities. Instead of leaving them untagged, you can also assign a new tag
|
||||
below."
|
||||
replacement_tag_prompt: Select tag
|
||||
tag: Tag
|
|
@ -3,18 +3,6 @@ en:
|
|||
tags:
|
||||
create:
|
||||
created: Tag created
|
||||
deletions:
|
||||
create:
|
||||
deleted: Tag deleted
|
||||
new:
|
||||
delete_and_leave_uncategorized: Delete "%{tag_name}"
|
||||
delete_and_recategorize: Delete "%{tag_name}" and assign new tag
|
||||
delete_tag: Delete tag?
|
||||
explanation: "%{tag_name} will be removed from transactions and other taggable
|
||||
entities. Instead of leaving them untagged, you can also assign a new tag
|
||||
below."
|
||||
replacement_tag_prompt: Select tag
|
||||
tag: Tag
|
||||
edit:
|
||||
edit: Edit tag
|
||||
form:
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
---
|
||||
en:
|
||||
transfers:
|
||||
create:
|
||||
success: Transfer created
|
||||
destroy:
|
||||
success: Transfer removed
|
||||
form:
|
||||
amount: Amount
|
||||
date: Date
|
||||
description: Description
|
||||
description_placeholder: Transfer from Checking to Savings
|
||||
expense: Expense
|
||||
from: From
|
||||
income: Income
|
||||
select_account: Select account
|
||||
submit: Create transfer
|
||||
to: To
|
||||
transfer: Transfer
|
||||
new:
|
||||
title: New transfer
|
||||
transfer:
|
||||
remove_body: This will NOT delete the underlying transactions. It will just
|
||||
remove the transfer.
|
||||
remove_confirm: Confirm
|
||||
remove_title: Remove transfer?
|
||||
transfer_name: Transfer from %{from_account} to %{to_account}
|
|
@ -38,18 +38,24 @@ Rails.application.routes.draw do
|
|||
end
|
||||
|
||||
resources :tags, except: %i[ show destroy ] do
|
||||
resources :deletions, only: %i[ new create ], module: :tags
|
||||
resources :deletions, only: %i[ new create ], module: :tag
|
||||
end
|
||||
|
||||
namespace :category do
|
||||
resource :dropdown, only: :show
|
||||
end
|
||||
|
||||
resources :categories do
|
||||
resources :deletions, only: %i[ new create ], module: :categories
|
||||
collection do
|
||||
resource :dropdown, only: :show, module: :categories, as: :category_dropdown
|
||||
end
|
||||
resources :deletions, only: %i[ new create ], module: :category
|
||||
end
|
||||
|
||||
resources :merchants, only: %i[ index new create edit update destroy ]
|
||||
|
||||
namespace :transaction do
|
||||
resources :rows, only: %i[ show update ]
|
||||
resources :rules, only: %i[ index ]
|
||||
end
|
||||
|
||||
resources :transactions do
|
||||
collection do
|
||||
post "bulk_delete"
|
||||
|
@ -57,17 +63,14 @@ Rails.application.routes.draw do
|
|||
post "bulk_update"
|
||||
post "mark_transfers"
|
||||
post "unmark_transfers"
|
||||
|
||||
scope module: :transactions, as: :transaction do
|
||||
resources :rows, only: %i[ show update ]
|
||||
resources :rules, only: %i[ index ]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
resources :transfers, only: %i[ new create destroy ]
|
||||
namespace :account do
|
||||
resources :transfers, only: %i[ new create destroy ]
|
||||
end
|
||||
|
||||
resources :accounts, shallow: true do
|
||||
resources :accounts do
|
||||
collection do
|
||||
get :summary
|
||||
get :list
|
||||
|
@ -77,11 +80,8 @@ Rails.application.routes.draw do
|
|||
post :sync
|
||||
end
|
||||
|
||||
scope module: :accounts do
|
||||
resource :logo, only: :show
|
||||
end
|
||||
|
||||
resources :valuations
|
||||
resource :logo, only: :show, module: :account
|
||||
resources :valuations, shallow: true
|
||||
end
|
||||
|
||||
resources :institutions, except: %i[ index show ]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue