@@ -11,7 +11,7 @@ import { Geolocation } from '@capacitor/geolocation';
11
11
import { UIBeanStorage } from '../../../services/uiBeanStorage' ;
12
12
import { UIBrewStorage } from '../../../services/uiBrewStorage' ;
13
13
import { UISettingsStorage } from '../../../services/uiSettingsStorage' ;
14
- import { ModalController , NavParams , Platform } from '@ionic/angular' ;
14
+ import { ModalController , Platform } from '@ionic/angular' ;
15
15
import { UIMillStorage } from '../../../services/uiMillStorage' ;
16
16
import { UIPreparationStorage } from '../../../services/uiPreparationStorage' ;
17
17
import { Brew } from '../../../classes/brew/brew' ;
@@ -58,13 +58,14 @@ declare var Plotly;
58
58
} )
59
59
export class BrewAddComponent implements OnInit , OnDestroy {
60
60
public static readonly COMPONENT_ID : string = 'brew-add' ;
61
- public brew_template : Brew ;
61
+ @ Input ( 'brew_template' ) public brew_template : Brew ;
62
62
public data : Brew = new Brew ( ) ;
63
63
public settings : Settings ;
64
64
65
65
@Input ( ) public brew_flow_preset : BrewFlow ;
66
66
@Input ( ) public bean_preset : Bean ;
67
67
68
+ @Input ( 'loadSpecificLastPreparation' )
68
69
public loadSpecificLastPreparation : Preparation ;
69
70
70
71
@ViewChild ( 'brewBrewing' , { read : BrewBrewingComponent , static : false } )
@@ -77,9 +78,10 @@ export class BrewAddComponent implements OnInit, OnDestroy {
77
78
private disableHardwareBack ;
78
79
public bluetoothSubscription : Subscription = undefined ;
79
80
public readonly PreparationDeviceType = PreparationDeviceType ;
81
+
80
82
constructor (
81
83
private readonly modalController : ModalController ,
82
- private readonly navParams : NavParams ,
84
+
83
85
private readonly uiBeanStorage : UIBeanStorage ,
84
86
private readonly uiPreparationStorage : UIPreparationStorage ,
85
87
private readonly uiBrewStorage : UIBrewStorage ,
@@ -100,12 +102,7 @@ export class BrewAddComponent implements OnInit, OnDestroy {
100
102
private readonly uiHelper : UIHelper
101
103
) {
102
104
// Initialize to standard in drop down
103
-
104
105
this . settings = this . uiSettingsStorage . getSettings ( ) ;
105
- this . brew_template = this . navParams . get ( 'brew_template' ) ;
106
- this . loadSpecificLastPreparation = this . navParams . get (
107
- 'loadSpecificLastPreparation'
108
- ) ;
109
106
110
107
// Get first entry
111
108
this . data . bean = this . uiBeanStorage
0 commit comments