mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 12:04:08 +00:00
Family sharing (#1272)
* Initial account sharing changes * Update schema.rb * Update schema.rb * Change sharing UI to modal * UX fixes and sharing controls * Scope include in finances better * Update totals.rb * Update totals.rb * Scope reports to finance account scope * Update impersonation_sessions_controller_test.rb * Review fixes * Update schema.rb * Update show.html.erb * FIX db validation * Refine edit permissions * Review items * Review * Review * Add application level helper * Critical review * Address remaining review items * Fix modals * more scoping * linter * small UI fix * Fix: Sync broadcasts push unscoped balance sheet to all users * Update sync_complete_event.rb The fix removes the sidebar broadcasts (which rendered unscoped account groups using family.balance_sheet without user context) along with the now-unused sidebar_targets, account_group, and family_balance_sheet private methods. The sidebar will still update correctly — when the sync completes, Family::SyncCompleteEvent#broadcast fires family.broadcast_refresh, which triggers a morph-based page refresh for each user with their own authenticated session, rendering properly scoped sidebar content.
This commit is contained in:
29
config/locales/views/account_sharings/en.yml
Normal file
29
config/locales/views/account_sharings/en.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
en:
|
||||
account_sharings:
|
||||
show:
|
||||
title: Account Sharing
|
||||
subtitle: Control who can see and interact with this account
|
||||
member: Member
|
||||
permission: Permission
|
||||
shared: Shared
|
||||
no_members: No other members in your %{moniker} to share with
|
||||
permissions:
|
||||
full_control: Full control
|
||||
full_control_description: Can view, edit, and manage transactions
|
||||
read_write: Can annotate
|
||||
read_write_description: Can categorize, tag, and add notes
|
||||
read_only: View only
|
||||
read_only_description: Can only view account data
|
||||
save: Save sharing settings
|
||||
owner_label: "Owner: %{name}"
|
||||
shared_with_count:
|
||||
one: Shared with 1 member
|
||||
other: "Shared with %{count} members"
|
||||
include_in_finances: Include in my budgets & reports
|
||||
exclude_from_finances: Exclude from my budgets & reports
|
||||
finance_toggle_description: Count this account in your net worth, budgets, and reports
|
||||
update:
|
||||
success: Sharing settings updated
|
||||
not_owner: Only the account owner can manage sharing
|
||||
finance_toggle_success: Finance inclusion preference updated
|
||||
@@ -1,6 +1,7 @@
|
||||
---
|
||||
en:
|
||||
accounts:
|
||||
not_authorized: "You don't have permission to manage this account"
|
||||
account:
|
||||
edit: Edit
|
||||
link_lunchflow: Link with Lunch Flow
|
||||
@@ -13,6 +14,7 @@ en:
|
||||
remove_default: Unset default
|
||||
default_label: Default
|
||||
delete: Delete account
|
||||
sharing: Sharing
|
||||
chart:
|
||||
data_not_available: Data not available for the selected period
|
||||
create:
|
||||
|
||||
@@ -58,6 +58,11 @@ en:
|
||||
month_start_day: Budget month starts on
|
||||
month_start_day_hint: Set when your budget month starts (e.g., payday)
|
||||
month_start_day_warning: Your budgets and MTD calculations will use this custom start day instead of the 1st of each month.
|
||||
sharing_title: "%{moniker} Sharing"
|
||||
sharing_subtitle: "Control how accounts are shared in your %{moniker}"
|
||||
sharing_default_label: Default sharing for new accounts
|
||||
sharing_shared: Share with all members
|
||||
sharing_private: Keep private by default
|
||||
profiles:
|
||||
destroy:
|
||||
cannot_remove_self: You cannot remove yourself from the account.
|
||||
|
||||
@@ -348,6 +348,8 @@ Rails.application.routes.draw do
|
||||
collection do
|
||||
post :sync_all
|
||||
end
|
||||
|
||||
resource :sharing, only: [ :show, :update ], controller: "account_sharings"
|
||||
end
|
||||
|
||||
# Convenience routes for polymorphic paths
|
||||
|
||||
Reference in New Issue
Block a user