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>
59 lines
2.5 KiB
PHP
59 lines
2.5 KiB
PHP
<?php
|
|
$items = is_array($rows ?? null) ? $rows : [];
|
|
?>
|
|
|
|
<section class="card">
|
|
<h2 class="section-title"><?= $e($t('settings.integrations_hub.title')) ?></h2>
|
|
<p class="muted mt-12"><?= $e($t('settings.integrations_hub.description')) ?></p>
|
|
|
|
<?php if (!empty($errorMessage)): ?>
|
|
<div class="mt-12"><?php $type='danger'; $message=(string) $errorMessage; $dismissible=true; include dirname(__DIR__) . '/components/alert.php'; ?></div>
|
|
<?php endif; ?>
|
|
|
|
<?php if (!empty($successMessage)): ?>
|
|
<div class="mt-12"><?php $type='success'; $message=(string) $successMessage; $dismissible=true; include dirname(__DIR__) . '/components/alert.php'; ?></div>
|
|
<?php endif; ?>
|
|
</section>
|
|
|
|
<section class="card mt-16 integrations-overview">
|
|
<h3 class="section-title"><?= $e($t('settings.integrations_hub.list_title')) ?></h3>
|
|
<div class="table-wrap mt-12">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th><?= $e($t('settings.integrations_hub.fields.provider')) ?></th>
|
|
<th><?= $e($t('settings.integrations_hub.fields.instance')) ?></th>
|
|
<th><?= $e($t('settings.integrations_hub.fields.authorization')) ?></th>
|
|
<th><?= $e($t('settings.integrations_hub.fields.secret')) ?></th>
|
|
<th><?= $e($t('settings.integrations_hub.fields.active')) ?></th>
|
|
<th><?= $e($t('settings.integrations_hub.fields.last_test')) ?></th>
|
|
<th><?= $e($t('settings.integrations_hub.fields.actions')) ?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php if ($items === []): ?>
|
|
<tr>
|
|
<td class="muted" colspan="7"><?= $e($t('settings.integrations_hub.empty')) ?></td>
|
|
</tr>
|
|
<?php else: ?>
|
|
<?php foreach ($items as $item): ?>
|
|
<tr>
|
|
<td><?= $e((string) ($item['provider'] ?? '')) ?></td>
|
|
<td><?= $e((string) ($item['instance'] ?? '')) ?></td>
|
|
<td><?= $e((string) ($item['authorization_status'] ?? '')) ?></td>
|
|
<td><?= $e((string) ($item['secret_status'] ?? '')) ?></td>
|
|
<td><?= $e(!empty($item['is_active']) ? $t('settings.integrations_hub.active.yes') : $t('settings.integrations_hub.active.no')) ?></td>
|
|
<td><?= $e((string) ($item['last_test_at'] ?? '')) ?></td>
|
|
<td>
|
|
<a class="btn btn--secondary btn--sm" href="<?= $e((string) ($item['configure_url'] ?? '/settings/integrations')) ?>">
|
|
<?= $e($t('settings.integrations_hub.actions.settings')) ?>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
<?php endif; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|