suggest
This commit is contained in:
@@ -77,21 +77,20 @@
|
||||
<ion-content class="ion-padding">
|
||||
|
||||
<ion-card>
|
||||
<img class="back_image_sug" alt="{{modalSeleted.title}}" src="https://www.wrenchboard.com/assets/images/apps/family/{{modalSeleted.banner}}" />
|
||||
<div class="sug_img">
|
||||
<img class="back_image_sug" alt="{{modalSeleted.title}}" src="https://www.wrenchboard.com/assets/images/apps/family/{{modalSeleted.banner}}" />
|
||||
</div>
|
||||
<ion-card-header>
|
||||
<!-- <ion-card-title>{{modalSeleted.title}}</ion-card-title>-->
|
||||
<ion-card-subtitle>{{modalSeleted.title}}</ion-card-subtitle>
|
||||
|
||||
|
||||
</ion-card-header>
|
||||
|
||||
<ion-card-content>
|
||||
<ion-item style="padding: 0px;">
|
||||
<ion-textarea
|
||||
placeholder="Type something here"
|
||||
[autoGrow]="true"
|
||||
[ngModel]="description"
|
||||
style="background-color: aliceblue; min-height: 100px; border-radius: 10px;"
|
||||
value= "{{modalSeleted.description}}"
|
||||
|
||||
>
|
||||
</ion-textarea>
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user