From 7db98d513fe27dc0e32a9281bfa3186852941dce Mon Sep 17 00:00:00 2001 From: "pakintada@gmail.com" Date: Thu, 7 Dec 2023 10:47:53 +0700 Subject: [PATCH] add pop up if save existed --- .../features/recipes/recipes.component.html | 43 ++++++++++++++++-- .../app/features/recipes/recipes.component.ts | 11 +++++ server/data/database.db | Bin 12288 -> 20480 bytes 3 files changed, 50 insertions(+), 4 deletions(-) diff --git a/client/src/app/features/recipes/recipes.component.html b/client/src/app/features/recipes/recipes.component.html index e7bd8da..e55ee48 100644 --- a/client/src/app/features/recipes/recipes.component.html +++ b/client/src/app/features/recipes/recipes.component.html @@ -107,11 +107,23 @@ --> - + + + + +
diff --git a/client/src/app/features/recipes/recipes.component.ts b/client/src/app/features/recipes/recipes.component.ts index 6e0733b..e150ef0 100644 --- a/client/src/app/features/recipes/recipes.component.ts +++ b/client/src/app/features/recipes/recipes.component.ts @@ -66,6 +66,8 @@ export class RecipesComponent implements OnInit, OnDestroy { private oldSearchStr = ''; savedTmpfiles: any[] = []; + saveTab: boolean = false; + showSaveNoti: boolean = true; tableCtx?: ElementRef; @@ -150,11 +152,15 @@ export class RecipesComponent implements OnInit, OnDestroy { if(files != undefined && typeof files === 'object'){ // console.log("Obtain saves object: ", files.files[0], typeof files); this.savedTmpfiles = files.files; + // let svf = (document.getElementById('select_savefile_modal') as HTMLInputElement)!.checked; + // console.log("isSavedModalOpened",svf) } }, }) + + this._materialService .getMaterialCodes() .pipe( @@ -340,6 +346,11 @@ export class RecipesComponent implements OnInit, OnDestroy { // TODO: get tmp files to display or } + openLoadSaves(){ + this.showSaveNoti = false; + this.saveTab = true; + } + scrollToTop() { const table = this.tableCtx!.nativeElement; table.scrollTo({ top: 0, behavior: 'smooth' }); diff --git a/server/data/database.db b/server/data/database.db index 4005aa161b82d30fa28e4992ffc33db86063d162..ebe981344b03d0dec7a29bf502be74837b70e1d6 100644 GIT binary patch delta 537 zcmZut!A{#i5M6@{jV0SeQ02g7bErfFhTS!>0yj5U6ct+JMin`kC0;u#Y_CZcsXc}C z#F3sWBz^(qk2v!Y-5{Ze!bl^%dGBfTX0A@J?zEfLsty2nr~0|({%p7(bg((NGp%c& zo43Gvux`v->-+sh!yJv>`NdkjuKmW6o@J~j@|?>k6X^`;?J)2=0qppn4g)yj;hIt5 zG5q0&?azL=Mw-nAJPr?z{ICnZ1l=8_yogD`e2O*51C|Loe zC`(?XaF_`RF+s$2lnZ$fqup)1OSVgT&XtYERMLVD>G@^W6G@UVmeXFJ7pyIcgr{4w tPq(H5bD4r1k*L{1>X!0X^u~%!nU}