diff --git a/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/38969543_extrait-de-louis-sullivan-form-follow-function.-de-la-tour-de-bureaux-artistiquement-consideree.pdf.txt b/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/38969543_extrait-de-louis-sullivan-form-follow-function.-de-la-tour-de-bureaux-artistiquement-consideree.pdf.txt index f7bcb37..ef2f53b 100644 --- a/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/38969543_extrait-de-louis-sullivan-form-follow-function.-de-la-tour-de-bureaux-artistiquement-consideree.pdf.txt +++ b/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/38969543_extrait-de-louis-sullivan-form-follow-function.-de-la-tour-de-bureaux-artistiquement-consideree.pdf.txt @@ -25,22 +25,42 @@ Comments: email: adrien.payet@outlook.com uuid: user://WWjXgPWk role: admin - date: 2024-11-11T14:30:48+01:00 - id: m3d2a41o - type: comment - isRead: false position: pageIndex: 1 - x: "225.5333404541" - y: 181 + x: "33.337885333938" + y: "22.007722007722" + date: 2024-11-11T16:47:45+01:00 + id: m3d768ay + type: comment + isRead: false - page: uri: projects/miss-dior-blooming-bouquet title: Miss Dior Blooming Bouquet file: uuid: file://s0lNtRA0Z7ybTCWG - replies: [ ] - text: autre test + replies: + - + page: + uri: projects/miss-dior-blooming-bouquet + title: Miss Dior Blooming Bouquet + file: + uuid: file://s0lNtRA0Z7ybTCWG + replies: [ ] + text: réponse + author: + name: Adrien Payet + email: adrien.payet@outlook.com + uuid: user://WWjXgPWk + role: admin + position: + pageIndex: 1 + date: 2024-11-11T16:47:58+01:00 + id: m3d76io7 + type: comment + isRead: false + parentId: m3d76dn1 + text: test 2 author: name: Adrien Payet email: adrien.payet@outlook.com @@ -48,9 +68,30 @@ Comments: role: admin position: pageIndex: 1 - x: '69.533340454102' - y: 117 - date: 2024-11-11T14:40:41+01:00 - id: m3d2mtm8 + x: "77.594135956086" + y: "61.776061776062" + date: 2024-11-11T16:47:52+01:00 + id: m3d76dn1 + type: comment + isRead: false +- + page: + uri: projects/miss-dior-blooming-bouquet + title: Miss Dior Blooming Bouquet + file: + uuid: file://s0lNtRA0Z7ybTCWG + replies: [ ] + text: 3e com + author: + name: Adrien Payet + email: adrien.payet@outlook.com + uuid: user://WWjXgPWk + role: admin + position: + pageIndex: 1 + x: '31.698764940525' + y: '51.544401544402' + date: 2024-11-11T16:48:12+01:00 + id: m3d76sxu type: comment isRead: false \ No newline at end of file diff --git a/public/site/plugins/comments/routes/reply.php b/public/site/plugins/comments/routes/reply.php index e0a54e8..cb9384b 100644 --- a/public/site/plugins/comments/routes/reply.php +++ b/public/site/plugins/comments/routes/reply.php @@ -20,7 +20,9 @@ return [ 'page' => $page, 'parentId' => $data->parentId, 'file' => $file, - 'filePageIndex' => $data->filePageIndex, + 'position' => [ + 'pageIndex' => $data->position->pageIndex, + ], 'text' => $data->text, 'author' => $user, 'date' => (string) $data->date, diff --git a/public/site/templates/projects.json.php b/public/site/templates/projects.json.php index 7d400cb..723cec8 100644 --- a/public/site/templates/projects.json.php +++ b/public/site/templates/projects.json.php @@ -1,9 +1,10 @@ children()->map(function ($child) { +$children = $page->children()->filter(function ($child) { + return kirby()->user()->role() === 'admin' || $child->managers()->toUsers()->has(kirby()->user()); +})->map(function ($child) { return [ 'title' => $child->title()->value(), 'url' => $child->url(), - 'uri' => $child->uri(), 'uri' => '/' . $child->uri(), 'modified' => $child->modified('Y-MM-d'), 'currentStep' => $child->currentStep()->value(), @@ -12,6 +13,7 @@ $children = $page->children()->map(function ($child) { ]; })->values(); + $specificData = [ "children" => $children, ]; diff --git a/src/components/Menu.vue b/src/components/Menu.vue index d88d501..4958257 100644 --- a/src/components/Menu.vue +++ b/src/components/Menu.vue @@ -48,7 +48,7 @@ }} -
+
Projets en cours
-
+
Projets archivés
  • diff --git a/src/components/comments/Comment.vue b/src/components/comments/Comment.vue index 370af66..a1b99c8 100644 --- a/src/components/comments/Comment.vue +++ b/src/components/comments/Comment.vue @@ -1,5 +1,9 @@