Deploy from Lumerel
This commit is contained in:
339
public/dashboard.php
Normal file
339
public/dashboard.php
Normal file
@@ -0,0 +1,339 @@
|
||||
<?php
|
||||
session_start();
|
||||
require_once __DIR__ . '/../src/db.php';
|
||||
|
||||
if (!isset($_SESSION['onboarding_token'])) {
|
||||
header('Location: index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
$token = $_SESSION['onboarding_token'];
|
||||
|
||||
// Fetch session data
|
||||
$stmt = $pdo->prepare("SELECT * FROM onboarding_sessions WHERE session_token = ?");
|
||||
$stmt->execute([$token]);
|
||||
$session = $stmt->fetch();
|
||||
|
||||
if (!$session || !$session['completed']) {
|
||||
header('Location: index.php');
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Dashboard - <?= htmlspecialchars($session['company_name']) ?></title>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
||||
background: #f3f4f6;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.header {
|
||||
background: linear-gradient(135deg, <?= $session['primary_color'] ?> 0%, <?= $session['secondary_color'] ?> 100%);
|
||||
color: white;
|
||||
padding: 24px 40px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.header-content {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.header h1 {
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.header p {
|
||||
font-size: 14px;
|
||||
opacity: 0.9;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1200px;
|
||||
margin: 40px auto;
|
||||
padding: 0 40px;
|
||||
}
|
||||
|
||||
.welcome-card {
|
||||
background: white;
|
||||
border-radius: 16px;
|
||||
padding: 40px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.welcome-card h2 {
|
||||
font-size: 28px;
|
||||
color: #1f2937;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.welcome-card p {
|
||||
font-size: 16px;
|
||||
color: #6b7280;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.cards-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
||||
gap: 24px;
|
||||
margin-top: 32px;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: white;
|
||||
border-radius: 12px;
|
||||
padding: 32px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
.card:hover {
|
||||
transform: translateY(-4px);
|
||||
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.card-icon {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border-radius: 12px;
|
||||
background: linear-gradient(135deg, <?= $session['primary_color'] ?> 0%, <?= $session['secondary_color'] ?> 100%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 24px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.card h3 {
|
||||
font-size: 20px;
|
||||
color: #1f2937;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.card p {
|
||||
font-size: 14px;
|
||||
color: #6b7280;
|
||||
line-height: 1.6;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.card-button {
|
||||
display: inline-block;
|
||||
padding: 10px 20px;
|
||||
background: linear-gradient(135deg, <?= $session['primary_color'] ?> 0%, <?= $session['secondary_color'] ?> 100%);
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
border-radius: 8px;
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.card-button:hover {
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.settings-section {
|
||||
background: white;
|
||||
border-radius: 12px;
|
||||
padding: 32px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
margin-top: 32px;
|
||||
}
|
||||
|
||||
.settings-section h3 {
|
||||
font-size: 20px;
|
||||
color: #1f2937;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.setting-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 16px 0;
|
||||
border-bottom: 1px solid #e5e7eb;
|
||||
}
|
||||
|
||||
.setting-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.setting-label {
|
||||
font-weight: 600;
|
||||
color: #4b5563;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.setting-value {
|
||||
color: #1f2937;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.color-preview {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border-radius: 6px;
|
||||
display: inline-block;
|
||||
border: 2px solid #e5e7eb;
|
||||
vertical-align: middle;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.badge {
|
||||
display: inline-block;
|
||||
padding: 4px 12px;
|
||||
background: #10b981;
|
||||
color: white;
|
||||
border-radius: 12px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<div class="header-content">
|
||||
<div>
|
||||
<h1><?= htmlspecialchars($session['company_name']) ?></h1>
|
||||
<p><?= htmlspecialchars($session['company_tagline'] ?: 'Your Dashboard') ?></p>
|
||||
</div>
|
||||
<span class="badge">✓ Setup Complete</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="welcome-card">
|
||||
<h2>Welcome, <?= htmlspecialchars($session['contact_name']) ?>! 👋</h2>
|
||||
<p>Your onboarding is complete and your account is ready to go. Below you'll find quick access to key features and your current settings.</p>
|
||||
</div>
|
||||
|
||||
<div class="cards-grid">
|
||||
<div class="card">
|
||||
<div class="card-icon">📄</div>
|
||||
<h3>Create Quote</h3>
|
||||
<p>Start building your first professional quote with your custom branding and preferences.</p>
|
||||
<a href="#" class="card-button">New Quote →</a>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-icon">🎨</div>
|
||||
<h3>Customize Templates</h3>
|
||||
<p>Personalize your quote templates with your brand colors, logo, and messaging.</p>
|
||||
<a href="#" class="card-button">Edit Templates →</a>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-icon">👥</div>
|
||||
<h3>Manage Clients</h3>
|
||||
<p>Add and organize your client contacts for faster quote generation.</p>
|
||||
<a href="#" class="card-button">View Clients →</a>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-icon">📊</div>
|
||||
<h3>View Reports</h3>
|
||||
<p>Track your quotes, conversions, and revenue with detailed analytics.</p>
|
||||
<a href="#" class="card-button">See Reports →</a>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-icon">⚙️</div>
|
||||
<h3>Account Settings</h3>
|
||||
<p>Update your company information, preferences, and integrations.</p>
|
||||
<a href="#" class="card-button">Manage Settings →</a>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-icon">💬</div>
|
||||
<h3>Get Support</h3>
|
||||
<p>Need help? Our support team is here to assist you with any questions.</p>
|
||||
<a href="#" class="card-button">Contact Support →</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="settings-section">
|
||||
<h3>Your Current Settings</h3>
|
||||
|
||||
<div class="setting-item">
|
||||
<span class="setting-label">Company Name</span>
|
||||
<span class="setting-value"><?= htmlspecialchars($session['company_name']) ?></span>
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<span class="setting-label">Industry</span>
|
||||
<span class="setting-value"><?= ucfirst($session['industry']) ?></span>
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<span class="setting-label">Primary Brand Color</span>
|
||||
<span class="setting-value">
|
||||
<span class="color-preview" style="background: <?= $session['primary_color'] ?>"></span>
|
||||
<?= $session['primary_color'] ?>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<span class="setting-label">Secondary Brand Color</span>
|
||||
<span class="setting-value">
|
||||
<span class="color-preview" style="background: <?= $session['secondary_color'] ?>"></span>
|
||||
<?= $session['secondary_color'] ?>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<span class="setting-label">Quote Format</span>
|
||||
<span class="setting-value"><?= ucfirst($session['quote_format']) ?></span>
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<span class="setting-label">Payment Terms</span>
|
||||
<span class="setting-value"><?= str_replace('_', ' ', ucfirst($session['payment_terms'])) ?></span>
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<span class="setting-label">Quote Validity</span>
|
||||
<span class="setting-value"><?= $session['quote_validity_days'] ?> days</span>
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<span class="setting-label">Contact Email</span>
|
||||
<span class="setting-value"><?= htmlspecialchars($session['contact_email']) ?></span>
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<span class="setting-label">Contact Phone</span>
|
||||
<span class="setting-value"><?= htmlspecialchars($session['contact_phone']) ?></span>
|
||||
</div>
|
||||
|
||||
<?php if ($session['website']): ?>
|
||||
<div class="setting-item">
|
||||
<span class="setting-label">Website</span>
|
||||
<span class="setting-value">
|
||||
<a href="<?= htmlspecialchars($session['website']) ?>" target="_blank" style="color: <?= $session['primary_color'] ?>">
|
||||
<?= htmlspecialchars($session['website']) ?>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user