Fixed edit entry post issue

This commit is contained in:
2017-10-27 14:34:55 +07:00
parent 6a4fd98a03
commit 766fe4425d
7 changed files with 34 additions and 24 deletions

View File

@@ -75,12 +75,12 @@ var post = {
post.current = _.find(post.list, function(o) { return o.id == id })
if (post.current.status == 2) {
post.current.status = 1
post.current.valid_at = fecha.format(new Date(), 'YYYY/MM/DD')
var d = new Date();
post.current.valid_at = fecha.format(new Date(), 'YYYY-MM-DD H:mm:s')
} else if (post.current.status == 1) {
post.current.status = 0
}
post.save()
// console.log(post.current);
},
validateStatus: function(id) {