instances added god may help
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
|
||||
namespace MintyPHP\Service\CustomField;
|
||||
|
||||
use MintyPHP\Repository\Support\RepoQuery;
|
||||
use MintyPHP\Repository\CustomField\TenantCustomFieldDefinitionRepository;
|
||||
use MintyPHP\Repository\CustomField\TenantCustomFieldOptionRepository;
|
||||
use MintyPHP\Repository\CustomField\UserCustomFieldValueOptionRepository;
|
||||
use MintyPHP\Repository\CustomField\UserCustomFieldValueRepository;
|
||||
use MintyPHP\Service\Tenant\TenantScopeService;
|
||||
use MintyPHP\Repository\Support\RepoQuery;
|
||||
use MintyPHP\Service\User\UserScopeGateway;
|
||||
|
||||
class UserCustomFieldValueService
|
||||
{
|
||||
@@ -119,7 +119,7 @@ class UserCustomFieldValueService
|
||||
* Build API-safe custom field payload grouped by tenant.
|
||||
*
|
||||
* @param array<int, array<string, mixed>> $tenantSummaries Assignment tenant rows
|
||||
* from UserService::buildAssignmentsForUser(...), each with at least id/uuid/description/status.
|
||||
* from user assignment context, each with at least id/uuid/description/status.
|
||||
* @return array<int, array<string, mixed>>
|
||||
*/
|
||||
public static function buildPublicValuesByTenant(int $userId, array $tenantSummaries, ?int $tenantScopeId = null): array
|
||||
@@ -228,9 +228,9 @@ class UserCustomFieldValueService
|
||||
$tenant = $orderedTenants[$tenantId];
|
||||
$result[] = [
|
||||
'tenant' => [
|
||||
'uuid' => (string) ($tenant['uuid'] ?? ''),
|
||||
'description' => (string) ($tenant['description'] ?? ''),
|
||||
'status' => (string) ($tenant['status'] ?? ''),
|
||||
'uuid' => (string) $tenant['uuid'],
|
||||
'description' => (string) $tenant['description'],
|
||||
'status' => (string) $tenant['status'],
|
||||
],
|
||||
'fields' => $fields,
|
||||
];
|
||||
@@ -406,7 +406,7 @@ class UserCustomFieldValueService
|
||||
|
||||
public static function extractAddressBookFilterSpec(array $query, int $currentUserId): array
|
||||
{
|
||||
$tenantIds = TenantScopeService::getUserTenantIds($currentUserId);
|
||||
$tenantIds = (new UserScopeGateway())->getUserTenantIds($currentUserId);
|
||||
$definitions = TenantCustomFieldDefinitionRepository::listFilterableByTenantIds($tenantIds);
|
||||
if (!$definitions) {
|
||||
return ['definitions' => [], 'filters' => [], 'query' => []];
|
||||
|
||||
Reference in New Issue
Block a user