File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
controllers/grid/settings/series Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 18
18
namespace APP \press ;
19
19
20
20
use APP \core \Application ;
21
+ use APP \facades \Repo ;
21
22
use PKP \context \PKPSection ;
22
23
use PKP \context \SubEditorsDAO ;
23
24
use PKP \db \DAORegistry ;
25
+ use stdClass ;
24
26
25
27
class Series extends PKPSection
26
28
{
@@ -326,7 +328,16 @@ public function setSortOption($sortOption)
326
328
public function getEditorsString ()
327
329
{
328
330
$ subEditorsDao = DAORegistry::getDAO ('SubEditorsDAO ' ); /** @var SubEditorsDAO $subEditorsDao */
329
- $ editors = $ subEditorsDao ->getBySubmissionGroupIds ([$ this ->getId ()], Application::ASSOC_TYPE_SECTION , $ this ->getPressId ());
331
+ $ assignments = $ subEditorsDao ->getBySubmissionGroupIds ([$ this ->getId ()], Application::ASSOC_TYPE_SECTION , $ this ->getPressId ());
332
+ $ editors = Repo::user ()
333
+ ->getCollector ()
334
+ ->filterByUserIds (
335
+ $ assignments
336
+ ->map (fn (stdClass $ assignment ) => $ assignment ->userId )
337
+ ->filter ()
338
+ ->toArray ()
339
+ )
340
+ ->getMany ();
330
341
331
342
$ separator = ', ' ;
332
343
$ str = '' ;
Original file line number Diff line number Diff line change 17
17
18
18
use APP \controllers \grid \settings \series \form \SeriesForm ;
19
19
use APP \core \Application ;
20
+ use APP \facades \Repo ;
20
21
use APP \notification \NotificationManager ;
21
22
use PKP \context \SubEditorsDAO ;
22
23
use PKP \controllers \grid \feature \OrderGridItemsFeature ;
28
29
use PKP \linkAction \LinkAction ;
29
30
use PKP \linkAction \request \AjaxModal ;
30
31
use PKP \security \Role ;
32
+ use stdClass ;
31
33
32
34
class SeriesGridHandler extends SetupGridHandler
33
35
{
@@ -81,7 +83,16 @@ public function initialize($request, $args = null)
81
83
}
82
84
83
85
// Get the series editors data for the row
84
- $ assignedSeriesEditors = $ subEditorsDao ->getBySubmissionGroupIds ([$ series ->getId ()], Application::ASSOC_TYPE_SECTION , $ press ->getId ());
86
+ $ assignments = $ subEditorsDao ->getBySubmissionGroupIds ([$ series ->getId ()], Application::ASSOC_TYPE_SECTION , $ press ->getId ());
87
+ $ assignedSeriesEditors = Repo::user ()
88
+ ->getCollector ()
89
+ ->filterByUserIds (
90
+ $ assignments
91
+ ->map (fn (stdClass $ assignment ) => $ assignment ->userId )
92
+ ->filter ()
93
+ ->toArray ()
94
+ )
95
+ ->getMany ();
85
96
if ($ assignedSeriesEditors ->empty ()) {
86
97
$ editorsString = __ ('common.none ' );
87
98
} else {
You can’t perform that action at this time.
0 commit comments