Add books to favourites catalog#7
Conversation
| }, | ||
| props: ['title', 'author', 'description', 'img', 'id', 'nrFav'], | ||
| methods: { | ||
| addFavourite () { |
There was a problem hiding this comment.
This way you just unnecessarily duplicate data. I think the logic would be much easier / more effective if every book simply had predicate isFavourite property. Then adding / removing would only take one operation. In addition to that you could easily _.filter() books to get favourite ones.
Someone correct me if I'm wrong, please.
There was a problem hiding this comment.
Agree with you
|
@kgogola $ git commit --amend "Add books to favourites catalog"
$ git push origin PUT_YOU_BRANCH_NAME_HERE --forceCommit messages should always be written in imperative mode |
|
@kgogola You have to run script I've provided you in your console in your project directory |
|
@k911 I' ve got some troubles with editing commit. I get such error: |
LaYatiX
left a comment
There was a problem hiding this comment.
Can't accept it for now. If you have any question please contact me on slack
Now data aren't copied. Button change ''isFav'' property and it's allows to display favourites books in appropriate catalog.
|
Sorry guyz for time lag, I had some issues :/ I hope the new update will be correct. Unfortunately still I can't change this name of commit, I don't really now @k911 what did I break there, now I get such notice: In git status I have certain new file. I think here is the problem. Reset command not working and cached as well. |

In Book component I included button which allow to add some books to favourites catalog. User can add book just once, so it can't be a couple of same books in this catalog.
I also included simple layout to watching results, but it should be replaced with layout from my previous task.