Implement stack and card reordering
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -55,7 +55,7 @@ class CardController extends Controller {
|
||||
* @return array
|
||||
*/
|
||||
public function reorder($cardId, $stackId, $order) {
|
||||
return $this->cardService->reorder($cardId, $stackId, $order);
|
||||
return $this->cardService->reorder((int)$cardId, (int)$stackId, (int)$order);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -88,7 +88,7 @@ class StackController extends Controller {
|
||||
* @return array
|
||||
*/
|
||||
public function reorder($stackId, $order) {
|
||||
return $this->stackService->reorder($stackId, $order);
|
||||
return $this->stackService->reorder((int)$stackId, (int)$order);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -400,6 +400,11 @@ class CardService {
|
||||
if ($this->boardService->isArchived($this->cardMapper, $id)) {
|
||||
throw new StatusException('Operation not allowed. This board is archived.');
|
||||
}
|
||||
|
||||
$card = $this->cardMapper->find($id);
|
||||
$card->setStackId($stackId);
|
||||
$this->cardMapper->update($card);
|
||||
|
||||
$cards = $this->cardMapper->findAll($stackId);
|
||||
$result = [];
|
||||
$i = 0;
|
||||
|
||||
Reference in New Issue
Block a user