create store for comment draft

This commit is contained in:
isUnknown 2024-12-19 16:03:20 +01:00
parent 13cbfd8309
commit 94ae220174
7 changed files with 162 additions and 47 deletions

View file

@ -31,7 +31,6 @@ return [
"file" => $file
],
"position" => [
"pageIndex" => $data->position->pageIndex,
"x" => $data->position->x,
"y" => $data->position->y
],
@ -42,6 +41,10 @@ return [
"type" => "comment",
];
if ($data->position->pageIndex) {
$commentData["position"]["pageIndex"] = $data->position->pageIndex;
}
$newComment = new Comment($commentData);
$comments[] = $newComment->toArray();