Anmeldefrist in Marktdurchführungstabelle anzeigen
This commit is contained in:
1 parent
f1b090ee85
commit
7fc75eaee6
2 files changed
+12
No files matched your search
@@ -510,6 +510,7 @@ function market_management_search_occurrences(PDO $pdo, array $input): array
|
|||||||
$sortColumn = match ($sort) {
|
$sortColumn = match ($sort) {
|
||||||
'market_name' => 'm.name',
|
'market_name' => 'm.name',
|
||||||
'place' => 'o.place',
|
'place' => 'o.place',
|
||||||
|
'registration_deadline' => 'o.registration_deadline',
|
||||||
'status' => 'o.status',
|
'status' => 'o.status',
|
||||||
default => 'MIN(d.date)',
|
default => 'MIN(d.date)',
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ function auth_render_markets_large_table(array $marketTable): string
|
|||||||
'market_name' => 'Markt',
|
'market_name' => 'Markt',
|
||||||
'earliest_date' => 'Markttag(e)',
|
'earliest_date' => 'Markttag(e)',
|
||||||
'place' => 'Ort',
|
'place' => 'Ort',
|
||||||
|
'registration_deadline' => 'Anmeldefrist',
|
||||||
'status' => 'Status',
|
'status' => 'Status',
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -136,6 +137,16 @@ function auth_render_markets_large_table(array $marketTable): string
|
|||||||
$html[] = '<div class="sg-large-table__cell" role="cell">' . auth_escape_html((string) ($row['market_name'] ?? '')) . '</div>';
|
$html[] = '<div class="sg-large-table__cell" role="cell">' . auth_escape_html((string) ($row['market_name'] ?? '')) . '</div>';
|
||||||
$html[] = '<div class="sg-large-table__cell" role="cell"><a class="sg-hyperlink" href="#" aria-haspopup="dialog" aria-expanded="false" data-market-drawer-open="true" data-market-occurrence-id="' . (int) ($row['id'] ?? 0) . '">' . auth_escape_html(auth_format_market_date($row['earliest_date'] ?? null, $row['latest_date'] ?? null)) . '</a></div>';
|
$html[] = '<div class="sg-large-table__cell" role="cell"><a class="sg-hyperlink" href="#" aria-haspopup="dialog" aria-expanded="false" data-market-drawer-open="true" data-market-occurrence-id="' . (int) ($row['id'] ?? 0) . '">' . auth_escape_html(auth_format_market_date($row['earliest_date'] ?? null, $row['latest_date'] ?? null)) . '</a></div>';
|
||||||
$html[] = '<div class="sg-large-table__cell" role="cell">' . auth_escape_html((string) ($row['place'] ?? '')) . '</div>';
|
$html[] = '<div class="sg-large-table__cell" role="cell">' . auth_escape_html((string) ($row['place'] ?? '')) . '</div>';
|
||||||
|
$registrationDeadline = (string) ($row['registration_deadline'] ?? '');
|
||||||
|
$registrationDeadlineLabel = '';
|
||||||
|
if ($registrationDeadline !== '') {
|
||||||
|
try {
|
||||||
|
$registrationDeadlineLabel = (new DateTimeImmutable($registrationDeadline))->format('d.m.Y');
|
||||||
|
} catch (Throwable) {
|
||||||
|
$registrationDeadlineLabel = $registrationDeadline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$html[] = '<div class="sg-large-table__cell" role="cell">' . auth_escape_html($registrationDeadlineLabel) . '</div>';
|
||||||
$status = (string) ($row['status'] ?? '');
|
$status = (string) ($row['status'] ?? '');
|
||||||
$statusSignalClass = trim(auth_market_status_signal_class($status));
|
$statusSignalClass = trim(auth_market_status_signal_class($status));
|
||||||
$statusValue = '<span' . ($statusSignalClass !== '' ? ' class="' . auth_escape_html($statusSignalClass) . '"' : '') . '>' . auth_escape_html(auth_market_status_label($status)) . '</span>';
|
$statusValue = '<span' . ($statusSignalClass !== '' ? ' class="' . auth_escape_html($statusSignalClass) . '"' : '') . '>' . auth_escape_html(auth_market_status_label($status)) . '</span>';
|
||||||
|
|||||||
Reference in new issue
Block a user