fix default broke material and topping route

This commit is contained in:
pakintada@gmail.com 2024-02-08 14:39:21 +07:00
parent fb046dadf8
commit d9a7961806
2 changed files with 17 additions and 2 deletions

View file

@ -185,10 +185,17 @@ export class RecipesComponent implements OnInit, OnDestroy, AfterViewInit {
// FIXME: Lag assigned
this.recipesDashboard$.subscribe((data) => {
this.recipesDashboard$.subscribe(async (data) => {
this.currentVersion = data.configNumber;
console.log('current version', this.currentVersion);
console.log("data : ", data);
// set default country and filename if was "default"
let currentFile = this._recipeService.getCurrentFile();
if(currentFile == "default"){
await AsyncStorage.setItem('currentRecipeCountry', await this._recipeService.getCurrentCountry(this.department!));
await AsyncStorage.setItem('currentRecipeFile', data.filename);
}
});
console.log('ngAfterViewInit::department', this.department);