loading present
This commit is contained in:
@@ -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 { WrenchService } from 'src/app/services/wrench.service';
|
||||
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
||||
@@ -18,7 +18,8 @@ export class JoboffersPage implements OnInit {
|
||||
private router: Router,
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private alertController:AlertController,
|
||||
private wrenchService: WrenchService
|
||||
private wrenchService: WrenchService,
|
||||
private loadingCtrl: LoadingController
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
@@ -136,8 +137,11 @@ export class JoboffersPage implements OnInit {
|
||||
|
||||
offerRespData:any;
|
||||
// offferResponse(respData)
|
||||
sendOfferResponse(item, respType){
|
||||
|
||||
async sendOfferResponse(item, respType){
|
||||
const loading = await this.loadingCtrl.create({
|
||||
message: 'Processing',
|
||||
duration: 3000,
|
||||
});
|
||||
this.responseData = {
|
||||
action:15010,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
@@ -146,7 +150,8 @@ export class JoboffersPage implements OnInit {
|
||||
offer_result:respType,
|
||||
contract:item.contract,
|
||||
offer_code: item.contract
|
||||
}
|
||||
};
|
||||
loading.present();
|
||||
this.wrenchService.offferResponse(this.responseData).subscribe(
|
||||
offerRespData => {
|
||||
this.offerRespData = offerRespData;
|
||||
|
||||
Reference in New Issue
Block a user