add setup onboarding page, dashboard launch checklist, provider registry
- new /setup page with three-section onboarding (account, provider, payments) - dashboard launch checklist with progress bar, go-live, dismiss - provider registry on Provider module (single source of truth for metadata) - payments registry for Stripe - setup context made provider-agnostic (provider_connected, theme_customised, etc.) - admin provider pages now fully registry-driven (no hardcoded provider names) - auth flow: fresh installs redirect to /setup, signed_in_path respects setup state - removed old /admin/setup wizard - 840 tests, 0 failures Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,7 @@ defmodule BerrypodWeb.Admin.Providers.Index do
|
||||
|
||||
alias Berrypod.Products
|
||||
alias Berrypod.Products.ProviderConnection
|
||||
alias Berrypod.Providers.Provider
|
||||
|
||||
@impl true
|
||||
def mount(_params, _session, socket) do
|
||||
@@ -11,6 +12,7 @@ defmodule BerrypodWeb.Admin.Providers.Index do
|
||||
{:ok,
|
||||
socket
|
||||
|> assign(:page_title, "Provider connections")
|
||||
|> assign(:available_providers, Provider.available())
|
||||
|> stream(:connections, connections)}
|
||||
end
|
||||
|
||||
@@ -85,6 +87,13 @@ defmodule BerrypodWeb.Admin.Providers.Index do
|
||||
"""
|
||||
end
|
||||
|
||||
defp provider_name(type) do
|
||||
case Provider.get(type) do
|
||||
%{name: name} -> name
|
||||
nil -> String.capitalize(type)
|
||||
end
|
||||
end
|
||||
|
||||
defp format_relative_time(datetime) do
|
||||
diff = DateTime.diff(DateTime.utc_now(), datetime, :second)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user