add feed pattern/level

This commit is contained in:
pakintada@gmail.com 2024-02-01 11:08:17 +07:00
parent 8211328ee1
commit cabfcdee15
3 changed files with 69 additions and 1 deletions

View file

@ -76,7 +76,11 @@
[attr.data-tip]="param.pkey" [attr.data-tip]="param.pkey"
*ngFor="let param of getStringParamOfIndex(i)" *ngFor="let param of getStringParamOfIndex(i)"
> >
<!-- <p>&nbsp;</p> -->
<div *ngIf="param.pkey != 'encoder_cnt'">
<!-- <p>&nbsp;</p> -->
<p *ngIf="param.pkey == 'notail'">tail</p> <p *ngIf="param.pkey == 'notail'">tail</p>
<input <input
type="text" type="text"
@ -85,6 +89,11 @@
(click)="openStringParamEditor(i)" (click)="openStringParamEditor(i)"
/> />
<p *ngIf="param.pkey == 'esp-v2-press-value'">mA</p> <p *ngIf="param.pkey == 'esp-v2-press-value'">mA</p>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -140,6 +149,31 @@
/> />
<p>sec</p> <p>sec</p>
</div> </div>
</div>
<!-- feed levels -->
<div class="flex w-58 rounded-md bg-pink-200 items-center space-x-2 p-2 justify-center" *ngIf="getTooltipForStirTime(getTypeForRecipeListAtIndex(i)) == 'Mix'">
<p>Style</p>
<input class="w-4 bg-transparent" formControlName="feedPattern">
<p>Level</p>
<input class="w-12 bg-transparent" type="number" formControlName="feedParameter">
<div class="flex p-1 space-x-2 bg-green-300 text-center rounded-md" *ngIf="getStringParam(i, 'encoder_cnt') != undefined">
<p>Encoder </p>
<p>{{getStringParam(i, "encoder_cnt")?.pvalue}}</p>
</div>
</div> </div>
<div class="collapse collapse-open" *ngIf="isTopping(getTypeForRecipeListAtIndex(i)['id'])"> <div class="collapse collapse-open" *ngIf="isTopping(getTypeForRecipeListAtIndex(i)['id'])">
<!-- <div class="collapse-title">Topping Settings</div> --> <!-- <div class="collapse-title">Topping Settings</div> -->
@ -321,6 +355,23 @@
</div> </div>
</details> </details>
<details class="flex items-center space-x-2 bg-pink-200 p-4 rounded-md">
<summary class="cursor-pointer">Feed</summary>
<div class="flex items-center space-x-2">
<p class="text-base m-4">Style</p>
<input
type="text"
class="input w-16"
formControlName="feedPattern"
/>
</div>
<div class="flex items-center space-x-2">
<p class="text-base m-4">Level</p>
<input type="text" class="input w-16" formControlName="feedParameter" />
</div>
</details>
<!-- String Param --> <!-- String Param -->
<div class="flex items-center space-x-2"> <div class="flex items-center space-x-2">
<p class="text-base m-4">Parameters</p> <p class="text-base m-4">Parameters</p>

View file

@ -108,6 +108,10 @@ export class RecipeListComponent implements OnInit {
.subscribe(({ result }) => { .subscribe(({ result }) => {
this._recipeListOriginalArray = result; this._recipeListOriginalArray = result;
result.forEach((recipeDetailMat: RecipeDetailMat, index: number) => { result.forEach((recipeDetailMat: RecipeDetailMat, index: number) => {
console.log(this.recipeListData);
// StringParam // StringParam
if ( if (
recipeDetailMat.StringParam != '' || recipeDetailMat.StringParam != '' ||
@ -210,6 +214,18 @@ export class RecipeListComponent implements OnInit {
disabled: !this.isEditable(), disabled: !this.isEditable(),
}, },
], ],
feedPattern: [
{
value: recipeDetailMat.feedPattern,
disabled: !this.isEditable(),
}
],
feedParameter: [
{
value: recipeDetailMat.feedParameter,
disabled: !this.isEditable(),
}
]
}) })
); );
}); });

1
server/.gitignore vendored
View file

@ -4,3 +4,4 @@
token.json token.json
client_secret.json client_secret.json
app.env app.env
cofffeemachineConfig