Initial dev export (exclude uploads/runtime)
This commit is contained in:
43
plugins/store/customers.php
Normal file
43
plugins/store/customers.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
$pageTitle = $title ?? 'Store Customers';
|
||||
$customers = $customers ?? [];
|
||||
ob_start();
|
||||
?>
|
||||
<section class="admin-card">
|
||||
<div class="badge">Store</div>
|
||||
<div style="display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:16px;">
|
||||
<div>
|
||||
<h1 style="font-size:28px; margin:0;">Customers</h1>
|
||||
<p style="color: var(--muted); margin-top:6px;">Registered and purchasing customers.</p>
|
||||
</div>
|
||||
<a href="/admin/store" class="btn outline">Back</a>
|
||||
</div>
|
||||
<div style="display:flex; flex-wrap:wrap; gap:8px; margin-top:12px;">
|
||||
<a href="/admin/store" class="btn outline small">Overview</a>
|
||||
<a href="/admin/store/settings" class="btn outline small">Settings</a>
|
||||
<a href="/admin/store/orders" class="btn outline small">Orders</a>
|
||||
<a href="/admin/store/customers" class="btn outline small">Customers</a>
|
||||
</div>
|
||||
|
||||
<?php if (!$customers): ?>
|
||||
<div style="margin-top:16px; color:var(--muted); font-size:13px;">No customers yet.</div>
|
||||
<?php else: ?>
|
||||
<div style="margin-top:16px; display:grid; gap:10px;">
|
||||
<?php foreach ($customers as $customer): ?>
|
||||
<div class="admin-card" style="padding:14px; display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:10px; align-items:center;">
|
||||
<div>
|
||||
<div style="font-weight:600;"><?= htmlspecialchars((string)($customer['email'] ?? ''), ENT_QUOTES, 'UTF-8') ?></div>
|
||||
<div style="font-size:12px; color:var(--muted); margin-top:2px;">
|
||||
<?= htmlspecialchars((string)($customer['name'] ?? ''), ENT_QUOTES, 'UTF-8') ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pill"><?= ((int)($customer['is_active'] ?? 1) === 1) ? 'Active' : 'Inactive' ?></div>
|
||||
<div style="font-size:12px; color:var(--muted);"><?= htmlspecialchars((string)($customer['created_at'] ?? ''), ENT_QUOTES, 'UTF-8') ?></div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
<?php
|
||||
$content = ob_get_clean();
|
||||
require __DIR__ . '/../../../../modules/admin/views/layout.php';
|
||||
Reference in New Issue
Block a user