From 02e2197de770e501dd42215b41cbd1bbad7827cb Mon Sep 17 00:00:00 2001 From: john <johnbarlas39@gmail.com> Date: Wed, 19 Apr 2017 19:13:09 +0300 Subject: [PATCH] book renaming works & update to latest versions of pubsweet components --- app/components/Dashboard/Book.jsx | 3 ++- app/components/Dashboard/Dashboard.jsx | 7 ++++--- package.json | 12 ++++++------ 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/app/components/Dashboard/Book.jsx b/app/components/Dashboard/Book.jsx index a48f20b..5ee0de2 100644 --- a/app/components/Dashboard/Book.jsx +++ b/app/components/Dashboard/Book.jsx @@ -46,10 +46,11 @@ class Book extends React.Component { const { book, edit } = this.props const patch = { + id: book.id, title: this.renameTitle.value } - edit(book, patch) + edit(patch) this.setState({ isRenaming: false }) diff --git a/app/components/Dashboard/Dashboard.jsx b/app/components/Dashboard/Dashboard.jsx index 8b6bbff..2a5bd2f 100644 --- a/app/components/Dashboard/Dashboard.jsx +++ b/app/components/Dashboard/Dashboard.jsx @@ -56,6 +56,7 @@ export class Dashboard extends React.Component { Once you have the new book's db id, make the teams for it as well. */ createBook (newTitle) { + console.log('called') const { createCollection } = this.props.actions const book = { @@ -71,9 +72,9 @@ export class Dashboard extends React.Component { /* Edit a book's properties. */ - editBook (book, patch) { - const { patchCollection } = this.props.actions - patchCollection(book, patch) + editBook (patch) { + const { updateCollection } = this.props.actions + updateCollection(patch) } /* diff --git a/package.json b/package.json index d22ddad..ec4a177 100644 --- a/package.json +++ b/package.json @@ -20,18 +20,18 @@ "html-webpack-plugin": "^2.24.0", "json-loader": "^0.5.4", "lodash": "^4.17.4", - "pubsweet-client": "0.8.4", - "pubsweet-component-blog": "0.1.2", - "pubsweet-component-ink-backend": "0.0.4", + "pubsweet-client": "0.9.0", + "pubsweet-component-blog": "0.1.3", + "pubsweet-component-ink-backend": "0.0.5", "pubsweet-component-ink-frontend": "0.0.2", "pubsweet-component-login": "0.2.2", - "pubsweet-component-manage": "0.1.2", - "pubsweet-component-navigation": "0.1.1", + "pubsweet-component-manage": "0.1.3", + "pubsweet-component-navigation": "0.2.0", "pubsweet-component-signup": "0.1.1", "pubsweet-component-teams-manager": "0.1.2", "pubsweet-component-theme-editoria": "git+https://gitlab.coko.foundation/yannisbarlas/pubsweet-component-theme-editoria.git", "pubsweet-component-users-manager": "0.1.1", - "pubsweet-server": "0.7.3", + "pubsweet-server": "0.8.0", "pubsweet-theme-plugin": "0.0.1", "react-dnd": "^2.1.4", "react-dnd-html5-backend": "^2.1.2", -- GitLab