diff --git a/src/app/modules/colors/components/images-editor/images-editor.component.html b/src/app/modules/colors/components/images-editor/images-editor.component.html index 4408b14..c738cd5 100644 --- a/src/app/modules/colors/components/images-editor/images-editor.component.html +++ b/src/app/modules/colors/components/images-editor/images-editor.component.html @@ -1,4 +1,4 @@ - + Images diff --git a/src/app/modules/colors/components/images-editor/images-editor.component.ts b/src/app/modules/colors/components/images-editor/images-editor.component.ts index c53a23b..42c4499 100644 --- a/src/app/modules/colors/components/images-editor/images-editor.component.ts +++ b/src/app/modules/colors/components/images-editor/images-editor.component.ts @@ -18,6 +18,7 @@ export class ImagesEditorComponent extends SubscribingComponent { imageIds$: Observable backendUrl = environment.apiUrl + hasImages = false constructor( private recipeImageService: RecipeImageService, @@ -32,6 +33,11 @@ export class ImagesEditorComponent extends SubscribingComponent { super.ngOnInit() this.loadImagesIds() + this.subscribe( + this.imageIds$, + ids => this.hasImages = ids.length > 0, + 1 + ) } submit(event) { diff --git a/src/app/modules/colors/pages/explore/explore.component.html b/src/app/modules/colors/pages/explore/explore.component.html index 9ee5eec..89b077b 100644 --- a/src/app/modules/colors/pages/explore/explore.component.html +++ b/src/app/modules/colors/pages/explore/explore.component.html @@ -24,7 +24,7 @@
-
+
-
+
diff --git a/src/app/modules/colors/pages/explore/explore.component.ts b/src/app/modules/colors/pages/explore/explore.component.ts index 610f44c..5f68076 100644 --- a/src/app/modules/colors/pages/explore/explore.component.ts +++ b/src/app/modules/colors/pages/explore/explore.component.ts @@ -50,6 +50,10 @@ export class ExploreComponent extends ErrorHandlingComponent { r => { this.recipe = r this.note = r.note + + if (this.recipe.mixes.length <= 0 || this.recipe.steps.length <= 0) { + this.alertService.pushWarning("Cette recette n'est pas complète") + } }, '/colors/list' )