add contextual prompts for skipped setup steps
All checks were successful
deploy / deploy (push) Successful in 1m26s
All checks were successful
deploy / deploy (push) Successful in 1m26s
Disable checkout when Stripe isn't connected (cart drawer, cart page, and early guard in checkout controller to prevent orphaned orders). Show amber warning on order detail when email isn't configured. Fix pre-existing missing vertical spacing between page blocks. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
defmodule BerrypodWeb.Admin.OrderShow do
|
||||
use BerrypodWeb, :live_view
|
||||
|
||||
alias Berrypod.{ActivityLog, Orders}
|
||||
alias Berrypod.{ActivityLog, Mailer, Orders}
|
||||
alias Berrypod.Cart
|
||||
|
||||
@impl true
|
||||
@@ -25,6 +25,7 @@ defmodule BerrypodWeb.Admin.OrderShow do
|
||||
|> assign(:page_title, order.order_number)
|
||||
|> assign(:order, order)
|
||||
|> assign(:timeline, timeline)
|
||||
|> assign(:email_configured, Mailer.email_configured?())
|
||||
|
||||
{:ok, socket}
|
||||
end
|
||||
@@ -48,6 +49,25 @@ defmodule BerrypodWeb.Admin.OrderShow do
|
||||
</div>
|
||||
</.header>
|
||||
|
||||
<div :if={!@email_configured} class="admin-callout-warning admin-card-spaced">
|
||||
<div class="admin-callout-warning-body">
|
||||
<span class="admin-callout-warning-icon">
|
||||
<.icon name="hero-exclamation-triangle" class="size-5" />
|
||||
</span>
|
||||
<div>
|
||||
<p class="admin-callout-warning-title">
|
||||
Order confirmation emails aren't being sent
|
||||
</p>
|
||||
<p class="admin-callout-warning-desc">
|
||||
Set up an email provider to send order confirmations and shipping updates automatically.
|
||||
<.link navigate={~p"/admin/settings/email"} class="admin-link">
|
||||
Set up email →
|
||||
</.link>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="admin-grid order-detail-grid">
|
||||
<%!-- order info --%>
|
||||
<div class="admin-card">
|
||||
|
||||
Reference in New Issue
Block a user