Files
WrenchBoardIonic2023/src/app/components/interest-card/interest-card.component.ts
T
CHIEFSOFT\ameye 5db307b75f procc jobs
2023-11-18 17:29:00 -05:00

62 lines
1.9 KiB
TypeScript

import {Component, Input, OnInit} from '@angular/core';
import {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-interest-card',
templateUrl: './interest-card.component.html',
styleUrls: ['./interest-card.component.scss'],
})
export class InterestCardComponent implements OnInit {
@Input() intData:any;
@Input() intResponse: any;
@Input() thisObj:any;
currData:any;
constructor( private navctr: NavController,
private router: Router,
public sessionDataProviderService: SessionDataProviderService,
private wrenchService: WrenchService) {
}
ngOnInit() {
var tt = this.intData;
this.currData = this.intData;
// debugger;
}
async approveStart(intDataR){
var reqData = {
member_id: this.thisObj.sessionDataProviderService.member_id,
uid: this.thisObj.sessionDataProviderService.member_uid,
sessionid: this.thisObj.sessionDataProviderService.session ,
proc : 'ACCEPT',
client_uid: intDataR.client_uid,
offer_code: intDataR.offer_code,
offer_uid: intDataR.offer_code
};
// debugger;
this.intResponse( this.thisObj, reqData, "APPROVED");
}
async rejectStart(intDataR){
var reqData = {
member_id: this.thisObj.sessionDataProviderService.member_id,
uid: this.thisObj.sessionDataProviderService.member_uid,
sessionid: this.thisObj.sessionDataProviderService.session ,
proc : 'REJECT',
client_uid: intDataR.client_uid,
offer_code: intDataR.offer_code,
offer_uid: intDataR.offer_code
};
this.intResponse(this.thisObj ,reqData,"REJECT"); // "REJECT"
}
}