mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge branch 'fix/docgen-accompanying-period-context-with-list-aworks' into 'master'
Refactor username mapping in activity context filter. See merge request Chill-Projet/chill-bundles!797
This commit is contained in:
commit
739e0b1692
6
.changes/unreleased/Fixed-20250214-121010.yaml
Normal file
6
.changes/unreleased/Fixed-20250214-121010.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
kind: Fixed
|
||||||
|
body: fix generation of document with accompanying period context, and list of activities and works
|
||||||
|
time: 2025-02-14T12:10:10.920355454+01:00
|
||||||
|
custom:
|
||||||
|
Issue: ""
|
||||||
|
SchemaChange: No schema change
|
@ -143,7 +143,10 @@ class ListActivitiesByAccompanyingPeriodContext implements
|
|||||||
array_filter(
|
array_filter(
|
||||||
$works,
|
$works,
|
||||||
function ($work) use ($user) {
|
function ($work) use ($user) {
|
||||||
$workUsernames = array_map(static fn (User $user) => $user['username'], $work['referrers'] ?? []);
|
$workUsernames = [];
|
||||||
|
foreach ($work['referrers'] as $referrer) {
|
||||||
|
$workUsernames[] = $referrer['username'];
|
||||||
|
}
|
||||||
|
|
||||||
return \in_array($user->getUserIdentifier(), $workUsernames, true);
|
return \in_array($user->getUserIdentifier(), $workUsernames, true);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user