mirror of
https://github.com/Karaka-Management/oms-Kanban.git
synced 2026-02-18 05:08:41 +00:00
Test fixes
This commit is contained in:
parent
bdaf777637
commit
903964d70e
|
|
@ -107,9 +107,11 @@ final class ApiController extends Controller
|
||||||
$accounts[] = $card->createdBy->id;
|
$accounts[] = $card->createdBy->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($card->commentList->comments as $element) {
|
if ($card->commentList !== null) {
|
||||||
if ($element->createdBy->id !== $comment->createdBy->id) {
|
foreach ($card->commentList->comments as $element) {
|
||||||
$accounts[] = $element->createdBy->id;
|
if ($element->createdBy->id !== $comment->createdBy->id) {
|
||||||
|
$accounts[] = $element->createdBy->id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -456,7 +458,14 @@ final class ApiController extends Controller
|
||||||
public function apiCommentCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void
|
public function apiCommentCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void
|
||||||
{
|
{
|
||||||
$this->app->moduleManager->get('Comment', 'Api')->apiCommentCreate($request, $response, $data);
|
$this->app->moduleManager->get('Comment', 'Api')->apiCommentCreate($request, $response, $data);
|
||||||
$comment = $response->getDataArray($request->uri->__toString())['response'];
|
$comment = $response->getDataArray($request->uri->__toString())['response'] ?? null;
|
||||||
|
|
||||||
|
if ($comment === null) {
|
||||||
|
$response->header->status = RequestStatusCode::R_400;
|
||||||
|
$this->createInvalidCreateResponse($request, $response, $comment);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$this->createCommentNotifications($comment, $request);
|
$this->createCommentNotifications($comment, $request);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
# Structure
|
|
||||||
|
|
||||||
## ER
|
|
||||||
|
|
||||||

|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 184 KiB |
|
|
@ -19,7 +19,3 @@ Other modules that work great with this one together are:
|
||||||
* [Tasks](Tasks)
|
* [Tasks](Tasks)
|
||||||
* [ProjectManagement](ProjectManagement)
|
* [ProjectManagement](ProjectManagement)
|
||||||
* [EventManagement](EventManagement)
|
* [EventManagement](EventManagement)
|
||||||
|
|
||||||
# Dependencies
|
|
||||||
|
|
||||||
* [Editor](Editor)
|
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@ return ['Kanban' => [
|
||||||
'Back' => 'Zurück',
|
'Back' => 'Zurück',
|
||||||
'Date' => 'Datum',
|
'Date' => 'Datum',
|
||||||
'Description' => 'Beschreibung',
|
'Description' => 'Beschreibung',
|
||||||
'Columns' => 'Spalten',
|
'Columns' => 'Spalten',
|
||||||
'Column' => 'Spalte',
|
'Column' => 'Spalte',
|
||||||
'Order' => 'Order',
|
'Order' => 'Order',
|
||||||
'Board' => 'Board',
|
'Board' => 'Board',
|
||||||
'Name' => 'Name',
|
'Name' => 'Name',
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,8 @@ return ['Kanban' => [
|
||||||
'Date' => 'Date',
|
'Date' => 'Date',
|
||||||
'Description' => 'Description',
|
'Description' => 'Description',
|
||||||
'Order' => 'Order',
|
'Order' => 'Order',
|
||||||
'Columns' => 'Columns',
|
'Columns' => 'Columns',
|
||||||
'Column' => 'Column',
|
'Column' => 'Column',
|
||||||
'Board' => 'Board',
|
'Board' => 'Board',
|
||||||
'Name' => 'Name',
|
'Name' => 'Name',
|
||||||
'Status' => 'Status',
|
'Status' => 'Status',
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ use Modules\Comments\Models\CommentListStatus;
|
||||||
use phpOMS\Uri\UriFactory;
|
use phpOMS\Uri\UriFactory;
|
||||||
|
|
||||||
/** @var \Modules\Kanban\Models\KanbanCard $card */
|
/** @var \Modules\Kanban\Models\KanbanCard $card */
|
||||||
$card = $this->data['card'];
|
$card = $this->data['card'];
|
||||||
$isNew = $card->id === 0;
|
$isNew = $card->id === 0;
|
||||||
|
|
||||||
$editPossible = $card->createdBy->id === $this->request->header->account;
|
$editPossible = $card->createdBy->id === $this->request->header->account;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user