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:
2026-04-10 11:15:43 +02:00
parent 5dbe7a254e
commit d37a45b028
21 changed files with 1375 additions and 1 deletions

View File

@@ -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()
);
},
[]
),
];
}
}