fix(recipe-list): 🐛 fix StringParam

fix StringParam where feedParameter and feedPattern not found
This commit is contained in:
pakintada@gmail.com 2024-03-15 10:56:44 +07:00
parent 8315f268b1
commit bdcc7d8d56

View file

@ -301,6 +301,7 @@ export class RecipeListComponent implements OnInit, OnChanges {
console.log('test recipelist', this.recipeList);
this.recipeList.forEach(
(recipeDetailMat: RecipeDetailMat, index: number) => {
// console.log("test recipedetailmat", recipeDetailMat);
// StringParam
if (
recipeDetailMat.StringParam != '' ||
@ -332,7 +333,9 @@ export class RecipeListComponent implements OnInit, OnChanges {
// --------------- mapping missing data ---------------
// map name
// console.log("use recipeList input; ", recipeDetailMat);
console.log("use recipeList input; ", recipeDetailMat);
console.log("test recipeDetailMat.feedPattern", recipeDetailMat.feedPattern);
console.log("test recipeDetailMat.feedParameter", recipeDetailMat.feedParameter);
this.recipeListData.push(
this._formBuilder.group({
@ -402,13 +405,13 @@ export class RecipeListComponent implements OnInit, OnChanges {
],
feedPattern: [
{
value: recipeDetailMat.feedPattern,
value: recipeDetailMat.feedPattern ?? (recipeDetailMat as any).FeedPattern,
disabled: !this.isEditable(),
},
],
feedParameter: [
{
value: recipeDetailMat.feedParameter,
value: recipeDetailMat.feedParameter ?? (recipeDetailMat as any).FeedParameter,
disabled: !this.isEditable(),
},
],