diff --git a/src/main/ts/src/app/posts/create-update/create-update-post.component.ts b/src/main/ts/src/app/posts/create-update/create-update-post.component.ts index d944d09..3f5502a 100644 --- a/src/main/ts/src/app/posts/create-update/create-update-post.component.ts +++ b/src/main/ts/src/app/posts/create-update/create-update-post.component.ts @@ -67,7 +67,7 @@ export class CreateUpdatePostComponent implements OnInit { this.listCategories = []; this.activatedTab = Tabs.EDITION; this.createUpdatePostService.getCategories().subscribe(listCategories => { - this.listCategories = listCategories.filter(category => !category.listSubCategories.length); + this.listCategories = listCategories.filter(category => !category.listSubCategories); }); const postKey = this.activatedRoute.snapshot.paramMap.get('postKey'); @@ -166,6 +166,7 @@ export class CreateUpdatePostComponent implements OnInit { }); } else { this.createUpdatePostService.addPost(this.model).subscribe(post => { + NotificationsComponent.success('Article enregistré'); this.router.navigate([`/posts/update/${post.key}`]); }, error => { console.log(error); diff --git a/src/main/ts/src/app/posts/post.component.html b/src/main/ts/src/app/posts/post.component.html index 4ed9c62..1021a47 100644 --- a/src/main/ts/src/app/posts/post.component.html +++ b/src/main/ts/src/app/posts/post.component.html @@ -43,9 +43,6 @@