send suggested

This commit is contained in:
CHIEFSOFT\ameye
2023-12-18 07:45:21 -05:00
parent 9383b0ad0a
commit 5bcaf984c2
2 changed files with 31 additions and 18 deletions
@@ -60,15 +60,6 @@
<div *ngIf="tabs =='about'" class="about">
<ion-grid>
<ion-row>
<ion-col class="mtop">
<ion-button
expand="block"
shape="round"
size="small"
(click)="sendReminder()">Send Reminder</ion-button>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="mtop">
<ion-button color="danger"
@@ -76,6 +67,18 @@
shape="round"
size="small" (click)="cancelSuggest()">Cancel Request</ion-button>
</ion-col>
<ion-col class="mtop">
<ion-button
expand="block"
shape="round"
size="small"
[disabled]="sendDisabled"
(click)="sendReminder()">Send Reminder</ion-button>
</ion-col>
</ion-row>
<ion-row>
</ion-row>
</ion-grid>
</div>
@@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
import {AlertController, NavController} from "@ionic/angular";
import {AlertController, LoadingController, NavController} from "@ionic/angular";
import {Router} from "@angular/router";
import {SessionDataProviderService} from "../../store/session-data-provider.service";
import {WrenchService} from "../../services/wrench.service";
@@ -12,16 +12,17 @@ import {WrenchService} from "../../services/wrench.service";
export class SuggestdetailsPage implements OnInit {
tabs = 'about';
suggestTotalData:any;
tabs = 'about';
suggestTotalData:any;
suggestData:any;
suggestActionData:any;
suggestActionData:any;
constructor(
private navctr: NavController,
private router: Router,
public sessionDataProviderService: SessionDataProviderService,
private alertController:AlertController,
private wrenchService: WrenchService
private wrenchService: WrenchService,
private loadingCtrl: LoadingController,
) {
// debugger;
this.suggestTotalData = this.router.getCurrentNavigation().extras.state;
@@ -66,7 +67,7 @@ suggestActionData:any;
text: "Send",
handler: () => {
this.setSuggestStatus(222); // remind
this.onBack();
// this.onBack();
},
},
],
@@ -99,13 +100,18 @@ suggestActionData:any;
await alert.present();
}
statusResult:any;
sendDisabled:boolean= false;
//define('WRENCHBOARD_FAMILY_SGGESTSTATUS', 22026);
suggestEditData: {
action:number, member_id: number, uid: string, sessionid: string, suggest_uid:20, suggest_action: string,offset: 0
};
setSuggestStatus(suggest_action){
async setSuggestStatus(suggest_action){
const loading = await this.loadingCtrl.create({
message: 'Sending...',
duration: 3500,
});
this.suggestEditData =
{
action:22026,
@@ -116,10 +122,14 @@ suggestActionData:any;
suggest_action:suggest_action,offset: 0
};
loading.present();
this.wrenchService.setSuggestStatus(this.suggestEditData).subscribe(
statusResult => {
this.statusResult = statusResult;
console.log("statusResult RETURN->", this.statusResult);
loading.dismiss();
this.statusResult = statusResult;
console.log("statusResult RETURN->", this.statusResult);
this.sendDisabled= true;
//this.total_family = this.familyData.length;
}