feat(121+122): smsplanet conversation, notifications, default footer

Phase 121 — SMSPLANET Conversation + Notifications:
- migration 20260512_000110 adds smsplanet conversation + notifications tables
- src/Modules/Sms (SmsConversationService, SmsMessageRepository, SmsplanetWebhookController)
- src/Modules/Notifications (Repository, Controller, ApiController)
- order SMS tab, notification center, sender mode, inbound webhook
- public notifications.js + layouts/app.php integration

Phase 122 — SMSPLANET Default SMS Footer:
- migration 20260512_000111 adds smsplanet_integration_settings.default_footer
- footer appended to test SMS and order SMS, validated against 918 char limit
- settings textarea + compact order SMS note when footer configured

Bundled (could not split per-phase without hunk staging):
- routes/web.php (also carries Phase 118 fakturownia redirects)
- DOCS/{ARCHITECTURE,DB_SCHEMA,TECH_CHANGELOG}.md (118 + 121 + 122 entries)
- .paul/codebase/{architecture,db_schema,tech_changelog}.md (118 + 121 + 122)
- .paul/STATE.md, ROADMAP.md, changelog/2026-05-12.md (UNIFY closure)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-05-12 20:37:41 +02:00
parent 8f14851d85
commit 360eef128d
34 changed files with 2538 additions and 128 deletions

View File

@@ -2,6 +2,9 @@
$settings = is_array($settings ?? null) ? $settings : [];
$authMethod = (string) ($settings['auth_method'] ?? 'token');
$sender = trim((string) ($settings['sender'] ?? ''));
$senderMode = (string) ($settings['sender_mode'] ?? 'text');
$senderPhone = trim((string) ($settings['sender_phone'] ?? ''));
$defaultFooter = trim((string) ($settings['default_footer'] ?? ''));
$hasApiToken = (bool) ($settings['has_api_token'] ?? false);
$hasApiKey = (bool) ($settings['has_api_key'] ?? false);
$hasApiPassword = (bool) ($settings['has_api_password'] ?? false);
@@ -88,6 +91,33 @@ if (str_starts_with($lastTestMessage, 'messageId:')) {
<span class="muted"><?= $e($t('settings.smsplanet.hints.sender')) ?></span>
</label>
<fieldset class="integration-settings-checkboxes">
<legend class="field-label"><?= $e($t('settings.smsplanet.fields.sender_mode')) ?></legend>
<div class="integration-settings-checkboxes__list">
<label class="integration-settings-checkboxes__item">
<input type="radio" name="sender_mode" value="text"<?= $senderMode !== 'phone' ? ' checked' : '' ?>>
<span><?= $e($t('settings.smsplanet.sender_modes.text')) ?></span>
</label>
<label class="integration-settings-checkboxes__item">
<input type="radio" name="sender_mode" value="phone"<?= $senderMode === 'phone' ? ' checked' : '' ?>>
<span><?= $e($t('settings.smsplanet.sender_modes.phone')) ?></span>
</label>
</div>
<span class="muted"><?= $e($t('settings.smsplanet.hints.sender_mode')) ?></span>
</fieldset>
<label class="form-field smsplanet-sender-phone-field">
<span class="field-label"><?= $e($t('settings.smsplanet.fields.sender_phone')) ?></span>
<input class="form-control" type="tel" name="sender_phone" inputmode="tel" maxlength="32" value="<?= $e($senderPhone) ?>" placeholder="48600111222">
<span class="muted"><?= $e($t('settings.smsplanet.hints.sender_phone')) ?></span>
</label>
<label class="form-field smsplanet-default-footer-field">
<span class="field-label"><?= $e($t('settings.smsplanet.fields.default_footer')) ?></span>
<textarea class="form-control" name="default_footer" rows="3" maxlength="300"><?= $e($defaultFooter) ?></textarea>
<span class="muted"><?= $e($t('settings.smsplanet.hints.default_footer')) ?></span>
</label>
<fieldset class="integration-settings-checkboxes">
<legend class="field-label"><?= $e($t('settings.smsplanet.fields.options')) ?></legend>
<div class="integration-settings-checkboxes__list">
@@ -127,6 +157,9 @@ if (str_starts_with($lastTestMessage, 'messageId:')) {
<label class="form-field">
<span class="field-label"><?= $e($t('settings.smsplanet.fields.test_message')) ?></span>
<textarea class="form-control" name="message" rows="4" maxlength="918" required>Test orderPRO SMSPLANET</textarea>
<?php if ($defaultFooter !== ''): ?>
<span class="muted"><?= $e($t('settings.smsplanet.hints.test_footer')) ?></span>
<?php endif; ?>
</label>
<div class="form-actions mt-16">