feat: match pickups by name
This commit is contained in:
@@ -6,6 +6,7 @@ use App\BusProNet\DataProvider\CountryDataProvider;
|
||||
use App\BusProNet\DataProvider\PickupDataProvider;
|
||||
use App\Entity\Teamer;
|
||||
use App\Entity\Upload;
|
||||
use App\Service\Teamer\PickupResolver;
|
||||
use Carbon\Carbon;
|
||||
use Symfony\Component\HttpFoundation\RequestStack;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
@@ -21,6 +22,7 @@ class AppRuntime implements RuntimeExtensionInterface
|
||||
private readonly TranslatorInterface $translator,
|
||||
private readonly CountryDataProvider $countries,
|
||||
private readonly PickupDataProvider $pickups,
|
||||
private readonly PickupResolver $pickupResolver,
|
||||
private readonly string $environment
|
||||
) {
|
||||
}
|
||||
@@ -86,6 +88,11 @@ class AppRuntime implements RuntimeExtensionInterface
|
||||
return 'ab '.$pickup->getCity();
|
||||
}
|
||||
|
||||
public function hasPickup(?int $pickupId, Teamer $teamer): bool
|
||||
{
|
||||
return $this->pickupResolver->hasPickup($pickupId, $teamer);
|
||||
}
|
||||
|
||||
public function fileIconFilter(Environment $environment, string $mimeType, ?string $classes = 'w-4 h-4'): string
|
||||
{
|
||||
$icon = match ($mimeType) {
|
||||
|
||||
Reference in New Issue
Block a user