126 lines
5.4 KiB
PHP
126 lines
5.4 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
require_once __DIR__ . '/includes/site.php';
|
|
require_once __DIR__ . '/includes/inquiries.php';
|
|
|
|
$reference = isset($_GET['ref']) ? trim((string) $_GET['ref']) : '';
|
|
$toastMessage = isset($_GET['created']) && $_GET['created'] === '1' && $reference !== '' ? 'Brief received — reference ' . $reference : '';
|
|
$activeNav = 'contact';
|
|
$pageTitle = 'Project brief';
|
|
$pageDescription = 'Confirmation and detail view for a submitted project brief.';
|
|
$inquiry = null;
|
|
$loadError = '';
|
|
|
|
if ($reference !== '') {
|
|
try {
|
|
$inquiry = find_project_inquiry($reference);
|
|
} catch (Throwable $exception) {
|
|
error_log('Project inquiry lookup failed: ' . $exception->getMessage());
|
|
$loadError = 'We could not load that brief right now.';
|
|
}
|
|
}
|
|
|
|
require __DIR__ . '/partials/header.php';
|
|
?>
|
|
<main>
|
|
<section class="section-shell border-bottom page-hero">
|
|
<div class="container">
|
|
<span class="eyebrow">Project brief</span>
|
|
<h1 class="section-title">Your request is in the queue.</h1>
|
|
<p class="section-copy mb-0">Use the reference below if you want to discuss this brief internally or when we wire notifications next.</p>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="section-shell">
|
|
<div class="container">
|
|
<?php if ($loadError !== ''): ?>
|
|
<div class="alert alert-danger" role="alert"><?= htmlspecialchars($loadError) ?></div>
|
|
<?php elseif (!$inquiry): ?>
|
|
<div class="empty-state empty-state--page">
|
|
<h2>We could not find that brief.</h2>
|
|
<p>Start a new project brief and we will capture the details from there.</p>
|
|
<a class="btn btn-primary" href="/contact.php">Start a project brief</a>
|
|
</div>
|
|
<?php else: ?>
|
|
<div class="row g-4 align-items-start">
|
|
<div class="col-lg-7">
|
|
<div class="surface-panel h-100">
|
|
<div class="d-flex flex-wrap gap-3 justify-content-between align-items-center mb-4">
|
|
<div>
|
|
<div class="panel-label">Reference</div>
|
|
<div class="reference-code" id="briefReference"><?= htmlspecialchars($inquiry['reference_code']) ?></div>
|
|
</div>
|
|
<button type="button" class="btn btn-outline-dark btn-sm" data-copy-target="#briefReference">Copy reference</button>
|
|
</div>
|
|
<div class="detail-grid">
|
|
<div>
|
|
<span class="detail-label">Name</span>
|
|
<strong><?= htmlspecialchars($inquiry['full_name']) ?></strong>
|
|
</div>
|
|
<div>
|
|
<span class="detail-label">Company</span>
|
|
<strong><?= htmlspecialchars($inquiry['company_name']) ?></strong>
|
|
</div>
|
|
<div>
|
|
<span class="detail-label">Email</span>
|
|
<strong><?= htmlspecialchars($inquiry['email']) ?></strong>
|
|
</div>
|
|
<div>
|
|
<span class="detail-label">Status</span>
|
|
<strong><?= htmlspecialchars(ucfirst($inquiry['status'])) ?></strong>
|
|
</div>
|
|
<div>
|
|
<span class="detail-label">Project type</span>
|
|
<strong><?= htmlspecialchars($inquiry['project_type']) ?></strong>
|
|
</div>
|
|
<div>
|
|
<span class="detail-label">Budget</span>
|
|
<strong><?= htmlspecialchars($inquiry['budget_range']) ?></strong>
|
|
</div>
|
|
<div>
|
|
<span class="detail-label">Target launch</span>
|
|
<strong><?= htmlspecialchars($inquiry['launch_window']) ?></strong>
|
|
</div>
|
|
<div>
|
|
<span class="detail-label">Submitted</span>
|
|
<strong><?= htmlspecialchars(format_display_datetime($inquiry['created_at'])) ?></strong>
|
|
</div>
|
|
</div>
|
|
<div class="message-panel mt-4">
|
|
<span class="detail-label">Project brief</span>
|
|
<p><?= nl2br(htmlspecialchars($inquiry['message'])) ?></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-5">
|
|
<div class="surface-panel compact-panel mb-4">
|
|
<div class="panel-label">Next steps</div>
|
|
<div class="content-row">
|
|
<h3>Internal review</h3>
|
|
<p>We review the brief against scope, urgency, and likely team shape.</p>
|
|
</div>
|
|
<div class="content-row">
|
|
<h3>Response path</h3>
|
|
<p>We recommend a discovery sprint, delivery pod, or a smaller technical diligence engagement.</p>
|
|
</div>
|
|
<div class="content-row mb-0">
|
|
<h3>What you can do now</h3>
|
|
<p>Share the reference with stakeholders or continue exploring our work and insights.</p>
|
|
</div>
|
|
</div>
|
|
<div class="surface-panel compact-panel">
|
|
<div class="panel-label">Explore while you wait</div>
|
|
<div class="d-flex flex-wrap gap-3">
|
|
<a class="btn btn-primary" href="/work.php">View work</a>
|
|
<a class="btn btn-outline-dark" href="/insights.php">Read insights</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</section>
|
|
</main>
|
|
<?php require __DIR__ . '/partials/footer.php'; ?>
|