|
|
|
|
@ -37,6 +37,7 @@ export class AttendanceOptionsComponent implements OnInit {
|
|
|
|
|
public enableLocationQR = false;
|
|
|
|
|
public enableLocationNFC = false;
|
|
|
|
|
public enableLocationWIFI = false;
|
|
|
|
|
public enableFirestore = false;
|
|
|
|
|
public deviceNFC = false;
|
|
|
|
|
public nfcIOSSuccess = false;
|
|
|
|
|
public lat = 0;
|
|
|
|
|
@ -75,7 +76,6 @@ export class AttendanceOptionsComponent implements OnInit {
|
|
|
|
|
this.priviligeList = AuthenticationService.servicePrivilage;
|
|
|
|
|
this.setServicesPrivilage();
|
|
|
|
|
this.checkNFCStatus("one");
|
|
|
|
|
this.checkFirebaseDocument();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public checkFirebaseDocument() {
|
|
|
|
|
@ -149,6 +149,18 @@ export class AttendanceOptionsComponent implements OnInit {
|
|
|
|
|
) {
|
|
|
|
|
this.enableLocationWIFI = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (
|
|
|
|
|
servicePrivilage.Previlege &&
|
|
|
|
|
servicePrivilage.ServiceName === "enableFirestore"
|
|
|
|
|
) {
|
|
|
|
|
this.enableFirestore = true;
|
|
|
|
|
this.common.sharedService.setSharedData(true, 'enableFirestore');
|
|
|
|
|
this.checkFirebaseDocument();
|
|
|
|
|
} else {
|
|
|
|
|
this.enableFirestore = false;
|
|
|
|
|
this.common.stopLoading();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -192,7 +204,9 @@ export class AttendanceOptionsComponent implements OnInit {
|
|
|
|
|
console.log("Error inside in swipe attendance");
|
|
|
|
|
})
|
|
|
|
|
.subscribe((result: Response) => {
|
|
|
|
|
this.attendScanService.processFirebaseDocument('NFC-IOS', result, firestoreDocument.isDocumentAvailable);
|
|
|
|
|
if (this.enableFirestore) {
|
|
|
|
|
this.attendScanService.processFirebaseDocument('NFC-IOS', result, firestoreDocument.isDocumentAvailable);
|
|
|
|
|
}
|
|
|
|
|
if (this.common.validResponse(result)) {
|
|
|
|
|
this.ngZone.run(() => {
|
|
|
|
|
this.nfcIOSSuccess = true;
|
|
|
|
|
|