mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 11:03:50 +00:00
Bugfixes/tasks list
This commit is contained in:
@@ -88,27 +88,27 @@ class UserMenuBuilder implements LocalMenuBuilderInterface
|
||||
if ($ended > 0) {
|
||||
$this->addItemInMenu(
|
||||
$menu,
|
||||
$user,
|
||||
'%number% tasks over deadline',
|
||||
'My tasks over deadline',
|
||||
SingleTaskRepository::DATE_STATUS_ENDED,
|
||||
$ended,
|
||||
-15);
|
||||
-15,
|
||||
['new', 'in_progress'],
|
||||
['alert']
|
||||
);
|
||||
}
|
||||
|
||||
if ($warning > 0) {
|
||||
$this->addItemInMenu(
|
||||
$menu,
|
||||
$user,
|
||||
'%number% tasks near deadline',
|
||||
'My tasks near deadline',
|
||||
SingleTaskRepository::DATE_STATUS_WARNING,
|
||||
$warning,
|
||||
-14);
|
||||
-14,
|
||||
['new', 'in_progress'],
|
||||
['warning']
|
||||
);
|
||||
}
|
||||
|
||||
$menu->addChild("My tasks", [
|
||||
'route' => 'chill_task_single_my_tasks'
|
||||
'route' => 'chill_task_singletask_my_tasks'
|
||||
])
|
||||
->setExtras([
|
||||
'order' => -10,
|
||||
@@ -117,20 +117,20 @@ class UserMenuBuilder implements LocalMenuBuilderInterface
|
||||
|
||||
}
|
||||
|
||||
protected function addItemInMenu(MenuItem $menu, User $u, $message, $title, $status, $number, $order)
|
||||
protected function addItemInMenu(MenuItem $menu, $message, $number, $order, array $states = [], array $status = [])
|
||||
{
|
||||
if ($number > 0) {
|
||||
$menu->addChild(
|
||||
$this->translator->transChoice($message, $number),
|
||||
[
|
||||
'route' => 'chill_task_singletask_list',
|
||||
'route' => 'chill_task_singletask_my_tasks',
|
||||
'routeParameters' => [
|
||||
'user_id' => $u->getId(),
|
||||
'status' => [
|
||||
$status
|
||||
],
|
||||
'hide_form' => true,
|
||||
'title' => $this->translator->trans($title)
|
||||
'f' => [
|
||||
'checkboxes' => [
|
||||
'states' => $states,
|
||||
'status' => $status
|
||||
]
|
||||
]
|
||||
]
|
||||
])
|
||||
->setExtras([
|
||||
|
Reference in New Issue
Block a user