From 13e2f349c75ff303c429902191deeb50efec4f5b Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Fri, 22 Sep 2023 20:53:08 -0400 Subject: [PATCH] Componets --- .../suggestedlist/suggestedlist.component.ts | 8 +++++-- src/app/pages/profile/profile.page.html | 8 +++---- .../suggestdetails/suggestdetails.page.ts | 22 ++++++++++++------- 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/src/app/components/suggestedlist/suggestedlist.component.ts b/src/app/components/suggestedlist/suggestedlist.component.ts index 0a47146..5189f4f 100644 --- a/src/app/components/suggestedlist/suggestedlist.component.ts +++ b/src/app/components/suggestedlist/suggestedlist.component.ts @@ -18,6 +18,7 @@ export class SuggestedlistComponent implements OnInit { ngOnInit() { this.getFamilySuggestList(); } + usrData: { action:number, member_id: number, uid: string, sessionid: string, @@ -44,8 +45,11 @@ export class SuggestedlistComponent implements OnInit { } ); } - getSuggestedDetails(item){ - this.router.navigate(['suggestdetails'],{state: item}); + var stateParam = { + itemData: item, + getFamilySuggestList: this.getFamilySuggestList() + }; + this.router.navigate(['suggestdetails'],{state: stateParam}); } } diff --git a/src/app/pages/profile/profile.page.html b/src/app/pages/profile/profile.page.html index e56a299..5c6c8d6 100644 --- a/src/app/pages/profile/profile.page.html +++ b/src/app/pages/profile/profile.page.html @@ -15,13 +15,13 @@
-
- -
+ + +
{{firstname}} {{lastname}} - {{email}} +
diff --git a/src/app/pages/suggestdetails/suggestdetails.page.ts b/src/app/pages/suggestdetails/suggestdetails.page.ts index 7dbfc41..cb47414 100644 --- a/src/app/pages/suggestdetails/suggestdetails.page.ts +++ b/src/app/pages/suggestdetails/suggestdetails.page.ts @@ -13,7 +13,8 @@ export class SuggestdetailsPage implements OnInit { tabs = 'about'; -suggestData:any; +suggestTotalData:any; + suggestData:any; suggestActionData:any; constructor( private navctr: NavController, @@ -22,9 +23,13 @@ suggestActionData:any; private alertController:AlertController, private wrenchService: WrenchService ) { - this.suggestData = this.router.getCurrentNavigation().extras.state; - console.log("XXXXX 1", this.router.getCurrentNavigation().extras); - console.log("XXXXX 2", this.router.getCurrentNavigation().extras.state); + // debugger; + this.suggestTotalData = this.router.getCurrentNavigation().extras.state; + this.suggestData = this.suggestTotalData.itemData; + + + // console.log("XXXXX 1", this.router.getCurrentNavigation().extras); + // console.log("XXXXX 2", this.router.getCurrentNavigation().extras.state); } ngOnInit() { @@ -38,8 +43,8 @@ suggestActionData:any; this.router.navigate(['mentor']); } - onEnroll() { - this.router.navigate(['enroll']); + refreshTaskList() { + //this.router.navigate(['enroll']); } @@ -60,7 +65,7 @@ suggestActionData:any; { text: "Send", handler: () => { - this.setSuggestStatus('REMIND_REQUEST'); + this.setSuggestStatus(222); // remind this.onBack(); }, }, @@ -84,7 +89,8 @@ suggestActionData:any; { text: "Delete", handler: () => { - this.setSuggestStatus('CANCEL_REQUEST'); + this.setSuggestStatus(555); // cancel + this.refreshTaskList(); this.onBack(); }, },