diff --git a/src/app/pages/suggest/suggest.page.html b/src/app/pages/suggest/suggest.page.html index 6d0e887..f6200bd 100644 --- a/src/app/pages/suggest/suggest.page.html +++ b/src/app/pages/suggest/suggest.page.html @@ -77,21 +77,20 @@ - {{modalSeleted.title}} +
+ {{modalSeleted.title}} +
- {{modalSeleted.title}} - - - diff --git a/src/app/pages/suggest/suggest.page.scss b/src/app/pages/suggest/suggest.page.scss index 6070d61..f306548 100644 --- a/src/app/pages/suggest/suggest.page.scss +++ b/src/app/pages/suggest/suggest.page.scss @@ -10,20 +10,21 @@ ion-content { } } - .back_image_sug { - width: auto; - height: 130px; - margin: auto; - padding: 10px; - text-align: center; + .sug_img{ + margin: 5px auto 5px auto; - .back { - font-size: 25px; - color: white; + .back_image_sug { + width: auto; + height: 130px; + margin: auto; + padding: 10px; + text-align: center; } + } + .flex { display: flex; justify-content: space-between; diff --git a/src/app/pages/suggest/suggest.page.ts b/src/app/pages/suggest/suggest.page.ts index 881e1eb..84c588b 100644 --- a/src/app/pages/suggest/suggest.page.ts +++ b/src/app/pages/suggest/suggest.page.ts @@ -14,7 +14,7 @@ export class SuggestPage implements OnInit { @ViewChild(IonModal) modal: IonModal; tabs = 'about'; - +@ViewChild('description') description; constructor( private navctr: NavController, private router: Router, @@ -70,9 +70,30 @@ export class SuggestPage implements OnInit { modalSeleted:any; suggestDetails(item){ this.modalSeleted = item; + this.description = this.modalSeleted.description; this.modal.present(); } + /* + 'member_id' => string '187' (length=3) + 'sessionid' => string '3D44DDF8C0D8DA7A4347554E37C0602CDB75E14B6909343DB6112459F2B597D0' (length=64) + 'uid' => string 'b4f14eb5-b663-4f88-a7e3-2e2131a7543a' (length=36) + 'title' => string 'Clean the house' (length=15) + 'description' => string 'This is the job description 1057 job description' (length=48) + 'banner' => string 'default.jpg' (length=11) + 'action' => int 22028 + */ + reqData: { + action:number, + member_id: number, + uid: string, + sessionid: string, + title: string, + description: string, + banner: string + }; + + suggestResult:any; async sendSuggestedTask(){ const loading = await this.loadingCtrl.create({ @@ -83,7 +104,29 @@ modalSeleted:any; loading.present(); - this.cancel(); + this.reqData = { + action:22028, + member_id: this.sessionDataProviderService.member_id, + uid: this.sessionDataProviderService.member_uid, + sessionid: this.sessionDataProviderService.session, + title: this.modalSeleted.title, + description: this.description, + banner: this.modalSeleted.banner + }; + + + this.wrenchService.familySuggestTasks(this.reqData).subscribe( + suggestResult => { + loading.dismiss(); + this.suggestResult = suggestResult; + console.log("suggestResult RETURN->", this.suggestResult); + setTimeout(()=>{ + this.cancel(); + }, 3000); + } + ); + + } diff --git a/src/app/services/wrench.service.ts b/src/app/services/wrench.service.ts index e92443b..fef50e8 100644 --- a/src/app/services/wrench.service.ts +++ b/src/app/services/wrench.service.ts @@ -196,7 +196,11 @@ export class WrenchService { pendingJobCancel(reqData){ return this.getPostData("pendingjobcancel", reqData); } +// + familySuggestTasks(reqData){ + return this.getPostData("familysuggesttasks", reqData); + } jobGroupData(reqData){ return this.getPostData("jobgrouplist", reqData); }