suggest actions

This commit is contained in:
CHIEFSOFT\ameye
2023-09-21 20:23:27 -04:00
parent 6906152612
commit 1fe1d5892c
3 changed files with 86 additions and 4 deletions
@@ -52,12 +52,12 @@
<ion-grid>
<ion-row>
<ion-col class="mtop">
<ion-button expand="block">Send Reminder</ion-button>
<ion-button expand="block" (click)="sendReminder()">Send Reminder</ion-button>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="mtop">
<ion-button color="danger" expand="block">Cancel Request</ion-button>
<ion-button color="danger" expand="block" (click)="cancelSuggest()">Cancel Request</ion-button>
</ion-col>
</ion-row>
</ion-grid>
@@ -1,6 +1,8 @@
import { Component, OnInit } from '@angular/core';
import {NavController} from "@ionic/angular";
import {AlertController, NavController} from "@ionic/angular";
import {Router} from "@angular/router";
import {SessionDataProviderService} from "../../store/session-data-provider.service";
import {WrenchService} from "../../services/wrench.service";
@Component({
selector: 'app-suggestdetails',
@@ -15,7 +17,10 @@ suggestData:any;
suggestActionData:any;
constructor(
private navctr: NavController,
private router: Router
private router: Router,
public sessionDataProviderService: SessionDataProviderService,
private alertController:AlertController,
private wrenchService: WrenchService
) {
this.suggestData = this.router.getCurrentNavigation().extras.state;
console.log("XXXXX 1", this.router.getCurrentNavigation().extras);
@@ -37,4 +42,78 @@ suggestActionData:any;
this.router.navigate(['enroll']);
}
usrData: {
action:number, member_id: number, uid: string, sessionid: string, limit:20, page:1,offset: 0
};
async sendReminder(){
const alert = await this.alertController.create({
header: "Remind",
message: "Confirm you are ready to send reminder ?",
buttons: [
{
text: "Cancel",
role: "cancel",
handler: () => {
// this.getMyOffersData();
},
},
{
text: "Send",
handler: () => {
this.onBack();
},
},
],
});
await alert.present();
}
async cancelSuggest(){
const alert = await this.alertController.create({
header: "Cancel",
message: "Confirm you are ready to cancel item.",
buttons: [
{
text: "Cancel",
role: "cancel",
handler: () => {
// this.getMyOffersData();
},
},
{
text: "Delete",
handler: () => {
this.onBack();
},
},
],
});
await alert.present();
}
statusResult:any;
setSuggestStatus(){
this.usrData =
{
action:11055,
member_id: this.sessionDataProviderService.member_id,
uid: this.sessionDataProviderService.member_uid,
sessionid: this.sessionDataProviderService.session ,
limit:20, page:1,offset: 0
};
this.wrenchService.setSuggestStatus(this.usrData).subscribe(
statusResult => {
this.statusResult = statusResult;
console.log("statusResult RETURN->", this.statusResult);
//this.total_family = this.familyData.length;
}
);
}
}
+3
View File
@@ -112,6 +112,9 @@ export class WrenchService {
return this.getPostData('paylistcard',usrData);
}
setSuggestStatus(usrData){
return this.getPostData('suggeststatus',usrData);
}
//recipients
getHomeBanners(usrData){
return this.getPostData('homebanners',usrData);