mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-09 07:25:19 +02:00
Allow user to add buy and sell trade transactions for investment accounts (#1066)
* Consolidate modal form structure into partial + helper * Scaffold out trade transaction form * Normalize translations * Add buy and sell trade form with tests * Move entryable lists to dedicated controllers * Delegate entry group contents rendering * More cleanup * Extract transaction and valuation update logic from entries controller * Delegate edit and show actions to entryables * Trade builder * Update paths for transaction updates
This commit is contained in:
parent
6bca35fa22
commit
e05f03b314
75 changed files with 801 additions and 624 deletions
|
@ -2,92 +2,12 @@
|
|||
en:
|
||||
account:
|
||||
entries:
|
||||
create:
|
||||
success: "%{name} created"
|
||||
destroy:
|
||||
success: Entry deleted
|
||||
empty:
|
||||
description: Try adding an entry, editing filters or refining your search
|
||||
title: No entries found
|
||||
entryables:
|
||||
trade:
|
||||
show:
|
||||
overview: Overview
|
||||
trade:
|
||||
buy: Buy
|
||||
sell: Sell
|
||||
transaction:
|
||||
selection_bar:
|
||||
mark_transfers: Mark as transfers?
|
||||
mark_transfers_confirm: Mark as transfers
|
||||
mark_transfers_message: By marking transactions as transfers, they will
|
||||
no longer be included in income or spending calculations.
|
||||
show:
|
||||
account_label: Account
|
||||
account_placeholder: Select an account
|
||||
additional: Additional
|
||||
amount: Amount
|
||||
category_label: Category
|
||||
category_placeholder: Select a category
|
||||
date_label: Date
|
||||
delete: Delete
|
||||
delete_subtitle: This permanently deletes the transaction, affects your
|
||||
historical balances, and cannot be undone.
|
||||
delete_title: Delete transaction
|
||||
exclude_subtitle: This excludes the transaction from any in-app features
|
||||
or analytics.
|
||||
exclude_title: Exclude transaction
|
||||
merchant_label: Merchant
|
||||
merchant_placeholder: Select a merchant
|
||||
name_label: Name
|
||||
nature: Transaction type
|
||||
note_label: Notes
|
||||
note_placeholder: Enter a note
|
||||
overview: Overview
|
||||
settings: Settings
|
||||
tags_label: Select one or more tags
|
||||
transaction:
|
||||
deposit: Deposit
|
||||
remove_transfer: Remove transfer
|
||||
remove_transfer_body: This will remove the transfer from this transaction
|
||||
remove_transfer_confirm: Confirm
|
||||
withdrawal: Withdrawal
|
||||
valuation:
|
||||
form:
|
||||
cancel: Cancel
|
||||
valuation:
|
||||
confirm_accept: Delete entry
|
||||
confirm_body_html: "<p>Deleting this entry will remove it from the account’s
|
||||
history which will impact different parts of your account. This includes
|
||||
the net worth and account graphs.</p></br><p>The only way you’ll be
|
||||
able to add this entry back is by re-entering it manually via a new
|
||||
entry</p>"
|
||||
confirm_title: Delete Entry?
|
||||
delete_entry: Delete entry
|
||||
edit_entry: Edit entry
|
||||
no_change: No change
|
||||
start_balance: Starting balance
|
||||
value_update: Value update
|
||||
loading:
|
||||
loading: Loading entries...
|
||||
trades:
|
||||
amount: Amount
|
||||
new: New transaction
|
||||
no_trades: No transactions for this account yet.
|
||||
trade: transaction
|
||||
trades: Transactions
|
||||
type: Type
|
||||
transactions:
|
||||
new: New transaction
|
||||
no_transactions: No transactions for this account yet.
|
||||
transaction: transaction
|
||||
transactions: Transactions
|
||||
update:
|
||||
success: Entry updated
|
||||
valuations:
|
||||
change: change
|
||||
date: date
|
||||
new_entry: New entry
|
||||
no_valuations: No valuations for this account yet
|
||||
valuations: Value history
|
||||
value: value
|
||||
|
|
|
@ -11,7 +11,7 @@ en:
|
|||
name: name
|
||||
needs_sync: Your account needs to sync the latest prices to calculate this
|
||||
portfolio
|
||||
new_holding: New holding
|
||||
new_holding: New transaction
|
||||
no_holdings: No holdings to show.
|
||||
return: total return
|
||||
weight: weight
|
||||
|
|
31
config/locales/views/account/trades/en.yml
Normal file
31
config/locales/views/account/trades/en.yml
Normal file
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
en:
|
||||
account:
|
||||
trades:
|
||||
create:
|
||||
success: Transaction created successfully.
|
||||
form:
|
||||
holding: Ticker symbol
|
||||
price: Price per share
|
||||
qty: Quantity
|
||||
submit: Add transaction
|
||||
ticker_placeholder: AAPL
|
||||
type: Type
|
||||
index:
|
||||
amount: Amount
|
||||
new: New transaction
|
||||
no_trades: No transactions for this account yet.
|
||||
trade: transaction
|
||||
trades: Transactions
|
||||
type: Type
|
||||
new:
|
||||
title: New transaction
|
||||
show:
|
||||
overview: Overview
|
||||
trade:
|
||||
buy: Buy
|
||||
deposit: Deposit
|
||||
inflow: Inflow
|
||||
outflow: Outflow
|
||||
sell: Sell
|
||||
withdrawal: Withdrawal
|
44
config/locales/views/account/transactions/en.yml
Normal file
44
config/locales/views/account/transactions/en.yml
Normal file
|
@ -0,0 +1,44 @@
|
|||
---
|
||||
en:
|
||||
account:
|
||||
transactions:
|
||||
index:
|
||||
new: New transaction
|
||||
no_transactions: No transactions for this account yet.
|
||||
transaction: transaction
|
||||
transactions: Transactions
|
||||
selection_bar:
|
||||
mark_transfers: Mark as transfers?
|
||||
mark_transfers_confirm: Mark as transfers
|
||||
mark_transfers_message: By marking transactions as transfers, they will no
|
||||
longer be included in income or spending calculations.
|
||||
show:
|
||||
account_label: Account
|
||||
account_placeholder: Select an account
|
||||
additional: Additional
|
||||
amount: Amount
|
||||
category_label: Category
|
||||
category_placeholder: Select a category
|
||||
date_label: Date
|
||||
delete: Delete
|
||||
delete_subtitle: This permanently deletes the transaction, affects your historical
|
||||
balances, and cannot be undone.
|
||||
delete_title: Delete transaction
|
||||
exclude_subtitle: This excludes the transaction from any in-app features or
|
||||
analytics.
|
||||
exclude_title: Exclude transaction
|
||||
merchant_label: Merchant
|
||||
merchant_placeholder: Select a merchant
|
||||
name_label: Name
|
||||
nature: Transaction type
|
||||
note_label: Notes
|
||||
note_placeholder: Enter a note
|
||||
overview: Overview
|
||||
settings: Settings
|
||||
tags_label: Select one or more tags
|
||||
transaction:
|
||||
remove_transfer: Remove transfer
|
||||
remove_transfer_body: This will remove the transfer from this transaction
|
||||
remove_transfer_confirm: Confirm
|
||||
update:
|
||||
success: Transaction updated successfully.
|
27
config/locales/views/account/valuations/en.yml
Normal file
27
config/locales/views/account/valuations/en.yml
Normal file
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
en:
|
||||
account:
|
||||
valuations:
|
||||
create:
|
||||
success: Valuation created successfully.
|
||||
form:
|
||||
cancel: Cancel
|
||||
index:
|
||||
change: change
|
||||
date: date
|
||||
new_entry: New entry
|
||||
no_valuations: No valuations for this account yet
|
||||
valuations: Value history
|
||||
value: value
|
||||
valuation:
|
||||
confirm_accept: Delete entry
|
||||
confirm_body_html: "<p>Deleting this entry will remove it from the account’s
|
||||
history which will impact different parts of your account. This includes
|
||||
the net worth and account graphs.</p></br><p>The only way you’ll be able
|
||||
to add this entry back is by re-entering it manually via a new entry</p>"
|
||||
confirm_title: Delete Entry?
|
||||
delete_entry: Delete entry
|
||||
edit_entry: Edit entry
|
||||
no_change: No change
|
||||
start_balance: Starting balance
|
||||
value_update: Value update
|
Loading…
Add table
Add a link
Reference in a new issue