From 95af38bf7241e0b035df0c7ce339425f0c25f1f1 Mon Sep 17 00:00:00 2001 From: Takiguchi Date: Sat, 18 Jan 2020 14:31:11 +0100 Subject: [PATCH] Remove old error panel to use notifications. --- .../create-update/create-update-post.component.ts | 3 ++- src/main/ts/src/app/posts/post.component.html | 3 --- src/main/ts/src/app/posts/post.component.ts | 15 +++++---------- 3 files changed, 7 insertions(+), 14 deletions(-) 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 @@