Overlay Docker para Coolify: notificación de leads API sobre imagen pública Relaticle
FROM ghcr.io/relaticle/relaticle:latest + COPY de los 5 ficheros custom (migration + Notification + Action + 2 Observers) que implementan la notificación in-app/email a un team cuando se crea una Company o People vía API con creation_source=API. Se elige overlay en vez de fork completo para no perder las mejoras de upstream en cada build. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Notifications;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
|
||||
final class NewApiLeadNotification extends Notification implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
public function __construct(
|
||||
private readonly string $recordLabel,
|
||||
private readonly string $recordName,
|
||||
private readonly string $recordUrl,
|
||||
) {}
|
||||
|
||||
/** @return list<string> */
|
||||
public function via(object $notifiable): array
|
||||
{
|
||||
return ['mail'];
|
||||
}
|
||||
|
||||
public function toMail(object $notifiable): MailMessage
|
||||
{
|
||||
return (new MailMessage)
|
||||
->subject("Nuevo {$this->recordLabel} desde la web: {$this->recordName}")
|
||||
->line("Se ha recibido un nuevo {$this->recordLabel} a través del formulario web: **{$this->recordName}**.")
|
||||
->action('Ver en el CRM', $this->recordUrl)
|
||||
->salutation('Relaticle');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user