|
|
@ -1,4 +1,4 @@ |
|
|
import { NgModule } from '@angular/core' |
|
|
import { NgModule, Pipe } from '@angular/core' |
|
|
import { SharedModule } from '@cdk/shared/shared.module' |
|
|
import { SharedModule } from '@cdk/shared/shared.module' |
|
|
import { AddDishToIngredientComponent } from './add-dish-to-ingredient/add-dish-to-ingredient.component' |
|
|
import { AddDishToIngredientComponent } from './add-dish-to-ingredient/add-dish-to-ingredient.component' |
|
|
import { IngredientMealsComponent } from './ingredient-meals/ingredient-meals.component' |
|
|
import { IngredientMealsComponent } from './ingredient-meals/ingredient-meals.component' |
|
|
@ -10,6 +10,13 @@ import { IngredientAnalysisComponent } from './ingredient-analysis/ingredient-an |
|
|
import { NutritionTableComponent } from './nutrition-table/nutrition-table.component' |
|
|
import { NutritionTableComponent } from './nutrition-table/nutrition-table.component' |
|
|
import { SelectFoodComponent } from './select-food/select-food.component' |
|
|
import { SelectFoodComponent } from './select-food/select-food.component' |
|
|
|
|
|
|
|
|
|
|
|
@Pipe({ name: 'findByPeople', pure: true }) |
|
|
|
|
|
export class FindByPeoplePipe { |
|
|
|
|
|
transform(values: any[], people: any) { |
|
|
|
|
|
return values?.find((v) => v.peopleName === people) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@NgModule({ |
|
|
@NgModule({ |
|
|
declarations: [ |
|
|
declarations: [ |
|
|
AddDishToIngredientComponent, |
|
|
AddDishToIngredientComponent, |
|
|
@ -21,6 +28,7 @@ import { SelectFoodComponent } from './select-food/select-food.component' |
|
|
IngredientAnalysisComponent, |
|
|
IngredientAnalysisComponent, |
|
|
NutritionTableComponent, |
|
|
NutritionTableComponent, |
|
|
SelectFoodComponent, |
|
|
SelectFoodComponent, |
|
|
|
|
|
FindByPeoplePipe, |
|
|
], |
|
|
], |
|
|
imports: [SharedModule], |
|
|
imports: [SharedModule], |
|
|
exports: [ |
|
|
exports: [ |
|
|
|