feat: show the travel name above the mailing list
This commit is contained in:
1 parent
d305774bee
commit
ff722b5cef
5 files changed
+87
-4
No files matched your search
@@ -109,6 +109,24 @@ class TravelIndex
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve a date code to its travel label, e.g. "Davos - Sportclub Waldschlössli - Wochenende".
|
||||
*
|
||||
* @param string $dateCode The date code to resolve
|
||||
*
|
||||
* @return string|null The label, or null if the code is not found or the travel has none
|
||||
*/
|
||||
public function mapDateCodeToLabel(string $dateCode): ?string
|
||||
{
|
||||
$dateId = $this->mapDateCodeToId($dateCode);
|
||||
|
||||
if (null === $dateId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $this->generateFilesMap()[$dateId]['label'] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a hotel code string to its corresponding hotel ID.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user