93 lines
5.4 KiB
PHP
93 lines
5.4 KiB
PHP
@extends('layouts.admin')
|
|
|
|
@section('title', __('Dashboard'))
|
|
|
|
@section('mobile_title', __('Dashboard'))
|
|
|
|
@section('content')
|
|
<div class="mx-auto max-w-6xl">
|
|
<div class="mb-8 flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
|
|
<div>
|
|
<h1 class="text-2xl font-semibold text-slate-900">{{ __('Dashboard') }}</h1>
|
|
<p class="mt-1 text-sm text-slate-600">{{ __('Overview of your pre-registration activity.') }}</p>
|
|
</div>
|
|
@can('create', \App\Models\PreregistrationPage::class)
|
|
<a
|
|
href="{{ route('admin.pages.create') }}"
|
|
class="inline-flex items-center justify-center rounded-lg bg-indigo-600 px-4 py-2.5 text-sm font-semibold text-white shadow-sm transition hover:bg-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2"
|
|
>
|
|
<svg class="mr-2 h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/>
|
|
</svg>
|
|
{{ __('New page') }}
|
|
</a>
|
|
@endcan
|
|
</div>
|
|
|
|
<div class="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
|
|
<div class="rounded-xl border border-slate-200 bg-white p-6 shadow-sm">
|
|
<div class="flex items-center gap-3">
|
|
<div class="flex h-10 w-10 items-center justify-center rounded-lg bg-indigo-100 text-indigo-700">
|
|
<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
|
|
</svg>
|
|
</div>
|
|
<div>
|
|
<p class="text-sm font-medium text-slate-500">{{ __('Total pages') }}</p>
|
|
<p class="text-2xl font-semibold tabular-nums text-slate-900">{{ number_format($totalPages) }}</p>
|
|
</div>
|
|
</div>
|
|
<p class="mt-4 text-xs text-slate-500">
|
|
@if (auth()->user()->isSuperadmin())
|
|
{{ __('All pre-registration pages in the system.') }}
|
|
@else
|
|
{{ __('Pages you own.') }}
|
|
@endif
|
|
</p>
|
|
</div>
|
|
|
|
<div class="rounded-xl border border-slate-200 bg-white p-6 shadow-sm">
|
|
<div class="flex items-center gap-3">
|
|
<div class="flex h-10 w-10 items-center justify-center rounded-lg bg-emerald-100 text-emerald-700">
|
|
<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"/>
|
|
</svg>
|
|
</div>
|
|
<div>
|
|
<p class="text-sm font-medium text-slate-500">{{ __('Total subscribers') }}</p>
|
|
<p class="text-2xl font-semibold tabular-nums text-slate-900">{{ number_format($totalSubscribers) }}</p>
|
|
</div>
|
|
</div>
|
|
<p class="mt-4 text-xs text-slate-500">{{ __('Across all pages in this overview.') }}</p>
|
|
</div>
|
|
|
|
<div class="rounded-xl border border-slate-200 bg-white p-6 shadow-sm sm:col-span-2 lg:col-span-1">
|
|
<div class="flex items-center gap-3">
|
|
<div class="flex h-10 w-10 items-center justify-center rounded-lg bg-amber-100 text-amber-800">
|
|
<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/>
|
|
</svg>
|
|
</div>
|
|
<div>
|
|
<p class="text-sm font-medium text-slate-500">{{ __('Active pages') }}</p>
|
|
<p class="text-2xl font-semibold tabular-nums text-slate-900">{{ number_format($activePages) }}</p>
|
|
</div>
|
|
</div>
|
|
<p class="mt-4 text-xs text-slate-500">{{ __('Currently within the start and end date window.') }}</p>
|
|
</div>
|
|
</div>
|
|
|
|
@can('create', \App\Models\PreregistrationPage::class)
|
|
<div class="mt-8 rounded-xl border border-dashed border-slate-300 bg-white/80 p-6 text-center">
|
|
<p class="text-sm text-slate-600">{{ __('Ready to launch a new campaign?') }}</p>
|
|
<a
|
|
href="{{ route('admin.pages.create') }}"
|
|
class="mt-3 inline-flex text-sm font-semibold text-indigo-600 hover:text-indigo-500"
|
|
>
|
|
{{ __('Create a pre-registration page') }} →
|
|
</a>
|
|
</div>
|
|
@endcan
|
|
</div>
|
|
@endsection
|