Files
portal/app/resources/views/emails/new_lead.blade.php
T
Дмитрий a4601fe84b phase2(notifications-stage1): NotificationService + new_lead email (P0 этап 1)
Старт closing «Notification delivery» из карты P0. Этап 1/6 плана:
NotificationService + Mailable + интеграция в ProcessWebhookJob::chargeNewLead.

- App\Services\NotificationService — диспетчер 8 событий × 3 каналов
  (inapp/push/email) согласно schema.sql:699 users.notification_preferences.
  Этап 1 реализует только email-канал для new_lead.
- App\Mail\NewLeadNotification + emails/new_lead.blade.php — HTML-письмо
  в Forest-палитре с таблицей phone/contact_name/received_at/deal_id.
- ProcessWebhookJob::chargeNewLead — после ActivityLog вызывает
  notifyNewLead. Throwable от Mail::send проглатывается + Log::warning
  (отказ канала не должен валить транзакцию).
- Pest 11/11 в tests/Feature/Notifications/NewLeadNotificationTest.php:
  email=true получает / email=false не получает / schema-default не шлёт /
  inactive не получает / soft-deleted не получает / другой тенант не
  получает / Биз-19 дубль не дублирует / повторный vid не дублирует /
  balance=0 не шлёт / subject содержит project_name.
- IDE-helper регенерирован (4 модели получили @mixin docblocks).
- PHPStan baseline регенерирован (138 ignore.unmatched схлопнулись).

Pest 280/280 за 31.27 сек (+11 от 269, 1029 assertions).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 11:03:43 +03:00

46 lines
2.3 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>Новый лид {{ $projectName }}</title>
</head>
<body style="font-family: Inter, -apple-system, sans-serif; max-width: 600px; margin: 0 auto; padding: 24px; color: #081319;">
<h1 style="color: #0F6E56; font-size: 20px;">Лидерра. Новый лид</h1>
<p>Здравствуйте, {{ $manager->first_name ?? $manager->email }}.</p>
<p>В проекте <strong>{{ $projectName }}</strong> поступил новый лид.</p>
<table style="width: 100%; border-collapse: collapse; margin: 16px 0;">
<tr>
<td style="padding: 8px 12px; background: #F6F3EC; width: 140px; vertical-align: top;">Телефон</td>
<td style="padding: 8px 12px; background: #FFFFFF; border-left: 1px solid #E1EEEA;">
<a href="tel:{{ $deal->phone }}" style="color: #0F6E56; text-decoration: none;">{{ $deal->phone }}</a>
</td>
</tr>
@if ($deal->contact_name)
<tr>
<td style="padding: 8px 12px; background: #F6F3EC; vertical-align: top;">Имя</td>
<td style="padding: 8px 12px; background: #FFFFFF; border-left: 1px solid #E1EEEA;">{{ $deal->contact_name }}</td>
</tr>
@endif
<tr>
<td style="padding: 8px 12px; background: #F6F3EC; vertical-align: top;">Получено</td>
<td style="padding: 8px 12px; background: #FFFFFF; border-left: 1px solid #E1EEEA;">{{ $deal->received_at?->setTimezone($manager->timezone ?? 'Europe/Moscow')->format('d.m.Y H:i') }}</td>
</tr>
<tr>
<td style="padding: 8px 12px; background: #F6F3EC; vertical-align: top;">ID сделки</td>
<td style="padding: 8px 12px; background: #FFFFFF; border-left: 1px solid #E1EEEA;">#{{ $deal->id }}</td>
</tr>
</table>
<p style="margin-top: 24px;">
Откройте CRM, чтобы взять лид в работу.
</p>
<p style="color: #66635C; font-size: 12px; margin-top: 32px;">
Это автоматическое уведомление о событии «Новый лид». Чтобы изменить настройки уведомлений перейдите в Настройки Уведомления.
</p>
</body>
</html>