diff --git a/src/app/brew/brew-detail/brew-detail.component.html b/src/app/brew/brew-detail/brew-detail.component.html index f1b0c63a..80314135 100644 --- a/src/app/brew/brew-detail/brew-detail.component.html +++ b/src/app/brew/brew-detail/brew-detail.component.html @@ -19,146 +19,146 @@ - {{"BREW_HEADER_BEFORE_BREW" | translate }} + choosenPreparation.manage_parameters.grind_size, + choosenPreparation.use_custom_parameters])" [style.order]="(settings | brewFieldOrderPipe: [settings.brew_order.before.grind_size, + choosenPreparation.brew_order.before.grind_size, + choosenPreparation.use_custom_parameters])">

{{"BREW_DATA_GRIND_SIZE" | translate}}:

{{data.grind_size}}

+ choosenPreparation.manage_parameters.grind_weight, + choosenPreparation.use_custom_parameters])" [style.order]="(settings | brewFieldOrderPipe: [settings.brew_order.before.grind_weight, + choosenPreparation.brew_order.before.grind_weight, + choosenPreparation.use_custom_parameters])">

{{"BREW_DATA_GRIND_WEIGHT" | translate}}:

{{data.grind_weight}}

+ choosenPreparation.manage_parameters.brew_temperature, + choosenPreparation.use_custom_parameters])" [style.order]="(settings | brewFieldOrderPipe: [settings.brew_order.before.brew_temperature, + choosenPreparation.brew_order.before.brew_temperature, + choosenPreparation.use_custom_parameters])">

{{"BREW_DATA_BREW_TEMPERATURE" | translate}}:

{{data.brew_temperature}}

+ choosenPreparation.manage_parameters.method_of_preparation, + choosenPreparation.use_custom_parameters])" [style.order]="(settings | brewFieldOrderPipe: [settings.brew_order.before.method_of_preparation, + choosenPreparation.brew_order.before.method_of_preparation, + choosenPreparation.use_custom_parameters])" detail="true" (click)="detailPreparation()">

{{"BREW_DATA_PREPARATION_METHOD" | translate}}:

-

{{data.getPreparation().name}}

+

{{choosenPreparation.name}}

+ choosenPreparation.manage_parameters.bean_type, + choosenPreparation.use_custom_parameters])" [style.order]="(settings | brewFieldOrderPipe: [settings.brew_order.before.bean_type, + choosenPreparation.brew_order.before.bean_type, + choosenPreparation.use_custom_parameters])" detail="true" (click)="detailBean()">

{{"BREW_DATA_BEAN_TYPE" | translate}}:

{{data.getBean().name}}

+ choosenPreparation.brew_order.before.bean_type, + choosenPreparation.use_custom_parameters])">

{{"BREW_INFORMATION_BEAN_AGE" | translate}}:

-

{{data.getCalculatedBeanAge()}}

+

{{data | brewFunctionPipe: BREW_FUNCTION_PIPE_ENUM.GET_CALCULATED_BEAN_AGE}}

+ choosenPreparation.brew_order.before.bean_type, + choosenPreparation.use_custom_parameters])">

{{"BREW_INFORMATION_BREW_RATIO" | translate}}:

-

{{data.getBrewRatio()}}

+

{{data | brewFunctionPipe: BREW_FUNCTION_PIPE_ENUM.GET_BREW_RATIO}}

+ choosenPreparation.manage_parameters.mill, + choosenPreparation.use_custom_parameters])" [style.order]="(settings | brewFieldOrderPipe: [settings.brew_order.before.mill, + choosenPreparation.brew_order.before.mill, + choosenPreparation.use_custom_parameters])" detail="true" (click)="detailMill()">

{{"BREW_DATA_MILL" | translate}}:

{{data.getMill().name}}

+ choosenPreparation.manage_parameters.mill_speed, + choosenPreparation.use_custom_parameters])" [style.order]="(settings | brewFieldOrderPipe: [settings.brew_order.before.mill_speed, + choosenPreparation.brew_order.before.mill_speed, + choosenPreparation.use_custom_parameters])">

{{"BREW_DATA_MILL_SPEED" | translate}}:

{{data.mill_speed}}

+ choosenPreparation.manage_parameters.mill_timer, + choosenPreparation.use_custom_parameters])" [style.order]="(settings | brewFieldOrderPipe: [settings.brew_order.before.mill_timer, + choosenPreparation.brew_order.before.mill_timer, + choosenPreparation.use_custom_parameters])">

{{"BREW_DATA_MILL_TIMER" | translate}}:

-

{{data?.getFormattedTotalMillTimerTime()}}

+

{{data | brewFunctionPipe: BREW_FUNCTION_PIPE_ENUM.FORMATTED_TOTAL_MILL_TIME}}

+ choosenPreparation.manage_parameters.pressure_profile, + choosenPreparation.use_custom_parameters])" [style.order]="(settings | brewFieldOrderPipe: [settings.brew_order.before.pressure_profile, + choosenPreparation.brew_order.before.pressure_profile, + choosenPreparation.use_custom_parameters])">

{{"BREW_DATA_PRESSURE_PROFILE" | translate}}:

{{data.pressure_profile}}

+ choosenPreparation.manage_parameters.method_of_preparation_tool, + choosenPreparation.use_custom_parameters])" [style.order]="(settings | brewFieldOrderPipe: [settings.brew_order.before.method_of_preparation_tool, + choosenPreparation.brew_order.before.method_of_preparation_tool, + choosenPreparation.use_custom_parameters])" lines="inset">

{{"BREW_DATA_PREPARATION_METHOD_TOOL" | translate}}:

{{data.getPreparationToolName(uuid)}}
+ *ngFor="let uuid of data.method_of_preparation_tools">{{data | brewFunctionPipe: [BREW_FUNCTION_PIPE_ENUM.GET_PREPARATION_TOOL_NAME,uuid] }}
+ choosenPreparation.manage_parameters.bean_weight_in, + choosenPreparation.use_custom_parameters])" [style.order]="(settings | brewFieldOrderPipe: [settings.brew_order.before.bean_weight_in, + choosenPreparation.brew_order.before.bean_weight_in, + choosenPreparation.use_custom_parameters])">

{{"BREW_DATA_BEAN_WEIGHT_IN" | translate}}:

{{data.bean_weight_in}}

+ choosenPreparation.manage_parameters.vessel, + choosenPreparation.use_custom_parameters])" [style.order]="(settings | brewFieldOrderPipe: [settings.brew_order.before.vessel, + choosenPreparation.brew_order.before.vessel, + choosenPreparation.use_custom_parameters])">

{{"BREW_DATA_VESSEL_NAME" | translate}}:

{{data.vessel_name}}

@@ -170,10 +170,10 @@

{{data.vessel_weight}}

+ choosenPreparation.manage_parameters.water, + choosenPreparation.use_custom_parameters])" [style.order]="(settings | brewFieldOrderPipe: [settings.brew_order.before.water, + choosenPreparation.brew_order.before.water, + choosenPreparation.use_custom_parameters])">

{{"BREW_DATA_WATER" | translate}}:

{{data.getWater().name}}

@@ -190,18 +190,18 @@

{{data.getWater().name}}

+ choosenPreparation.manage_parameters.brew_temperature_time, + choosenPreparation.use_custom_parameters])" [style.order]="(settings | brewFieldOrderPipe: [settings.brew_order.while.brew_temperature_time, + choosenPreparation.brew_order.while.brew_temperature_time, + choosenPreparation.use_custom_parameters])">

{{'BREW_DATA_TEMPERATURE_TIME' | translate}} / {{'BREW_DATA_SURF_TIME' | translate}}:

-

{{data?.getFormattedTotalCoffeeTemperatureTime()}}

+

{{data | brewFunctionPipe: BREW_FUNCTION_PIPE_ENUM.FORMATTED_TOTAL_COFFEE_TEMPERATURE_TIME}}

+ choosenPreparation.brew_order.while.brew_time, + choosenPreparation.use_custom_parameters])"> @@ -252,51 +252,51 @@

{{data?.getFormattedTotalCoffeeTemperatureTime()}}

+ choosenPreparation.brew_order.while.brew_time, + choosenPreparation.use_custom_parameters])" #brewBrewingGraphEl [isDetail]='true' [brewComponent]='this' [(data)]='data'> + choosenPreparation.manage_parameters.brew_time, + choosenPreparation.use_custom_parameters])" [style.order]="(settings | brewFieldOrderPipe: [settings.brew_order.while.brew_time, + choosenPreparation.brew_order.while.brew_time, + choosenPreparation.use_custom_parameters])">

{{'BREW_DATA_TIME' | translate}}:

-

{{data.getFormattedBrewTime()}}

+

{{data | brewFunctionPipe: BREW_FUNCTION_PIPE_ENUM.FORMATTED_BREW_TIME}}

+ choosenPreparation.brew_order.while.brew_time, + choosenPreparation.use_custom_parameters])" lines="full">

{{'BREW_DATA_CALCULATED_COFFEE_BREW_TIME' | translate}}:

-

{{data.getFormattedCoffeeBrewTime()}}

+

{{data | brewFunctionPipe: BREW_FUNCTION_PIPE_ENUM.FORMATTED_COFFEE_BREW_TIME}}

+ choosenPreparation.manage_parameters.coffee_blooming_time, + choosenPreparation.use_custom_parameters])" [style.order]="(settings | brewFieldOrderPipe: [settings.brew_order.while.coffee_blooming_time, + choosenPreparation.brew_order.while.coffee_blooming_time, + choosenPreparation.use_custom_parameters])">

{{"BREW_DATA_COFFEE_BLOOMING_TIME" | translate}}:

-

{{data?.getFormattedTotalCoffeeBloomingTime()}}

+

{{data | brewFunctionPipe: BREW_FUNCTION_PIPE_ENUM.FORMATTED_TOTAL_COFFEE_BLOOMING_TIME}}

+ choosenPreparation.brew_order.while.coffee_first_drip_time, + choosenPreparation.use_custom_parameters])">

{{"BREW_DATA_COFFEE_FIRST_DRIP_TIME" | translate}}:

-

{{data?.getFormattedTotalCoffeeFirstDripTime()}}

+

{{data | brewFunctionPipe: BREW_FUNCTION_PIPE_ENUM.FORMATTED_TOTAL_COFFEE_FIRST_DRIP_TIME}}

@@ -308,21 +308,21 @@

{{data?.getFormattedTotalCoffeeFirstDripTime()}}

+ choosenPreparation.brew_order.after.brew_quantity, + choosenPreparation.use_custom_parameters])">

{{"BREW_DATA_BREW_QUANTITY" | translate}}:

{{data.brew_quantity}} ({{data.getBrewQuantityTypeName()}})

+ choosenPreparation.manage_parameters.coffee_type, + choosenPreparation.use_custom_parameters])" [style.order]="(settings | brewFieldOrderPipe: [settings.brew_order.after.coffee_type, + choosenPreparation.brew_order.after.coffee_type, + choosenPreparation.use_custom_parameters])">

{{"BREW_DATA_COFFEE_TYPE" | translate}}

@@ -330,20 +330,20 @@

{{data.coffee_type}}

+ choosenPreparation.manage_parameters.coffee_concentration, + choosenPreparation.use_custom_parameters])" [style.order]="(settings | brewFieldOrderPipe: [settings.brew_order.after.coffee_concentration, + choosenPreparation.brew_order.after.coffee_concentration, + choosenPreparation.use_custom_parameters])">

{{"BREW_DATA_COFFEE_CONCENTRATION" | translate}}:

{{data.coffee_concentration}}

+ choosenPreparation.manage_parameters.rating, + choosenPreparation.use_custom_parameters])" [style.order]="(settings | brewFieldOrderPipe: [settings.brew_order.after.rating, + choosenPreparation.brew_order.after.rating, + choosenPreparation.use_custom_parameters])">

{{"BREW_DATA_RATING" | translate }}:

{{data.rating | number : '.0-2'}}

@@ -351,10 +351,10 @@

{{data.rating | number : '.0-2'}}

+ choosenPreparation.manage_parameters.brew_beverage_quantity, + choosenPreparation.use_custom_parameters])" [style.order]="(settings | brewFieldOrderPipe: [settings.brew_order.after.brew_beverage_quantity, + choosenPreparation.brew_order.after.brew_beverage_quantity, + choosenPreparation.use_custom_parameters])">

{{"BREW_DATA_BREW_BEVERAGE_QUANTITY" | translate }}:

{{data.brew_beverage_quantity}} ({{data.getBrewBeverageQuantityTypeName()}})

@@ -362,10 +362,10 @@

{{data.brew_beverage_quantity}} ({{data.getBrewBeverageQuantityTypeName + choosenPreparation.manage_parameters.tds, + choosenPreparation.use_custom_parameters])" [style.order]="(settings | brewFieldOrderPipe: [settings.brew_order.after.tds, + choosenPreparation.brew_order.after.tds, + choosenPreparation.use_custom_parameters])">

{{"BREW_DATA_TDS" | translate }}:

{{data.tds}}

@@ -374,13 +374,13 @@

{{data.tds}}

+ choosenPreparation.manage_parameters.grind_weight && choosenPreparation.manage_parameters.brew_beverage_quantity && choosenPreparation.manage_parameters.tds, + choosenPreparation.use_custom_parameters])" [style.order]="(settings | brewFieldOrderPipe: [settings.brew_order.after.tds, + choosenPreparation.brew_order.after.tds, + choosenPreparation.use_custom_parameters])" lines="inset">

{{"BREW_DATA_CALCULATED_EXTRACTION_YIELD" | translate }}:

-

{{data.getExtractionYield()}}

+

{{data | brewFunctionPipe: BREW_FUNCTION_PIPE_ENUM.GET_EXTRACTION_YIELD}}

{{data.getExtractionYield()}}

+ choosenPreparation.manage_parameters.note, + choosenPreparation.use_custom_parameters])" [style.order]="(settings | brewFieldOrderPipe: [settings.brew_order.after.note, + choosenPreparation.brew_order.after.note, + choosenPreparation.use_custom_parameters])">

{{"BREW_DATA_NOTES" | translate }}:

{{data.note}}
@@ -405,10 +405,10 @@

{{"BREW_DATA_NOTES" | translate }}:

+ choosenPreparation.manage_parameters.attachments, + choosenPreparation.use_custom_parameters]) && data?.attachments?.length>0" [style.order]="(settings | brewFieldOrderPipe: [settings.brew_order.after.attachments, + choosenPreparation.brew_order.after.attachments, + choosenPreparation.use_custom_parameters])">
diff --git a/src/app/brew/brew-detail/brew-detail.component.ts b/src/app/brew/brew-detail/brew-detail.component.ts index db41c36e..6d85e3c2 100644 --- a/src/app/brew/brew-detail/brew-detail.component.ts +++ b/src/app/brew/brew-detail/brew-detail.component.ts @@ -28,6 +28,9 @@ import { BrewPopoverExtractionComponent } from '../brew-popover-extraction/brew- import { BrewBrewingGraphComponent } from '../../../components/brews/brew-brewing-graph/brew-brewing-graph.component'; import { sleep } from '../../../classes/devices'; import { ShareService } from '../../../services/shareService/share-service.service'; +import { BREW_FUNCTION_PIPE_ENUM } from '../../../enums/brews/brewFunctionPipe'; +import { Bean } from '../../../classes/bean/bean'; +import { Mill } from '../../../classes/mill/mill'; declare var Plotly; @Component({ @@ -51,6 +54,10 @@ export class BrewDetailComponent { @ViewChild('brewBrewingGraphEl', { static: false }) public brewBrewingGraphEl: BrewBrewingGraphComponent; + public bean: Bean; + /**We named it that way, because the graph-componeneted access it aswell **/ + public choosenPreparation: Preparation; + public mill: Mill; constructor( private readonly modalController: ModalController, public uiHelper: UIHelper, @@ -80,6 +87,10 @@ export class BrewDetailComponent { if (this.brew) { const copy: IBrew = this.uiHelper.copyData(this.brew); this.data.initializeByObject(copy); + + this.bean = this.data.getBean(); + this.choosenPreparation = this.data.getPreparation(); + this.mill = this.data.getMill(); } if (this.showCupping()) { // Set timeout else element wont be visible @@ -118,7 +129,7 @@ export class BrewDetailComponent { } public getPreparation(): Preparation { - return this.data.getPreparation(); + return this.choosenPreparation; } public showSectionAfterBrew(): boolean { return this.uiBrewHelper.showSectionAfterBrew(this.getPreparation()); @@ -172,6 +183,9 @@ export class BrewDetailComponent { this.editActive = false; if (returningBrew) { this.data = returningBrew; + this.bean = this.data.getBean(); + this.choosenPreparation = this.data.getPreparation(); + this.mill = this.data.getMill(); this.initializeFlowChartOnGraphEl(); } } @@ -188,7 +202,7 @@ export class BrewDetailComponent { .format(formattingStr); return formatted; } - private showCupping(): boolean { + public showCupping(): boolean { return this.uiBrewHelper.showCupping(this.data); } @@ -365,4 +379,6 @@ export class BrewDetailComponent { await popover.present(); await popover.onWillDismiss(); } + + protected readonly BREW_FUNCTION_PIPE_ENUM = BREW_FUNCTION_PIPE_ENUM; } diff --git a/src/app/brew/brew-flow/brew-flow.component.html b/src/app/brew/brew-flow/brew-flow.component.html index 8718c351..cdc4b5fa 100644 --- a/src/app/brew/brew-flow/brew-flow.component.html +++ b/src/app/brew/brew-flow/brew-flow.component.html @@ -12,7 +12,7 @@ {{'BREW_FLOW_WEIGHT_REALTIME' | translate}} - {{'BREW_PRESSURE_FLOW' | translate}} + size="{{graphIconColSize}}" style="padding-right:5px;">
? g
?g
- ({{brewComponent.brewBrewingGraphEl.data.getBrewRatio()}}) + ({{brewComponent.brewBrewingGraphEl.data | brewFunctionPipe: BREW_FUNCTION_PIPE_ENUM.GET_BREW_RATIO}}) +
@@ -75,7 +76,7 @@
+ size="{{graphIconColSize}}" style="padding-right:5px;">
? g/s
@@ -87,8 +88,8 @@
- +
? bar
@@ -99,7 +100,7 @@
+ size="{{graphIconColSize}}" style="padding-right:5px;">
? °C
@@ -110,7 +111,7 @@
+ size="{{graphIconColSize}}" style="padding-right:5px;"> diff --git a/src/app/brew/brew-flow/brew-flow.component.ts b/src/app/brew/brew-flow/brew-flow.component.ts index b6b1fb0d..04e8d2d1 100644 --- a/src/app/brew/brew-flow/brew-flow.component.ts +++ b/src/app/brew/brew-flow/brew-flow.component.ts @@ -25,6 +25,7 @@ import { UIAlert } from '../../../services/uiAlert'; import { PreparationDeviceType } from '../../../classes/preparationDevice'; import { UIHelper } from 'src/services/uiHelper'; +import { BREW_FUNCTION_PIPE_ENUM } from '../../../enums/brews/brewFunctionPipe'; declare var Plotly; @@ -90,6 +91,8 @@ export class BrewFlowComponent implements OnDestroy, OnInit { protected readonly PREPARATION_STYLE_TYPE = PREPARATION_STYLE_TYPE; protected heightInformationBlock: number = 50; + public graphIconColSize: number = 2.4; + public bluetoothSubscription: Subscription = undefined; constructor( private readonly modalController: ModalController, public readonly uiHelper: UIHelper, @@ -235,6 +238,13 @@ export class BrewFlowComponent implements OnDestroy, OnInit { ) && this.brew.getPreparation().style_type === PREPARATION_STYLE_TYPE.ESPRESSO; + + this.graphIconColSize = this.getGraphIonColSize(); + this.bluetoothSubscription = this.bleManager + .attachOnEvent() + .subscribe((_type) => { + this.graphIconColSize = this.getGraphIonColSize(); + }); } setTimeout(() => { if (!this.isDetail) { @@ -444,6 +454,10 @@ export class BrewFlowComponent implements OnDestroy, OnInit { } public async ngOnDestroy() { + if (this.bluetoothSubscription) { + this.bluetoothSubscription.unsubscribe(); + this.bluetoothSubscription = undefined; + } if (this.brewFlowGraphSubscription) { this.brewFlowGraphSubscription.unsubscribe(); this.brewFlowGraphSubscription = undefined; @@ -492,4 +506,6 @@ export class BrewFlowComponent implements OnDestroy, OnInit { BrewFlowComponent.COMPONENT_ID ); } + + protected readonly BREW_FUNCTION_PIPE_ENUM = BREW_FUNCTION_PIPE_ENUM; } diff --git a/src/components/brew-information/brew-information.component.html b/src/components/brew-information/brew-information.component.html index a4d3fd08..16ad8c6d 100644 --- a/src/components/brew-information/brew-information.component.html +++ b/src/components/brew-information/brew-information.component.html @@ -219,7 +219,7 @@ {{ "BREW_DATA_PREPARATION_METHOD_TOOL" | translate }}
{{ brew?.getPreparationToolName(uuid) }} + *ngFor='let uuid of brew?.method_of_preparation_tools;let i=index;'>{{brew | brewFunctionPipe: [BREW_FUNCTION_PIPE_ENUM.GET_PREPARATION_TOOL_NAME,uuid] }}
diff --git a/src/components/brews/brew-brewing-graph/brew-brewing-graph.component.html b/src/components/brews/brew-brewing-graph/brew-brewing-graph.component.html index 86e8e0d7..203bbdc4 100644 --- a/src/components/brews/brew-brewing-graph/brew-brewing-graph.component.html +++ b/src/components/brews/brew-brewing-graph/brew-brewing-graph.component.html @@ -1,7 +1,7 @@ + brewComponent.choosenPreparation.brew_order.while.brew_time, + brewComponent.choosenPreparation.use_custom_parameters])" class="ion-padding-bottom-half" lines="none">
{{'BREW_FLOW_WEIGHT_REALTIME' | translate}} - {{'BREW_PRESSURE_FLOW' | translate}} @@ -40,20 +40,20 @@ -
? g
?g
-
({{data.getBrewRatio()}})
+
({{data | brewFunctionPipe: BREW_FUNCTION_PIPE_ENUM.GET_BREW_RATIO}})
- @@ -66,8 +66,8 @@ - +
? bar
@@ -78,7 +78,7 @@
+ size="{{graphIconColSize}}">
? °C
diff --git a/src/components/brews/brew-brewing-graph/brew-brewing-graph.component.ts b/src/components/brews/brew-brewing-graph/brew-brewing-graph.component.ts index 1eef60de..bde89cfd 100644 --- a/src/components/brews/brew-brewing-graph/brew-brewing-graph.component.ts +++ b/src/components/brews/brew-brewing-graph/brew-brewing-graph.component.ts @@ -65,6 +65,7 @@ import { TextToSpeechService } from '../../../services/textToSpeech/text-to-spee import { SanremoYOUDevice } from '../../../classes/preparationDevice/sanremo/sanremoYOUDevice'; import { SanremoYOUMode } from '../../../enums/preparationDevice/sanremo/sanremoYOUMode'; import { GraphHelperService } from '../../../services/graphHelper/graph-helper.service'; +import { BREW_FUNCTION_PIPE_ENUM } from '../../../enums/brews/brewFunctionPipe'; declare var Plotly; @@ -162,6 +163,8 @@ export class BrewBrewingGraphComponent implements OnInit { public textToSpeechWeightInterval: any = undefined; public textToSpeechTimerInterval: any = undefined; + public graphIconColSize: number = 2; + constructor( private readonly platform: Platform, private readonly bleManager: CoffeeBluetoothDevicesService, @@ -287,6 +290,7 @@ export class BrewBrewingGraphComponent implements OnInit { } // If scale disconnected, sometimes the timer run but the screen was not refreshed, so maybe it helpes to detect the change. setTimeout(() => { + this.graphIconColSize = this.getGraphIonColSize(); this.checkChanges(); }, 200); this.brewComponent?.brewBrewingPreparationDeviceEl?.checkChanges(); @@ -532,6 +536,7 @@ export class BrewBrewingGraphComponent implements OnInit { timeout = 1000; } setTimeout(() => { + this.graphIconColSize = this.getGraphIonColSize(); try { Plotly.purge(this.profileDiv.nativeElement); } catch (ex) {} @@ -3863,4 +3868,6 @@ export class BrewBrewingGraphComponent implements OnInit { } return false; } + + protected readonly BREW_FUNCTION_PIPE_ENUM = BREW_FUNCTION_PIPE_ENUM; } diff --git a/src/components/brews/brew-brewing/brew-brewing.component.html b/src/components/brews/brew-brewing/brew-brewing.component.html index 107e3469..5d78e597 100644 --- a/src/components/brews/brew-brewing/brew-brewing.component.html +++ b/src/components/brews/brew-brewing/brew-brewing.component.html @@ -298,7 +298,7 @@

{{"BREW_DATA_BREW_QUANTITY" | translate}}

-

({{data.getBrewRatio()}} , {{data.getGramsPerLiter()}})

+

({{data | brewFunctionPipe: BREW_FUNCTION_PIPE_ENUM.GET_BREW_RATIO}} , {{data | brewFunctionPipe: BREW_FUNCTION_PIPE_ENUM.GET_GRAMS_PER_LITER}})

{{"BREW_DATA_BREW_QUANTITY" | translate}}

{{"BREW_DATA_BREW_BEVERAGE_QUANTITY" | translate}}

- ({{data.getBrewRatio()}} , {{data.getGramsPerLiter()}})

+ ({{data | brewFunctionPipe: BREW_FUNCTION_PIPE_ENUM.GET_BREW_RATIO}} , {{data | brewFunctionPipe: BREW_FUNCTION_PIPE_ENUM.GET_GRAMS_PER_LITER}})

{{"BREW_DATA_BREW_BEVERAGE_QUANTITY" | translate}} choosenPreparation.brew_order.after.tds, choosenPreparation.use_custom_parameters])" lines="inset"> - {{'BREW_DATA_CALCULATED_EXTRACTION_YIELD' | translate}}: {{data.getExtractionYield()}} + {{'BREW_DATA_CALCULATED_EXTRACTION_YIELD' | translate}}: {{data | brewFunctionPipe: BREW_FUNCTION_PIPE_ENUM.GET_EXTRACTION_YIELD}} + ): any { try { - switch (arg) { + let action; + if (typeof arg !== 'object') { + action = arg; + } else { + action = arg[0]; + } + switch (action) { case BREW_FUNCTION_PIPE_ENUM.GET_EXTRACTION_YIELD: return value.getExtractionYield(); case BREW_FUNCTION_PIPE_ENUM.GET_BREW_RATIO: @@ -22,6 +31,16 @@ export class BrewFunction implements PipeTransform { return value.getCalculatedBeanAge(); case BREW_FUNCTION_PIPE_ENUM.IS_ARCHIVED: return value.isArchived(); + case BREW_FUNCTION_PIPE_ENUM.GET_GRAMS_PER_LITER: + return value.getGramsPerLiter(); + case BREW_FUNCTION_PIPE_ENUM.FORMATTED_TOTAL_MILL_TIME: + return value.getFormattedTotalMillTimerTime(); + case BREW_FUNCTION_PIPE_ENUM.FORMATTED_BREW_TIME: + return value.getFormattedBrewTime(); + case BREW_FUNCTION_PIPE_ENUM.FORMATTED_COFFEE_BREW_TIME: + return value.getFormattedCoffeeBrewTime(); + case BREW_FUNCTION_PIPE_ENUM.GET_PREPARATION_TOOL_NAME: + return value.getPreparationToolName(arg[1]); } } catch (ex) {} }