Merged PR 2072: fix(reward-order-confirmation): Only display one orderDate if other ones are...

fix(reward-order-confirmation): Only display one orderDate if other ones are equal

Ref: #5517
This commit is contained in:
Nino Righi
2025-12-08 15:20:19 +00:00
committed by Lorenz Hilpert
parent 6c41214d69
commit 39e56a275e

View File

@@ -49,7 +49,7 @@ export class OrderConfirmationHeaderComponent {
if (!orders || orders.length === 0) {
return '';
}
return orders
const formattedDates = orders
.map((order) => {
if (!order.orderDate) {
return null;
@@ -60,7 +60,8 @@ export class OrderConfirmationHeaderComponent {
);
return formatted ? `${formatted} Uhr` : null;
})
.filter(Boolean)
.join('; ');
.filter(Boolean);
return [...new Set(formattedDates)].join('; ');
});
}