feat(120): alert component unification
Phase 120 - Plan 01:
- Reusable PHP alert component (resources/views/components/alert.php)
with inline SVG icon per type, optional dismiss button.
- Missing .alert--info SCSS variant added (#eff6ff/#bfdbfe/#1e3a8a) -
fixes black-on-white alert after Fakturownia test connection.
- Flash::push(type, message) + Flash::all() with BC for set/get;
legacy key heuristic (error/.save/warning -> typed entries).
- Central flash renderer in 3 layouts (app/auth/public) iterating
Flash::all() through component (.alerts-stack wrap).
- Vanilla JS alert-dismiss.js with idempotent guard and delegated
click handler on [data-alert-dismiss].
- 36 views migrated off inline <div class="alert alert--TYPE">;
.flash--error/success removed from views (orders/show, shipments/prepare).
- SCSS rebuilt: public/assets/css/{app,login}.css.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -109,13 +109,18 @@ foreach ($channelOptions as $channelOption) {
|
||||
|
||||
<section class="card mt-16 statistics-orders-table-wrap">
|
||||
<?php if ($debugEnabled): ?>
|
||||
<div class="alert alert--warning" role="alert">
|
||||
<?php
|
||||
ob_start();
|
||||
?>
|
||||
<strong>DEBUG</strong>
|
||||
<pre style="margin:8px 0 0;white-space:pre-wrap;"><?= $e(json_encode([
|
||||
'filters' => $debugMeta,
|
||||
'diagnostics' => $diagnostics,
|
||||
], JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT)) ?></pre>
|
||||
</div>
|
||||
<?php
|
||||
$statisticsDebugHtml = ob_get_clean();
|
||||
?>
|
||||
<?php $type='warning'; $messageHtml=$statisticsDebugHtml; $dismissible=true; include dirname(__DIR__) . '/components/alert.php'; unset($messageHtml); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!$hasData): ?>
|
||||
|
||||
Reference in New Issue
Block a user