Merge remote-tracking branch 'origin/master' into Development
This commit is contained in:
@@ -64,6 +64,12 @@ public function show(Segment $segment)
|
||||
->withQueryString();
|
||||
|
||||
$contracts = $this->hydrateClientShortcut($contracts);
|
||||
|
||||
// Hide addresses array since we're using the singular address relationship
|
||||
$contracts->getCollection()->each(function ($contract) {
|
||||
$contract->clientCase?->person?->makeHidden('addresses');
|
||||
$contract->clientCase?->client?->person?->makeHidden('addresses');
|
||||
});
|
||||
|
||||
$clients = Client::query()
|
||||
->whereHas('clientCases.contracts.segments', function ($q) use ($segment) {
|
||||
@@ -191,8 +197,7 @@ private function buildContractsQuery(Segment $segment, ?string $search, ?string
|
||||
->where('contract_segment.active', '=', 1);
|
||||
})
|
||||
->with([
|
||||
'clientCase.person',
|
||||
'clientCase.client.person',
|
||||
'clientCase.person.address',
|
||||
'type',
|
||||
'account',
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user