removed wifi issue checks

ZohaibIqbalKambrani
umasoodch 5 years ago
parent 97846ad8b4
commit 0379ee4e89

@ -208,19 +208,6 @@ export class AttendanceOptionsComponent implements OnInit {
}
}
async verifyWIFIConfiguration() {
try {
let ssid_ = await this.wifiWizard2.getConnectedSSID();
if(ssid_ == this.ssid){
this.common.presentAlert(this.ts.trPK("general", "forget-wifi-connection-text"));
} else {
this.startWIFIProcedure();
}
} catch (err) {
this.common.presentAlert(this.ts.trPK("general", "forget-wifi-connection-text"));
}
}
// Wifi Attendance
public async startWifi() {
const isAndroid = this.platform.is("android");
@ -231,8 +218,6 @@ export class AttendanceOptionsComponent implements OnInit {
if(!isWifiEnabled){
this.showWifiNotEnabled();
return;
} else {
this.verifyWIFIConfiguration();
}
} else if(isAndroid) {
let locationPermission = await this.devicePermissionsService.requestLocationAutherization();
@ -240,15 +225,16 @@ export class AttendanceOptionsComponent implements OnInit {
return;
}
if (!isWifiEnabled) {
this.showWifiNotEnabled();
} else {
this.startWIFIProcedure();
}
if(!isWifiEnabled){
this.wifiWizard2.setWifiEnabled(true).then(()=>{
this.startWifi();
}).catch((err) => {
console.debug(err);
});
return;
}
}
async startWIFIProcedure () {
// opening wifi dailog if all above conditions are passed (isWifiEnabled == true)
let modal = await this.modalController.create({
component: WifiModalComponent,
showBackdrop: true,
@ -257,6 +243,8 @@ export class AttendanceOptionsComponent implements OnInit {
modal.cssClass = "wifi-modal";
await modal.present();
}
}
showWifiNotEnabled(){

Loading…
Cancel
Save