From 257d337b39bd29642e6fa421a4942a6a29f7207e Mon Sep 17 00:00:00 2001 From: FyloZ Date: Mon, 12 Apr 2021 08:58:51 -0400 Subject: [PATCH] =?UTF-8?q?Ajout=20d'une=20ic=C3=B4ne=20lorsque=20l'approb?= =?UTF-8?q?ation=20d'une=20recette=20est=20expir=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/colors/pages/list/list.component.html | 15 +++++++++++++-- .../modules/colors/pages/list/list.component.ts | 6 +++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/app/modules/colors/pages/list/list.component.html b/src/app/modules/colors/pages/list/list.component.html index 2116ae1..7390a47 100644 --- a/src/app/modules/colors/pages/list/list.component.html +++ b/src/app/modules/colors/pages/list/list.component.html @@ -72,8 +72,19 @@ - - + + + + + diff --git a/src/app/modules/colors/pages/list/list.component.ts b/src/app/modules/colors/pages/list/list.component.ts index 21c3670..95cd14f 100644 --- a/src/app/modules/colors/pages/list/list.component.ts +++ b/src/app/modules/colors/pages/list/list.component.ts @@ -3,7 +3,7 @@ import {ErrorHandlingComponent} from '../../../shared/components/subscribing.com import {RecipeService} from '../../services/recipe.service' import {EmployeePermission} from '../../../shared/model/employee' import {AccountService} from '../../../accounts/services/account.service' -import {getRecipeLuma, Recipe} from '../../../shared/model/recipe.model' +import {getRecipeLuma, isRecipeApprobationExpired, Recipe} from '../../../shared/model/recipe.model' import {ActivatedRoute, Router} from '@angular/router' import {ErrorModel, ErrorService} from '../../../shared/service/error.service' @@ -52,6 +52,10 @@ export class ListComponent extends ErrorHandlingComponent { .forEach(r => this.recipeMatchesSearchQuery(r)) } + isRecipeApprobationExpired(recipe: Recipe): boolean { + return isRecipeApprobationExpired(recipe) + } + isCompanyHidden(companyRecipes: Recipe[]): boolean { return (this.searchQuery && this.searchQuery.length > 0) && companyRecipes.map(r => this.hiddenRecipes[r.id]).filter(r => !r).length <= 0 }