feat: extend teamer dashboard

This commit is contained in:
Björn Fromme
2023-12-12 18:04:01 +01:00
parent 8ff59b3068
commit b5781df8d9
16 changed files with 286 additions and 30 deletions
+8
View File
@@ -89,6 +89,14 @@ class AppRuntime implements RuntimeExtensionInterface
return $this->intlExtension->formatCurrency($amount, 'EUR');
}
public function formatRating(int $rating): string
{
// Ratings are stored as integers so divide by 100 first
$rating = $rating / 100;
return 'Ø '.$this->intlExtension->formatNumber($rating, ['fraction_digit' => 2]);
}
public function renderIcon(Environment $environment, string $icon, string $classes = 'w-5 h-5'): string
{
return $environment->render('_partials/_icon.html.twig', [