added cashier subscription, subscription plans
This commit is contained in:
@@ -1,19 +1,11 @@
|
||||
@section('title'){{ __('Dashboard') }}@endsection
|
||||
<div class="flex h-full w-full flex-1 flex-col gap-4 rounded-xl">
|
||||
<div class="grid auto-rows-min gap-4 md:grid-cols-3">
|
||||
<div class="grid auto-rows-min gap-4 md:grid-cols-2">
|
||||
|
||||
|
||||
|
||||
<article class="flex items-center gap-4 rounded-lg border border-gray-100 bg-white p-6 dark:border-gray-800 dark:bg-white/[0.03]">
|
||||
<span class="rounded-full bg-blue-100 p-3 text-blue-600 dark:bg-blue-500/20 dark:text-blue-400">
|
||||
<flux:icon.circle-dollar-sign />
|
||||
</span>
|
||||
<div>
|
||||
<p class="text-2xl font-medium text-gray-900 dark:text-white">0</p>
|
||||
<p class="text-sm text-gray-500 dark:text-gray-400">Balance</p>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<article class="flex items-center gap-4 rounded-lg border border-gray-100 bg-white p-6 dark:border-gray-800 dark:bg-white/[0.03]">
|
||||
<span class="rounded-full bg-blue-100 p-3 text-blue-600 dark:bg-blue-500/20 dark:text-blue-400">
|
||||
<span class="rounded-full bg-[#F04743]/20 p-3 text-[#F04743] dark:bg-[#F04743]/20 dark:text-[#F04743]">
|
||||
<flux:icon.at-sign />
|
||||
</span>
|
||||
<div>
|
||||
@@ -23,7 +15,7 @@
|
||||
</article>
|
||||
|
||||
<article class="flex items-center gap-4 rounded-lg border border-gray-100 bg-white p-6 dark:border-gray-800 dark:bg-white/[0.03]">
|
||||
<span class="rounded-full bg-blue-100 p-3 text-blue-600 dark:bg-blue-500/20 dark:text-blue-400">
|
||||
<span class="rounded-full bg-[#F04743]/20 p-3 text-[#F04743] dark:bg-[#F04743]/20 dark:text-[#F04743]">
|
||||
<flux:icon.mails />
|
||||
</span>
|
||||
<div>
|
||||
@@ -34,7 +26,35 @@
|
||||
|
||||
|
||||
</div>
|
||||
<div class="relative h-full flex-1 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" />
|
||||
</div>
|
||||
@if(auth()->user()->subscribedToProduct(config('app.plans')[0]['product_id']))
|
||||
|
||||
<article class="flex items-center gap-4 rounded-lg border border-gray-100 bg-white p-6 dark:border-gray-800 dark:bg-white/[0.03]">
|
||||
<div>
|
||||
<p class="text-sm text-gray-500 dark:text-gray-400">Your <span class="text-accent-content font-bold">{{ $subscription['name'] }}</span> subscription is active and will be
|
||||
@if($subscription['ends_at']) end at<span class="app-primary"> {{ \Carbon\Carbon::make($subscription['ends_at'])->toFormattedDayDateString() }}.</span>
|
||||
@else auto-renew as per the plan you chose.
|
||||
@endif
|
||||
To manage you subscription <a href="{{ route('billing') }}" target="_blank" class="text-blue-500">Click here</a></p>
|
||||
</div>
|
||||
</article>
|
||||
@else
|
||||
<div class="flex-1 overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-700 dark:bg-white/[0.03]">
|
||||
<livewire:dashboard.pricing />
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
// Check if session flash data exists
|
||||
@if(session()->has('alert'))
|
||||
setTimeout(function() {
|
||||
// Emitting showAlert event with type and message from session
|
||||
Livewire.emit('showAlert', {
|
||||
type: '{{ session('alert')['type'] }}',
|
||||
message: '{{ session('alert')['message'] }}'
|
||||
});
|
||||
}, 2000); // 2000ms = 2 seconds delay
|
||||
@endif
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user