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