feat: add multi-city representation support and domain context resolution
- Created migration to add representation_cities table and domain, is_global fields to representations. - Implemented SiteContextController to resolve domain to site context (city | representation | unknown). - Developed DomainContext and DomainContextResolver services for domain mapping. - Added tests for DomainContextResolver and commission logic based on domain ownership.
This commit is contained in:
@@ -44,6 +44,7 @@ class ClinicController extends BaseController
|
||||
private readonly UserRepository $userRepo,
|
||||
private readonly WeeklyScheduleRepository $scheduleRepo,
|
||||
private readonly FileValidatorService $fileValidator,
|
||||
private readonly \App\Representation\Service\DomainContextResolver $domainResolver,
|
||||
private readonly string $projectDir,
|
||||
) {}
|
||||
|
||||
@@ -259,7 +260,7 @@ class ClinicController extends BaseController
|
||||
#[Route('/api/v1/clinics', methods: ['GET'])]
|
||||
public function list(Request $request): JsonResponse
|
||||
{
|
||||
$filters = $request->query->all();
|
||||
$filters = $this->domainResolver->applyToListFilters($request->query->all());
|
||||
$result = $this->clinicRepo->findWithFilters($filters);
|
||||
|
||||
$clinicIds = array_map(fn(Clinic $c) => $c->getId(), $result['items']);
|
||||
|
||||
Reference in New Issue
Block a user