More improvements
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\EventPaymentModules\DTO;
|
||||
|
||||
/**
|
||||
* Render-Kontext der Anmelde-Zusammenfassung. Steuert die kontextabhängige Einbettung des GiroCodes:
|
||||
* im Web über den Endpoint, in der Mail über eine inline-CID.
|
||||
*/
|
||||
enum RegistrationRenderContext
|
||||
{
|
||||
case Web;
|
||||
case Mail;
|
||||
}
|
||||
@@ -8,7 +8,8 @@ use App\Models\EventParticipant;
|
||||
* Eingabe für {@see \App\EventPaymentModules\EventPaymentModule::registrationSummary()}.
|
||||
*
|
||||
* Anker ist der (bereits erstellte) Teilnehmer -- daraus leiten die Module Event, Betrag/Restbetrag
|
||||
* und Verwendungszweck ab. $configuration ist die aufgelöste pro-Event-Config des Zahlungsmoduls.
|
||||
* und Verwendungszweck ab. $configuration ist die aufgelöste pro-Event-Config des Zahlungsmoduls,
|
||||
* $context steuert die kontextabhängige Ausgabe (z.B. GiroCode-Einbettung Web vs. Mail).
|
||||
*/
|
||||
final class RegistrationSummaryRequest
|
||||
{
|
||||
@@ -18,6 +19,7 @@ final class RegistrationSummaryRequest
|
||||
public function __construct(
|
||||
public readonly EventParticipant $participant,
|
||||
public readonly array $configuration = [],
|
||||
public readonly RegistrationRenderContext $context = RegistrationRenderContext::Web,
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,22 +5,14 @@ namespace App\EventPaymentModules\DTO;
|
||||
/**
|
||||
* Ausgabe von {@see \App\EventPaymentModules\EventPaymentModule::registrationSummary()}.
|
||||
*
|
||||
* Render-agnostisch: speist den Zahlungs-Abschnitt sowohl im Anmeldeabschluss (Vue) als auch in den Mails.
|
||||
* Zwei Darstellungsformen:
|
||||
* - strukturierte $lines (label/value) -- z.B. Überweisung (Kontoinhaber, IBAN, Verwendungszweck, Betrag),
|
||||
* - $html -- frei konfigurierter Text (z.B. Barzahlung).
|
||||
* Das Modul erzeugt seinen Zahlungs-Block vollständig als HTML; die Render-Stellen (Anmeldeabschluss,
|
||||
* Mails) geben ihn nur noch per `v-html` / `{!! !!}` aus.
|
||||
*/
|
||||
final class RegistrationSummaryResponse
|
||||
{
|
||||
/** Gibt es überhaupt einen Zahlungs-Info-Block darzustellen? */
|
||||
/** Gibt es überhaupt einen Zahlungs-Block darzustellen? */
|
||||
public bool $hasPaymentInformation = false;
|
||||
|
||||
/** @var array<int, array{label: string, value: string}> */
|
||||
public array $lines = [];
|
||||
|
||||
/** Frei konfigurierter HTML-Text (alternativ zu $lines). */
|
||||
public ?string $html = null;
|
||||
|
||||
/** Soll der GiroCode (QR) angezeigt werden? */
|
||||
public bool $showGiroCode = false;
|
||||
/** Fertig gerenderter HTML-Block der Zahlungsinformationen. */
|
||||
public string $html = '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user