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>
37 lines
1.7 KiB
PHP
37 lines
1.7 KiB
PHP
<?php
|
|
$success = trim((string) ($successMessage ?? ''));
|
|
$error = trim((string) ($errorMessage ?? ''));
|
|
?>
|
|
|
|
<section class="card">
|
|
<h2 class="section-title">Ksiegowosc</h2>
|
|
<p class="muted mt-12">Wybierz typ dokumentu ktorego konfiguracje chcesz zarzadzac.</p>
|
|
|
|
<?php if ($error !== ''): ?>
|
|
<div class="mt-12"><?php $type='danger'; $message=(string) $error; $dismissible=true; include dirname(__DIR__) . '/components/alert.php'; ?></div>
|
|
<?php endif; ?>
|
|
<?php if ($success !== ''): ?>
|
|
<div class="mt-12"><?php $type='success'; $message=(string) $success; $dismissible=true; include dirname(__DIR__) . '/components/alert.php'; ?></div>
|
|
<?php endif; ?>
|
|
</section>
|
|
|
|
<section class="card mt-16">
|
|
<div class="form-grid-2">
|
|
<div style="border:1px solid var(--border-color, #e5e7eb);border-radius:8px;padding:16px">
|
|
<h3 class="section-title" style="margin-top:0">Paragony</h3>
|
|
<p class="muted mt-12">Konfiguracje wystawiania paragonow: format numeracji, sposob numerowania, oznaczenie zamowienia.</p>
|
|
<div class="form-actions mt-16">
|
|
<a class="btn btn--primary" href="/settings/accounting/receipts">Zarzadzaj paragonami</a>
|
|
</div>
|
|
</div>
|
|
<div style="border:1px solid var(--border-color, #e5e7eb);border-radius:8px;padding:16px">
|
|
<h3 class="section-title" style="margin-top:0">Faktury</h3>
|
|
<p class="muted mt-12">Konfiguracje wystawiania faktur: numeracja lokalna lub delegacja do Fakturowni, termin platnosci, typ dokumentu.</p>
|
|
<div class="form-actions mt-16">
|
|
<a class="btn btn--primary" href="/settings/accounting/invoices">Zarzadzaj fakturami</a>
|
|
<a class="btn btn--secondary ml-8" href="/settings/accounting/invoices/issued">Faktury wystawione</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|