fixed qa issues

MOHEMM-SFH-COLORS
umasoodch 4 years ago
parent 1aafd62e4a
commit 2833749d2f

@ -34,8 +34,8 @@
border-bottom: var(--cusgray) solid 1px; border-bottom: var(--cusgray) solid 1px;
border-radius: 0px; border-radius: 0px;
// margin-left: 20px; // margin-left: 20px;
margin-left: 34px; margin-left: 30px;
margin-top: -10px; // margin-top: -10px;
// -webkit-appearance: none; // -webkit-appearance: none;
// -moz-appearance: none; // -moz-appearance: none;
text-indent: 1px; text-indent: 1px;

@ -136,9 +136,25 @@ export class AttendScanService {
}); });
} }
fakeSwipeAttendance() {
const request: any = {};
request.Latitude = this.lat;
request.Longitude = this.longt;
request.QRValue = this.scannedResult.text;
request.NFCValue = '';
request.WIFIValue = '';
request.UID = this.deviceID;
request.EmployeeID = this.userData.EMPLOYEE_NUMBER;
this.attendance_service.fakeAttendanceSwipeScanner(request, () => {console.log('Error inside in swipe attendance');})
.subscribe((result: Response) => {
if (this.common.validResponse(result)) {
this.common.presentAlert(this.ts.trPK('home', 'fake-location'));
}
});
}
public async checkFirestoreDocument(userID : string) { public async checkFirestoreDocument(userID : string) {
try {
let result = {}; let result = {};
await this.firebasex.fetchDocumentInFirestoreCollection(userID, this.collection, (document: any) => { await this.firebasex.fetchDocumentInFirestoreCollection(userID, this.collection, (document: any) => {
console.log("Successfully Fetched the document with id ="); console.log("Successfully Fetched the document with id =");
@ -157,26 +173,14 @@ export class AttendScanService {
this.common.sharedService.setSharedData(result, 'firebase-document'); this.common.sharedService.setSharedData(result, 'firebase-document');
this.common.stopLoading(); this.common.stopLoading();
}) })
} catch(error) {
console.log(error);
this.common.stopLoading();
} }
fakeSwipeAttendance() {
const request: any = {};
request.Latitude = this.lat;
request.Longitude = this.longt;
request.QRValue = this.scannedResult.text;
request.NFCValue = '';
request.WIFIValue = '';
request.UID = this.deviceID;
request.EmployeeID = this.userData.EMPLOYEE_NUMBER;
this.attendance_service.fakeAttendanceSwipeScanner(request, () => {console.log('Error inside in swipe attendance');})
.subscribe((result: Response) => {
if (this.common.validResponse(result)) {
this.common.presentAlert(this.ts.trPK('home', 'fake-location'));
}
});
} }
public updateFirebaseDocument(resultObject: any) { public updateFirebaseDocument(resultObject: any) {
try {
let currentFirebaseDocument = this.common.sharedService.getSharedData('firebase-document'); let currentFirebaseDocument = this.common.sharedService.getSharedData('firebase-document');
let currentSwipeArray = currentFirebaseDocument.document.swipeData; let currentSwipeArray = currentFirebaseDocument.document.swipeData;
currentSwipeArray.push(resultObject); currentSwipeArray.push(resultObject);
@ -189,9 +193,13 @@ export class AttendScanService {
}, (error) => { }, (error) => {
console.error("Error adding document: " + error); console.error("Error adding document: " + error);
}); });
} catch (error) {
console.log(error);
}
} }
public processFirebaseDocument(mode: string, result: any, isDocumentAvailable: boolean) { public processFirebaseDocument(mode: string, result: any, isDocumentAvailable: boolean) {
try {
console.log(mode); console.log(mode);
console.log(result); console.log(result);
console.log(isDocumentAvailable); console.log(isDocumentAvailable);
@ -210,6 +218,9 @@ export class AttendScanService {
} else { } else {
this.createNewDocument(resultObject); this.createNewDocument(resultObject);
} }
} catch (error) {
console.log(error);
}
} }
public createNewDocument(resultObject: any) { public createNewDocument(resultObject: any) {

@ -66,16 +66,16 @@
<span class="btnTitle">{{ts.trPK('myTeam','profile-details')}}</span> <span class="btnTitle">{{ts.trPK('myTeam','profile-details')}}</span>
</ion-col> </ion-col>
</ion-col> </ion-col>
<ion-col [size]="3"> <ion-col [size]="3" (click)="getMenuEntries(employee)">
<ion-col> <ion-col>
<ion-segment-button <ion-segment-button
value="create-request" value="create-request"
[ngClass]="activeSegment == 'create-request' ? 'active-Segment' : 'normal-Segment'"> [ngClass]="activeSegment == 'create-request' ? 'active-Segment' : 'normal-Segment'">
<img (click)="getMenuEntries(employee)" class="imgSize" src="../assets/imgs/create-req.svg"> <img class="imgSize" src="../assets/imgs/create-req.svg">
<!-- <ion-label> {{ts.trPK('vacation-rule','create-request')}}</ion-label> --> <!-- <ion-label> {{ts.trPK('vacation-rule','create-request')}}</ion-label> -->
</ion-segment-button> </ion-segment-button>
</ion-col> </ion-col>
<ion-col (click)="getMenuEntries(employee)"> <span class="btnTitle">{{ts.trPK('vacation-rule','create-request')}}</span></ion-col> <ion-col > <span class="btnTitle">{{ts.trPK('vacation-rule','create-request')}}</span></ion-col>
</ion-col> </ion-col>
<ion-col [size]="3"> <ion-col [size]="3">
<ion-col> <ion-col>

Loading…
Cancel
Save