- Implemented the full Fat Bottom Grille storefront and staff dashboard.
Highlights include configurable menus, specials, cart/checkout, taxes, customer accounts with email 2FA, newsletters, analytics, refunds, PDF/CSV exports, Square/Mailgun adapters, and optional MySQL migration. See README.md for setup and production configuration. Verified PHP/JavaScript syntax, responsive layouts, registration, 2FA, checkout, dashboard workflows, settings persistence, and PDF generation. Real Square, Mailgun, and MySQL connections require credentials/server access. Square implementation follows the official Payments API and Refunds API.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<div class="admin-page-actions">
|
||||
<p><strong><?= (int) $recipientCount ?></strong> active users are currently opted in.</p>
|
||||
</div>
|
||||
|
||||
<div class="admin-detail-grid newsletter-grid">
|
||||
<section class="admin-panel">
|
||||
<div class="admin-panel-heading"><div><span class="eyebrow">Send an update</span><h2>New Newsletter</h2></div></div>
|
||||
<form class="form-stack" action="/admin/newsletters/send" method="post">
|
||||
<?= csrf_field() ?>
|
||||
<label>Subject line<input type="text" name="subject" maxlength="140" required placeholder="This weekend at Fat Bottom Grille"></label>
|
||||
<label>Message<textarea name="content" rows="12" required placeholder="Share a new special, schedule update, or note from the kitchen..."></textarea></label>
|
||||
<div class="notice">Every email includes an unsubscribe link. Users can also opt out from My Account.</div>
|
||||
<button class="button button-large button-block" type="submit" data-confirm="Send this newsletter to every opted-in user?">Send to <?= (int) $recipientCount ?> Subscribers</button>
|
||||
</form>
|
||||
</section>
|
||||
<section class="admin-panel">
|
||||
<div class="admin-panel-heading"><div><span class="eyebrow">Delivery history</span><h2>Past Sends</h2></div></div>
|
||||
<div class="newsletter-history">
|
||||
<?php if (!$newsletters): ?><p class="muted">No newsletters have been sent yet.</p><?php endif; ?>
|
||||
<?php foreach ($newsletters as $newsletter): ?>
|
||||
<article>
|
||||
<div><strong><?= e($newsletter['subject']) ?></strong><span><?= e(store_datetime((string) ($newsletter['sent_at'] ?: $newsletter['created_at']))) ?></span></div>
|
||||
<span class="role-badge"><?= (int) $newsletter['recipient_count'] ?> sent</span>
|
||||
<small>by <?= e($newsletter['author'] ?: 'System') ?></small>
|
||||
</article>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
Reference in New Issue
Block a user