feat: create Mailjet lists for travel mailings

This commit is contained in:
fromme committed 2026-11-04 15:32:50 +01:00
1 parent d63fa10a56
commit c16f368293
15 files changed
+851 -1

No files matched your search

+20
View File
@@ -127,6 +127,26 @@ class TravelIndex
return $this->generateFilesMap()[$dateId]['label'] ?? null;
}
/**
* Resolve a date code to the travel's start date.
*
* @param string $dateCode The date code to resolve
*
* @return \DateTimeImmutable|null The start date, or null if the code is not found or the travel has none
*/
public function mapDateCodeToStartDate(string $dateCode): ?\DateTimeImmutable
{
$dateId = $this->mapDateCodeToId($dateCode);
if (null === $dateId) {
return null;
}
$dateFrom = $this->generateFilesMap()[$dateId]['dateFrom'] ?? null;
return $dateFrom instanceof \DateTimeImmutable ? $dateFrom : null;
}
/**
* Convert a hotel code string to its corresponding hotel ID.
*