fix(recipe-list): 🐛 fix recipe not update
- add key alternative to feedParameter and feedPattern
This commit is contained in:
parent
eb8a770147
commit
1633197b92
1 changed files with 33 additions and 14 deletions
|
|
@ -43,6 +43,7 @@ import {
|
|||
|
||||
import { RecipeToppingComponent } from '../recipe-topping/recipe-topping.component';
|
||||
import Lang from 'src/app/shared/helpers/lang';
|
||||
import { Debugger } from 'src/app/shared/helpers/debugger';
|
||||
|
||||
@Component({
|
||||
selector: 'app-recipe-list',
|
||||
|
|
@ -333,9 +334,15 @@ export class RecipeListComponent implements OnInit, OnChanges {
|
|||
// --------------- mapping missing data ---------------
|
||||
|
||||
// map name
|
||||
console.log("use recipeList input; ", recipeDetailMat);
|
||||
console.log("test recipeDetailMat.feedPattern", recipeDetailMat.feedPattern);
|
||||
console.log("test recipeDetailMat.feedParameter", recipeDetailMat.feedParameter);
|
||||
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({
|
||||
|
|
@ -405,13 +412,17 @@ export class RecipeListComponent implements OnInit, OnChanges {
|
|||
],
|
||||
feedPattern: [
|
||||
{
|
||||
value: recipeDetailMat.feedPattern ?? (recipeDetailMat as any).FeedPattern,
|
||||
value:
|
||||
recipeDetailMat.feedPattern ??
|
||||
(recipeDetailMat as any).FeedPattern,
|
||||
disabled: !this.isEditable(),
|
||||
},
|
||||
],
|
||||
feedParameter: [
|
||||
{
|
||||
value: recipeDetailMat.feedParameter ?? (recipeDetailMat as any).FeedParameter,
|
||||
value:
|
||||
recipeDetailMat.feedParameter ??
|
||||
(recipeDetailMat as any).FeedParameter,
|
||||
disabled: !this.isEditable(),
|
||||
},
|
||||
],
|
||||
|
|
@ -546,7 +557,7 @@ export class RecipeListComponent implements OnInit, OnChanges {
|
|||
|
||||
this.stringParams[index] = stringParamList;
|
||||
|
||||
console.log("string param debugr")
|
||||
console.log('string param debugr');
|
||||
}
|
||||
|
||||
console.log('string param debug change', this.stringParamData);
|
||||
|
|
@ -627,13 +638,17 @@ 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(),
|
||||
},
|
||||
],
|
||||
|
|
@ -768,7 +783,7 @@ export class RecipeListComponent implements OnInit, OnChanges {
|
|||
this.selectedRecipeList.push(i);
|
||||
console.log('selected recipe list', this.selectedRecipeList);
|
||||
|
||||
if(this.displayOnly){
|
||||
if (this.displayOnly) {
|
||||
// ignore list
|
||||
this.recipeListFormChange.emit(this.selectedRecipeList);
|
||||
}
|
||||
|
|
@ -1006,7 +1021,7 @@ export class RecipeListComponent implements OnInit, OnChanges {
|
|||
async openRecipeListEditor(i: number) {
|
||||
await Promise.resolve();
|
||||
if (this.timeoutHandler) {
|
||||
console.log("timeout", this.timeout, "display only: ", this.displayOnly);
|
||||
console.log('timeout', this.timeout, 'display only: ', this.displayOnly);
|
||||
if (this.timeout >= 20 && !this.displayOnly) {
|
||||
// alert("Opening Recipe List Editor in detail")
|
||||
if (
|
||||
|
|
@ -1016,12 +1031,12 @@ export class RecipeListComponent implements OnInit, OnChanges {
|
|||
} else {
|
||||
this.showDetailRecipeList = false;
|
||||
}
|
||||
} else if (this.timeout >= 0 && this.displayOnly){
|
||||
console.log("Activate add to selection",i)
|
||||
} else if (this.timeout >= 0 && this.displayOnly) {
|
||||
console.log('Activate add to selection', i);
|
||||
this.addToSelection(i);
|
||||
} else if (this.timeout < 10 && !this.displayOnly){
|
||||
} else if (this.timeout < 10 && !this.displayOnly) {
|
||||
// hayaina! taimu a-uto
|
||||
console.log("早お腹(very fast)!タイムアウト(timeout)=", i);
|
||||
console.log('早お腹(very fast)!タイムアウト(timeout)=', i);
|
||||
this.addToSelection(i);
|
||||
}
|
||||
|
||||
|
|
@ -1182,4 +1197,8 @@ export class RecipeListComponent implements OnInit, OnChanges {
|
|||
this.recipeListData.at(index).get('name')?.setValue(mat_name);
|
||||
});
|
||||
}
|
||||
|
||||
// debugger
|
||||
recipeListDebugger = new Debugger();
|
||||
eval = () => this.recipeListDebugger.eval(this);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue