feat: add past-due payment banner to dashboard
Show an amber banner to logged-in users whose grace_period_until is set, linking to the Stripe Customer Portal to update their card. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
<x-layouts::app :title="__('Dashboard')">
|
<x-layouts::app :title="__('Dashboard')">
|
||||||
<div class="flex h-full w-full flex-1 flex-col gap-4 rounded-xl">
|
<div class="flex h-full w-full flex-1 flex-col gap-4 rounded-xl">
|
||||||
|
@include('partials.past-due-banner')
|
||||||
<div class="grid auto-rows-min gap-4 md:grid-cols-3">
|
<div class="grid auto-rows-min gap-4 md:grid-cols-3">
|
||||||
<div class="relative aspect-video overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-700">
|
<div class="relative aspect-video overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-700">
|
||||||
<x-placeholder-pattern class="absolute inset-0 size-full stroke-gray-900/20 dark:stroke-neutral-100/20" />
|
<x-placeholder-pattern class="absolute inset-0 size-full stroke-gray-900/20 dark:stroke-neutral-100/20" />
|
||||||
|
|||||||
18
resources/views/partials/past-due-banner.blade.php
Normal file
18
resources/views/partials/past-due-banner.blade.php
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
@auth
|
||||||
|
@if (auth()->user()->grace_period_until !== null)
|
||||||
|
<div class="mb-4 flex items-center justify-between gap-4 rounded-xl border border-amber-500/40 bg-amber-500/10 p-4 text-amber-900 dark:text-amber-100">
|
||||||
|
<div class="flex-1 text-sm">
|
||||||
|
<strong class="font-semibold">We couldn't charge your card.</strong>
|
||||||
|
Update your payment method by
|
||||||
|
{{ auth()->user()->grace_period_until->format('l, j M') }}
|
||||||
|
or your paid features will end.
|
||||||
|
</div>
|
||||||
|
<a
|
||||||
|
href="{{ route('billing.portal') }}"
|
||||||
|
class="shrink-0 rounded-lg bg-amber-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-amber-700"
|
||||||
|
>
|
||||||
|
Update card
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
@endauth
|
||||||
Reference in New Issue
Block a user