feat: extend teamer dashboard
This commit is contained in:
@@ -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', [
|
||||
|
||||
Reference in New Issue
Block a user