* builtin slide switching added to the backend
This commit is contained in:
parent
25ff60b34b
commit
66bc94037d
@ -8,6 +8,14 @@ use Doctrine\Common\Collections\ArrayCollection;
|
|||||||
|
|
||||||
class KanbanBoard implements \JsonSerializable
|
class KanbanBoard implements \JsonSerializable
|
||||||
{
|
{
|
||||||
|
const PRIO_MAP = [
|
||||||
|
'Trivial' => 0,
|
||||||
|
'Minor' => 1,
|
||||||
|
'Major' => 2,
|
||||||
|
'Critical' => 3,
|
||||||
|
'Blocker' => 4,
|
||||||
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var KanbanEntry[]|ArrayCollection
|
* @var KanbanEntry[]|ArrayCollection
|
||||||
*/
|
*/
|
||||||
@ -211,7 +219,10 @@ class KanbanBoard implements \JsonSerializable
|
|||||||
private function prioSort(array $toSort): array
|
private function prioSort(array $toSort): array
|
||||||
{
|
{
|
||||||
usort($toSort, function (KanbanEntry $a, KanbanEntry $b) {
|
usort($toSort, function (KanbanEntry $a, KanbanEntry $b) {
|
||||||
return $a->getTaurusPrio() <=> $b->getTaurusPrio();
|
// if (null !== $a->getTaurusPrio()) {
|
||||||
|
return $a->getTaurusPrio() <=> $b->getTaurusPrio();
|
||||||
|
// }
|
||||||
|
// return self::PRIO_MAP[$b->getIssuePriority()] <=> self::PRIO_MAP[$a->getIssuePriority()];
|
||||||
});
|
});
|
||||||
return $toSort;
|
return $toSort;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -57,6 +57,24 @@ class Team implements JsonSerializable
|
|||||||
*/
|
*/
|
||||||
private $slides;
|
private $slides;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(name="kanban_enabled", type="boolean", options={"default" = true})
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
private $kanbanEnabled = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(name="commit_tracker_enabled", type="boolean", options={"default" = true})
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
private $commitTrackerEnabled = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(name="watched_enabled", type="boolean", options={"default" = true})
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
private $watchedEnabled = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(name="filter_id", type="integer", nullable=true)
|
* @ORM\Column(name="filter_id", type="integer", nullable=true)
|
||||||
* @var int
|
* @var int
|
||||||
@ -243,6 +261,60 @@ class Team implements JsonSerializable
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function isKanbanEnabled(): bool
|
||||||
|
{
|
||||||
|
return $this->kanbanEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param bool $kanbanEnabled
|
||||||
|
* @return Team
|
||||||
|
*/
|
||||||
|
public function setKanbanEnabled(bool $kanbanEnabled): Team
|
||||||
|
{
|
||||||
|
$this->kanbanEnabled = $kanbanEnabled;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function isCommitTrackerEnabled(): bool
|
||||||
|
{
|
||||||
|
return $this->commitTrackerEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param bool $commitTrackerEnabled
|
||||||
|
* @return Team
|
||||||
|
*/
|
||||||
|
public function setCommitTrackerEnabled(bool $commitTrackerEnabled): Team
|
||||||
|
{
|
||||||
|
$this->commitTrackerEnabled = $commitTrackerEnabled;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function isWatchedEnabled(): bool
|
||||||
|
{
|
||||||
|
return $this->watchedEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param bool $watchedEnabled
|
||||||
|
* @return Team
|
||||||
|
*/
|
||||||
|
public function setWatchedEnabled(bool $watchedEnabled): Team
|
||||||
|
{
|
||||||
|
$this->watchedEnabled = $watchedEnabled;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
@ -451,6 +523,9 @@ class Team implements JsonSerializable
|
|||||||
'name' => $this->getName(),
|
'name' => $this->getName(),
|
||||||
'members' => $this->getMembers() ?? [],
|
'members' => $this->getMembers() ?? [],
|
||||||
'labels' => $this->getLabels() ?? [],
|
'labels' => $this->getLabels() ?? [],
|
||||||
|
'kanbanEnabled' => $this->isKanbanEnabled(),
|
||||||
|
'commitTrackerEnabled' => $this->isCommitTrackerEnabled(),
|
||||||
|
'watchedEnabled' => $this->isWatchedEnabled(),
|
||||||
'filterId' => $this->getFilterId(),
|
'filterId' => $this->getFilterId(),
|
||||||
'dailyLockEnabled' => $this->isDailyLockEnabled(),
|
'dailyLockEnabled' => $this->isDailyLockEnabled(),
|
||||||
'dailyStartTime' => $this->getDailyStartTime()
|
'dailyStartTime' => $this->getDailyStartTime()
|
||||||
|
|||||||
@ -53,6 +53,54 @@ class Team
|
|||||||
*/
|
*/
|
||||||
private $labels;
|
private $labels;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a dummy field, not a text actually. Only used to filter the input
|
||||||
|
* @Annotation\Type("Zend\Form\Element\Text")
|
||||||
|
* @Annotation\Options({
|
||||||
|
* "label": "Active"
|
||||||
|
* })
|
||||||
|
* @Annotation\Validator({
|
||||||
|
* "name":"NotEmpty",
|
||||||
|
* "options": {"type": Zend\Validator\NotEmpty::NULL}
|
||||||
|
* })
|
||||||
|
* @Annotation\Required(false)
|
||||||
|
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
private $kanbanEnabled;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a dummy field, not a text actually. Only used to filter the input
|
||||||
|
* @Annotation\Type("Zend\Form\Element\Text")
|
||||||
|
* @Annotation\Options({
|
||||||
|
* "label": "Active"
|
||||||
|
* })
|
||||||
|
* @Annotation\Validator({
|
||||||
|
* "name":"NotEmpty",
|
||||||
|
* "options": {"type": Zend\Validator\NotEmpty::NULL}
|
||||||
|
* })
|
||||||
|
* @Annotation\Required(false)
|
||||||
|
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
private $commitTrackerEnabled;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a dummy field, not a text actually. Only used to filter the input
|
||||||
|
* @Annotation\Type("Zend\Form\Element\Text")
|
||||||
|
* @Annotation\Options({
|
||||||
|
* "label": "Active"
|
||||||
|
* })
|
||||||
|
* @Annotation\Validator({
|
||||||
|
* "name":"NotEmpty",
|
||||||
|
* "options": {"type": Zend\Validator\NotEmpty::NULL}
|
||||||
|
* })
|
||||||
|
* @Annotation\Required(false)
|
||||||
|
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
private $watchedEnabled;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Annotation\Type("Zend\Form\Element\Number")
|
* @Annotation\Type("Zend\Form\Element\Number")
|
||||||
* @Annotation\Required(true)
|
* @Annotation\Required(true)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user