feat: person tags system - org-level skills with self-reported and organiser-assigned sources
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -24,6 +24,23 @@ final class PersonResource extends JsonResource
|
||||
'created_at' => $this->created_at->toIso8601String(),
|
||||
'crowd_type' => new CrowdTypeResource($this->whenLoaded('crowdType')),
|
||||
'company' => new CompanyResource($this->whenLoaded('company')),
|
||||
'tags' => $this->when(
|
||||
$this->user_id && $this->relationLoaded('user'),
|
||||
function () {
|
||||
$orgId = $this->event?->organisation_id;
|
||||
if (!$orgId || !$this->user) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return UserOrganisationTagResource::collection(
|
||||
$this->user->organisationTags()
|
||||
->where('organisation_id', $orgId)
|
||||
->with('personTag')
|
||||
->get()
|
||||
);
|
||||
},
|
||||
[]
|
||||
),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user