diff --git a/Mohem/GoogleService-Info.plist b/Mohem/GoogleService-Info.plist index 89817c12..3512ee66 100644 --- a/Mohem/GoogleService-Info.plist +++ b/Mohem/GoogleService-Info.plist @@ -3,21 +3,21 @@ CLIENT_ID - 679409052782-3teqf8vdh9e1suvnhddj3pgmna7vg5rt.apps.googleusercontent.com + 191800911346-5ejbfu1pn53p7qamjsb29takrefsoqh5.apps.googleusercontent.com REVERSED_CLIENT_ID - com.googleusercontent.apps.679409052782-3teqf8vdh9e1suvnhddj3pgmna7vg5rt + com.googleusercontent.apps.191800911346-5ejbfu1pn53p7qamjsb29takrefsoqh5 API_KEY - AIzaSyCjMjhbeS7qilBoP4SH0t3SgkkHryf34JA + AIzaSyCjBBHXiQsA5mbT7y1kVyxuBBPEgDbXlcg GCM_SENDER_ID - 679409052782 + 191800911346 PLIST_VERSION 1 BUNDLE_ID - com.cloudsolutions.mohemm + com.SFHP.SFHPEServices PROJECT_ID - mohemm-dce93 + erp-app-d50bd STORAGE_BUCKET - mohemm-dce93.appspot.com + erp-app-d50bd.appspot.com IS_ADS_ENABLED IS_ANALYTICS_ENABLED @@ -29,8 +29,6 @@ IS_SIGNIN_ENABLED GOOGLE_APP_ID - 1:679409052782:ios:ace07cf8ba043b48a78a7f - DATABASE_URL - https://mohemm-dce93.firebaseio.com + 1:191800911346:ios:55bd653a029e9a1bf0b76b \ No newline at end of file diff --git a/Mohem/config.xml b/Mohem/config.xml index 489fe2d8..b8a46129 100644 --- a/Mohem/config.xml +++ b/Mohem/config.xml @@ -1,11 +1,9 @@ - - MOHEMM + + SFHP E-services an app created by cloud Solutions Cloud Solutions - - @@ -109,6 +107,13 @@ + + + + + + + diff --git a/Mohem/google-services.json b/Mohem/google-services.json index 62fbaeae..1ba20d2a 100644 --- a/Mohem/google-services.json +++ b/Mohem/google-services.json @@ -1,35 +1,49 @@ { "project_info": { - "project_number": "679409052782", - "firebase_url": "https://mohemm-dce93.firebaseio.com", - "project_id": "mohemm-dce93", - "storage_bucket": "mohemm-dce93.appspot.com" + "project_number": "191800911346", + "project_id": "erp-app-d50bd", + "storage_bucket": "erp-app-d50bd.appspot.com" }, "client": [ { "client_info": { - "mobilesdk_app_id": "1:679409052782:android:dba155ac0859d7fea78a7f", + "mobilesdk_app_id": "1:191800911346:android:96f24d98a8f8a264f0b76b", "android_client_info": { - "package_name": "hmg.cloudSolutions.mohem" + "package_name": "com.SFHP.SFHPEServices" } }, "oauth_client": [ { - "client_id": "679409052782-mtd6d8rjltucnm9uatn6g7et08sm6lbv.apps.googleusercontent.com", + "client_id": "191800911346-09g6ag5atropqnomavpu8o8v0glvbv9g.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "com.SFHP.SFHPEServices", + "certificate_hash": "d8593670617096c5ed223437bba032caaddeac3e" + } + }, + { + "client_id": "191800911346-b3683ve4lufveaqpsaa0bali0i1vp50j.apps.googleusercontent.com", "client_type": 3 } ], "api_key": [ { - "current_key": "AIzaSyDgWjuSBIKGghWxYg_KGBRIZTi-O_UA8mU" + "current_key": "AIzaSyA2eFR85AotmT1vdvbpmW4XtGMoHCxlTRk" } ], "services": { "appinvite_service": { "other_platform_oauth_client": [ { - "client_id": "679409052782-mtd6d8rjltucnm9uatn6g7et08sm6lbv.apps.googleusercontent.com", + "client_id": "191800911346-b3683ve4lufveaqpsaa0bali0i1vp50j.apps.googleusercontent.com", "client_type": 3 + }, + { + "client_id": "191800911346-5ejbfu1pn53p7qamjsb29takrefsoqh5.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "com.SFHP.SFHPEServices" + } } ] } diff --git a/Mohem/key.jks b/Mohem/key.jks index f63c61a7..4870f845 100644 Binary files a/Mohem/key.jks and b/Mohem/key.jks differ diff --git a/Mohem/resources/android/xml/network_security_config.xml b/Mohem/resources/android/xml/network_security_config.xml index f9fecaf7..fc0e0fc8 100644 --- a/Mohem/resources/android/xml/network_security_config.xml +++ b/Mohem/resources/android/xml/network_security_config.xml @@ -1,6 +1,7 @@ - + localhost + erpuat.sfh.med.sa \ No newline at end of file diff --git a/Mohem/src/app/absence/absence-confirm/absence-confirm.component.scss b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.scss index be9894f5..2859abc3 100644 --- a/Mohem/src/app/absence/absence-confirm/absence-confirm.component.scss +++ b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.scss @@ -219,7 +219,7 @@ ion-card-content.confirm-details{ position: absolute; top: 0px; z-index: 0; - background: #44A7A1; + background: #29b5bf; color: #fff; border-radius: 50%; border: 0px; @@ -266,7 +266,7 @@ ion-card-content.confirm-details{ min-height: 45px !important; min-width: 5px !important; margin: 8px !important; - --background: #0ca2de; + --background: #29b5bf; width: 80% !important; color: white!important; border-radius: 16px !important; diff --git a/Mohem/src/app/absence/submit-absence/submit-absence.component.scss b/Mohem/src/app/absence/submit-absence/submit-absence.component.scss index 6f5e22c1..2c7c0124 100644 --- a/Mohem/src/app/absence/submit-absence/submit-absence.component.scss +++ b/Mohem/src/app/absence/submit-absence/submit-absence.component.scss @@ -14,7 +14,7 @@ min-height: 45px !important; min-width: 5px !important; margin: 8px !important; - --background: #44A7A1; + --background: #29b5bf; width: 80% !important; color: white!important; border-radius: 16px !important; diff --git a/Mohem/src/app/app.component.html b/Mohem/src/app/app.component.html index e50ad5b4..ab5846dd 100644 --- a/Mohem/src/app/app.component.html +++ b/Mohem/src/app/app.component.html @@ -29,7 +29,7 @@ - + {{ts.trPK('userProfile','title')}} @@ -111,7 +111,7 @@ - + {{ts.trPK('general','digital-id')}} @@ -140,17 +140,13 @@ - - + - --> + @@ -195,7 +195,7 @@ - + {{ts.trPK('userProfile','title')}} @@ -276,7 +276,7 @@ - + {{ts.trPK('general','digital-id')}} @@ -325,15 +325,15 @@ - - + --> + diff --git a/Mohem/src/app/app.component.scss b/Mohem/src/app/app.component.scss index 32a3b0d3..5761a421 100644 --- a/Mohem/src/app/app.component.scss +++ b/Mohem/src/app/app.component.scss @@ -350,8 +350,9 @@ button.menu-item.item.item-block.item-ios { } .logoImg { - margin-bottom: 180px; + // margin-bottom: 180px; width: 225px; + margin-top: 20px; } .companyTxt { diff --git a/Mohem/src/app/authentication/app-update/app-update.component.html b/Mohem/src/app/authentication/app-update/app-update.component.html index 06fb6067..3546573f 100644 --- a/Mohem/src/app/authentication/app-update/app-update.component.html +++ b/Mohem/src/app/authentication/app-update/app-update.component.html @@ -15,7 +15,7 @@ - {{ 'general,update-now' | translate }} diff --git a/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts b/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts index ee3a2805..fee84407 100644 --- a/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts +++ b/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts @@ -17,7 +17,7 @@ import { CheckUserAuthenticationResponse } from 'src/app/hmg-common/services/aut import { LoginModel } from '../models/LoginModel'; import * as moment from 'moment'; import { CheckAppVersionResponse } from 'src/app/hmg-common/services/authentication/models/check-app-version.response'; -// import { NFC } from "@ionic-native/nfc/ngx"; +import { NFC } from "@ionic-native/nfc/ngx"; import { DigitalIdComponent } from '../digital-id/digital-id.component'; import { AppUpdateComponent } from '../app-update/app-update.component'; import { Password } from '../models/password'; @@ -69,7 +69,7 @@ export class ConfirmLoginComponent implements OnInit { public platform: Platform, public modalController: ModalController, public alertController: AlertController, - // private nfc: NFC, + private nfc: NFC, private smsRetriever: SmsRetriever ) { this.loginData = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false); @@ -353,20 +353,20 @@ export class ConfirmLoginComponent implements OnInit { } async checkNFCStatus() { - // try { - // let nfcStatus = await this.nfc.enabled(); - // console.log("nfc status >>>>>>>>>>" + nfcStatus); - // this.isNFCAvailable = true; - // } catch (err) { - // console.log("Error reading tag", err); - // if (err === "NO_NFC") { - // this.isNFCAvailable = false; - // } else if (err === "NFC_DISABLED") { - // this.isNFCAvailable = true; - // } else { - // this.isNFCAvailable = false; - // } - // } + try { + let nfcStatus = await this.nfc.enabled(); + console.log("nfc status >>>>>>>>>>" + nfcStatus); + this.isNFCAvailable = true; + } catch (err) { + console.log("Error reading tag", err); + if (err === "NO_NFC") { + this.isNFCAvailable = false; + } else if (err === "NFC_DISABLED") { + this.isNFCAvailable = true; + } else { + this.isNFCAvailable = false; + } + } } public checkSMS() { @@ -376,7 +376,7 @@ export class ConfirmLoginComponent implements OnInit { request.activationCode = ''; request.P_USER_NAME = data.P_USER_NAME; request.MobileNumber = data.MobileNumber; - request.IsDeviceNFC = true; + request.IsDeviceNFC = this.isNFCAvailable;; this.authService.checkSMS(request, () => { }, this.ts.trPK('general', 'ok')) .subscribe((result: SMSCheckResponse) => { if (this.cs.validResponse(result)) { diff --git a/Mohem/src/app/authentication/sms-page/sms-page.page.ts b/Mohem/src/app/authentication/sms-page/sms-page.page.ts index d8642295..03dd46a4 100644 --- a/Mohem/src/app/authentication/sms-page/sms-page.page.ts +++ b/Mohem/src/app/authentication/sms-page/sms-page.page.ts @@ -24,7 +24,7 @@ import { GetLoginInfoRequest } from 'src/app/hmg-common/services/authentication/ import * as moment from 'moment'; -// import { NFC } from "@ionic-native/nfc/ngx"; +import { NFC } from "@ionic-native/nfc/ngx"; import { SmsRetriever } from '@ionic-native/sms-retriever/ngx'; @@ -125,7 +125,7 @@ export class SmsPageComponent implements OnInit { public platform: Platform, - // private nfc: NFC, + private nfc: NFC, private smsRetriever: SmsRetriever @@ -367,33 +367,33 @@ export class SmsPageComponent implements OnInit { async checkNFCStatus() { - // try { + try { - // let nfcStatus = await this.nfc.enabled(); + let nfcStatus = await this.nfc.enabled(); - // console.log("nfc status >>>>>>>>>>" + nfcStatus); + console.log("nfc status >>>>>>>>>>" + nfcStatus); - // this.isNFCAvailable = true; + this.isNFCAvailable = true; - // } catch (err) { + } catch (err) { - // console.log("Error reading tag", err); + console.log("Error reading tag", err); - // if (err === "NO_NFC") { + if (err === "NO_NFC") { - // this.isNFCAvailable = false; + this.isNFCAvailable = false; - // } else if (err === "NFC_DISABLED") { + } else if (err === "NFC_DISABLED") { - // this.isNFCAvailable = true; + this.isNFCAvailable = true; - // } else { + } else { - // this.isNFCAvailable = false; + this.isNFCAvailable = false; - // } + } - // } + } } diff --git a/Mohem/src/app/eit/add-eit/add-eit.component.scss b/Mohem/src/app/eit/add-eit/add-eit.component.scss index 93c8fb5e..373ba945 100644 --- a/Mohem/src/app/eit/add-eit/add-eit.component.scss +++ b/Mohem/src/app/eit/add-eit/add-eit.component.scss @@ -33,7 +33,7 @@ ion-label { min-height: 45px !important; min-width: 5px !important; margin: 8px !important; - background-color: #44A7A1; + background-color: #29b5bf; width: 80% !important; color: white!important; border-radius: 16px !important; diff --git a/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.scss b/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.scss index d38f4fed..a2bce595 100644 --- a/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.scss +++ b/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.scss @@ -189,7 +189,7 @@ position: absolute; top: 0px; z-index: 0; - background: #44A7A1; + background: #29b5bf; color: #fff; border-radius: 50%; border: 0px; @@ -243,7 +243,7 @@ min-height: 45px !important; min-width: 5px !important; margin: 8px !important; - background-color: #0ca2de; + background-color: #29b5bf; width: 80% !important; color: white!important; border-radius: 16px !important; diff --git a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.scss b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.scss index 27000691..06421641 100644 --- a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.scss +++ b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.scss @@ -189,7 +189,7 @@ position: absolute; top: 0px; z-index: 0; - background: #44A7A1; + background: #29b5bf; color: #fff; border-radius: 50%; border: 0px; @@ -243,7 +243,7 @@ min-height: 45px !important; min-width: 5px !important; margin: 8px !important; - background-color: #44A7A1; + background-color: #29b5bf; width: 80% !important; color: white!important; border-radius: 16px !important; diff --git a/Mohem/src/app/hmg-common/services/common/common.service.ts b/Mohem/src/app/hmg-common/services/common/common.service.ts index aaa04ffe..cfffbc00 100644 --- a/Mohem/src/app/hmg-common/services/common/common.service.ts +++ b/Mohem/src/app/hmg-common/services/common/common.service.ts @@ -1674,24 +1674,24 @@ export class CommonService { // disable: false, // total: 0 // }, - // { - // value: 0, - // name: 'PR', - // active: false, - // color: '#114475', - // key: 'REQAPPRV', - // disable: false, - // total: 0 - // }, - // { - // value: 0, - // name: 'PO', - // active: false, - // color: '#38c9b3', - // key: 'POAPPRV', - // disable: false, - // total: 0 - // }, + { + value: 0, + name: 'PR', + active: false, + color: '#114475', + key: 'REQAPPRV', + disable: false, + total: 0 + }, + { + value: 0, + name: 'PO', + active: false, + color: '#38c9b3', + key: 'POAPPRV', + disable: false, + total: 0 + } // { // value: 0, // name: 'ITG', @@ -1736,8 +1736,8 @@ export class CommonService { data: [0, 0, 0, 0, 0, 0, 0, 0], backgroundColor: [ '#18a169', - '#3cb9d5', '#114475', + '#3cb9d5', '#38c9b3', '#cc3232', '#9e7e97', @@ -1756,11 +1756,11 @@ export class CommonService { // this.filters[1].value = this.filterKeys['INVMOA']; // this.data.datasets[0].data[1] = this.filterKeys['INVMOA']; - // this.filters[2].value = this.filterKeys['REQAPPRV']; - // this.data.datasets[0].data[2] = this.filterKeys['REQAPPRV']; + this.filters[1].value = this.filterKeys['REQAPPRV']; + this.data.datasets[0].data[1] = this.filterKeys['REQAPPRV']; - // this.filters[3].value = this.filterKeys['POAPPRV']; - // this.data.datasets[0].data[3] = this.filterKeys['POAPPRV']; + this.filters[2].value = this.filterKeys['POAPPRV']; + this.data.datasets[0].data[2] = this.filterKeys['POAPPRV']; // this.filters[5].value = this.filterKeys['INVITEM']; // this.data.datasets[0].data[5] = this.filterKeys['INVITEM']; diff --git a/Mohem/src/app/hmg-common/services/connector/connector.service.ts b/Mohem/src/app/hmg-common/services/connector/connector.service.ts index c4cea209..184d0d18 100644 --- a/Mohem/src/app/hmg-common/services/connector/connector.service.ts +++ b/Mohem/src/app/hmg-common/services/connector/connector.service.ts @@ -31,7 +31,7 @@ export class ConnectorService { // public static host = 'https://hmgwebservices.com/'; public static host = 'https://erpuat.sfh.med.sa/'; //UAR SFHP // public static host = 'http://10.201.204.124:6085/'; //UAR SFHP - // public static host = 'https://uat.hmgwebservices.com/'; + // public static host = 'http://10.201.204.124:6086/'; diff --git a/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.scss b/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.scss index 2712f0ca..f9bd33c7 100644 --- a/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.scss +++ b/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.scss @@ -45,14 +45,14 @@ .title { font-family: 'Inter' !important; - line-height: 12px; + line-height: 18px; letter-spacing: -0.56px; color: #575757; opacity: 1; font-size: 14px; width: 100%; text-overflow: ellipsis; - white-space: nowrap; + // white-space: nowrap; // overflow: hidden; display: block; margin-left: -10px; @@ -83,14 +83,14 @@ .title { font-family: 'Inter' !important; - line-height: 12px; + line-height: 18px; letter-spacing: -0.56px; color: #575757; opacity: 1; font-size: 14px; width: 100%; text-overflow: ellipsis; - white-space: nowrap; + // white-space: nowrap; overflow: hidden; display: block; margin-left: -10px; diff --git a/Mohem/src/app/hmg-common/ui/services-button/services-button.component.scss b/Mohem/src/app/hmg-common/ui/services-button/services-button.component.scss index ba13a4eb..10b22579 100644 --- a/Mohem/src/app/hmg-common/ui/services-button/services-button.component.scss +++ b/Mohem/src/app/hmg-common/ui/services-button/services-button.component.scss @@ -21,9 +21,8 @@ .iconBox img { margin: 0px auto 10px !important; display: block; - width: 30px; - height: 33px; - // max-width: 35%; + width: 25px; + height: 30px; } .titleBox { diff --git a/Mohem/src/app/home/attendance-options/attendance-options.component.ts b/Mohem/src/app/home/attendance-options/attendance-options.component.ts index 34dc4380..76dd19f9 100644 --- a/Mohem/src/app/home/attendance-options/attendance-options.component.ts +++ b/Mohem/src/app/home/attendance-options/attendance-options.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit, NgZone, VERSION } from "@angular/core"; -// import { NFC } from "@ionic-native/nfc/ngx"; +import { NFC } from "@ionic-native/nfc/ngx"; import { CommonService } from "src/app/hmg-common/services/common/common.service"; import { Platform } from "@ionic/angular"; import { AttendScanService } from "../../hmg-common/services/attend-services/attend-scan.service"; @@ -13,11 +13,11 @@ import { attendanceSwipeScannerRequest } from "src/app/home/models/attendanceSwi import { Device } from "@ionic-native/device/ngx"; import { AttendanceService } from "src/app/home/services/attendance.services"; import { Response } from "src/app/hmg-common/services/models/response"; -// import { WifiWizard2 } from "@ionic-native/wifi-wizard-2/ngx"; +import { WifiWizard2 } from "@ionic-native/wifi-wizard-2/ngx"; import { OpenNativeSettings } from '@ionic-native/open-native-settings/ngx'; import { DevicePermissionsService } from 'src/app/hmg-common/services/device-permissions/device-permissions.service'; -// import { Geolocation } from '@ionic-native/geolocation/ngx'; -// import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx'; +import { Geolocation } from '@ionic-native/geolocation/ngx'; +import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx'; import { FirebaseX } from '@ionic-native/firebase-x/ngx'; import { HMGUtils } from 'src/app/hmg-common/hmg_utils'; @@ -53,7 +53,7 @@ export class AttendanceOptionsComponent implements OnInit { constructor( - // private nfc: NFC, + private nfc: NFC, public common: CommonService, public platform: Platform, public attendScanService: AttendScanService, @@ -62,11 +62,11 @@ export class AttendanceOptionsComponent implements OnInit { private device: Device, private attendance_service: AttendanceService, public ngZone: NgZone, - // private wifiWizard2: WifiWizard2, + private wifiWizard2: WifiWizard2, private openNativeSettings: OpenNativeSettings, private devicePermissionsService:DevicePermissionsService, - // private geolocation: Geolocation, - // public backgroundGeolocation: BackgroundGeolocation, + private geolocation: Geolocation, + public backgroundGeolocation: BackgroundGeolocation, public hmgUtils: HMGUtils ) {} @@ -88,31 +88,31 @@ export class AttendanceOptionsComponent implements OnInit { } async checkNFCStatus(checkValue: string) { - // try { - // let nfcStatus = await this.nfc.enabled(); - // console.log("nfc status >>>>>>>>>>" + nfcStatus); - // if (nfcStatus === "NFC_OK") { - // this.deviceNFC = true; - // if (checkValue === "two") { - // this.startNFC(); - // } - // } - // if (nfcStatus === null && checkValue === "two") { - // this.startNFC(); - // } - // } catch (err) { - // console.log("Error reading tag", err); - // if (err === "NO_NFC") { - // this.deviceNFC = false; - // } else if (err === "NFC_DISABLED") { - // this.deviceNFC = true; - // if (checkValue === "two") { - // this.common.presentAlert(this.ts.trPK("general", "nfc-settings")); - // } - // } else if (checkValue === "two") { - // this.common.presentAlert(this.ts.trPK("general", "nfc-error")); - // } - // } + try { + let nfcStatus = await this.nfc.enabled(); + console.log("nfc status >>>>>>>>>>" + nfcStatus); + if (nfcStatus === "NFC_OK") { + this.deviceNFC = true; + if (checkValue === "two") { + this.startNFC(); + } + } + if (nfcStatus === null && checkValue === "two") { + this.startNFC(); + } + } catch (err) { + console.log("Error reading tag", err); + if (err === "NO_NFC") { + this.deviceNFC = false; + } else if (err === "NFC_DISABLED") { + this.deviceNFC = true; + if (checkValue === "two") { + this.common.presentAlert(this.ts.trPK("general", "nfc-settings")); + } + } else if (checkValue === "two") { + this.common.presentAlert(this.ts.trPK("general", "nfc-error")); + } + } } public setServicesPrivilage() { @@ -154,15 +154,15 @@ export class AttendanceOptionsComponent implements OnInit { } async startIOSNfc() { - // try { - // let tag = await this.nfc.scanTag(); - // console.log(JSON.stringify(tag)); - // const serialNumber = this.nfc.bytesToHexString(tag.id); - // this.swipeAttendanceNFC(serialNumber); - // } catch (err) { - // this.common.presentAlert(this.ts.trPK("general", "nfc-error")); - // console.log("Error reading tag", err); - // } + try { + let tag = await this.nfc.scanTag(); + console.log(JSON.stringify(tag)); + const serialNumber = this.nfc.bytesToHexString(tag.id); + this.swipeAttendanceNFC(serialNumber); + } catch (err) { + this.common.presentAlert(this.ts.trPK("general", "nfc-error")); + console.log("Error reading tag", err); + } } public async nfcModal() { @@ -243,38 +243,38 @@ export class AttendanceOptionsComponent implements OnInit { public async startWifi() { const isAndroid = this.platform.is("android"); const isIOS = this.platform.is("ios"); - // const isWifiEnabled = await this.wifiWizard2.isWifiEnabled(); + const isWifiEnabled = await this.wifiWizard2.isWifiEnabled(); const versionType = this.device.version; const versionTypeInt = parseInt(versionType); console.log('version type: ' + versionType); console.log('version Type: ' + versionTypeInt); if(isAndroid && versionTypeInt > 10) { - // if(!isWifiEnabled){ - // this.showWifiNotEnabled(); - // return; - // } + if(!isWifiEnabled){ + this.showWifiNotEnabled(); + return; + } } if (isIOS) { - // if(!isWifiEnabled){ - // this.showWifiNotEnabled(); - // return; - // } + if(!isWifiEnabled){ + this.showWifiNotEnabled(); + return; + } } else if(isAndroid) { let locationPermission = await this.devicePermissionsService.requestLocationAutherization(); if (!locationPermission) { return; } - // if(!isWifiEnabled){ - // this.wifiWizard2.setWifiEnabled(true).then(()=>{ - // this.startWifi(); - // }).catch((err) => { - // console.debug(err); - // }); - // return; - // } + if(!isWifiEnabled){ + this.wifiWizard2.setWifiEnabled(true).then(()=>{ + this.startWifi(); + }).catch((err) => { + console.debug(err); + }); + return; + } } // opening wifi dailog if all above conditions are passed (isWifiEnabled == true) let modal = await this.modalController.create({ diff --git a/Mohem/src/app/home/home.module.ts b/Mohem/src/app/home/home.module.ts index 08469d11..6232673c 100644 --- a/Mohem/src/app/home/home.module.ts +++ b/Mohem/src/app/home/home.module.ts @@ -5,7 +5,7 @@ import { Routes, RouterModule } from '@angular/router'; import { HmgCommonModule } from '../hmg-common/hmg-common.module'; import { IonicModule } from '@ionic/angular'; import { HomePage } from './home.page'; -// import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx'; +import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx'; import { WorklistMainService } from '../notification/service/work-list.main.service'; import { AttendanceOptionsComponent } from './attendance-options/attendance-options.component'; import { NfcModalComponent } from './nfc-modal/nfc-modal.component'; @@ -36,7 +36,7 @@ const routes: Routes = [ WifiModalComponent ], providers: [ - // BarcodeScanner, + BarcodeScanner, WorklistMainService ], entryComponents: [ diff --git a/Mohem/src/app/home/home.page.html b/Mohem/src/app/home/home.page.html index 09e5a195..bbaeb616 100644 --- a/Mohem/src/app/home/home.page.html +++ b/Mohem/src/app/home/home.page.html @@ -9,11 +9,11 @@ - + diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index d8ad3df0..0a827a21 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -7,8 +7,8 @@ import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/mo import { MenuService } from 'src/app/hmg-common/services/menu/menuservice.service'; import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response'; import { CommonService } from 'src/app/hmg-common/services/common/common.service'; -// import { Geolocation } from '@ionic-native/geolocation/ngx'; -// import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx'; +import { Geolocation } from '@ionic-native/geolocation/ngx'; +import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx'; import { Device } from '@ionic-native/device/ngx'; import { attendanceSwipeScannerRequest } from './models/attendanceSwipe.Request'; import { COCRequest } from 'src/app/notification/models/COCRequest'; @@ -37,8 +37,8 @@ import { TimeCardService } from '../time-card/service/time-card.service'; import { WorklistMainService } from '../notification/service/work-list.main.service'; import { isThisISOWeek } from 'date-fns'; import { Router } from '@angular/router'; -// import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx'; -// import { NFC, Ndef } from "@ionic-native/nfc/ngx" +import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx'; +import { NFC, Ndef } from "@ionic-native/nfc/ngx" import { DigitalIdComponent } from '../authentication/digital-id/digital-id.component'; import { FirebaseX } from '@ionic-native/firebase-x/ngx'; import { BusinessCardComponent } from "src/app/authentication/business-card/business-card.component"; @@ -75,6 +75,7 @@ export class HomePage implements OnInit { public isFakeLocationUsed = false; public intervalCountdown: any; public showLoader = true; + public enableSwipe = false; public statsButtons = [ // { // title: this.ts.trPK('attendance-tracking', 'title'), @@ -154,10 +155,10 @@ export class HomePage implements OnInit { public common: CommonService, public events: Events, private device: Device, - // private geolocation: Geolocation, + private geolocation: Geolocation, private attendanceService: AttendanceService, private eitService: EitService, - // private barcodeScanner: BarcodeScanner, + private barcodeScanner: BarcodeScanner, public actionSheetCtrl: ActionSheetController, public sharedData: SharedDataService, private sanitizer: DomSanitizer, @@ -169,9 +170,9 @@ export class HomePage implements OnInit { public workListService: WorklistMainService, public router: Router, private platform: Platform, - // public backgroundGeolocation: BackgroundGeolocation, + public backgroundGeolocation: BackgroundGeolocation, public modalController: ModalController, - // private nfc: NFC, + private nfc: NFC, public firebasex: FirebaseX ) { this.events.subscribe('img-change', displayImg => { @@ -203,11 +204,11 @@ export class HomePage implements OnInit { public slideSettingsTwo() { const width = this.platform.width(); this.slideOptsOne = { - slidesPerView: width > 320 ? 3.4 : 3, + slidesPerView: width > 320 ? 3.2 : 3, spaceBetween: 10 }; this.slideOptsTwo = { - slidesPerView: width > 320 ? 3.4 : 2.4, + slidesPerView: width > 320 ? 3.2 : 2.2, spaceBetween: width > 320 ? 10 : 5 }; this.showStaticServices = true; @@ -282,32 +283,32 @@ export class HomePage implements OnInit { this.location = granted as boolean; if (this.location) { if (this.platform.is('android')) { - // this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => { - // if (resp && (resp.latitude && resp.longitude)) { - // if (resp.isFromMockProvider || resp.mockLocationsEnabled) { - // this.isFakeLocationUsed = true; - // } - // this.lat = resp.latitude; - // this.longt = resp.longitude; - // this.attendance(); - // } else { - // this.common.presentAlert(this.ts.trPK('home', 'position-error')); - // } - // }, (error) => { - // this.common.presentAlert(this.ts.trPK('home', 'position-error')); - // }); + this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => { + if (resp && (resp.latitude && resp.longitude)) { + if (resp.isFromMockProvider || resp.mockLocationsEnabled) { + this.isFakeLocationUsed = true; + } + this.lat = resp.latitude; + this.longt = resp.longitude; + this.attendance(); + } else { + this.common.presentAlert(this.ts.trPK('home', 'position-error')); + } + }, (error) => { + this.common.presentAlert(this.ts.trPK('home', 'position-error')); + }); } else { - // this.geolocation.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true }).then(resp => { - // if (resp && resp.coords.latitude && resp.coords.longitude) { - // this.lat = resp.coords.latitude; - // this.longt = resp.coords.longitude; - // this.attendance(); - // } else { - // this.common.presentAlert(this.ts.trPK('home', 'position-error')); - // } - // }).catch(error => { - // this.common.presentAlert(this.ts.trPK('home', 'position-error')); - // }); + this.geolocation.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true }).then(resp => { + if (resp && resp.coords.latitude && resp.coords.longitude) { + this.lat = resp.coords.latitude; + this.longt = resp.coords.longitude; + this.attendance(); + } else { + this.common.presentAlert(this.ts.trPK('home', 'position-error')); + } + }).catch(error => { + this.common.presentAlert(this.ts.trPK('home', 'position-error')); + }); } } else { return false; @@ -317,23 +318,8 @@ export class HomePage implements OnInit { setServicesPrivilage() { for (const servicePrivilage of AuthenticationService.servicePrivilage) { - if (servicePrivilage.Previlege === false) { - if (servicePrivilage.ServiceName === 'accrualBalance') { - this.statsButtons[3].show = false; - // this.statsButtons[4].show = false; - } - if (servicePrivilage.ServiceName === 'vacationRule') { - this.showVcationRule = false; - } - // document - // .getElementById(servicePrivilage.ServiceName) - // .setAttribute('disabled', 'disabled'); - // document.getElementById(servicePrivilage.ServiceName).style.filter = - // 'grayscale(1)'; - } else { - this.statsButtons[3].show = true; - this.statsButtons[4].show = true; - this.showVcationRule = true; + if (servicePrivilage.Previlege && servicePrivilage.ServiceName === "swipe") { + this.enableSwipe = true; } } } @@ -384,7 +370,7 @@ export class HomePage implements OnInit { callDashboardServices() { this.getMenu(); this.statsButtons[1].show = true; - // this.setServicesPrivilage(); + this.setServicesPrivilage(); if (this.common.getTotalNumberOfWorklistRequest()) { this.statsButtons[0].statsValue = this.common.getTotalNumberOfWorklistRequest(); this.showLoader = false; diff --git a/Mohem/src/app/my-team/details/details.component.html b/Mohem/src/app/my-team/details/details.component.html index 29d4537b..9085d78c 100644 --- a/Mohem/src/app/my-team/details/details.component.html +++ b/Mohem/src/app/my-team/details/details.component.html @@ -36,7 +36,7 @@

{{ts.trPK('userProfile','role')}}

- {{employee.POSITION_NAME}} + {{employee.JOB_NAME}}

{{ts.trPK('userProfile','empNo')}}

@@ -462,7 +462,7 @@ @@ -502,7 +502,7 @@

{{ts.trPK('userProfile','job')}}

-

{{employee.POSITION_NAME}}

+

{{employee.JOB_NAME}}

{{ts.trPK('userProfile','payrol')}}

@@ -514,7 +514,7 @@
-->

{{ts.trPK('userProfile','position')}}

-

{{employee.POSITION_NAME}}

+

{{employee.JOB_NAME}}

{{ts.trPK('userProfile','grade')}}

diff --git a/Mohem/src/app/my-team/home/home.component.html b/Mohem/src/app/my-team/home/home.component.html index 2d769461..dea1c579 100644 --- a/Mohem/src/app/my-team/home/home.component.html +++ b/Mohem/src/app/my-team/home/home.component.html @@ -61,7 +61,7 @@ diff --git a/Mohem/src/app/notification/home/home.component.ts b/Mohem/src/app/notification/home/home.component.ts index f92f63d8..94c1676e 100644 --- a/Mohem/src/app/notification/home/home.component.ts +++ b/Mohem/src/app/notification/home/home.component.ts @@ -71,7 +71,7 @@ export class HomeComponent implements OnInit { public allFormattedData = []; public selectedFilter = 'HR'; public showSearchButton = false; - public itemType = 'HRSSA'; + public itemType = ''; public receivedITGCount = false; public countChanged: any = false; public totalHR = 0; @@ -124,22 +124,22 @@ export class HomeComponent implements OnInit { // key: 'INVMOA', // disable: false // }, - // { - // value: 0, - // name: 'PR', - // active: false, - // color: '#114475', - // key: 'REQAPPRV', - // disable: false - // }, - // { - // value: 0, - // name: 'PO', - // active: false, - // color: '#38c9b3', - // key: 'POAPPRV', - // disable: false - // }, + { + value: 0, + name: 'PR', + active: false, + color: '#114475', + key: 'REQAPPRV', + disable: false + }, + { + value: 0, + name: 'PO', + active: false, + color: '#38c9b3', + key: 'POAPPRV', + disable: false + } // { // value: 0, // name: 'ITG', diff --git a/Mohem/src/app/notification/worklist-advanced-search/worklist-advanced-search.component.scss b/Mohem/src/app/notification/worklist-advanced-search/worklist-advanced-search.component.scss index 59a2927e..6479c8ac 100644 --- a/Mohem/src/app/notification/worklist-advanced-search/worklist-advanced-search.component.scss +++ b/Mohem/src/app/notification/worklist-advanced-search/worklist-advanced-search.component.scss @@ -48,7 +48,7 @@ } .search-button { - background: #44A7A1; + background: #29b5bf; height: 50px; text-align: center; font-family: WorkSans-Regular; diff --git a/Mohem/src/app/notification/worklist-main/worklist-main.component.scss b/Mohem/src/app/notification/worklist-main/worklist-main.component.scss index 5817c5af..871b2e06 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.scss +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.scss @@ -356,7 +356,7 @@ ion-card { .active-Segment { font-size: 0.3cm !important; - background: #6d6e71 !important; + background: #c2a16b !important; text-transform: none; --color-checked: none; border-radius: 100px; diff --git a/Mohem/src/app/payslip/home/home.component.scss b/Mohem/src/app/payslip/home/home.component.scss index 3f11c246..4d32c3f4 100644 --- a/Mohem/src/app/payslip/home/home.component.scss +++ b/Mohem/src/app/payslip/home/home.component.scss @@ -362,6 +362,7 @@ margin-left: 25px !important; font-size: 15px !important; margin-right: 25px !important; + font-weight: bold; } .date { @@ -480,7 +481,7 @@ .label{ font-size: 16px; // margin-left: 15px; - color: #a2a5a6 !important; + // color: #a2a5a6 !important; display: block; overflow: hidden; -webkit-box-flex: 1; @@ -526,6 +527,7 @@ color: #999999 !important; select{ width: 300px !important; border: none !important; + background: transparent !important; } .padding_date{ padding-left:5px !important; diff --git a/Mohem/src/app/profile/add-address/add-address.component.scss b/Mohem/src/app/profile/add-address/add-address.component.scss index 9237f873..d8c7e08e 100644 --- a/Mohem/src/app/profile/add-address/add-address.component.scss +++ b/Mohem/src/app/profile/add-address/add-address.component.scss @@ -33,7 +33,7 @@ min-height: 45px !important; min-width: 5px !important; margin: 8px !important; - background-color: #44A7A1; + background-color: #29b5bf; width: 80% !important; color: white!important; border-radius: 16px !important; diff --git a/Mohem/src/app/profile/add-basic-details/add-basic-details.component.scss b/Mohem/src/app/profile/add-basic-details/add-basic-details.component.scss index c46b24ad..e658bd12 100644 --- a/Mohem/src/app/profile/add-basic-details/add-basic-details.component.scss +++ b/Mohem/src/app/profile/add-basic-details/add-basic-details.component.scss @@ -33,7 +33,7 @@ min-height: 45px !important; min-width: 5px !important; margin: 8px !important; - background-color: #44A7A1; + background-color: #29b5bf; width: 80% !important; color: white!important; border-radius: 16px !important; diff --git a/Mohem/src/app/profile/confirm-address/confirm-address.component.scss b/Mohem/src/app/profile/confirm-address/confirm-address.component.scss index c26b777a..4ea6b1e7 100644 --- a/Mohem/src/app/profile/confirm-address/confirm-address.component.scss +++ b/Mohem/src/app/profile/confirm-address/confirm-address.component.scss @@ -189,7 +189,7 @@ position: absolute; top: 0px; z-index: 0; - background: #44A7A1; + background: #29b5bf; color: #fff; border-radius: 50%; border: 0px; @@ -243,7 +243,7 @@ min-height: 45px !important; min-width: 5px !important; margin: 8px !important; - background-color: #44A7A1; + background-color: #29b5bf; width: 80% !important; color: white!important; border-radius: 16px !important; diff --git a/Mohem/src/app/profile/confirm-basic-details/confirm-basic-details.component.scss b/Mohem/src/app/profile/confirm-basic-details/confirm-basic-details.component.scss index cfa056b3..48ea4fdd 100644 --- a/Mohem/src/app/profile/confirm-basic-details/confirm-basic-details.component.scss +++ b/Mohem/src/app/profile/confirm-basic-details/confirm-basic-details.component.scss @@ -189,7 +189,7 @@ position: absolute; top: 0px; z-index: 0; - background: #44A7A1; + background: #29b5bf; color: #fff; border-radius: 50%; border: 0px; @@ -243,7 +243,7 @@ min-height: 45px !important; min-width: 5px !important; margin: 8px !important; - background-color: #44A7A1; + background-color: #29b5bf; width: 80% !important; color: white!important; border-radius: 16px !important; diff --git a/Mohem/src/app/profile/confirm-contact/confirm-contact.component.scss b/Mohem/src/app/profile/confirm-contact/confirm-contact.component.scss index d38f4fed..a2bce595 100644 --- a/Mohem/src/app/profile/confirm-contact/confirm-contact.component.scss +++ b/Mohem/src/app/profile/confirm-contact/confirm-contact.component.scss @@ -189,7 +189,7 @@ position: absolute; top: 0px; z-index: 0; - background: #44A7A1; + background: #29b5bf; color: #fff; border-radius: 50%; border: 0px; @@ -243,7 +243,7 @@ min-height: 45px !important; min-width: 5px !important; margin: 8px !important; - background-color: #0ca2de; + background-color: #29b5bf; width: 80% !important; color: white!important; border-radius: 16px !important; diff --git a/Mohem/src/app/profile/home/home.component.html b/Mohem/src/app/profile/home/home.component.html index 5eb3c359..35433380 100644 --- a/Mohem/src/app/profile/home/home.component.html +++ b/Mohem/src/app/profile/home/home.component.html @@ -59,7 +59,7 @@
- +
@@ -70,7 +70,7 @@
+ style="background: #29b5bf; border-radius: 0px 0px 10px 10px;"> - {{ts.trPK('general','next')}} + {{ts.trPK('general','next')}} diff --git a/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.html b/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.html index 733cac06..2be39bf2 100644 --- a/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.html +++ b/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.html @@ -25,7 +25,7 @@
-
+

diff --git a/Mohem/src/app/profile/profile-image/profile-image.component.ts b/Mohem/src/app/profile/profile-image/profile-image.component.ts index e2a22857..05998030 100644 --- a/Mohem/src/app/profile/profile-image/profile-image.component.ts +++ b/Mohem/src/app/profile/profile-image/profile-image.component.ts @@ -78,8 +78,10 @@ public setImage:any; this.common.setUpdateImage(this.displayImg,true); this.event.publish('img-change', this.displayImg); let msg: string = this.ts.trPK("userProfile", "successChange"); - this.common.presentAlert(msg); - this.common.back(); + this.common.greenToast(msg); + // this.common.presentAlert(msg); + // this.common.back(); + this.common.openHome(); } // valid it }// End handleWorkListButtonsResult diff --git a/Mohem/src/app/termination/confirm-termination/confirm-termination.component.scss b/Mohem/src/app/termination/confirm-termination/confirm-termination.component.scss index d38f4fed..a2bce595 100644 --- a/Mohem/src/app/termination/confirm-termination/confirm-termination.component.scss +++ b/Mohem/src/app/termination/confirm-termination/confirm-termination.component.scss @@ -189,7 +189,7 @@ position: absolute; top: 0px; z-index: 0; - background: #44A7A1; + background: #29b5bf; color: #fff; border-radius: 50%; border: 0px; @@ -243,7 +243,7 @@ min-height: 45px !important; min-width: 5px !important; margin: 8px !important; - background-color: #0ca2de; + background-color: #29b5bf; width: 80% !important; color: white!important; border-radius: 16px !important; diff --git a/Mohem/src/assets/imgs/call-o.svg b/Mohem/src/assets/imgs/call-o.svg index bd0cdd95..020779b2 100644 --- a/Mohem/src/assets/imgs/call-o.svg +++ b/Mohem/src/assets/imgs/call-o.svg @@ -1,6 +1,6 @@ - + diff --git a/Mohem/src/assets/imgs/call.svg b/Mohem/src/assets/imgs/call.svg index 60216890..e7b1638d 100644 --- a/Mohem/src/assets/imgs/call.svg +++ b/Mohem/src/assets/imgs/call.svg @@ -1,5 +1,5 @@ - - - + + + diff --git a/Mohem/src/assets/imgs/profile.svg b/Mohem/src/assets/imgs/profile.svg new file mode 100644 index 00000000..735b72f7 --- /dev/null +++ b/Mohem/src/assets/imgs/profile.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/Mohem/src/theme/variables.scss b/Mohem/src/theme/variables.scss index 31d173c1..575ba675 100644 --- a/Mohem/src/theme/variables.scss +++ b/Mohem/src/theme/variables.scss @@ -114,11 +114,11 @@ --primary: #3ac1f1; --secondary: #19a163; --danger: #f53d3d; - --customnavy: #44A7A1; + --customnavy: #29b5bf; --light: #ffffff; --dark: #000000;; --gray: #e4e5e7; - --custgreen: #44A7A1; + --custgreen: #29b5bf; --cusgray: #d9d9d9; --darkgray: #7F8C8D; --grayBG: #acacac; @@ -128,7 +128,7 @@ --red: #BE1E2D; --blue: #223262; --cyanblue: #1b75bc; - --newgreen: #44A7A1; + --newgreen: #29b5bf; --darkblue: #29B5BF; --lightblue: #3cb9d5; --newred: #cb3232;