Closed salahusama closed 4 years ago
Logic for saving as draft let me know what you would change anything
I tried to think of how gmail does it if you try exit an email without pressing send it will ask you if you want to save it as a draft
Good work. I think it might be better to simplify this a bit though. Keep in mind you have to update the BE to support this as well.
For example, something like this might be a good idea...
To publish an article:
To save an article as draft:
You'll also need to see (and toggle) whether the article is published or not. So we should be able to publish an article saved as draft and un-publish an article. A toggle in the admin table maybe?
Ive added a save button then i created a function which checks if the save button was clicked or the publish button then i added a save function in the article for modal. I still need to add a function which saves the draft in the database
This will be useful to save articles still in progress without having them on the main articles page publicly.
A Boolean value of published on each article is a good solution. We can just show the published articles on the main page.