@@ -11,7 +11,7 @@ import { Geolocation } from '@capacitor/geolocation';
1111import { UIBeanStorage } from '../../../services/uiBeanStorage' ;
1212import { UIBrewStorage } from '../../../services/uiBrewStorage' ;
1313import { UISettingsStorage } from '../../../services/uiSettingsStorage' ;
14- import { ModalController , NavParams , Platform } from '@ionic/angular' ;
14+ import { ModalController , Platform } from '@ionic/angular' ;
1515import { UIMillStorage } from '../../../services/uiMillStorage' ;
1616import { UIPreparationStorage } from '../../../services/uiPreparationStorage' ;
1717import { Brew } from '../../../classes/brew/brew' ;
@@ -58,13 +58,14 @@ declare var Plotly;
5858} )
5959export class BrewAddComponent implements OnInit , OnDestroy {
6060 public static readonly COMPONENT_ID : string = 'brew-add' ;
61- public brew_template : Brew ;
61+ @ Input ( 'brew_template' ) public brew_template : Brew ;
6262 public data : Brew = new Brew ( ) ;
6363 public settings : Settings ;
6464
6565 @Input ( ) public brew_flow_preset : BrewFlow ;
6666 @Input ( ) public bean_preset : Bean ;
6767
68+ @Input ( 'loadSpecificLastPreparation' )
6869 public loadSpecificLastPreparation : Preparation ;
6970
7071 @ViewChild ( 'brewBrewing' , { read : BrewBrewingComponent , static : false } )
@@ -77,9 +78,10 @@ export class BrewAddComponent implements OnInit, OnDestroy {
7778 private disableHardwareBack ;
7879 public bluetoothSubscription : Subscription = undefined ;
7980 public readonly PreparationDeviceType = PreparationDeviceType ;
81+
8082 constructor (
8183 private readonly modalController : ModalController ,
82- private readonly navParams : NavParams ,
84+
8385 private readonly uiBeanStorage : UIBeanStorage ,
8486 private readonly uiPreparationStorage : UIPreparationStorage ,
8587 private readonly uiBrewStorage : UIBrewStorage ,
@@ -100,12 +102,7 @@ export class BrewAddComponent implements OnInit, OnDestroy {
100102 private readonly uiHelper : UIHelper
101103 ) {
102104 // Initialize to standard in drop down
103-
104105 this . settings = this . uiSettingsStorage . getSettings ( ) ;
105- this . brew_template = this . navParams . get ( 'brew_template' ) ;
106- this . loadSpecificLastPreparation = this . navParams . get (
107- 'loadSpecificLastPreparation'
108- ) ;
109106
110107 // Get first entry
111108 this . data . bean = this . uiBeanStorage
0 commit comments