Organization settings management LiveView for PhoenixKit.
Provides a unified interface for company information shared between Legal and Billing modules. This includes company details and bank information.
Summary
Functions
Gets the list of bank accounts. A company can have more than one (a EUR
operating account and a USD reserve account, say) — each entry carries
"uuid", "label", "bank_name", "iban", "swift", "primary".
Gets bank details in the original single-account shape — the PRIMARY bank account's fields (falling back to whichever account comes first if none is marked primary, and to blank if there are no accounts at all).
Gets company info from consolidated key with fallback to legacy keys.
Callback implementation for Phoenix.LiveView.handle_event/3.
Callback implementation for Phoenix.LiveView.handle_info/2.
Callback implementation for Phoenix.LiveView.handle_params/3.
Callback implementation for Phoenix.LiveView.mount/3.
Callback implementation for Phoenix.LiveView.render/1.
Functions
Gets the list of bank accounts. A company can have more than one (a EUR
operating account and a USD reserve account, say) — each entry carries
"uuid", "label", "bank_name", "iban", "swift", "primary".
Falls back to migrating the legacy single-account "company_bank_details"
setting (from before multi-account support) into a one-entry list marked
primary. That migration is computed on every read, not persisted — it
costs nothing until the operator actually saves an account, at which
point the real list setting takes over.
Gets bank details in the original single-account shape — the PRIMARY bank account's fields (falling back to whichever account comes first if none is marked primary, and to blank if there are no accounts at all).
Kept for phoenix_kit_billing, which calls this exact function via a
soft dependency (see its core_compat.ex) and has no notion of multiple
accounts. New code wanting the full list should call get_bank_accounts/0.
Gets company info from consolidated key with fallback to legacy keys.
Callback implementation for Phoenix.LiveView.handle_event/3.
Callback implementation for Phoenix.LiveView.handle_info/2.
Callback implementation for Phoenix.LiveView.handle_params/3.
Callback implementation for Phoenix.LiveView.mount/3.
Callback implementation for Phoenix.LiveView.render/1.