@@ -57,20 +57,24 @@ final class BitzerController extends ModuleController
57
57
58
58
private \DateInterval $ upcomingInterval ;
59
59
60
+ private bool $ showCompletedTasks ;
61
+
60
62
public function __construct (
61
63
Bitzer $ bitzer ,
62
64
Schedule $ schedule ,
63
65
AgentRepository $ agentRepository ,
64
66
Translator $ translator ,
65
67
TaskClassNameRepository $ taskClassNameRepository ,
66
- string $ upcomingInterval
68
+ string $ upcomingInterval ,
69
+ bool $ showCompletedTasks
67
70
) {
68
71
$ this ->bitzer = $ bitzer ;
69
72
$ this ->schedule = $ schedule ;
70
73
$ this ->agentRepository = $ agentRepository ;
71
74
$ this ->translator = $ translator ;
72
75
$ this ->taskClassNameRepository = $ taskClassNameRepository ;
73
76
$ this ->upcomingInterval = new \DateInterval ($ upcomingInterval );
77
+ $ this ->showCompletedTasks = $ showCompletedTasks ;
74
78
}
75
79
76
80
public function indexAction (array $ module = []): void
@@ -164,6 +168,7 @@ public function myScheduleAction(): void
164
168
$ this ->view ->setFusionPath ('mySchedule ' );
165
169
$ this ->view ->assignMultiple ([
166
170
'groupedTasks ' => $ groupedTasks ,
171
+ 'completedTasks ' => $ this ->showCompletedTasks ? $ this ->schedule ->findCompleted (null , $ agents ) : null ,
167
172
'labels ' => [
168
173
'task.scheduledTime.label ' => $ this ->getLabel ('task.scheduledTime.label ' ),
169
174
'task.actionStatus.label ' => $ this ->getLabel ('task.actionStatus.label ' ),
0 commit comments