Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions app/Modules/Group/Events/Traits/IsPublishableApplicationEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,24 @@ public function getEventType(): string
public function getPublishableMessage(): array
{
return [
'expert_panel' => [
'id' => $this->group->uuid,
'name' => $this->group->displayName,
'type' => $this->group->fullType->name,
'affiliation_id' => $this->group->expertPanel->affiliation_id
],
'expert_panel' => array_merge(
[
'id' => $this->group->uuid,
'name' => $this->group->name,
'short_name' => $this->group->expertPanel->short_base_name,
'status' => $this->group->groupStatus->name,
'parent_group' => $this->group->parentGroup?->name, // TODO: check representation when no parent: null or empty string?
'type' => $this->group->fullType->name,
'affiliation_id' => $this->group->expertPanel->affiliation_id,
'scope_description' => $this->group->expertPanel->scope_description,
],
// Conditionally add vcep field below if type is 'vcep'
$this->group->fullType->name === 'vcep' ? ['cspec_url' => $this->group->expertPanel->affiliation_id] : [],
)
];
}


public function mapGeneForMessage($gene): array
{
$messageGene = [
Expand Down
5 changes: 5 additions & 0 deletions app/Modules/Group/Models/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,4 +268,9 @@ protected static function newFactory()
{
return new GroupFactory();
}

public function parentGroup(): BelongsTo
{
return $this->belongsTo(Group::class, 'parent_id', 'id');
}
}
4 changes: 2 additions & 2 deletions config/dx.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
* The current schema version of messsages sent to a particular topic.
*/
'schema_versions' => [
'gpm-general-events' => '1.1.0',
'gpm-person-events' => '1.1.0'
'gpm-general-events' => '1.9.9',
'gpm-person-events' => '1.9.9'
]

];