merge master-newdesign

master
Mohamed Mekawy 6 years ago
commit ae3a2e4995

@ -1098,9 +1098,9 @@
}
},
"@ionic-native/firebase-x": {
"version": "5.19.1",
"resolved": "https://registry.npmjs.org/@ionic-native/firebase-x/-/firebase-x-5.19.1.tgz",
"integrity": "sha512-UKNfGmwxy6++21KkZwZxXf0/t1zIKkybwCk6NVRwyuEnPTtNgnynA2G10pYOfTkOFu5UnK8WpqFagRJbHHBHdg==",
"version": "5.21.6",
"resolved": "https://registry.npmjs.org/@ionic-native/firebase-x/-/firebase-x-5.21.6.tgz",
"integrity": "sha512-NS7FEa1DMP3mBOrrOOMPan9cj+VCyLbqHPBcUooFchIGtsrYcMiBHq+q7NQyrKhry3BFSG2PusKR8oTr0TCyoQ==",
"requires": {
"@types/cordova": "^0.0.34"
},
@ -1216,21 +1216,6 @@
"@types/cordova": "^0.0.34"
}
},
"@ionic-native/vibration": {
"version": "5.21.6",
"resolved": "https://registry.npmjs.org/@ionic-native/vibration/-/vibration-5.21.6.tgz",
"integrity": "sha512-sVmB4sHJ0MG+3IwmSvaHUATEM9D8ZFKko/1orHALTwGN57o0Ncf/n37PKWdPp8BANmYhTAoj6iOBd+YNonhf3w==",
"requires": {
"@types/cordova": "^0.0.34"
},
"dependencies": {
"@types/cordova": {
"version": "0.0.34",
"resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz",
"integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ="
}
}
},
"@ionic-native/zbar": {
"version": "5.19.1",
"resolved": "https://registry.npmjs.org/@ionic-native/zbar/-/zbar-5.19.1.tgz",
@ -1530,9 +1515,9 @@
"dev": true
},
"@types/selenium-webdriver": {
"version": "3.0.16",
"resolved": "https://registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-3.0.16.tgz",
"integrity": "sha512-lMC2G0ItF2xv4UCiwbJGbnJlIuUixHrioOhNGHSCsYCJ8l4t9hMCUimCytvFv7qy6AfSzRxhRHoGa+UqaqwyeA==",
"version": "3.0.17",
"resolved": "https://registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-3.0.17.tgz",
"integrity": "sha512-tGomyEuzSC1H28y2zlW6XPCaDaXFaD6soTdb4GNdmte2qfHtrKqhy0ZFs4r/1hpazCfEZqeTSRLvSasmEx89uw==",
"dev": true
},
"@types/source-list-map": {
@ -1789,9 +1774,9 @@
}
},
"adm-zip": {
"version": "0.4.13",
"resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.13.tgz",
"integrity": "sha512-fERNJX8sOXfel6qCBCMPvZLzENBEhZTzKqg6vrOW5pvoEaQuJhRU4ndTAh6lHOxn1I6jnz2NHra56ZODM751uw==",
"version": "0.4.14",
"resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.14.tgz",
"integrity": "sha512-/9aQCnQHF+0IiCl0qhXoK7qs//SwYE7zX8lsr/DNk1BRAHYxeLZPL4pguwK29gUEqasYQjqPtEpDRSWEkdHn9g==",
"dev": true
},
"after": {
@ -4508,9 +4493,9 @@
}
},
"cordova-plugin-firebasex": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/cordova-plugin-firebasex/-/cordova-plugin-firebasex-7.0.1.tgz",
"integrity": "sha512-0gV2yXrsRw5xXx4xgwLNb8BcHo7IRXLrnZuVM9S2eUw5FxH5IcsksXGxRKXc5ccYG+kSe0sMlwP5ULkSKhckzw==",
"version": "7.0.2",
"resolved": "https://registry.npmjs.org/cordova-plugin-firebasex/-/cordova-plugin-firebasex-7.0.2.tgz",
"integrity": "sha512-xEZvcJC/8jwfz0Dr9XSi6NQaUyv34SSLzF04Pa0HWRM+CZ788pvGXRjWjpNe7n9eirpB9HDNZ92i18T81tovBQ==",
"requires": {
"plist": "^3.0.1",
"xcode": "^2.0.0",
@ -4572,11 +4557,6 @@
"resolved": "https://registry.npmjs.org/cordova-plugin-themeablebrowser/-/cordova-plugin-themeablebrowser-0.2.18.tgz",
"integrity": "sha512-FdE1L3wItbTtUudysX/QxN6DTnfGPTMiS4Np/XKeSfYM0bU8sP6DhUIUp1vA8GAulihkEfbNIvy68oVkx2xtFQ=="
},
"cordova-plugin-vibration": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/cordova-plugin-vibration/-/cordova-plugin-vibration-3.1.1.tgz",
"integrity": "sha512-qgv67Rueo4Pydfant3TwnXeFiN9dl+6lKMM6h5jYg9XewiGAGOr8vfWsTvQssC3m3xMKGS1ap3xPNH+BzZ4RMA=="
},
"cordova-plugin-whitelist": {
"version": "1.3.4",
"resolved": "https://registry.npmjs.org/cordova-plugin-whitelist/-/cordova-plugin-whitelist-1.3.4.tgz",
@ -7673,6 +7653,11 @@
"integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=",
"dev": true
},
"ionic2-calendar": {
"version": "0.5.8",
"resolved": "https://registry.npmjs.org/ionic2-calendar/-/ionic2-calendar-0.5.8.tgz",
"integrity": "sha512-+8xy/cahkCzEJTYmsqkRiAXcn7FlSSXPM72nU/BKtDj6uNKBl/5Bqu6EoKT1z4YAc1cC3uOZSdSKv9smr4GNnA=="
},
"ionicons": {
"version": "4.6.3",
"resolved": "https://registry.npmjs.org/ionicons/-/ionicons-4.6.3.tgz",
@ -9574,9 +9559,9 @@
}
},
"node-sass": {
"version": "4.13.0",
"resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.13.0.tgz",
"integrity": "sha512-W1XBrvoJ1dy7VsvTAS5q1V45lREbTlZQqFbiHb3R3OTTCma0XBtuG6xZ6Z4506nR4lmHPTqVRwxT6KgtWC97CA==",
"version": "4.13.1",
"resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.13.1.tgz",
"integrity": "sha512-TTWFx+ZhyDx1Biiez2nB0L3YrCZ/8oHagaDalbuBSlqXgUPsdkUSzJsVxeDO9LtPB49+Fh3WQl3slABo6AotNw==",
"dev": true,
"requires": {
"async-foreach": "^0.1.3",
@ -9672,9 +9657,9 @@
"dev": true
},
"npm": {
"version": "6.13.6",
"resolved": "https://registry.npmjs.org/npm/-/npm-6.13.6.tgz",
"integrity": "sha512-NomC08kv7HIl1FOyLOe9Hp89kYsOsvx52huVIJ7i8hFW8Xp65lDwe/8wTIrh9q9SaQhA8hTrfXPh3BEL3TmMpw==",
"version": "6.14.0",
"resolved": "https://registry.npmjs.org/npm/-/npm-6.14.0.tgz",
"integrity": "sha512-OgfdLadz7j6dikbpaimmLzMxwLKbXthQXHiJwtegorwtBVnhecfUeYkHopwd5ICaiClQnqlYQCHERXDiYK3Jcw==",
"requires": {
"JSONStream": "^1.3.5",
"abbrev": "~1.1.1",
@ -9682,12 +9667,12 @@
"ansistyles": "~0.1.3",
"aproba": "^2.0.0",
"archy": "~1.0.0",
"bin-links": "^1.1.6",
"bin-links": "^1.1.7",
"bluebird": "^3.5.5",
"byte-size": "^5.0.1",
"cacache": "^12.0.3",
"call-limit": "^1.1.1",
"chownr": "^1.1.3",
"chownr": "^1.1.4",
"ci-info": "^2.0.0",
"cli-columns": "^3.1.2",
"cli-table3": "^0.5.1",
@ -9707,7 +9692,7 @@
"glob": "^7.1.4",
"graceful-fs": "^4.2.3",
"has-unicode": "~2.0.1",
"hosted-git-info": "^2.8.5",
"hosted-git-info": "^2.8.6",
"iferr": "^1.0.2",
"imurmurhash": "*",
"infer-owner": "^1.0.4",
@ -9725,7 +9710,7 @@
"libnpmorg": "^1.0.1",
"libnpmsearch": "^2.0.2",
"libnpmteam": "^1.0.2",
"libnpx": "^10.2.0",
"libnpx": "^10.2.2",
"lock-verify": "^2.1.0",
"lockfile": "^1.0.4",
"lodash._baseindexof": "*",
@ -9744,7 +9729,7 @@
"mississippi": "^3.0.0",
"mkdirp": "~0.5.1",
"move-concurrently": "^1.0.1",
"node-gyp": "^5.0.5",
"node-gyp": "^5.0.7",
"nopt": "~4.0.1",
"normalize-package-data": "^2.5.0",
"npm-audit-report": "^1.3.2",
@ -9752,10 +9737,10 @@
"npm-install-checks": "^3.0.2",
"npm-lifecycle": "^3.1.4",
"npm-package-arg": "^6.1.1",
"npm-packlist": "^1.4.7",
"npm-packlist": "^1.4.8",
"npm-pick-manifest": "^3.0.2",
"npm-profile": "^4.0.2",
"npm-registry-fetch": "^4.0.2",
"npm-registry-fetch": "^4.0.3",
"npm-user-validate": "~1.0.0",
"npmlog": "~4.1.2",
"once": "~1.4.0",
@ -9772,7 +9757,7 @@
"read-installed": "~4.0.3",
"read-package-json": "^2.1.1",
"read-package-tree": "^5.3.1",
"readable-stream": "^3.4.0",
"readable-stream": "^3.6.0",
"readdir-scoped-modules": "^1.1.0",
"request": "^2.88.0",
"retry": "^0.12.0",
@ -9941,7 +9926,7 @@
}
},
"bin-links": {
"version": "1.1.6",
"version": "1.1.7",
"bundled": true,
"requires": {
"bluebird": "^3.5.3",
@ -10040,7 +10025,7 @@
}
},
"chownr": {
"version": "1.1.3",
"version": "1.1.4",
"bundled": true
},
"ci-info": {
@ -10421,7 +10406,7 @@
}
},
"env-paths": {
"version": "1.0.0",
"version": "2.2.0",
"bundled": true
},
"err-code": {
@ -10724,7 +10709,7 @@
}
},
"get-caller-file": {
"version": "1.0.2",
"version": "1.0.3",
"bundled": true
},
"get-stream": {
@ -10819,7 +10804,7 @@
"bundled": true
},
"hosted-git-info": {
"version": "2.8.5",
"version": "2.8.6",
"bundled": true
},
"http-cache-semantics": {
@ -10919,7 +10904,7 @@
}
},
"invert-kv": {
"version": "1.0.0",
"version": "2.0.0",
"bundled": true
},
"ip": {
@ -11077,10 +11062,10 @@
"bundled": true
},
"lcid": {
"version": "1.0.0",
"version": "2.0.0",
"bundled": true,
"requires": {
"invert-kv": "^1.0.0"
"invert-kv": "^2.0.0"
}
},
"libcipm": {
@ -11239,7 +11224,7 @@
}
},
"libnpx": {
"version": "10.2.0",
"version": "10.2.2",
"bundled": true,
"requires": {
"dotenv": "^5.0.1",
@ -11369,15 +11354,30 @@
"ssri": "^6.0.0"
}
},
"map-age-cleaner": {
"version": "0.1.3",
"bundled": true,
"requires": {
"p-defer": "^1.0.0"
}
},
"meant": {
"version": "1.0.1",
"bundled": true
},
"mem": {
"version": "1.1.0",
"version": "4.3.0",
"bundled": true,
"requires": {
"mimic-fn": "^1.0.0"
"map-age-cleaner": "^0.1.1",
"mimic-fn": "^2.0.0",
"p-is-promise": "^2.0.0"
},
"dependencies": {
"mimic-fn": {
"version": "2.1.0",
"bundled": true
}
}
},
"mime-db": {
@ -11391,10 +11391,6 @@
"mime-db": "~1.35.0"
}
},
"mimic-fn": {
"version": "1.2.0",
"bundled": true
},
"minimatch": {
"version": "3.0.4",
"bundled": true,
@ -11472,6 +11468,10 @@
"version": "0.0.7",
"bundled": true
},
"nice-try": {
"version": "1.0.5",
"bundled": true
},
"node-fetch-npm": {
"version": "2.0.2",
"bundled": true,
@ -11482,33 +11482,20 @@
}
},
"node-gyp": {
"version": "5.0.5",
"version": "5.0.7",
"bundled": true,
"requires": {
"env-paths": "^1.0.0",
"glob": "^7.0.3",
"graceful-fs": "^4.1.2",
"mkdirp": "^0.5.0",
"nopt": "2 || 3",
"npmlog": "0 || 1 || 2 || 3 || 4",
"request": "^2.87.0",
"rimraf": "2",
"semver": "~5.3.0",
"env-paths": "^2.2.0",
"glob": "^7.1.4",
"graceful-fs": "^4.2.2",
"mkdirp": "^0.5.1",
"nopt": "^4.0.1",
"npmlog": "^4.1.2",
"request": "^2.88.0",
"rimraf": "^2.6.3",
"semver": "^5.7.1",
"tar": "^4.4.12",
"which": "1"
},
"dependencies": {
"nopt": {
"version": "3.0.6",
"bundled": true,
"requires": {
"abbrev": "1"
}
},
"semver": {
"version": "5.3.0",
"bundled": true
}
"which": "^1.3.1"
}
},
"nopt": {
@ -11597,11 +11584,12 @@
}
},
"npm-packlist": {
"version": "1.4.7",
"version": "1.4.8",
"bundled": true,
"requires": {
"ignore-walk": "^3.0.1",
"npm-bundled": "^1.0.1"
"npm-bundled": "^1.0.1",
"npm-normalize-package-bin": "^1.0.1"
}
},
"npm-pick-manifest": {
@ -11623,7 +11611,7 @@
}
},
"npm-registry-fetch": {
"version": "4.0.2",
"version": "4.0.3",
"bundled": true,
"requires": {
"JSONStream": "^1.3.4",
@ -11702,12 +11690,38 @@
"bundled": true
},
"os-locale": {
"version": "2.1.0",
"version": "3.1.0",
"bundled": true,
"requires": {
"execa": "^0.7.0",
"lcid": "^1.0.0",
"mem": "^1.1.0"
"execa": "^1.0.0",
"lcid": "^2.0.0",
"mem": "^4.0.0"
},
"dependencies": {
"cross-spawn": {
"version": "6.0.5",
"bundled": true,
"requires": {
"nice-try": "^1.0.4",
"path-key": "^2.0.1",
"semver": "^5.5.0",
"shebang-command": "^1.2.0",
"which": "^1.2.9"
}
},
"execa": {
"version": "1.0.0",
"bundled": true,
"requires": {
"cross-spawn": "^6.0.0",
"get-stream": "^4.0.0",
"is-stream": "^1.1.0",
"npm-run-path": "^2.0.0",
"p-finally": "^1.0.0",
"signal-exit": "^3.0.0",
"strip-eof": "^1.0.0"
}
}
}
},
"os-tmpdir": {
@ -11722,10 +11736,18 @@
"os-tmpdir": "^1.0.0"
}
},
"p-defer": {
"version": "1.0.0",
"bundled": true
},
"p-finally": {
"version": "1.0.0",
"bundled": true
},
"p-is-promise": {
"version": "2.1.0",
"bundled": true
},
"p-limit": {
"version": "1.2.0",
"bundled": true,
@ -12031,7 +12053,7 @@
}
},
"readable-stream": {
"version": "3.4.0",
"version": "3.6.0",
"bundled": true,
"requires": {
"inherits": "^2.0.3",
@ -12366,10 +12388,16 @@
}
},
"string_decoder": {
"version": "1.2.0",
"version": "1.3.0",
"bundled": true,
"requires": {
"safe-buffer": "~5.1.0"
"safe-buffer": "~5.2.0"
},
"dependencies": {
"safe-buffer": {
"version": "5.2.0",
"bundled": true
}
}
},
"stringify-package": {
@ -12700,14 +12728,14 @@
"bundled": true
},
"yargs": {
"version": "11.0.0",
"version": "11.1.1",
"bundled": true,
"requires": {
"cliui": "^4.0.0",
"decamelize": "^1.1.1",
"find-up": "^2.1.0",
"get-caller-file": "^1.0.1",
"os-locale": "^2.0.0",
"os-locale": "^3.1.0",
"require-directory": "^2.1.1",
"require-main-filename": "^1.0.1",
"set-blocking": "^2.0.0",
@ -13662,9 +13690,9 @@
}
},
"protractor": {
"version": "5.4.2",
"resolved": "https://registry.npmjs.org/protractor/-/protractor-5.4.2.tgz",
"integrity": "sha512-zlIj64Cr6IOWP7RwxVeD8O4UskLYPoyIcg0HboWJL9T79F1F0VWtKkGTr/9GN6BKL+/Q/GmM7C9kFVCfDbP5sA==",
"version": "5.4.3",
"resolved": "https://registry.npmjs.org/protractor/-/protractor-5.4.3.tgz",
"integrity": "sha512-7pMAolv8Ah1yJIqaorDTzACtn3gk7BamVKPTeO5lqIGOrfosjPgXFx/z1dqSI+m5EeZc2GMJHPr5DYlodujDNA==",
"dev": true,
"requires": {
"@types/q": "^0.0.32",

@ -38,7 +38,7 @@
"@ionic-native/file": "^5.18.0",
"@ionic-native/file-path": "^5.18.0",
"@ionic-native/fingerprint-aio": "^5.18.0",
"@ionic-native/firebase-x": "^5.19.1",
"@ionic-native/firebase-x": "^5.21.5",
"@ionic-native/geolocation": "^5.10.0",
"@ionic-native/globalization": "^5.18.0",
"@ionic-native/health": "^5.4.0",
@ -52,7 +52,6 @@
"@ionic-native/sqlite": "^5.18.0",
"@ionic-native/status-bar": "^5.0.0",
"@ionic-native/themeable-browser": "^5.18.0",
"@ionic-native/vibration": "^5.21.6",
"@ionic-native/zbar": "^5.10.0",
"@ionic/angular": "^4.1.0",
"@ng-bootstrap/ng-bootstrap": "^4.2.2",
@ -84,7 +83,7 @@
"cordova-plugin-file": "^6.0.2",
"cordova-plugin-filepath": "^1.5.6",
"cordova-plugin-fingerprint-aio": "^3.0.0",
"cordova-plugin-firebasex": "^7.0.1",
"cordova-plugin-firebasex": "^7.0.2",
"cordova-plugin-geolocation": "^4.0.2",
"cordova-plugin-globalization": "^1.11.0",
"cordova-plugin-inappbrowser": "^3.1.0",
@ -96,19 +95,19 @@
"cordova-plugin-splashscreen": "^5.0.3",
"cordova-plugin-statusbar": "^2.4.3",
"cordova-plugin-themeablebrowser": "^0.2.18",
"cordova-plugin-vibration": "^3.1.1",
"cordova-plugin-whitelist": "^1.3.4",
"cordova-sqlite-storage": "^3.4.0",
"cordova-support-google-services": "^1.3.2",
"cordova.plugins.diagnostic": "^5.0.1",
"core-js": "^2.5.4",
"date-fns": "^1.30.1",
"ionic2-calendar": "^0.5.8",
"mx.ferreyra.callnumber": "0.0.2",
"ng-circle-progress": "^1.5.1",
"ng2-file-upload": "^1.3.0",
"ng2-pdf-viewer": "^5.3.2",
"ngx-gauge": "^1.0.0-beta.10",
"npm": "^6.13.1",
"npm": "^6.13.7",
"phonegap-plugin-barcodescanner": "^8.1.0",
"phonegap-plugin-multidex": "^1.0.0",
"primeicons": "^1.0.0",
@ -141,11 +140,11 @@
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"node-sass": "^4.13.0",
"protractor": "~5.4.0",
"node-sass": "^4.13.1",
"protractor": "^5.4.3",
"ts-node": "~8.0.0",
"tslint": "~5.12.0",
"typescript": "~3.1.6"
"typescript": "3.1.6"
},
"description": "An Ionic project",
"cordova": {
@ -195,8 +194,7 @@
"cordova-plugin-fingerprint-aio": {
"FACEID_USAGE_DESCRIPTION": "User Authentication"
},
"cordova-plugin-firebasex": {},
"cordova-plugin-vibration": {}
"cordova-plugin-firebasex": {}
},
"platforms": [
"browser",

@ -1,6 +1,6 @@
<ion-header >
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-title color="light"> {{ts.trPK('submitAbsenceConfirm','submitAbsenceConfirm')}}</ion-title>
<ion-buttons slot="start">
<nav-buttons></nav-buttons>
@ -11,7 +11,137 @@
<ion-content>
<ion-card>
<!-------------------------------Start New design ---------------------------------------->
<ion-grid>
<ion-row style="margin-top: 20px;margin-left: 12px;">
<ion-col>
<div size="10" class="approvalTitle">{{'general, addAttach' | translate}}</div>
</ion-col>
<ion-col style="padding-left: 7%;" size="2">
<div class="fileDiv">
<input end class="inputfile" style="margin-top: 10px;z-index: 99999;position: absolute;opacity: 0;" type="file" ng2FileSelect [uploader]="uploader"
(change)="onFileSelected($event)" />
<label end for="file" class="attachLable">
<ion-icon style="font-size: 22px;" name="add"></ion-icon>
</label></div>
</ion-col>
</ion-row>
<ion-item class="attachmentDiv" *ngIf="attachListOver?.length == 0">
<ion-img style="height: 26px;width:100%;margin-top:12px" src="../assets/imgs/attach-icon.png"></ion-img>
<ion-label style="margin-top: -24px;" position="floating" class="boldTxtNav">{{ 'general, notAttch' | translate}}</ion-label>
</ion-item>
</ion-grid>
<ion-grid class="attachmentDiv" *ngIf="attachListOver?.length > 0">
<div *ngFor="let attachList of attachListOver ; let i = index">
<ion-row>
<ion-col size="1">
<ion-label style="color: black !important;">
{{attachList.AttachmentID +1 }} .
</ion-label>
</ion-col>
<ion-col style="text-align: left;" size="10">
<ion-label style="color: blue !important;" (click)="OpenAttachFiles(attachList.P_FILE_DATA,attachList.P_FILE_CONTENT_TYPE)">
{{attachList.P_FILE_NAME }}
</ion-label>
</ion-col>
<ion-col size="1">
<!-- <button float-end class="attachImgBtn"
(click)="OpenAttachFiles(attachList.P_FILE_DATA,attachList.P_FILE_CONTENT_TYPE)">
<img class="attachImg" src="../assets/imgs/view.png">
</button> -->
<button float-end [disabled]="attachList.isSuccess" class="attachImgBtn removeLable"
(click)="removeFile(attachList)">
<ion-icon style="font-size:22px;margin-left:-7px;margin-top:-2px;" name="close"></ion-icon>
</button>
</ion-col>
</ion-row>
</div>
</ion-grid>
<ion-grid *ngIf="attachmentRes?.length > 0">
<div *ngFor="let attachRes of attachmentRes">
<ion-row>
<ion-col col-8>
<div> <img float-start class="attachImg" src="../assets/imgs/file.png">
</div>
<ion-label>
{{attachRes.FILE_NAME }} </ion-label>
</ion-col>
<ion-col col-4>
<button float-end class="attachImgBtn"
(click)="OpenAttachFiles(attachRes.FILE_DATA,attachRes.FILE_CONTENT_TYPE)">
<img class="attachImg" src="../assets/imgs/view.png">
</button>
<button float-end [disabled]="!isResubmitEIT" class="attachImgBtn" (click)="delelteFile(attachRes)"><img
class="attachImg" src="../assets/imgs/deletegray.png"></button>
</ion-col>
<!-- <button [disabled]="!isResubmitEIT" class="iconButton" (click)="addAttachment(false,attachRes)"><img
class="imgSize" src="../assets/imgs/editIcon.png"></button>
<button (click)="delelteFile(attachRes)" class="iconButton" [disabled]="!isResubmitEIT"><img
class="imgSize" src="../assets/imgs/cancel.png"></button> -->
</ion-row>
</div>
</ion-grid>
<ion-grid class="">
<div class="approvalTitle">{{'confirmAddEit, comment' | translate}}</div>
<ion-item class="submitNote" lines="none">
<!-- <ion-label position="floating" class="boldTxtNav">{{'confirmAddEit, comment' | translate}}</ion-label> -->
<ion-textarea type="text" [(ngModel)]="absComments"></ion-textarea>
</ion-item>
</ion-grid>
<ion-grid class="approvalList">
<div class="approvalTitle">{{'confirmAddEit, approverList' | translate}}</div>
<div class="noDataDiv" *ngIf="approversList?.length == 0">
<p>{{ 'general, empty' | translate}}</p>
</div>
<div style="background-color: white;border-radius: 32px;border: 1px solid #c8c4c4;" *ngIf="approversList?.length > 0">
<ion-list class="notification-list ">
<div class="timeline">
<ion-item style="padding-left: 4%;" *ngFor="let employee of approversList">
<div class="timeline-item" slot="start">
<div class="timeline-thumb timeline-icon">
<img *ngIf="employee.EMPLOYEE_IMAGE" class="empImge"
[src]="'data:image/png;base64,'+employee.EMPLOYEE_IMAGE">
<img *ngIf="employee.EMPLOYEE_IMAGE == null" class="empImge"
src="../assets/imgs/profile.png"> </div>
</div>
<ion-col>
<ion-label style="color:black !important ;font-weight: bold;padding-top: 0%;">
{{employee.APPROVER}}
</ion-label>
<ion-label style="color:black !important ;padding-top: 4%;">
{{employee.POSITION_TITLE}}
</ion-label>
</ion-col>
<div class="line"></div>
</ion-item>
</div>
</ion-list>
</div>
</ion-grid>
<!-------------------------------End New design ---------------------------------------->
<!-- <ion-card>
<ion-card-header class="boxHdr">
<div class="hrTitle"> {{ts.trPK('confirmAddEit','approverList')}}</div>
</ion-card-header>
@ -123,14 +253,14 @@
</ion-grid>
</ion-card-content>
</ion-card>
</ion-card> -->
</div>
<!-- </div> -->
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button color="customnavy" (click)="startAbApproval()">{{ts.trPK('confirmAddEit','start')}}</ion-button>
<ion-button class="confirmEitOkButton" (click)="openSubmitModal()">{{ts.trPK('confirmAddEit','start')}}</ion-button>
</div>
</ion-footer>

@ -28,4 +28,246 @@ ion-card-content.confirm-details{
}
.confirm-details label{
font-size: 13px;
}
}
/****************** NEW Design ***************************************/
.footer-button {
border-radius: 2px;
padding: 0 1.1em;
min-height: 45px;
min-width: 200px;
}
.Header {
font-weight: bold;
color: #1a586d !important;
font-size: 10px;
}
.tbData {
font-size: 10px;
}
.btnBack {
background: transparent;
float: right;
}
.attachmentDiv{
background: #ffffff;
height: auto;
text-align: center;
padding-top: 1px;
margin: 10px;
border-radius: 15px;
border: 1px solid grey;
}
.noDataDiv{
background: #ffffff;
height: 11%;
text-align: center;
padding-top: 1px;
border-radius: 10px;
margin: 10px;
border-radius: 5px;
}
.submitNote{
background: #ffffff;
height: 80px;
padding-top: 1px;
margin: 10px;
border-radius: 15px;
border: 1px solid grey;
}
.approvalList{
--background: #f0efef;
height: auto;
text-align: center;
padding-top: 1px;
border-radius: 10px;
margin: 10px;
border-radius: 5px;
}
/************************New Design**********************************/
.notification-list{
background: none;
background: none;
border-radius: 32px;
ion-item{
// margin-top: 5px;
// margin-bottom: 5px;
background-color: transparent;
.item-date{
width: 100%;
font-size: 16px;
font-weight: bold;
text-align: start;
padding: 0;
margin: 0;
position: absolute;
left: 0;
top: 12%;
}
ion-label , [item-end]{
white-space: normal;
font-size: 14px;
padding-top: 15%;
// :root[dir="ltr"]{
// margin-left: 10px;
// }
// :root[dir="rtl"]{
// margin-right: 10px;
// }
}
}
}
.timeline {
position: relative;
margin: 15px 0 0 0;
// border-bottom: solid 1px var(--cusgray);
}
.timeline:before {
content: '';
position: inherit !important;
top: 0;
bottom: 0;
width: 4px;
// background: #e4e4e4;
z-index: 1;
left: 35px;
/* margin-left: -10px; */
/* z-index: 1; */
}
.timeline .timeline-thumb {
border-radius: 500px;
width: 70px !important;
z-index: 2;
position: absolute;
left: 0px;
// :root[dir="ltr"]{
// left: 37px;
// }
// :root[dir="rtl"]{
// right: 37px;
// }
float: right;
top: 9px;
}
.timeline .timeline-thumb.timeline-icon {
height: 70px;
// text-align: center;
// color: white;
// border: 5px solid #CBD0D3;
// transform: scale(0.2);
}
.timeline .timeline-item {
width: 40px;
}
.timeline .timeline-stats {
position: relative;
font-size: 12px;
color: var(--darkgray);
}
.empImge{
border-radius: 50%;
width:100%;
height: 100%;
border: #dedede solid 1px;
}
.empImgeRep {
border-radius: 50% !important;
width: 80px;
height: 80px;
border: #dedede solid 1px;
}
.line{
padding-bottom:87px;
}
.attachLable{
position: absolute;
top: 0px;
z-index: 0;
background: #30b8c6;
color: #fff;
border-radius: 50%;
border: 0px;
width: 24px;
height: 24px;
text-align: center;
font-size: 5px;
}
.removeLable{
top: 0px;
z-index: 0;
background: #d8252d;
color: #fff;
border-radius: 50%;
border: 0px;
width: 20px;
height: 20px;
text-align: center;
font-size: 5px;
}
.note-modal {
// width: 90%;
// height: 50%;
// top: 20%;
// left: 5%;
// right: 5%;
// bottom: 5%;
background: rgba(0, 0, 0, 0.5) !important;
padding: 30% 10% !important;
--height: 12cm !important;
// --width: 80% !important;
--border-radius:20px;
}
.header-toolbar-new{
--background: #22c6b3;
}
.confirmEitOkButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
--background: #22c6b3;
width: 80% !important;
color: white!important;
border-radius: 16px !important;
}

@ -13,7 +13,8 @@ import { ConfirmAddEitService } from '../service/confirm-add-eit-service';
import { AbsenceNotificatonBodyResponse } from '../models/AbsenceNotificationBodyRes';
import { AbsenceAttachmentComponent } from '../absence-attachment/absence-attachment.component';
import { WorkListAttachViewComponent } from 'src/app/notification/work-list-attach-view/work-list-attach-view.component';
import { FileUploader } from 'ng2-file-upload';
import { SubmitAbsenceModalComponent } from '../submit-absence-modal/submit-absence-modal.component';
@Component({
selector: "app-absence-confirm",
templateUrl: "./absence-confirm.component.html",
@ -38,6 +39,9 @@ export class AbsenceConfirmComponent implements OnInit {
attachReqObj: WorkListButtonRequest = new WorkListButtonRequest();
private isResubmitAbs: boolean = false;
private isSubmitBtnClicked: boolean;
filterAllowedType: any = ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'];
constructor(
public common: CommonService,
public ts: TranslatorService,
@ -225,6 +229,41 @@ export class AbsenceConfirmComponent implements OnInit {
}
/*****submit modal********/
async openSubmitModal() {
this.common.sharedService.setSharedData( this.attachListOver, 'submitAbsAttachmentList');
this.common.sharedService.setSharedData(this.absComments, 'absComments');
const modal = await this.modalCtrl.create({
component: SubmitAbsenceModalComponent,
backdropDismiss: false,
});
modal.cssClass = 'note-modal';
modal.onDidDismiss()
.then((data) => {
console.log(data.data);
if (data.data == "cancel" || data.data == undefined) {
return;
} else {
this.startAbApproval();
}
});
return await modal.present();
}
removeFile(objectitem) {
if (this.attachListOver) {
@ -324,4 +363,96 @@ export class AbsenceConfirmComponent implements OnInit {
if (this.P_TransactionID && this.isSubmitBtnClicked == false)
this.cancelAbProcess();
}
/*******************Add attchement Functions*************/
public uploader: FileUploader = new FileUploader({
allowedMimeType: ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'],
maxFileSize: 10 * 1024 * 1024,
formatDataFunctionIsAsync: true,
formatDataFunction: async (item) => {
return new Promise((resolve, reject) => {
resolve({
name: item._file.name,
length: item._file.size,
contentType: item._file.type,
date: new Date()
});
});
}
});
onFileSelected(input) {
// this.uploader.onWhenAddingFileFailed = function (item: any, filter: any, options: any){
if (!(this.filterAllowedType.indexOf(input.target.files[0].type) > -1)) {
let msg: string = "";
msg = this.ts.trPK("general", "notSupport");
this.common.presentAlert(msg);
return
} // todo: show alert that you tried uploading wrong files
else {
const file = input.target.files[0];
// console.log(file);
//var encoded = Base64.encode(file);
this.getBase64(file).then(
data => this.pushObject(data, file.name, file.type)
);
// }
// };
}
}
getBase64(file) {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result);
reader.onerror = error => reject(error);
});
}
pushObject(fileData, name, type) {
console.log("before push: "+ this.index);
//this.attachListOver.length++;
try {
let array = name.split('.');
let attachType: string = array[array.length - 1];
this.attachListOver.push(
{
AttachmentID: this.attachListOver.length,
P_FILE_CONTENT_TYPE: attachType,//type.split('/')[1],
P_FILE_DATA: fileData.split(',')[1],
P_FILE_NAME: name,//.split('.')[0],
P_TRANSACTION_ID: this.P_TransactionID
})
} catch (e) {
}
//console.log("after push: "+ this.index);
// return this.addAttachRequest
}
}

@ -0,0 +1,132 @@
<ion-header>
<ion-toolbar>
<!-- class="header-toolbar" <nav-buttons></nav-buttons> -->
<ion-title color="dark">{{ 'replacementRoll, title' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content >
<ion-list syle="margin-bottom:2px !important" [hidden]="isAnswer==true">
<ion-item>
<ion-label class="boldTxtNav">{{'replacementRoll, searchBy' | translate}}</ion-label>
<ion-select okText='{{"general, ok" | translate }}' cancelText='{{"general, cancel" | translate }}'
[(ngModel)]="searchBy">
<ion-select-option value="1" selected="true">{{'addAttach, name' | translate}}</ion-select-option>
<ion-select-option value="2">{{'login, username' | translate}}</ion-select-option>
<ion-select-option value="3">{{'general, email' | translate}}</ion-select-option>
</ion-select>
</ion-item>
<ion-item lines="none">
<ion-button class="filterBtn" button-type="clear" (click)="getreplacmentemployee()" item-end>
<ion-icon slot="icon-only" color="white" name="search"></ion-icon>
</ion-button>
<ion-input class="filterInput" [(ngModel)]="inputSearch" placeholder='{{"general, search" | translate}}'></ion-input>
<!-- <button ion-button icon-only (click)="getreplacmentemployee()" clear type="button" item-end>
<ion-icon name="search"></ion-icon>
</button> -->
</ion-item>
<!-- <ion-item>
<ion-label>
{{selEmpName}}
</ion-label>
</ion-item> -->
<!-- <div class="centerDiv">
<button ion-button (click)="closePage()">{{'general.save' | translate}}</button>
</div> -->
</ion-list>
<!-- <div class="noteInput">
<ion-label [hidden]="isAnswer==false" class="boldTxtNav" padding>{{"replacementRoll, question" | translate}} :
{{pQuestion}} ?</ion-label>
<ion-label [hidden]="isAnswer==false" class="boldTxtNav" padding>{{"replacementRoll, answer" | translate}}
</ion-label>
<ion-label [hidden]="isAnswer==true" class="boldTxtNav" padding>{{"replacementRoll, enterNote" | translate}}
</ion-label>
<ion-item>
<ion-textarea [(ngModel)]="userNote"></ion-textarea>
</ion-item>
</div> -->
<ion-item [hidden]="isAnswer==true">
<!-- <ion-list *ngIf="ReplacementList"> -->
<!-- <ion-list *ngIf="ReplacementList">
-->
<!-- <ion-radio-group mode="md" [(ngModel)]="selEmp"> -->
<!-- <ion-grid fixed>
<ion-row justify-content-end>
<ion-col [ngClass]="{'activated': (active == i),'deactivated': (active != i)}" (click)="select(employee,i)"
*ngFor="let employee of demoeAttach;let i=index;"
size-xs="6" size-sm="6" size-md="6" size-lg="6" align-self-stretch>
<div class="profileImageDiv"> <img class="profileImage" src="../assets/imgs/profile.png"></div>
<div *ngIf="active == i" class="selIEmpDiv"> <img class="selIEmpImage" src="../assets/imgs/green.png"></div>
<br/>
<div class="repContentDiv">
<ion-label style="color:var(--dark) !important">
<span style="font-weight: bold !important">{{employee.EMPLOYEE_DISPLAY_NAME}}</span>
<br>{{employee.USER_NAME}}<br>
{{employee.EMAIL_ADDRESS}}</ion-label>
</div>
</ion-col>
</ion-row>
</ion-grid> -->
<!-- </ion-radio-group> -->
<!--
</ion-list> -->
<div class="square-container">
<div (click)="select(employee,i)" *ngFor="let employee of ReplacementList;let i=index;" class="square">
<div class="profileImageDiv">
<!-- <img class="profileImage" src="../assets/imgs/profile.png"> -->
<img *ngIf="employee.EMPLOYEE_IMAGE" class="empImgeRep" [src]="'data:image/png;base64,'+employee.EMPLOYEE_IMAGE">
<img *ngIf="employee.EMPLOYEE_IMAGE == null" class="empImgeRep" src="../assets/imgs/profile.png">
</div>
<div *ngIf="active == i" class="selIEmpDiv">
<img class="selIEmpImage" src="../assets/imgs/green.png">
</div>
<div [ngClass]="{'activated': (active == i),'deactivated': (active != i)}"
class="content">
<ion-label>
<span style="font-weight: bold !important">{{employee.EMPLOYEE_DISPLAY_NAME}}</span>
<br>{{employee.USER_NAME}}<br>
{{employee.EMAIL_ADDRESS}}
</ion-label>
</div>
</div>
</div>
</ion-item>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button class="footer-button" style="background: var(--newgreen)!important;border-radius: 10px; --background: transparent; " ion-button (click)="submitAction()">
{{'general, submit' | translate}}</ion-button>
<ion-button class="footer-button" style="background: var(--darkblue)!important;border-radius: 10px; --background: transparent; " ion-button (click)="closeModal()">
{{'general, cancel' | translate}}</ion-button>
</div>
</ion-footer>

@ -0,0 +1,121 @@
button.item-button.button.button-md.button-clear.button-clear-md {
background-color: transparent;
}
.footer-button {
border-radius: 3px;
padding: 0 1.1em;
min-height: 45px;
min-width: 200px;
}
// ion-item {
// margin-top: 5%;
// margin-right: 7%;
// width: 100%;
// }
.ionItem{
border: #e4e4e4 solid;
/* margin: 6px; */
/* padding: 11px; */
height: 85px;
width: 164px;
border-radius: 5px;
text-align: center;
}
.profileImageDiv{
text-align: center;
margin-bottom: -27px;
z-index: 3;
position: relative;
top: 0;
}
.profileImage{
width:60px !important;
// margin-left: -25px;
// margin-right: 22px;
}
.activated{
border: #209a83 0.02cm solid ;
}
.deactivated{ border: #e4e4e4 0.02cm solid;
}
.repContentDiv{
text-align: center;
width: 85%;
font-size: 14px;
border: #e4e4e4 solid;
border-radius: 5px;
padding: 20px 8px 8px 8px;
margin-top: -9px;
margin-right: -35px
}
.selIEmpDiv{
text-align: right;
margin-bottom: -26px;
margin-right: 0px;
z-index: 3;
position: relative;
top: 0;
}
.selIEmpImage{
width:22px !important
}
.noteInput{
border: solid var(--gray) 1px;
border-radius: 15px;
margin: 8px 17px 0px 17px;
padding: 10px 2px 10px 2px;
}
.filterInput{
border: solid var(--gray) 1px;
border-radius: 21px;
padding-left: 10px !important;
}
.filterBtn{
background: var(--newgreen);
--background: var (--newgreen);
border-radius: 50%;
height: 60px;
width: 60px;
}
*{
box-sizing: border-box;
}
.square-container{
// padding: 8px;
width:100%;
}
.square{
// width:calc(100% / 2);
width:50%;
float:left;
position: relative;
// padding-bottom: calc(100% / 2);
}
.square .content{
width: calc(100% - 16px) !important;
height: calc(100% - 16px) !important;
margin: 8px;
padding: 16px;
// position: absolute;
color: white;
border-radius: 9px;
text-align: center;
// background-color: #0095ff;
// box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26);
}

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AbsenceReplacementListComponent } from './absence-replacement-list.component';
describe('AbsenceReplacementListComponent', () => {
let component: AbsenceReplacementListComponent;
let fixture: ComponentFixture<AbsenceReplacementListComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AbsenceReplacementListComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AbsenceReplacementListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,342 @@
import { ModalController } from '@ionic/angular';
import { Component, OnInit } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { WorKListReplacmentEmployeeResponse } from 'src/app/notification/models/ReplacmentEmployeeRes';
import { WorkListReplacmentEmployeeRequest } from 'src/app/notification/models/ReplacmentEmployeeReq';
import { WorkListActionRequest } from 'src/app/notification/models/NotificationActionReq';
import { WorklistMainService } from 'src/app/notification/service/work-list.main.service';
import { ViewReplacementModalComponent } from 'src/app/notification/view-replacement-modal/view-replacement-modal.component';
import { WorklistService } from 'src/app/notification/service/worklist.service';
@Component({
selector: 'app-absence-replacement-list',
templateUrl: './absence-replacement-list.component.html',
styleUrls: ['./absence-replacement-list.component.scss'],
})
export class AbsenceReplacementListComponent implements OnInit {
P_SEARCH_EMPLOYEE_DISPLAY_NAME: string = "";
P_SEARCH_EMAIL_ADDRESS: string = "";
getPassActionMode: any;
selectedValue: any;
inputSearch: any;
selEmpName: any;
selectedUserInf: any;
userNote: any;
getPassNotificationDetails: any;
isAnswer: boolean = false;
pQuestion: string = "";
selEmp: any;
P_PAGE_NUM: number;
P_PAGE_LIMIT: number;
ReplacementList: any = [];
searchBy: string = "";
IsReachEnd: boolean = false;
ReplacmentListRes: WorKListReplacmentEmployeeResponse;
private WorkListReplacmentEmployeeObj: WorkListReplacmentEmployeeRequest = new WorkListReplacmentEmployeeRequest();
private WorkListActionObj: WorkListActionRequest;
getpassResAttr: any = [];
active: any;
demoeAttach:any=[];
constructor(public worklistService: WorklistService, private cs: CommonService, private ts: TranslatorService, public workListMainService: WorklistMainService, public modalCtrl: ModalController) {
this.P_PAGE_NUM = 1;
this.P_PAGE_LIMIT = 50;
// this.getPassActionMode = this.cs.sharedService.getSharedData('passActionMode', false);
// this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo', false);
// this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr', false);
// this.pQuestion = this.cs.sharedService.getSharedData('pQuestion', false);
// if (this.getPassActionMode == "ANSWER_INFO") {
// this.isAnswer = true;
// }
this.WorkListReplacmentEmployeeObj.P_PAGE_NUM = this.P_PAGE_NUM;
this.WorkListReplacmentEmployeeObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
// this.WorkListActionObj = new WorkListActionRequest();
// this.WorkListActionObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;//26919060;
// this.WorkListActionObj.P_FORWARD_TO_USER_NAME = "";
// this.WorkListActionObj.P_ACTION_MODE = "";
// this.WorkListActionObj.P_COMMENTS = "";
// this.WorkListActionObj.RespondAttributeList =[];// this.getpassResAttr;
// this.WorkListActionObj.P_APPROVER_INDEX = null;
}
ngOnInit() {
this.demoeAttach = [{
USER_NAME: '18888',
EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ",
EMAIL_ADDRESS: "test@yuyuu.hjj",
},
{
USER_NAME: '18888',
EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ",
EMAIL_ADDRESS: "test@yuyuu.hjj"
},
{
USER_NAME: '18888',
EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ",
EMAIL_ADDRESS: "test@yuyuu.hjj"
},
{
USER_NAME: '18888',
EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ",
EMAIL_ADDRESS: "test@yuyuu.hjj"
}
];
}
getreplacmentemployee() {
this.ReplacementList = [];
this.IsReachEnd = false;
this.P_PAGE_NUM = 1;
if (this.inputSearch) {
switch (this.searchBy) {
case '1': {
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = this.inputSearch;
this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = "";
break;
}
case '2': {
this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = this.inputSearch;
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = "";
break;
}
case '3': {
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = this.inputSearch;
this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
break;
}
default: {
this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = "";
break;
}
}
} else {
this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = "";
}
// if(this.selectedValue =="1"){
// this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME=this.inputSearch;
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME="";
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS="";
// }
// else if(this.selectedValue =="2"){
// this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME="";
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME=this.inputSearch;
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS="";
// }
// else if(this.selectedValue =="3"){
// this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME="";
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME="";
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS=this.inputSearch;
// }
this.worklistService.getReplacmentEmployeeList(this.WorkListReplacmentEmployeeObj).
subscribe((result: WorKListReplacmentEmployeeResponse) => {
this.handleWorkListReplacmentEmployeeResult(result);
});
}//End replacment Employee
handleWorkListReplacmentEmployeeResult(result) {
if (this.cs.validResponse(result)) {
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
if (this.cs.hasData(result.ReplacementList)) {
//this.ReplacmentListRes =result.ReplacementList;
this.ReplacementList = result.ReplacementList;
this.P_PAGE_NUM++;
let lastItemIndex = this.ReplacementList.length - 1;
if (result.ReplacementList[lastItemIndex]) {
let lastitem = result.ReplacementList[lastItemIndex];
if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) {
this.IsReachEnd = true;
} else {
this.IsReachEnd = false;
}
}
} else {
let msg: string = this.ts.trPK('general', 'noResult');
this.cs.presentAlert(msg);
}
// if(result.ReplacementList.length == 0){
// }
// else if(result.ReplacementList != null)
// {
// this.ReplacmentListRes =result.ReplacementList;
// //open modal
// this.openModale(this.ReplacmentListRes);
// } // if result == null
} // valid it
}
getValueSelected(Value) {
this.selectedValue = Value;
}
select(selectEmp,index){
console.log(selectEmp.EMPLOYEE_DISPLAY_NAME);
this.selEmp=selectEmp
this.active=index;
}
clear() {
this.selEmpName = "";
this.selectedUserInf = null;
}
async openModale(ReplacmentListRes) {
const modal = await this.modalCtrl.create({
component: ViewReplacementModalComponent
});
modal.onDidDismiss()
.then((data) => {
if (data == "cancel" || data == "undefined") {
//this.selEmpName="";
return;
} else {
this.selectedUserInf = data;
this.selEmpName = this.selectedUserInf.EMPLOYEE_DISPLAY_NAME;
}
});
return await modal.present();
}
submitAction() {
this.selEmp
if( this.selEmp){
let data = this.selEmp;
this.modalCtrl.dismiss(data);
}else{
let msg: string = this.ts.trPK("replacementRoll", "msg");
this.cs.showErrorMessageDialog(() => {
}, this.ts.trPK('general', 'ok'), msg);
return false;
}
// if (this.selEmp && this.isAnswer == false) {
// // this.selectedUserInf = this.ReplacementList[this.selEmp];
// this.selectedUserInf = this.selEmp;
// console.log("selEmp "+ this.selEmp.USER_NAME);
// if (this.selectedUserInf && this.selectedUserInf.USER_NAME) {
// console.log("userInfo "+this.selectedUserInf.USER_NAME);
// if (this.userNote) {
// this.WorkListActionObj.P_FORWARD_TO_USER_NAME = this.selectedUserInf.USER_NAME;
// this.WorkListActionObj.P_ACTION_MODE = this.getPassActionMode;
// this.WorkListActionObj.P_COMMENTS = this.userNote;// response Attr
// this.workListMainService.actionButton(this.WorkListActionObj).
// subscribe((result: any) => {
// this.handleApplayActionResult(result);
// });
// } else {
// let msg: string = this.ts.trPK("replacementRoll", "enterNote");
// this.cs.showErrorMessageDialog(() => {
// }, this.ts.trPK('general', 'ok'), msg);
// }
// } else {
// let msg: string = this.ts.trPK("replacementRoll", "msg");
// this.cs.showErrorMessageDialog(() => {
// }, this.ts.trPK('general', 'ok'), msg);
// }
// } else if (this.isAnswer == true) {
// if (this.userNote) {
// this.WorkListActionObj.P_FORWARD_TO_USER_NAME = null;
// this.WorkListActionObj.P_ACTION_MODE = this.getPassActionMode;
// this.WorkListActionObj.P_COMMENTS = this.userNote;// response Attr
// this.workListMainService.actionButton(this.WorkListActionObj).
// subscribe((result: any) => {
// this.handleApplayActionResult(result);
// });
// } else {
// let msg: string = this.ts.trPK("replacementRoll", "enterNote");
// this.cs.showErrorMessageDialog(() => {
// }, this.ts.trPK('general', 'ok'), msg);
// }
// } else {
// let msg: string = this.ts.trPK("replacementRoll", "msg");
// this.cs.showErrorMessageDialog(() => {
// }, this.ts.trPK('general', 'ok'), msg);
// }
}
doInfinite(infiniteScroll) {
if (!this.IsReachEnd) {
//const request =new WorkListActionRequest();
// request.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME=this.P_SEARCH_USER_NAME;
// request.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME=this.P_SEARCH_EMPLOYEE_DISPLAY_NAME;
// request.P_SEARCH_EMAIL_ADDRESS=this.P_SEARCH_EMAIL_ADDRESS;
this.WorkListReplacmentEmployeeObj.P_PAGE_NUM = this.P_PAGE_NUM;
this.WorkListReplacmentEmployeeObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
// request.P_SELECTED_EMPLOYEE_NUMBER=this.selEmp;
this.worklistService.getReplacmentEmployeeList(this.WorkListReplacmentEmployeeObj).
subscribe((result: any) => {
if (this.cs.validResponse(result)) {
if (this.cs.hasData(result.ReplacementList)) {
this.P_PAGE_NUM++;
result.ReplacementList.forEach(vr => {
if (vr.ROW_NUM == vr.NO_OF_ROWS) {
this.IsReachEnd = true;
}
else {
this.IsReachEnd = false;
}
this.ReplacementList.push(vr);
// this.pro.GetVacationRulesList.push(vr);
});
} else {
this.IsReachEnd = true;
}
}
//this.P_PAGE_NUM++;
if (infiniteScroll)
infiniteScroll.target.complete();
// console.log(resFlag);
}, (Error) => console.log(Error), () => infiniteScroll.target.complete());
} else {
if (infiniteScroll)
infiniteScroll.target.complete();
}
}
closeModal() {
this.modalCtrl.dismiss();
}
}

@ -20,6 +20,10 @@ import { AbsenceAttachmentComponent } from "./absence-attachment/absence-attachm
import { AddAttachService } from "./service/add-attach-service";
import { WorkListAttachViewComponent } from "src/app/notification/work-list-attach-view/work-list-attach-view.component";
import { ViewAttachmentsComponent } from './view-attachments/view-attachments.component';
import { SubmitAbsenceModalComponent } from './submit-absence-modal/submit-absence-modal.component';
import { AbsenceReplacementListComponent } from './absence-replacement-list/absence-replacement-list.component';
import { WorklistService } from 'src/app/notification/service/worklist.service';
import { WorklistMainService } from 'src/app/notification/service/work-list.main.service';
const routes: Routes = [
{
path: "",
@ -52,6 +56,14 @@ const routes: Routes = [
{
path:'view-attachements',
component:ViewAttachmentsComponent
},
{
path:'absence-submit-modal',
component:SubmitAbsenceModalComponent
},
{
path:'absence-replacment-modal',
component:AbsenceReplacementListComponent
}
]
}
@ -73,7 +85,9 @@ const routes: Routes = [
SubmitAbConfirmService,
DatePicker,
ConfirmAddEitService,
AddAttachService
AddAttachService,
WorklistService,
WorklistMainService
],
declarations: [
AbsencePage,
@ -81,7 +95,9 @@ const routes: Routes = [
SubmitAbsenceComponent,
AbsenceConfirmComponent,
AbsenceAttachmentComponent,
ViewAttachmentsComponent
ViewAttachmentsComponent,
SubmitAbsenceModalComponent,
AbsenceReplacementListComponent
]
})
export class AbsencePageModule {}

@ -1,19 +1,150 @@
<ion-header >
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-title color="light">{{ts.trPK('absenceList','absenceList')}}</ion-title>
<ion-buttons slot="start">
<nav-buttons></nav-buttons>
</ion-buttons>
<ion-buttons slot="end">
<!-- <ion-buttons slot="end">
<button class="headerBtn" (click)="AccrualBalances()">
<img class="headerImg" src="../assets/imgs/accubalance.png">
</button>
</ion-buttons>
</ion-buttons> -->
</ion-toolbar>
</ion-header>
<ion-content padding>
<ion-content >
<!-- colorBG -->
<div class="contentEit" style="background: #f3f1f1;">
<div class="header-div">
<!-- <ion-buttons slot="end">
<button class="headerBtn" (click)="AccrualBalances()">
<img class="headerImg" src="../assets/imgs/accubalance.png">
</button>
</ion-buttons> -->
<!-- <ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" defaultHref="/home"></ion-back-button>
</ion-buttons>
<p class="Title">{{ts.trPK('absenceList','absenceList')}}</p> -->
</div>
<div class="">
<div >
<ion-grid class="headerGrid">
<div style="color: black;">
<div class="result-graph">
<div >
<!-- <ion-item> -->
<!-- <ion-label class="datelabel">{{request.P_EFFECTIVE_DATE}}</ion-label> -->
<ion-datetime [(ngModel)]="Sdate" class="datetime" displayFormat="DD MMMM YYYY" placeholder="DD MMMM YYYY"
(ionChange)="getAccrualBalance()"></ion-datetime>
<ion-icon class="iconCalendar" ios="ios-calendar" md="md-calendar"></ion-icon>
<!-- </ion-item> -->
</div>
<div style=" border-bottom: 1px solid #a7a4a4; margin-bottom: 12px;
margin-top: -10px; margin-right: -9px;"></div>
<div class="result-text-container">
<h2>{{totalnumber}}</h2>
<!-- <h2>{{accrualNet + accrualUsed + accrualYearly}}</h2> -->
<span>{{ts.trPK('absenceList','totalNumber')}}</span>
</div>
<p-chart #chart class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart>
</div>
<div style="position: relative;
left: 82%;
bottom: 128px;
color: black;
background-color: #DDB017;
width: 13%;
height: 6px;">
<ion-col>
<ion-row>
<label class="green-label">{{ts.trPK('absenceList','accrualNet')}}</label>
</ion-row>
<ion-row>
<label class="green-amount">{{accrualNet}}</label>
</ion-row>
</ion-col>
</div>
<div style="position: relative;
left: 59%;
bottom: 131px;
color: black;
background-color: #094875;
width: 13%;
height: 6px;">
<ion-col>
<ion-row>
<label class="blue-label">{{ts.trPK('absenceList','accrualUsed')}}</label>
</ion-row>
<ion-row>
<label class="blue-amount" for="">{{accrualUsed}}</label>
</ion-row>
</ion-col>
</div>
<div style="position: relative;
left: 82%;
bottom: 80px;
color: black;
background-color: #CB3232;
width: 13%;
height: 6px;">
<ion-col>
<ion-row>
<label class="blue-label">{{ts.trPK('absenceList','accrualYearly')}}</label>
</ion-row>
<ion-row>
<label class="blue-amount" for="">{{accrualYearly}}</label>
</ion-row>
</ion-col>
</div>
<!-- <div style="position: relative;
left: 59%;
bottom: 73px;
color: black;
background-color: #094875;
width: 16%;
height: 6px;">
<ion-col>
<ion-row>
<label class="blue-label">text</label>
</ion-row>
<ion-row> -->
<!-- <label class="blue-amount" for="">{{getleaveAccrualBalance.ACCRUAL_YEARLY_ENTITLEMENT}}</label> -->
<!-- </ion-row>
</ion-col>
</div> -->
</div>
</ion-grid>
</div>
</div>
<!-- /////////////////////////////////////////////////////////up -->
<!-- <ion-content padding> -->
<div class="no-dataDiv" *ngIf="!GetAbsenceTransactionList || GetAbsenceTransactionList.length <= 0" >
<ion-row>
@ -25,92 +156,104 @@
</div>
<div *ngIf="GetAbsenceTransactionList && GetAbsenceTransactionList.length > 0 ">
<ion-card *ngFor="let item of GetAbsenceTransactionList; let i=index;">
<div *ngFor="let item of GetAbsenceTransactionList; let i=index;">
<ion-card-header class="boxHdr">
<!-- <ion-card-header class="boxHdr">
<div class="hrTitle">{{ts.trPK('absenceList','absHeader')}}</div>
<img class="imgSize" src="../assets/imgs/attachment.png" *ngIf="item.ATTACHMENT_EXIST=='Y'" (click)="AttachmentDocuments(item.ABSENCE_ATTENDANCE_ID)">
</ion-card-header>
<ion-card-content>
<ion-grid>
</ion-card-header> -->
<ion-grid class="grids">
<div>
<ion-row>
<ion-col class="colBold">
<label for="">{{ts.trPK('absenceList','startDate')}} </label>
</ion-col>
<ion-col>
<label for=""> {{item.START_DATE}}</label>
<label style="color:#094875;font-weight: bold;" class="label" for="">{{ts.trPK('absenceList','startDate')}} </label>
<br>
<label class="label" style="color:black;" for=""> {{item.START_DATE}}</label>
<br>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold">
<label for="">{{ts.trPK('absenceList','endDate')}}</label>
</ion-col>
<ion-col>
<label for=""> {{item.END_DATE}}</label>
</ion-col>
<label style="color:#094875;font-weight: bold;" class="label" for="">{{ts.trPK('absenceList','endDate')}}</label>
<br>
<label class="label" style="color:black;" for=""> {{item.END_DATE}}</label>
<br>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold">
<label for="">{{ts.trPK('absenceList','absenceType')}} </label>
</ion-col>
<ion-col>
<label for="">{{item.ABSENCE_TYPE}}</label>
<label style="color:#094875;font-weight: bold;" class="label" for="">{{ts.trPK('absenceList','absenceType')}} </label>
<br>
<label class="label" style="color:black;" for="">{{item.ABSENCE_TYPE}}</label>
<br>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold">
<label for="">{{ts.trPK('absenceList','absenceCategory')}}</label>
</ion-col>
<ion-col>
<label for="">{{item.ABSENCE_CATEGORY}}</label>
<label style="color:#094875;font-weight: bold;" class="label" for="">{{ts.trPK('absenceList','absenceCategory')}}</label>
<br>
<label class="label" style="color:black;" for="">{{item.ABSENCE_CATEGORY}}</label>
<br>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold">
<label for="">{{ts.trPK('absenceList','days')}}</label>
</ion-col>
<ion-col>
<label for="">{{item.ABSENCE_DAYS}}</label>
<label style="color:#094875;font-weight: bold;" class="label" for="">{{ts.trPK('absenceList','days')}}</label>
<br>
<label class="label" style="color:black;" for="">{{item.ABSENCE_DAYS}}</label>
<br>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold">
<label for="">{{ts.trPK('absenceList','hours')}}</label>
</ion-col>
<ion-col>
<label for="">{{item.ABSENCE_HOURS}}</label>
<label style="color:#094875;font-weight: bold;" class="label" for="">{{ts.trPK('absenceList','hours')}}</label>
<br>
<label class="label" style="color:black;" for="">{{item.ABSENCE_HOURS}}</label>
<br>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold">
<label for="">{{ts.trPK('absenceList','approvalStatus')}}</label>
</ion-col>
<ion-col>
<label for="">{{item.APPROVAL_STATUS}}</label>
<label style="color:#094875;font-weight: bold;" for="">{{ts.trPK('absenceList','approvalStatus')}}</label>
<br>
<label class="label" style="color:black;" for="">{{item.APPROVAL_STATUS}}</label>
<br>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold">
<label for="">{{ts.trPK('absenceList','absenceStatus')}}</label>
</ion-col>
<ion-col>
<label for="">{{item.ABSENCE_STATUS}}</label>
<label style="color:#094875;font-weight: bold;" for="">{{ts.trPK('absenceList','absenceStatus')}}</label>
<br>
<label class="label" style="color:black;" for="">{{item.ABSENCE_STATUS}}</label>
<br>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
</div>
</ion-grid>
</ion-card-content>
</ion-card>
</div>
</div>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
<ion-icon class="addClass" name="add" (click)="createAbsence()"></ion-icon>
</div>
</ion-content>
<ion-footer>
<!-- <ion-footer>
<div class="centerDiv">
<ion-button color="customnavy" class="gridBtn" (click)="createAbsence()">{{ts.trPK('absenceList','createAbs')}}</ion-button>
</div>
</ion-footer>
</ion-footer> -->

@ -7,3 +7,212 @@
height:20px;
width:20px;
}
.addClass{
background-color: #094875;
width: 80px;
height: 80px;
right: 8%;
position: fixed;
color: white;
bottom: 20%;
border-radius: 50%;
z-index: 999;
-webkit-box-shadow: 2px -1px 13px 0px rgba(0,0,0,0.59);
-moz-box-shadow: 2px -1px 13px 0px rgba(0,0,0,0.59);
box-shadow: 2px -1px 13px 0px rgba(0,0,0,0.59);
}
.grids{
border-radius: 20px !important;
background: white;
padding-left: 1px;
padding-right: 1px;
margin: 13px;
padding-top: 0px;
padding-bottom: 3px;
padding-left: 13px;
padding-right: 13px;
border: 1px solid #cac8c8;
margin-bottom: 10% !important;
}
.bgcolor {
color: white;
border-top-right-radius: 19px;
border-top-left-radius: 15px;
padding-top: 1;
padding-bottom: 0;
margin-top: 0;
margin-bottom: 0;
/* border-radius: 12px !important; */
background: #094875;
border-bottom: 1px solid #a7a4a4;
border-top: 1px solid #cac8c8;
margin-left: -13px;
margin-right: -13px;
}
.header-div {
background-color: #22C6B3;
text-transform: capitalize;
height: 160px;
/* position: relative; */
/* display: block; */
margin-bottom: -28px;
}
.header-toolbar-new{
--background: #22c6b3;
}
.hrClass{
border-width: 0;
box-sizing: content-box;
border-bottom: 1px solid #e6e6e6;
background: #fff !important;
height: 1px;
}
//////////////////////////////////////////////down
.colorBG{
--background: #f0efef;
}
.Title{
text-align: center;
color: white;
margin-top: -33px;
font-size: 17px;
}
.result-graph{
font-size: 14px;
margin-left: -48px;
margin-right: 3px;
margin-bottom: -30px;
}
.datetime{
// text-align: center;
// font-family: WorkSans-Bold;
// margin-left: 111px;
text-align: center;
font-family: WorkSans-Bold;
margin-left: 47px;
margin-top: -19px;
}
.datelabel{
margin-left: 150px;
color: black !important;
font-family: WorkSans-Bold;
}
.iconCalendar{
// margin-left: -241px;
// margin-top: 5px;
margin-left: 30px !important;
width: 22% !important;
height: 26px !important;
margin-top: -69px !important;
margin-bottom: 20px !important;
}
.today-graph{
// display:block !important;
// height: 150px !important;
// width: 300 !important;
// margin-left: -70px !important;
display: block !important;
height: 196px;
width: 385px;
padding-left: 51px;
// padding-top: 29px;
margin-left: -70px !important;
}
.headerGrid{
background-color: white !important;
border: 1px solid #cac8c8 !important;
border-radius: 20px !important;
padding-top: 28px;
padding-bottom: 14px;
margin-left: 13px;
margin-right: 13px;
margin-top: -136px;
margin-bottom: 10px;
}
.header{
margin-top: -126px;
}
.result-text-container {
padding: 0;
margin: 0;
position: absolute;
left: 31%;
top: 23%;
display: block;
text-align: center;
transform: translate(-50%, -50%);
h2 {
font-size: 25px;
font-family: WorkSans-Bold;
margin: 0 auto;
// margin-top: 289px;
line-height: 36px;
}
span {
width: 125px;
display: block;
margin: 0 auto;
font-size: 12px;
// margin-top: 289px;
font-family: workSans-Regular;
}
}
.green-label{
font-size: 12px;
margin-top: -13px;
}
.green-amount{
font-size: 17px;
font-family: WorkSans-Bold;
margin-top: -3px;
}
.blue-label{
font-size: 12px;
margin-top: -13px;
}
.blue-amount{
font-size: 17px;
font-family: WorkSans-Bold;
margin-top: -4px;
}
.contentEit:before {
position: absolute;
content: "";
// background: #22c6b3;
height: 140px;
width: 100%;
left: 0;
top: 0px;
z-index: 1;
}

@ -6,6 +6,9 @@ import { MenuService } from "src/app/hmg-common/services/menu/menuservice.servic
import { AbsenceAttahcmentResponse } from "../models/abs.attach.response";
import { AbsenceListService } from "../service/service.service";
import { IonInfiniteScroll } from "@ionic/angular";
import { AccrualService } from 'src/app/accrual-balances/services/accrual.service';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user';
@Component({
selector: "app-home",
@ -13,6 +16,7 @@ import { IonInfiniteScroll } from "@ionic/angular";
styleUrls: ["./home.component.scss"]
})
export class HomeComponent implements OnInit {
[x: string]: any;
@ViewChild(IonInfiniteScroll) infiniteScroll: IonInfiniteScroll;
P_PAGE_NUM: number;
P_PAGE_LIMIT: number;
@ -21,14 +25,55 @@ export class HomeComponent implements OnInit {
selEmp: string = "";
respID: number;
selMenu: MenuResponse;
leaveAccrualBalance: any;
data: any;
accrualNet: any;
getleaveAccrualBalance: any;
accrualUsed: any;
accrualYearly: any;
effectiveDate: any;
Sdate: any;
emp_no: any;
balance: any;
ACCRUAL_NET_ENTITLEMENT: any;
ACCRUAL_USED_ENTITLEMENT: any;
ACCRUAL_YEARLY_ENTITLEMENT: any;
totalnumber: any;
public options = {
cutoutPercentage: 80,
tooltips: { enabled: false },
legend: { display: false }};
gaugeType = "full";
// gaugeValue = 11.200;
// gaugeLabel = "";
constructor(
public common: CommonService,
public ts: TranslatorService,
public menuService: MenuService,
public absService: AbsenceListService
public absService: AbsenceListService,
public accrualService: AccrualService,
public authService: AuthenticationService
) {}
ngOnInit() {
this.Sdate = new Date().toISOString();
this.getUserDetails();
}
private getUserDetails(){
this.authService.loadAuthenticatedUser().subscribe((user: AuthenticatedUser) => {
if (user) {
this.emp_no=user.EMPLOYEE_NUMBER;
this.getAccrualBalance();
}
});
this.P_PAGE_LIMIT = 50;
this.P_PAGE_NUM = 1;
this.selMenu = this.common.sharedService.getSharedData(
@ -43,13 +88,42 @@ export class HomeComponent implements OnInit {
MenuResponse.SHARED_SEL_RESP_ID,
false
);
this.leaveAccrualBalance = this.common.sharedService.getSharedData('leaveAccrualBalance', false);
console.log("this.leaveAccrualBalance>>>>>>>>>>" + this.leaveAccrualBalance.ACCRUAL_NET_ENTITLEMENT);
/***
ACCRUAL_NET_ENTITLEMENT: 24.59
ACCRUAL_USED_ENTITLEMENT: 0
ACCRUAL_YEARLY_ENTITLEMENT: 50.4*/
this.accrualNet = this.leaveAccrualBalance.ACCRUAL_NET_ENTITLEMENT;
this.accrualUsed = this.leaveAccrualBalance.ACCRUAL_USED_ENTITLEMENT;
this.accrualYearly = this.leaveAccrualBalance.ACCRUAL_YEARLY_ENTITLEMENT;
this.totalnumber= this.accrualNet + this.accrualUsed + this.accrualYearly;
this.totalnumber= this.totalnumber.toFixed(3);
this.request = this.common.sharedService.getSharedData('leaveAccrualBalanceDate', false);
console.log("this.request" + this.request.P_EFFECTIVE_DATE);
this.effectiveDate = this.request.P_EFFECTIVE_DATE;
this.data = {
// labels: ['earingTotal', 'deductionTotal'],
datasets: [
{ data: [this.accrualNet,this.accrualUsed,this.accrualYearly],
backgroundColor: [
'#DDB017',
'#094875',
'#CB3232',],
borderWidth: 2
}
]
};
this.getAbsenceTransaction();
}
AccrualBalances() {
AccrualBalances() {
this.common.openAccuralPage();
}
AttachmentDocuments(id) {
AttachmentDocuments(id) {
const request = {
P_ABSENCE_ATTENDANCE_ID: id
};
@ -77,7 +151,7 @@ export class HomeComponent implements OnInit {
//this.GetAbsenceTransactionList =result.GetAbsenceTransactionList;
}
}
getAbsenceTransaction() {
getAbsenceTransaction() {
this.IsReachEnd = false;
const request = {
P_SELECTED_EMPLOYEE_NUMBER: this.selEmp,
@ -91,7 +165,7 @@ export class HomeComponent implements OnInit {
});
}
private handleAbsListResult(result) {
handleAbsListResult(result) {
if (this.common.validResponse(result)) {
if (this.common.hasData(result.GetAbsenceTransactionList)) {
this.GetAbsenceTransactionList = result.GetAbsenceTransactionList;
@ -108,7 +182,7 @@ export class HomeComponent implements OnInit {
}
}
}
doInfinite(infiniteScroll) {
doInfinite() {
if (!this.IsReachEnd) {
//this.P_PAGE_NUM++;
const request = {
@ -148,7 +222,54 @@ export class HomeComponent implements OnInit {
}
}
}
createAbsence() {
createAbsence() {
this.common.openSubmitAbsencePage();
}
///////////////////////////////////////////////////////////////
getAccrualBalance() {
if (this.Sdate) {
let today = new Date(this.Sdate);
let day = today.getDate();
let month = today.getMonth() + 1;
let year = today.getFullYear();
let todayDate = month + '/' + day + '/' + year;
let effectiveDate = todayDate;
const request = {
P_SELECTED_EMPLOYEE_NUMBER: this.emp_no,
P_EFFECTIVE_DATE: effectiveDate
};
this.accrualService
.getAccrualBalances(request)
.subscribe((result: any) => {
this.handleAccrualResult(result);
});
}
}
handleAccrualResult(result) {
if (this.common.validResponse(result)) {
this.balance = result.GetAccrualBalancesList;
}
if(this.balance){
this.accrualNet = this.balance[0].ACCRUAL_NET_ENTITLEMENT;
this.accrualUsed = this.balance[0].ACCRUAL_USED_ENTITLEMENT;
this.accrualYearly = this.balance[0].ACCRUAL_YEARLY_ENTITLEMENT;
this.totalnumber= this.accrualNet + this.accrualUsed + this.accrualYearly;
this.totalnumber= this.totalnumber.toFixed(3);
this.data = {
// labels: ['earingTotal', 'deductionTotal'],
datasets: [
{ data: [this.accrualNet,this.accrualUsed,this.accrualYearly],
backgroundColor: [
'#DDB017',
'#094875',
'#CB3232',],
borderWidth: 2
}
]
};
}
}
}

@ -0,0 +1,39 @@
<ion-content padding>
<!--
<ion-col col-1
style="margin-right: -22px;margin-top: -10px;">
<ion-button class="closeIcon" (click)="closeModal()">
<img src="../assets/imgs/close.png">
</ion-button>
</ion-col> -->
<h2><div class="Header">Confirmation</div></h2>
<div>
<div *ngIf="submitAbsAttachmentList.length==0" class="labelcheck" lines="none" style="text-align: center;">
No Attachment
</div>
<div *ngIf="absComments==''" class="labelcheck" style="text-align: center;margin-bottom: 5px;padding-bottom: 16px;">
No Note
</div>
</div>
<ion-footer style="border-top: 2px solid grey !important;">
<ion-row class="rowBtn">
<ion-label class="labelRadio">Are you sure you want to submit</ion-label>
<ion-button class="submitOkButton" (click)="OkBtnModal()"> {{ts.trPK('general','ok')}}
</ion-button>
</ion-row>
<ion-row class="rowBtn">
<ion-button class="submitCancelButton" (click)="closeModal()"> {{ts.trPK('general','cancel')}}
</ion-button>
</ion-row>
</ion-footer>
</ion-content>

@ -0,0 +1,53 @@
.rowBtn{
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.Header{
color: black !important;
font-size: 25px !important;
font-weight: bold !important;;
margin: 0;
text-align: center;
margin-bottom: 20px;
}
.labelRadio{
color: black !important;
font-weight: bold !important;
padding-bottom: 20px;
}
.labelcheck{
color: red !important;
font-weight: bold !important;
margin-bottom: 10px;
}
.submitOkButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
--background:: #22c6b3;
width: 100% !important;
color: white!important;
border-radius: 16px !important;
}
.submitCancelButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
--background:: #094875;
width: 100% !important;
color: white!important;
border-radius: 16px !important;
}

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { SubmitAbsenceModalComponent } from './submit-absence-modal.component';
describe('SubmitAbsenceModalComponent', () => {
let component: SubmitAbsenceModalComponent;
let fixture: ComponentFixture<SubmitAbsenceModalComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ SubmitAbsenceModalComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SubmitAbsenceModalComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,36 @@
import { Component, OnInit } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { ModalController } from '@ionic/angular';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
@Component({
selector: 'app-submit-absence-modal',
templateUrl: './submit-absence-modal.component.html',
styleUrls: ['./submit-absence-modal.component.scss'],
})
export class SubmitAbsenceModalComponent implements OnInit {
submitAbsAttachmentList :any =[];
absComments: string;
constructor( private ts: TranslatorService,private modalCtrl: ModalController, private cs: CommonService){
this.submitAbsAttachmentList = this.cs.sharedService.getSharedData('submitAbsAttachmentList', false);
this.absComments = this.cs.sharedService.getSharedData('absComments', false);
}
ngOnInit() {
console.log("modal");
//this.actionBtns = this.cs.sharedService.getSharedData("passActionMore" , false);
console.log("modal");
}
closeModal() {
this.modalCtrl.dismiss();
}
OkBtnModal() {
let data = "ok";
this.modalCtrl.dismiss(data);
}
}

@ -1,5 +1,5 @@
<ion-header >
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-title color="light"> {{ts.trPK('submitAbsence','submitAbsence')}}</ion-title>
<ion-buttons slot="start">
<nav-buttons></nav-buttons>
@ -8,37 +8,36 @@
</ion-header>
<ion-content padding>
<ion-item>
<ion-label class="colBold requiredClass">{{ts.trPK('submitAbsence','absenceType')}} </ion-label>
<ion-item class='dynamicField'>
<ion-label position='floating' class="colBold requiredClass">{{ts.trPK('submitAbsence','absenceType')}} </ion-label>
<ion-select (ionChange)="calcDay()" okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}" [(ngModel)]="absenceType" (ionChange)="onTypeAbsenceChange()" required>
<!-- let item of AbsenceType; let i=index; -->
<ion-select-option value= "{{item.ABSENCE_ATTENDANCE_TYPE_ID}}" *ngFor="let item of absenceTypeList; let i=index;">{{item.ABSENCE_ATTENDANCE_TYPE_NAME}} </ion-select-option>
</ion-select>
</ion-item>
<ion-item>
<ion-label class="colBold requiredClass">{{ts.trPK('submitAbsence','startDate')}} </ion-label>
<ion-item class='dynamicField'>
<ion-label position='floating' class="colBold requiredClass">{{ts.trPK('submitAbsence','startDate')}} </ion-label>
<ion-datetime (ionChange)="calcDay()" [(ngModel)]="startDate" min="1900" max="2100" displayFormat="MMM/DD/YYYY" placeholder="MM/DD/YYYY" required></ion-datetime>
</ion-item>
<ion-item *ngIf="hoursOrDay!='D'">
<ion-label class="colBold requiredClass">{{ts.trPK('submitAbsence','startTime')}} </ion-label>
<ion-item *ngIf="hoursOrDay!='D'" class='dynamicField'>
<ion-label position='floating' class="colBold requiredClass">{{ts.trPK('submitAbsence','startTime')}} </ion-label>
<ion-datetime displayFormat="HH:mm" [(ngModel)]="startTime" required></ion-datetime>
</ion-item>
<ion-item>
<ion-label class="colBold requiredClass">{{ts.trPK('submitAbsence','endDate')}}</ion-label>
<ion-item class='dynamicField'>
<ion-label position='floating' class="colBold requiredClass">{{ts.trPK('submitAbsence','endDate')}}</ion-label>
<ion-datetime (ionChange)="calcDay()" [(ngModel)]="endDate" min="1900" max="2100" displayFormat="MMM/DD/YYYY" placeholder="MM/DD/YYYY" required ></ion-datetime>
</ion-item>
<ion-item *ngIf="hoursOrDay!='D'">
<ion-label class="colBold requiredClass">{{ts.trPK('submitAbsence','endTime')}}</ion-label>
<ion-item *ngIf="hoursOrDay!='D'" class='dynamicField'>
<ion-label position='floating' class="colBold requiredClass">{{ts.trPK('submitAbsence','endTime')}}</ion-label>
<ion-datetime displayFormat="HH:mm" [(ngModel)]="endTime" required></ion-datetime>
</ion-item>
<ion-item>
<ion-item class='dynamicField'>
<ion-label class="colBold" >{{ts.trPK('submitAbsence','totalDays')}} </ion-label>
<ion-label end style="text-align: center;">{{totalDays}}</ion-label>
</ion-item>
<ion-item>
<ion-item class='dynamicField'>
<ion-input placeholder="{{ts.trPK('searchForReplacment','searchForReplacment')}}" type="text" [(ngModel)]="employeeSel">
</ion-input>
<button ion-button class="search-button" icon-only (click)="SearchReplacment()" clear type="button" item-end >
@ -46,8 +45,8 @@
</button>
</ion-item>
<ion-item>
<ion-label class="colBold">{{ts.trPK('submitAbsence','comments')}}</ion-label>
<ion-item class='dynamicField'>
<ion-label position='floating' class="colBold">{{ts.trPK('submitAbsence','comments')}}</ion-label>
<ion-textarea [(ngModel)]="absComments"></ion-textarea>
</ion-item>
<div id="dynamic-abs-container" >
@ -55,6 +54,6 @@
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button color="customnavy" (click)="validateAbcenseTransaction()">{{ts.trPK('general','next')}}</ion-button>
<ion-button class="confirmEitOkButton" (click)="validateAbcenseTransaction()">{{ts.trPK('general','next')}}</ion-button>
</div>
</ion-footer>

@ -3,3 +3,21 @@
font-size: 25px;
color: #7F8C8D;
}
.header-toolbar-new{
--background: #22c6b3;
}
.confirmEitOkButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
--background: #22c6b3;
width: 80% !important;
color: white!important;
border-radius: 16px !important;
}

@ -26,6 +26,7 @@ import * as moment from "moment";
import {ReplacementListComponent} from "../../vacation-rule/replacement-list/replacement-list.component";
import {ReplacmentResponse} from "../models/replacment-response";
import { AbsenceResponse } from '../models/absence.response';
import { AbsenceReplacementListComponent } from '../absence-replacement-list/absence-replacement-list.component';
@Component({
selector: "app-submit-absence",
templateUrl: "./submit-absence.component.html",
@ -230,12 +231,13 @@ export class SubmitAbsenceComponent implements OnInit {
async SearchReplacment() {
const modal = await this.modalCtrl.create({
component: ReplacementListComponent
component: AbsenceReplacementListComponent,
backdropDismiss: false
});
modal.cssClass = 'replaceRoll-modal';
modal.onDidDismiss()
.then((data) => {
const user = data.data.empData;
const user = data.data;
console.log(data)
console.log(user);
if (data) {

@ -1,6 +1,6 @@
<ion-header >
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-title color="light"> {{ts.trPK('absenceList','attach')}}</ion-title>
<ion-buttons slot="start">
<nav-buttons></nav-buttons>

@ -0,0 +1,3 @@
.header-toolbar-new{
--background: #22c6b3;
}

@ -1,13 +1,13 @@
import { Injectable } from "@angular/core";
import { Observable } from "rxjs";
import { ConnectorService } from "src/app/hmg-common/services/connector/connector.service";
import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
@Injectable({
providedIn: "root"
providedIn: 'root'
})
export class AccrualService {
public static GET_ACCRUAL_BALANCE =
"Services/ERP.svc/REST/GET_ACCRUAL_BALANCES";
'Services/ERP.svc/REST/GET_ACCRUAL_BALANCES';
constructor(
public con: ConnectorService,
public authService: AuthenticationService

@ -29,6 +29,10 @@ export class AppComponent implements OnInit, AfterViewInit {
companyDesc: string = "Powered By Cloud Solutions";
public direction = "ltr";
User_Job_name: string;
requestGetLoginInfo: {
DeviceType: string; DeviceToken: string; //this.deviceToken
};
user: boolean;
constructor(
public ts: TranslatorService,
private cs: CommonService,
@ -71,6 +75,7 @@ export class AppComponent implements OnInit, AfterViewInit {
}
private startReceivingPushService() {
console.log("platform.ready")
this.pushService.startReceiving();
}
subscribeEvents() {
@ -159,6 +164,7 @@ export class AppComponent implements OnInit, AfterViewInit {
closeMenu(){
this.menu.toggle();
}
}

@ -15,6 +15,9 @@ import { FilePath } from '@ionic-native/file-path/ngx';
import { File } from '@ionic-native/file/ngx';
import { Base64 } from '@ionic-native/base64/ngx';
import { FirebaseX } from '@ionic-native/firebase-x/ngx';
import { NgCalendarModule } from 'ionic2-calendar';
@NgModule({
declarations: [AppComponent],
entryComponents: [],
@ -25,7 +28,8 @@ import { FirebaseX } from '@ionic-native/firebase-x/ngx';
hardwareBackButton: true,
}),
AppRoutingModule,
HmgCommonModule
HmgCommonModule,
NgCalendarModule
],
providers: [
StatusBar,

@ -1,16 +1,29 @@
<ion-header>
<!-- <ion-header>
<ion-toolbar class="header-toolbar">
<ion-title color="light">Attendance Tracking </ion-title>
<ion-buttons slot="start">
<nav-buttons></nav-buttons>
</ion-buttons>
</ion-toolbar>
</ion-header>
</ion-header> -->
<!-- <ion-header>
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<nav-buttons backLink="/home"></nav-buttons>
</ion-buttons>
<ion-title>Attendance Tracking</ion-title>
</ion-toolbar>
</ion-header> -->
<ion-content>
<div class="back-button-container">
<nav-buttons backLink="/home"></nav-buttons>
</div>
<div class="timer-chart">
<ion-label class="shift-title" style="font-weight: bold"> {{curentDate}}</ion-label><br/>
<ion-label class="shift-title" style="font-weight: bold; font-size: 20px;"> {{curentDate}}</ion-label><br/>
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','today-time-left')}}</ion-label>
<div class="fixed-shift-timer">
@ -46,32 +59,29 @@
</div>
<ion-grid>
<ion-row class="rowBorder">
<ion-label class="shift-title">{{ts.trPK('attendance-tracking','shift-time')}}</ion-label>
<br /><br />
<ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SHT_NAME}} </ion-label>
<ion-col [size]="12" class="colBorder" style="border-right: none;">
<ion-label class="shift-title">{{ts.trPK('attendance-tracking','shift-time')}}</ion-label>
<ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SHT_NAME}} </ion-label>
</ion-col>
</ion-row>
<ion-row class="rowBorder">
<ion-col class="colBorder">
<ion-col [size]="6" class="colBorder">
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','check-in')}}</ion-label>
<br /><br />
<ion-label class="shift-text shift-title">08:00</ion-label>
</ion-col>
<ion-col>
<ion-col [size]="6" class="colBorder">
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','check-out')}}</ion-label>
<br /><br />
<ion-label class="shift-text shift-title">08:00 </ion-label>
</ion-col>
</ion-row>
<ion-row style="text-align: center">
<ion-col class="colBorder">
<ion-col [size]="6" class="colBorder">
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','late-in')}}</ion-label>
<br /><br />
<ion-label class="shift-text shift-title">08:00 </ion-label>
</ion-col>
<ion-col>
<ion-col [size]="6" class="colBorder">
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','regular')}}</ion-label>
<br /><br />
<ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SCHEDULED_HOURS}} </ion-label>
<ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SCHEDULED_HOURS | slice:0:-3}} </ion-label>
</ion-col>
</ion-row>
</ion-grid>

@ -1,26 +1,29 @@
ion-content {
font-family: WorkSans-Regular;
}
ion-grid {
padding:30px 15px;
}
.timer-chart{
padding-top:18px;
background: #094773;
// height: 50%;
text-align: center;
background: #094773;
text-align: center;
line-height: .7cm;
}
.tracking-content{
background: #053c63;
height: 50%;
background: #053c63;
min-height: 50%;
}
.rowBorder{
text-align: center;
border-bottom: var(--lightblue) solid 1px;
}
.shift-text{
// text-align: center;
// width: 100%;
// color: white !important;
margin-bottom: 12px;
margin-top: -9px;
font-size: 30px;
font-size: 36px;
line-height: 36px;
display: block;
}
.shift-title{
width: 100%;
@ -34,24 +37,32 @@ height: 50%;
}
.divstopBtn{
text-align: center;
text-align: center;
}
.stopBtn{
height: 70px;
width: 70px;
height: 89px;
width: 89px;
background-color: var(--lightblue) !important;
border-radius: 50%;
display: inline-block;
margin-top: -24px;
border: solid 3px #053c63;
margin-top: -40px;
border: solid 5px #053c63;
}
.colBorder{
padding: 20px 0px;
text-align: center;
}
.colBorder:nth-child(1){
border-right: var(--lightblue) solid 1px;
}
.fixed-shift-timer{
margin-top: -50px;
margin-bottom: -30px;
margin-bottom: -10px;
}
.back-button-container{
background: #094773;
}

@ -4,6 +4,9 @@ import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbore
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import {AttendScanService} from '../../hmg-common/services/attend-services/attend-scan.service';
import { AttendanceTrackingResponse } from 'src/app/hmg-common/services/dashbored/attendance-tracking.response';
import { SharedDataService } from '../../hmg-common/services/shared-data-service/shared-data.service';
import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
@ -22,12 +25,14 @@ export class HomeComponent implements OnInit {
public isCheckedIn = undefined;
public displayTime: any;
public percent: any;
public spentHours: any;
public userData = this.sharedData.getSharedData(AuthenticatedUser.SHARED_DATA, false);
constructor(
public cs: CommonService,
public db: DashboredService,
public ts: TranslatorService,
public attendScanService: AttendScanService
public attendScanService: AttendScanService,
public sharedData: SharedDataService
) { }
ngOnInit() {
@ -90,18 +95,20 @@ export class HomeComponent implements OnInit {
}
convertAndAssignTime(data) {
console.log(data);
this.remainingTime = this.convertInSeconds(data.P_REMAINING_HOURS.split(':'));
this.scheduledTime = this.convertInSeconds(data.P_SCHEDULED_HOURS.split(':'));
this.isCheckedIn = this.remainingTime === this.scheduledTime ? false : true;
this.initTimer();
console.log('remainingTime: ' + this.remainingTime);
console.log('scheduledTime: ' + this.scheduledTime);
console.log('isCheckedIn: ' + this.isCheckedIn);
}
this.spentHours = this.convertInSeconds(data.P_SPENT_HOURS.split(':'));
this.isCheckedIn = this.spentHours === 0 ? false : true;
if (this.isCheckedIn) {
this.initTimer();
}
}
showAttendanceTracking() {
this.db.getAttendanceTracking() .subscribe((result: AttendanceTrackingResponse) => {
const request = {
P_SELECTED_EMPLOYEE_NUMBER: this.userData.EMPLOYEE_NUMBER
};
this.db.getAttendanceTracking(request).subscribe((result: AttendanceTrackingResponse) => {
if (this.cs.validResponse(result)) {
const key = 'GetAttendanceTrackingList';
this.convertAndAssignTime(result[key]);

@ -7,6 +7,8 @@ import { IonicModule } from '@ionic/angular';
import { AttendancePage } from './attendance.page';
import { HomeComponent } from './home/home.component';
import {MonthlyAttendanceComponent} from './monthly-attendance/monthly-attendance.component';
import { HmgCommonModule } from '../hmg-common/hmg-common.module';
const routes: Routes = [
{
@ -16,6 +18,10 @@ const routes: Routes = [
{
path: 'home',
component: HomeComponent
},
{
path: 'monthlyAttendance',
component: MonthlyAttendanceComponent
}
]
}
@ -26,8 +32,9 @@ const routes: Routes = [
CommonModule,
FormsModule,
IonicModule,
HmgCommonModule,
RouterModule.forChild(routes)
],
declarations: [AttendancePage, HomeComponent]
declarations: [AttendancePage, HomeComponent, MonthlyAttendanceComponent]
})
export class AttendancePageModule {}

@ -0,0 +1,113 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" defaultHref="/home"></ion-back-button>
</ion-buttons>
<ion-title color="light">{{ts.trPK('attendance','attendance')}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content class="colorBG">
<div class="header-div">
<div class="header-div">
<p style="position: absolute; left: 40%; bottom: 65%;">{{currentMonth}}</p>
<ion-slides>
<ion-slide>
<ion-grid class="headerGrid">
<div style="color: black;">
<!-- <ngx-gauge
[type]="gaugeType"
[value]="gaugeValue"
[label]="gaugeLabel">
</ngx-gauge> -->
<div class="result-graph">
<div class="request-heading">
<span>Open Request Analysis</span>
</div>
<div class="result-text-container">
<h2>287</h2>
<span>TOTAL <br> OPEN REQUEST</span>
</div>
<p-chart class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart>
</div>
<div style="position: relative;
left: 79%;
bottom: 35px;
color: black;
background-color: #22c6b3;
width: 20%; height: 6px;">
</div>
<div style="position: relative;
left: 79%;
bottom: 20px;
color: black;
background-color: #094875;
width: 20%; height: 6px;">
</div>
</div>
</ion-grid>
</ion-slide>
</ion-slides>
</div>
</div>
<div style="margin-top: 45%;">
<ion-grid>
<ion-row>
<ion-col>
<ion-grid class="labelGrid">
<ion-row>
<ion-col>
<label style="font-size: 13px;">SCHEDULE</label>
</ion-col>
<ion-col>
<h2 style="margin-left: 45%; font-size: 25px;">23</h2>
</ion-col>
</ion-row>
</ion-grid>
</ion-col>
<ion-col>
<ion-grid class="labelGrid">
<ion-row>
<ion-col>
<label style="font-size: 12px;">OFF DAYS</label>
</ion-col>
<ion-col>
<h2 style="margin-left: 45%; font-size: 25px;">08</h2>
</ion-col>
</ion-row>
</ion-grid>
</ion-col>
<ion-col>
<ion-grid class="labelGrid">
<label style="font-size: 13px;">NON ANALYZED</label>
<h2 style="margin-left: 45%; font-size: 25px;">01</h2>
</ion-grid>
</ion-col>
<ion-col>
<ion-grid class="labelGrid">
<label style="font-size: 13px;">SHORTAGE HOURS</label>
<h2 style="margin-left: 45%; font-size: 25px;">03</h2>
</ion-grid>
</ion-col>
</ion-row>
</ion-grid>
</div>
<div >
<ion-grid class="bodyGrid">
<app-circle-calendar></app-circle-calendar>
</ion-grid>
</div>
</ion-content>

@ -0,0 +1,242 @@
.colorBG {
--background: #f0efef;
}
.header-div {
background: #22c6b3;
color: var(--light);
text-transform: capitalize;
display: block;
position: relative;
height: 210px;
margin-bottom: 60px;
}
.chart-modal .modal-Wrapper {
--background: rgb(116, 108, 108) !important;
--border-color:white!important ;
width: 85%!important ;
height: 40px !important ;
}
.navbar{
font-size: 10px !important;
--background: #22C6B3 !important;
color: aliceblue !important;
// margin-top: 10px !important;
}
.menu{
// margin-left:330px !important;
margin-top: 0px !important;
font-size: 35px !important;
background: #22C6B3;
color: aliceblue;
margin-left: 0px !important;
}
.person{
margin-left:100px !important;
margin-top: 0px !important;
font-size: 23px !important;
background: #22C6B3 !important;
color: aliceblue !important;
}
.grid{
margin-bottom: 550px !important;
margin-top: 20px !important;
margin-left: 15px !important;
margin-right: 15px !important;
background-color:white !important;
border-radius: 20px !important;
height: 250px !important;
}
.headerGrid{
margin-bottom: 550px !important;
margin-top: 80px !important;
margin-left: 15px !important;
margin-right: 15px !important;
background-color:white !important;
border-radius: 20px !important;
height: 250px !important;
}
.bodyGrid{
margin-bottom: 550px !important;
margin-top: 20px !important;
margin-left: 15px !important;
margin-right: 15px !important;
background-color:white !important;
border-radius: 20px !important;
height: 270px !important;
}
.labelGrid{
margin-top: -30px !important;
background-color:white !important;
border-radius: 20px !important;
height: 100px !important;
}
.ionSliders{
margin: 0px !important;
padding: 0px !important;
}
.ionSlide{
margin-top: 5px !important;
margin-left: 190px !important;
color: black !important;
}
.dateLable{
margin-left: 90px !important;
color: black !important;
font-size: small !important;
margin-top: 15px !important;
}
// h1{
// font-size: 15px !important;
// text-align: center !important;
// }
.arrowDropright{
margin-left:100px !important;
font-size: 20px !important;
color: rgb(168, 165, 165) !important;
margin-top: 15px !important;
}
.arrowDropleft{
font-size: 20px !important;
margin-left: 10px !important;
margin-top: 15px !important;
color: rgb(116, 108, 108) !important;
}
.ionLable{
font-size: 10px !important;
}
.number{
font-size: 18px !important;
font-weight: bolder !important;
color: black !important;
}
.header-div{
background:var(--primary);
background: -moz-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
background: -webkit-linear-gradient(45deg, (--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
background: #22C6B3;
// background: linear-gradient(90deg, #85C48D 0%, #85C48D 13%, #2BB5C6 98%, #2BB5C6 100%);
color:var(--light);
text-transform: capitalize;
display: block;
position: relative;
height: 210px;
margin-bottom:60px;
// border-radius: 0px 0px 70px 70px;
}
.request-heading {
span {
text-align: center;
display: block;
padding-top: 8px;
font-family: workSans-Regular;
}
}
.result-graph {
position: relative;
background: white;
margin-right: 20px;
margin-left: 20px;
margin-top: 20px;
padding-bottom: 20px;
border-radius: 20px;
}
.result-text-container {
padding: 0;
margin: 0;
position: absolute;
left: 50%;
top: 50%;
display: block;
text-align: center;
transform: translate(-50%, -50%);
h2 {
font-size: 38px;
font-family: WorkSans-Bold;
margin: 0 auto;
line-height: 36px;
}
span {
width: 125px;
display: block;
margin: 0 auto;
font-size: 12px;
font-family: workSans-Regular;
}
}

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { MonthlyAttendanceComponent } from './monthly-attendance.component';
describe('MonthlyAttendanceComponent', () => {
let component: MonthlyAttendanceComponent;
let fixture: ComponentFixture<MonthlyAttendanceComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ MonthlyAttendanceComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MonthlyAttendanceComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,101 @@
import { Component, OnInit } from '@angular/core';
import { CommonService } from '../../hmg-common/services/common/common.service';
import { TranslatorService } from '../../hmg-common/services/translator/translator.service';
import { SharedDataService } from '../../hmg-common/services/shared-data-service/shared-data.service';
import { GetSubordinatesAttdStatusRequest } from 'src/app/hmg-common/services/dashbored/models/GetSubordinatesAttdStatusRequest';
import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service';
import { GetSubordinatesAttdStatusResponse } from 'src/app/hmg-common/services/dashbored/models/GetSubordinatesAttdStatusResponse';
@Component({
selector: 'app-monthly-attendance',
templateUrl: './monthly-attendance.component.html',
styleUrls: ['./monthly-attendance.component.scss'],
})
export class MonthlyAttendanceComponent implements OnInit {
constructor(
private cs: CommonService,
public ts: TranslatorService,
public sharedData: SharedDataService,
public DS: DashboredService) { }
gaugeType = 'full';
gaugeValue = 28.3;
gaugeLabel = 'Days';
// gaugeAppendText = "km/hr";
currentMonth: any;
todayYear: any;
todayMonth: any;
public options = {
cutoutPercentage: 80,
tooltips: { enabled: false },
legend: { display: false }
};
public data = {
datasets: [
{
data: [120, 50],
backgroundColor: [
'#22c6b3',
'#094875',
],
borderWidth: 2
}]
};
ngOnInit() { }
ionViewWillEnter() {
this.currentMonth = this.sharedData.getSharedData("currentMonth");
console.log(this.currentMonth);
let day = this.currentMonth.split(" ");
this.todayMonth =day[0];
this.todayYear = day[1];
this.todayYear = parseInt(this.todayYear);
console.log("MONTH: " +this.todayMonth);
console.log("YEAR: " +this.todayYear);
this.getSubordinatesAttStatus()
}
getSubordinatesAttStatus() {
let request: GetSubordinatesAttdStatusRequest = new GetSubordinatesAttdStatusRequest();
// request.P_SCHEDULE_DATE_FROM = "/Date(1578603600000+0300)/"; //test
// request.P_SCHEDULE_DATE_TO = "/Date(1576011600000+0300)/";//test
console.log(this.currentMonth);
request.SearchMonth = this.todayMonth;
request.SearchYear = 2019//this.todayYear;
this.DS.getSubordinatesAttStatus(request, () => { console.log("Error "); }).subscribe((result: GetSubordinatesAttdStatusResponse) => {
if (this.cs.validResponse(result)) {
console.log("response");
console.log(result);
}
});
}
x(){
console.log("ENAD CHANge")
}
}

@ -1,5 +1,5 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" defaultHref="/home"></ion-back-button>
</ion-buttons>

@ -78,6 +78,7 @@ export class CheckUserComponent implements OnInit {
console.log(result);
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.P_USER_NAME = this.P_USER_NAME;
// this.loginData.EMPLOYEE_NAME=result.MemberLoginList[0].EMPLOYEE_NAME;
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
this.sharedData.setSharedData(true,Password.IS_FORGET_PSW);
this.cs.stopLoading();

@ -1,5 +1,5 @@
<ion-header *ngIf="!accessFromOutSide">
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" ></ion-back-button>
</ion-buttons>
@ -28,7 +28,10 @@
<!-- <img [src]="logo" class="loginLogo" />
<h1 class="heading1">{{welcome}} </h1> -->
<!-- <p class="text1" style="margin-bottom: -8px;font-weight: bold;font-size: 22px;">{{ts.trPK('login','Verify-text')}} </p> -->
<p class="text1" style="font-size: 28px;margin-bottom: 0px" >{{empname}}</p>
<!--
<p class="text1" style="font-size: 28px;margin-bottom: 0px" >{{empname}}</p>
-->
</ion-col>
</ion-row> <div *ngIf="onlySMSBox"><p>{{ts.trPK('login','verify-login-with')}}</p></div>
<!-- <type-writer *ngIf="!onlySMSBox" [text]="'login, verify-fingerprint' | translate" class="description"

@ -29,6 +29,7 @@ import { PushService } from 'src/app/hmg-common/services/push/push.service';
import { Platform } from '@ionic/angular';
import { CheckUserAuthenticationResponse } from 'src/app/hmg-common/services/authentication/models/check-user-auth.response';
import { LoginModel } from '../models/LoginModel';
import * as moment from "moment";
@ -70,6 +71,8 @@ export class ConfirmLoginComponent implements OnInit {
password:any;
loginType: any;
empname: string;
lastLoginDate: string;
user_name: string;
constructor(
@ -120,6 +123,7 @@ export class ConfirmLoginComponent implements OnInit {
this.password = localStorage.getItem("password");
this.empname = localStorage.getItem("emp-name");
}
@ -674,9 +678,9 @@ export class ConfirmLoginComponent implements OnInit {
console.log("authService.getLoginInfo");
if(result.Mohemm_GetPatientID_List.length > 0){
if(result.Mohemm_GetMobileLoginInfoList.length > 0){
if ( result.Mohemm_GetPatientID_List[0].LoginType == 2 || result.Mohemm_GetPatientID_List[0].LoginType == 3) {
if ( result.Mohemm_GetMobileLoginInfoList[0].LoginType == 2 || result.Mohemm_GetMobileLoginInfoList[0].LoginType == 3) {
this.loginTokenID = result.LogInTokenID;
//send silent sms
@ -742,6 +746,11 @@ export class ConfirmLoginComponent implements OnInit {
console.log("insert");
localStorage.setItem("emp-name",result.MemberInformationList[0].EMPLOYEE_NAME);
console.log("empnmae: "+ localStorage.getItem("emp-name"));
this.user_name=result.MemberInformationList[0].EMPLOYEE_NAME;
//get date and time of last login
let currDateTime = moment().format('MMM DD , YYYY HH:mm')
localStorage.setItem("login-at",currDateTime);
if (this.platform.is("cordova")) {
this.insertMobileLogin();
@ -781,12 +790,13 @@ export class ConfirmLoginComponent implements OnInit {
request.DeviceType= this.cs.getDeviceType();
request.DeviceToken=this.deviceToken;
request.DeviceToken="5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36";//this.deviceToken;
//request.TokenID=
request.LoginType=this.selectedOption;
request.EmployeeName=this.user_name;
this.authService
@ -840,10 +850,13 @@ private checkUserAuthentication() {
console.log("this.loginData before "+ this.loginData);
this.loginData = new LoginModel();
console.log("this.loginData after "+ this.loginData);
// console.log("result.MemberLoginList.EMPLOYEE_NAME "+ result.MemberInformationList[0].EMPLOYEE_NAME);
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.MobileNumber = result.MemberLoginList.P_MOBILE_NUMBER;
this.loginData.P_USER_NAME = this.username;
this.loginData.EmployeeName = this.user_name;
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA);
//this.remeberMyInfo();

@ -1,5 +1,5 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" ></ion-back-button>
</ion-buttons>

@ -5,7 +5,7 @@
<img class="centerDiv" src="../assets/imgs/header.png" />
</ion-col>
</ion-row> -->
<ion-row *ngIf="loginDiv">
<ion-row *ngIf="!user">
<div class="content">
@ -19,7 +19,7 @@
</div>
</ion-row>
<ion-row *ngIf="welcomeBack ">
<ion-row *ngIf="user ">
<ion-col [size]="4">
<img [src]="logo" class="logo" />
@ -30,12 +30,12 @@
<ion-row>
<ion-col *ngIf="loginDiv">
<ion-col *ngIf="!user">
<P class="pageTitle text-caps">{{ts.trPK('login','login')}}</P>
</ion-col>
</ion-row>
</ion-grid>
<div *ngIf="loginDiv">
<div *ngIf="!user">
<ion-item class="item-input-login">
<img class="item-icon" src="assets/imgs/username.png" item-start />
<ion-input class="login-input" required type="text" [(ngModel)]="username" placeholder="{{ts.trPK('login','username')}}">
@ -73,7 +73,7 @@
<!-- div login-->
<!-- <div *ngIf="welcomeBack"> -->
<welcome-login (onLogin)="login()" (loginWithUser)="loginWithUser()" *ngIf="welcomeBack ">
<welcome-login (onLogin)="login()" (loginWithUser)="loginWithUser()" *ngIf="user ">
</welcome-login>
<!-- </div> -->
@ -83,7 +83,7 @@
</ion-content>
<ion-footer *ngIf="loginDiv">
<ion-footer *ngIf="!user">
<div class="centerDiv">
<ion-button class="button-login" (click)="onLogin()">{{ts.trPK('login','login')}}</ion-button>
</div>

@ -45,7 +45,10 @@ export class LoginComponent implements OnInit, OnDestroy {
public loginDiv:boolean =true;
public welcomeBack:boolean =false;
public logo = "assets/icon/login/password.png";
deviceToken: any="";
user: boolean =false;
DeviceType: string;
requestGetLoginInfo:any;
constructor(
public cs: CommonService,
@ -64,25 +67,61 @@ export class LoginComponent implements OnInit, OnDestroy {
) { }
ngOnInit() {
// this.deviceToken= this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false);
// console.log("get deviceToken login"+ this.deviceToken)
this.deviceToken= localStorage.getItem('devicyeToken');
console.log("let deviceToken" + this.deviceToken);
if (this.deviceToken) {
console.log('login enabled first time: ' + this.deviceToken);
} else {
console.log("no deviceToken" );
this.pushService.startReceiving();
setTimeout(() => {
this.deviceToken= localStorage.getItem('deviceToken');
console.log('login enabled second time: ' + this.deviceToken);
}, 1000);
}
setTimeout(() => {
this.getLastLoginInfo();
},5000);
//here will delete below part and depdding on user (response from getMobileInfo)
this.username = localStorage.getItem("user");
this.password = localStorage.getItem("password");
let remember = localStorage.getItem("remember");
this.password = localStorage.getItem("password"); //****//
let remember = localStorage.getItem("remember");//****//
this.empname= localStorage.getItem("emp-name");
this.logintype= localStorage.getItem("login-type");
if (remember == "true") { this.remeberMe = true } else { this.remeberMe = false }
if(this.username || this.empname){
this.loginDiv=false;
this.welcomeBack=true;
//here will be check on user if exite then s part and depdding on user (response from getMobileInfo)
if(this.user){
// this.loginDiv=false;
// this.welcomeBack=true;
}else{
this.loginDiv=true;
this.welcomeBack=false;
// this.user=true;
// this.welcomeBack=false;
}
// alert("user>>" + this.username);
// alert("pass>>>" + this.password);
// alert("remember>>>" + this.remeberMe);
/// call getLoginInfo
}
ngOnDestroy(): void {
@ -125,20 +164,24 @@ export class LoginComponent implements OnInit, OnDestroy {
}
public onLogin() {
// console.log("onLogin");
console.log("onLogin");
// this.checkAppUpdated();
// this.checkUserAuthentication();
let deviceToken = localStorage.getItem('deviceToken');
if (deviceToken) {
console.log('login enabled first time: ' + deviceToken);
this.deviceToken = localStorage.getItem('deviceToken');
console.log("let deviceToken" + this.deviceToken);
if (this.deviceToken) {
console.log('login enabled first time: ' + this.deviceToken);
this.checkAppUpdated();
} else {
console.log("no deviceToken" );
this.pushService.startReceiving();
setTimeout(() => {
deviceToken = localStorage.getItem('deviceToken');
this.deviceToken = localStorage.getItem('deviceToken');
this.checkAppUpdated();
console.log('login enabled second time: ' + deviceToken);
console.log('login enabled second time: ' + this.deviceToken);
}, 1000);
}
}
@ -194,9 +237,12 @@ export class LoginComponent implements OnInit, OnDestroy {
console.log("success");
this.cs.stopLoading();
if (this.cs.validResponse(result)) {
// alert("result.MemberLoginList.EMPLOYEE_NAME :" + result.MemberLoginList.EMPLOYEE_NAME);
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.MobileNumber = result.MemberLoginList.P_MOBILE_NUMBER;
this.loginData.P_USER_NAME = this.username;
// this.loginData.EMPLOYEE_NAME =result.MemberLoginList[0].EMPLOYEE_NAME;
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA);
this.remeberMyInfo();
@ -279,6 +325,8 @@ export class LoginComponent implements OnInit, OnDestroy {
console.log(result);
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.P_USER_NAME = this.username;
this.loginData.EmployeeName =result.MemberLoginList[0].EMPLOYEE_NAME;
this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA);
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
this.sharedData.setSharedData(true, Password.IS_FORGET_PSW);
@ -292,8 +340,8 @@ export class LoginComponent implements OnInit, OnDestroy {
console.log("login emit");
console.log("login");
// this.checkUserAuthentication();
this.loginDiv=true;
this.welcomeBack=false;
//this.loginDiv=true;
this.user=false;
}
@ -302,4 +350,33 @@ export class LoginComponent implements OnInit, OnDestroy {
this.cs.openConfirmLoginPage();
}
///
getLastLoginInfo(){
this.requestGetLoginInfo= {
DeviceType:this.cs.getDeviceType(),
DeviceToken:this.deviceToken//"5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36"//this.deviceToken
}
this.authService.getLoginInfo(this.requestGetLoginInfo,() => {}, this.ts.trPK('general', 'ok')).subscribe(res => {
if (this.cs.validResponse(res)) {
if(res.Mohemm_GetMobileLoginInfoList.length > 0){
this.cs.sharedService.setSharedData(
// res.Patient_SELECTDeviceIMEIbyIMEIList[0],
res.Mohemm_GetMobileLoginInfoList[0],
AuthenticationService.IMEI_USER_DATA
);
this.user = true;
}
else{
this.user=false
}
}
});
}
}

@ -3,4 +3,7 @@ export class LoginModel {
activationCode: string;
P_USER_NAME: string;
MobileNumber: string;
EMPLOYEE_DISPLAY_NAME: string;
EMPLOYEE_NAME:string;
EmployeeName:string;
}

@ -1,5 +1,5 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" ></ion-back-button>
</ion-buttons>

@ -22,6 +22,7 @@ import { SMSCheckResponse } from "src/app/hmg-common/services/authentication/mod
import { Password } from "../models/password";
import { GetLoginInfoRequest } from 'src/app/hmg-common/services/authentication/models/get-login-info.request';
import * as moment from "moment";
@ -79,6 +80,7 @@ export class SmsPageComponent implements OnInit {
public smc_code: any = [];
code: any;
user_name: string;
constructor(
@ -346,6 +348,12 @@ export class SmsPageComponent implements OnInit {
console.log("insert");
localStorage.setItem("emp-name",result.MemberInformationList[0].EMPLOYEE_NAME);
console.log("empnmae: "+ localStorage.getItem("emp-name"));
// localStorage.setItem("login-at", new Date().toISOString());
this.user_name=result.MemberInformationList[0].EMPLOYEE_NAME;
//get date and time of last login
let currDateTime = moment().format('MMM DD , YYYY HH:mm')
localStorage.setItem("login-at",currDateTime);
if (this.platform.is("cordova")) {
// localStorage.setItem("full-name", result.P_USER_NAME);
@ -370,7 +378,7 @@ export class SmsPageComponent implements OnInit {
public insertMobileLogin(){
// alert("insertMobileLogin");
console.log("loginData" + this.loginData);
let request = new GetLoginInfoRequest();
@ -388,10 +396,12 @@ export class SmsPageComponent implements OnInit {
request.DeviceType= this.common.getDeviceType();
request.DeviceToken=this.deviceToken;
request.DeviceToken=this.deviceToken;//"5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36";//this.deviceToken;
request.LoginType=this.loginTypeData.loginType;
request.EmployeeName=this.user_name;
this.authService
.insertMobileLoginInfo(

@ -1,5 +1,5 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<nav-buttons backLink=""></nav-buttons>
<!-- <ion-back-button color="light" class="btnBack" defaultHref="/eit/eit-list/" ></ion-back-button> -->
@ -22,7 +22,7 @@
<ion-footer>
<div class="centerDiv">
<ion-button class="footer-button" color="customnavy" ion-button (click)="validateEITTransaction()">
<ion-button class="addEitOkButton" color="customnavy" ion-button (click)="validateEITTransaction()">
{{'vacation-rule, next-label' | translate}}</ion-button>
</div>
</ion-footer>

@ -11,7 +11,7 @@ ion-label {
.daynamicForm-Label {
font-size: 16px;
color: var(--customnavy) !important;
color: #a2a5a6 !important;
display: block;
overflow: hidden;
-webkit-flex: 1;
@ -20,4 +20,20 @@ ion-label {
white-space: normal;
padding: 5px 0px;
margin: 10px auto;
padding-left: 10px;
}
.header-toolbar-new{
--background: #22c6b3;
}
.addEitOkButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
background-color: #22c6b3;
width: 80% !important;
color: white!important;
border-radius: 16px !important;
}

@ -1,19 +1,139 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<nav-buttons></nav-buttons>
<ion-title color="light">{{headerTitle}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<!-------------------------------Start New design ---------------------------------------->
<ion-grid>
<ion-row style="margin-top: 20px;margin-left: 12px;">
<ion-col>
<div size="10" class="approvalTitle">{{'general, addAttach' | translate}}</div>
</ion-col>
<ion-col style="padding-left: 7%;" size="2">
<div class="fileDiv">
<input end class="inputfile" style="margin-top: 10px;z-index: 99999;position: absolute;opacity: 0;" type="file" ng2FileSelect [uploader]="uploader"
(change)="onFileSelected($event)" />
<label end for="file" class="attachLable">
<ion-icon style="font-size: 22px;" name="add"></ion-icon>
</label></div>
</ion-col>
</ion-row>
<ion-item class="attachmentDiv" *ngIf="attachListOver?.length == 0">
<ion-img style="height: 26px;width:100%;margin-top:12px" src="../assets/imgs/attach-icon.png"></ion-img>
<ion-label style="margin-top: -24px;" position="floating" class="boldTxtNav">{{ 'general, notAttch' | translate}}</ion-label>
</ion-item>
</ion-grid>
<ion-grid class="attachmentDiv" *ngIf="attachListOver?.length > 0">
<div *ngFor="let attachList of attachListOver ; let i = index">
<ion-row>
<ion-col size="1">
<ion-label style="color: black !important;">
{{attachList.AttachmentID +1 }} .
</ion-label>
</ion-col>
<ion-col style="text-align: left;" size="10">
<ion-label style="color: blue !important;" (click)="OpenAttachFiles(attachList.P_FILE_DATA,attachList.P_FILE_CONTENT_TYPE)">
{{attachList.P_FILE_NAME }}
</ion-label>
</ion-col>
<ion-col size="1">
<!-- <button float-end class="attachImgBtn"
(click)="OpenAttachFiles(attachList.P_FILE_DATA,attachList.P_FILE_CONTENT_TYPE)">
<img class="attachImg" src="../assets/imgs/view.png">
</button> -->
<button float-end [disabled]="attachList.isSuccess" class="attachImgBtn removeLable"
(click)="removeFile(attachList)">
<ion-icon style="font-size:22px;margin-left:-7px;margin-top:-2px;" name="close"></ion-icon>
</button>
</ion-col>
</ion-row>
</div>
</ion-grid>
<ion-grid *ngIf="attachmentRes?.length > 0">
<div *ngFor="let attachRes of attachmentRes">
<ion-row>
<ion-col col-8>
<div> <img float-start class="attachImg" src="../assets/imgs/file.png">
</div>
<ion-label>
{{attachRes.FILE_NAME }} </ion-label>
</ion-col>
<ion-col col-4>
<button float-end class="attachImgBtn"
(click)="OpenAttachFiles(attachRes.FILE_DATA,attachRes.FILE_CONTENT_TYPE)">
<img class="attachImg" src="../assets/imgs/view.png">
</button>
<button float-end [disabled]="!isResubmitEIT" class="attachImgBtn" (click)="delelteFile(attachRes)"><img
class="attachImg" src="../assets/imgs/deletegray.png"></button>
</ion-col>
<!-- <button [disabled]="!isResubmitEIT" class="iconButton" (click)="addAttachment(false,attachRes)"><img
class="imgSize" src="../assets/imgs/editIcon.png"></button>
<button (click)="delelteFile(attachRes)" class="iconButton" [disabled]="!isResubmitEIT"><img
class="imgSize" src="../assets/imgs/cancel.png"></button> -->
</ion-row>
</div>
</ion-grid>
<ion-card>
<ion-grid class="">
<div class="approvalTitle">{{'confirmAddEit, comment' | translate}}</div>
<ion-item class="submitNote" lines="none">
<!-- <ion-label position="floating" class="boldTxtNav">{{'confirmAddEit, comment' | translate}}</ion-label> -->
<ion-textarea type="text" [(ngModel)]="eitComments"></ion-textarea>
</ion-item>
</ion-grid>
<ion-grid class="approvalList">
<div class="approvalTitle">{{'confirmAddEit, approverList' | translate}}</div>
<div class="noDataDiv" *ngIf="approversList?.length == 0">
<p>{{ 'general, empty' | translate}}</p>
</div>
<div style="background-color: white;border-radius: 32px;border: 1px solid #c8c4c4;" *ngIf="approversList?.length > 0">
<ion-list class="notification-list ">
<div class="timeline">
<ion-item style="padding-left: 4%;" *ngFor="let employee of approversList">
<div class="timeline-item" slot="start">
<div class="timeline-thumb timeline-icon">
<img *ngIf="employee.EMPLOYEE_IMAGE" class="empImge"
[src]="'data:image/png;base64,'+employee.EMPLOYEE_IMAGE">
<img *ngIf="employee.EMPLOYEE_IMAGE == null" class="empImge"
src="../assets/imgs/profile.png"> </div>
</div>
<ion-col>
<ion-label style="color:black !important ;font-weight: bold;padding-top: 0%;">
{{employee.APPROVER}}
</ion-label>
<ion-label style="color:black !important ;padding-top: 4%;">
{{employee.POSITION_TITLE}}
</ion-label>
</ion-col>
<div class="line"></div>
</ion-item>
</div>
</ion-list>
</div>
</ion-grid>
<!-------------------------------End New design ---------------------------------------->
<!-- <ion-card>
<ion-card-header class="boxHdr">
<div class="hrTitle">{{'confirmAddEit, approverList' | translate}}</div>
</ion-card-header>
<ion-card-content>
<!-- <ion-item class="itemAH" > -->
<ion-grid no-padding class=" gridAH" *ngIf="approversList?.length > 0">
<ion-row class="rowAH titleH" nowrap>
<ion-col size="1">
@ -32,14 +152,10 @@
<ion-label class="Header" for="">{{'confirmAddEit, status' | translate}}</ion-label>
</ion-col>
</ion-row>
<!-- </ion-grid>
</ion-item> -->
<!-- <ion-list *ngIf="approversList?.length > 0"> -->
<!-- <ion-item class="itemAH" *ngFor="let item of approversList" >
<ion-grid class=" gridAH"> -->
<ion-row class="rowAH" *ngFor="let item of approversList" nowrap>
<ion-col size="1">
<ion-label class="tbData" for="">{{item.APPROVER_ORDER_NUMBER}}</ion-label>
@ -58,9 +174,7 @@
</ion-col>
</ion-row>
</ion-grid>
<!-- </ion-item>
</ion-list> -->
</ion-card-content>
</ion-card>
@ -69,44 +183,7 @@
<ion-textarea type="text" [(ngModel)]="eitComments"></ion-textarea>
</ion-item>
<!-- <div padding *ngIf="attachmentRes?.length > 0 || attachListOver?.length > 0">
<p class="boldTxt"> {{"absenceList.attachList" | translate}}</p>
</div>
<div *ngIf="attachListOver?.length > 0">
<ion-row *ngFor="let attachList of attachListOver ; let i = index">
<ion-col col-8 (click)="OpenAttachFiles(attachList.P_FILE_DATA,attachList.P_FILE_CONTENT_TYPE)">
{{ attachList.P_FILE_NAME }}</ion-col>
<ion-col col-4>
<button [disabled]="attachList.isSuccess" class="iconButton" (click)="removeFile(attachList)"><img
class="imgSize" src="../assets/imgs/cancel.png"></button>
</ion-col>
</ion-row>
</div> -->
<!-- <div *ngIf="attachmentRes?.length > 0">
<ion-row *ngFor="let attachRes of attachmentRes">
<ion-col col-8 (click)="OpenAttachFiles(attachRes.FILE_DATA,attachRes.FILE_CONTENT_TYPE)">
{{ attachRes.FILE_NAME }}</ion-col>
<ion-col col-4>
<button [disabled]="!isResubmitEIT" class="iconButton" (click)="addAttachment(false,attachRes)"><img
class="imgSize" src="../assets/imgs/editIcon.png"></button>
<button (click)="delelteFile(attachRes)" class="iconButton" [disabled]="!isResubmitEIT"><img
class="imgSize" src="../assets/imgs/cancel.png"></button>
</ion-col>
</ion-row>
</div> -->
<div>
<ion-card>
@ -169,24 +246,21 @@
</ion-col>
<!-- <button [disabled]="!isResubmitEIT" class="iconButton" (click)="addAttachment(false,attachRes)"><img
class="imgSize" src="../assets/imgs/editIcon.png"></button>
<button (click)="delelteFile(attachRes)" class="iconButton" [disabled]="!isResubmitEIT"><img
class="imgSize" src="../assets/imgs/cancel.png"></button> -->
</ion-row>
</div>
</ion-grid>
</ion-card-content>
</ion-card>
</ion-card> -->
</div>
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button class="footer-button" color="customnavy" ion-button (click)="startEitApproval()">
<ion-button class="confirmEitOkButton" color="customnavy" ion-button (click)="openSubmitModal()">
{{ (isDelete ? 'general, delete' : 'general, submit') | translate }}</ion-button>
</div>
</ion-footer>

@ -24,3 +24,220 @@
background: transparent;
float: right;
}
.attachmentDiv{
background: #ffffff;
height: auto;
text-align: center;
padding-top: 1px;
margin: 10px;
border-radius: 15px;
border: 1px solid grey;
}
.noDataDiv{
background: #ffffff;
height: 11%;
text-align: center;
padding-top: 1px;
border-radius: 10px;
margin: 10px;
border-radius: 5px;
}
.submitNote{
background: #ffffff;
height: 80px;
padding-top: 1px;
margin: 10px;
border-radius: 15px;
border: 1px solid grey;
}
.approvalList{
--background: #f0efef;
height: auto;
text-align: center;
padding-top: 1px;
border-radius: 10px;
margin: 10px;
border-radius: 5px;
}
/************************New Design**********************************/
.notification-list{
background: none;
background: none;
border-radius: 32px;
ion-item{
// margin-top: 5px;
// margin-bottom: 5px;
background-color: transparent;
.item-date{
width: 100%;
font-size: 16px;
font-weight: bold;
text-align: start;
padding: 0;
margin: 0;
position: absolute;
left: 0;
top: 12%;
}
ion-label , [item-end]{
white-space: normal;
font-size: 14px;
padding-top: 15%;
// :root[dir="ltr"]{
// margin-left: 10px;
// }
// :root[dir="rtl"]{
// margin-right: 10px;
// }
}
}
}
.timeline {
position: relative;
margin: 15px 0 0 0;
// border-bottom: solid 1px var(--cusgray);
}
.timeline:before {
content: '';
position: inherit !important;
top: 0;
bottom: 0;
width: 4px;
// background: #e4e4e4;
z-index: 1;
left: 35px;
/* margin-left: -10px; */
/* z-index: 1; */
}
.timeline .timeline-thumb {
border-radius: 500px;
width: 70px !important;
z-index: 2;
position: absolute;
left: 0px;
// :root[dir="ltr"]{
// left: 37px;
// }
// :root[dir="rtl"]{
// right: 37px;
// }
float: right;
top: 9px;
}
.timeline .timeline-thumb.timeline-icon {
height: 70px;
// text-align: center;
// color: white;
// border: 5px solid #CBD0D3;
// transform: scale(0.2);
}
.timeline .timeline-item {
width: 40px;
}
.timeline .timeline-stats {
position: relative;
font-size: 12px;
color: var(--darkgray);
}
.empImge{
border-radius: 50%;
width:100%;
height: 100%;
border: #dedede solid 1px;
}
.empImgeRep {
border-radius: 50% !important;
width: 80px;
height: 80px;
border: #dedede solid 1px;
}
.line{
padding-bottom:87px;
}
.attachLable{
position: absolute;
top: 0px;
z-index: 0;
background: #30b8c6;
color: #fff;
border-radius: 50%;
border: 0px;
width: 24px;
height: 24px;
text-align: center;
font-size: 5px;
}
.removeLable{
top: 0px;
z-index: 0;
background: #d8252d;
color: #fff;
border-radius: 50%;
border: 0px;
width: 20px;
height: 20px;
text-align: center;
font-size: 5px;
}
.note-modal {
// width: 90%;
// height: 50%;
// top: 20%;
// left: 5%;
// right: 5%;
// bottom: 5%;
background: rgba(0, 0, 0, 0.5) !important;
padding: 30% 10% !important;
--height: 12cm !important;
// --width: 80% !important;
--border-radius:20px;
}
.header-toolbar-new{
--background: #22c6b3;
}
.confirmEitOkButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
background-color: #22c6b3;
width: 80% !important;
color: white!important;
border-radius: 16px !important;
}

@ -12,6 +12,8 @@ import { CommonService } from 'src/app/hmg-common/services/common/common.service
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { EitService } from '../services/eit.service';
import { AddEitResponse } from '../models/add.eit.response';
import { FileUploader } from 'ng2-file-upload';
import { SubmitEitModalComponent } from '../submit-eit-modal/submit-eit-modal.component';
@Component({
selector: 'app-confirm-add-eit',
@ -46,6 +48,20 @@ export class ConfirmAddEitComponent implements OnInit {
isSubmitBtnClicked: boolean;
isDelete: boolean = false;
/***Add Attchment Vars */
isUpload: boolean = false;
inQueue: boolean = false;
addAttachmentListReq: any;
attachmentID: number = 0;
addAttachRequest: any = [];
fileData: any;
fileType: any;
dirPage: any;
TransactionID: any;
indexLastObj: any = 0;
filterAllowedType: any = ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'];
constructor(public modalController: ModalController, public cs: CommonService, private ts: TranslatorService, private eitService: EitService) {
this.isSubmitBtnClicked = false;
this.eitRequest = new EitRequest();
@ -277,6 +293,37 @@ export class ConfirmAddEitComponent implements OnInit {
return await modal.present();
}
/*****submit modal********/
async openSubmitModal() {
this.cs.sharedService.setSharedData( this.attachListOver, 'submitAttachmentList');
this.cs.sharedService.setSharedData(this.eitComments, 'eitComments');
const modal = await this.modalController.create({
component: SubmitEitModalComponent,
backdropDismiss: false,
});
modal.cssClass = 'note-modal';
modal.onDidDismiss()
.then((data) => {
console.log(data.data);
if (data.data == "cancel" || data.data == undefined) {
return;
} else {
this.startEitApproval();
}
});
return await modal.present();
}
removeFile(objectitem) {
@ -413,4 +460,100 @@ export class ConfirmAddEitComponent implements OnInit {
this.cancelEitProcess();
}
/*******************Add attchement Functions*************/
public uploader: FileUploader = new FileUploader({
allowedMimeType: ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'],
maxFileSize: 10 * 1024 * 1024,
formatDataFunctionIsAsync: true,
formatDataFunction: async (item) => {
return new Promise((resolve, reject) => {
resolve({
name: item._file.name,
length: item._file.size,
contentType: item._file.type,
date: new Date()
});
});
}
});
onFileSelected(input) {
// this.uploader.onWhenAddingFileFailed = function (item: any, filter: any, options: any){
if (!(this.filterAllowedType.indexOf(input.target.files[0].type) > -1)) {
let msg: string = "";
msg = this.ts.trPK("general", "notSupport");
this.cs.presentAlert(msg);
return
} // todo: show alert that you tried uploading wrong files
else {
const file = input.target.files[0];
// console.log(file);
//var encoded = Base64.encode(file);
this.getBase64(file).then(
data => this.pushObject(data, file.name, file.type)
);
// }
// };
}
}
getBase64(file) {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result);
reader.onerror = error => reject(error);
});
}
pushObject(fileData, name, type) {
console.log("before push: "+ this.index);
//this.attachListOver.length++;
try {
let array = name.split('.');
let attachType: string = array[array.length - 1];
this.attachListOver.push(
{
AttachmentID: this.attachListOver.length,
P_FILE_CONTENT_TYPE: attachType,//type.split('/')[1],
P_FILE_DATA: fileData.split(',')[1],
P_FILE_NAME: name,//.split('.')[0],
P_TRANSACTION_ID: this.P_TransactionID
})
} catch (e) {
}
//console.log("after push: "+ this.index);
// return this.addAttachRequest
}
// removeFile(objectitem) {
// let objIndex1 = this.uploader.queue.findIndex(item => item == objectitem);
// this.uploader.queue.splice(objIndex1, 1);
// let objIndex = this.addAttachRequest.findIndex(item => item.AttachmentID == objectitem.AttachmentID);
// this.addAttachRequest.splice(objIndex, 1);
// // this.addAttachRequest =this.addAttachRequest.filter(item => item.AttachmentID !== objectitem.AttachmentID);
// }
}

@ -1,15 +1,116 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-buttons slot="start">
<!-- <ion-back-button color="light" class="btnBack" defaultHref="/eit/homepage" ></ion-back-button> -->
<nav-buttons backLink=""></nav-buttons>
</ion-buttons>
<ion-title color="light">{{headerTitle}}</ion-title>
</ion-toolbar>
<ion-toolbar class="header-toolbar-new">
<nav-buttons [enableMenu]="false" [enableBack]="true" [navigate]="true"></nav-buttons>
<ion-title style="color: white;">{{headerTitle}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding>
<ion-content>
<div class="">
<!-- class="colorBG" -->
<div class="content" [hidden]="functionName!='HMG_TKT_NEW_EIT_SS'">
<ion-grid class="headerGrid">
<p class="title">{{ts.trPK('absenceList','tickets-balance')}}</p>
<div style="color: black;">
<div class="result-graph">
<p-chart #chart class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart>
<div>
<ion-row>
<ion-col class="col" size="4">
<div class="light-dote"></div>
<!-- </ion-col>
<ion-col> -->
<label class="light-label">{{ts.trPK('absenceList','adult')}}</label>
</ion-col>
<ion-col class="col" size="4">
<div class="blue-dote"></div>
<!-- </ion-col>
<ion-col> -->
<label class="blue-label">{{ts.trPK('absenceList','child')}}</label>
</ion-col>
<ion-col class="col" size="4">
<div class="green-dote"></div>
<!-- </ion-col>
<ion-col> -->
<label class="green-label">{{ts.trPK('absenceList','infants')}} </label>
</ion-col>
</ion-row>
</div>
</div>
</div>
</ion-grid>
</div>
<!-- ///////////////////////////////////////////////// -->
<ion-grid [hidden]="functionName!='HMG_TKT_NEW_EIT_SS'" >
<div class="gridService">
<ion-row>
<ion-col class="columns">
<div class="adult-dote"></div>
<label>{{ts.trPK('absenceList','adult')}}</label>
<br>
<br>
<label class="service">{{accrualNetAdult}}</label>
<br> <label class="services">{{ts.trPK('absenceList','tickets')}}</label>
</ion-col>
<ion-col class="columns">
<div class="child-dote"></div>
<label>{{ts.trPK('absenceList','child')}} </label>
<br>
<br>
<label class="service">{{accrualUNetChild}}</label>
<br> <label class="services">{{ts.trPK('absenceList','tickets')}}</label>
</ion-col>
<ion-col class="columns">
<div class="infants-dote"></div>
<label>{{ts.trPK('absenceList','infants')}} </label>
<br>
<br>
<label class="service">{{accrualNetInfants}}</label>
<br> <label class="services">{{ts.trPK('absenceList','tickets')}}</label>
</ion-col>
</ion-row>
</div>
</ion-grid>
<!--
<ion-grid class="three-grid">
<ion-row>
<ion-col >
infants
</ion-col>
<ion-col >2</ion-col>
<ion-col >tickit</ion-col>
</ion-row>
<ion-row>
<ion-col >
child
</ion-col>
<ion-col >2</ion-col>
<ion-col >tickit</ion-col>
</ion-row>
<ion-row>
<ion-col >
adult
</ion-col>
<ion-col >2</ion-col>
<ion-col >tickit</ion-col>
</ion-row>
</ion-grid> -->
<!-- //////////////////////////////////////////////////// -->
<!-- <ion-content padding> -->
<div *ngIf="eitAddedList && eitAddedList.length > 0 ">
<ion-card *ngFor="let eitAddedObj of eitAddedList; let i=index ">
@ -63,9 +164,9 @@
<!-- <no-data *ngIf="!getResEITTransactionList || getResEITTransactionList[0]?.Collection_Transaction.length <= 0" txt="{{'general.noData' | translate}}"></no-data> -->
<div *ngIf="getResEITTransactionList && getResEITTransactionList[0]?.Collection_Transaction.length > 0 ">
<!-- <div> -->
<ion-card *ngFor="let EITTransactionList of getResEITTransactionList; let i=index ">
<div *ngFor="let EITTransactionList of getResEITTransactionList; let i=index ">
<ion-card-header class="boxHdr">
<!-- <ion-card-header class="boxHdr">
<div class="hrTitle">{{this.headerTitle}}</div>
<button ion-button (click)="deleteEIT(i)"
@ -74,48 +175,65 @@
<button ion-button *ngIf="getPassMnuEntryObj.UPDATE_BUTTON == 'Y' && EITTransactionList.statusID!=2"
(click)="updateEITRrq(i)">
<img class="imgSize" src="../assets/imgs/edit.png"></button>
</ion-card-header>
<ion-card-content>
</ion-card-header> -->
<!-- <ion-card-content> -->
<ion-grid>
<div>
<ion-row>
<!-- <ion-row>
<ion-col class="colBold">
<label for="">status</label>
</ion-col>
<ion-col>
<label for="">{{EITTransactionList.status}}</label>
</ion-col>
</ion-row>
</ion-row> -->
</div>
<ion-grid class="grids">
<div *ngFor="let item of EITTransactionList.Collection_Transaction">
<ion-row *ngIf="item.DISPLAY_FLAG != 'N' ">
<!-- <ion-row *ngIf="item.DISPLAY_FLAG != 'N' ">
<ion-col class="colBold">
<label for="">{{item.SEGMENT_PROMPT}}</label>
</ion-col>
<ion-col>
<label for="">{{item.SEGMENT_VALUE_DSP}}</label>
</ion-col>
</ion-row>
</ion-row> -->
<ion-row class="">
<ion-col class="" *ngIf="item.SEGMENT_PROMPT!=''">
<label style="color:#094875;font-weight: bold;" class="label" for="">{{item.SEGMENT_PROMPT}} </label>
<br>
<label class="label" style="color:black;" for="">{{item.SEGMENT_VALUE_DSP}} </label>
<br>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
</div>
</ion-grid>
</ion-card-content>
</ion-card>
</ion-grid>
<!-- </ion-card-content> -->
</div>
<div>
</div>
</div>
<ion-icon class="addClass" name="add" (click)="addEITRrq()"></ion-icon>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
</div>
</ion-content>
<ion-footer>
<div class="centerDiv">
<!-- <button *ngIf="getPassMnuEntryObj.ADD_BUTTON == 'Y'" ion-button (click)="addEITRrq()">{{'requestEit.add'
| translate}} </button> -->
<ion-button class="footer-button" color="customnavy" ion-button (click)="addEITRrq()">
{{'general, add' | translate}}</ion-button>
<!-- <ion-button class="footer-button" color="customnavy" ion-button (click)="addEITRrq()">
{{'general, add' | translate}}</ion-button> -->
</div>
</ion-footer>

@ -9,3 +9,256 @@ h4 {
text-align: center;
color: #000000;
}
.grids{
border-radius: 20px !important;
background: white;
padding-left: 1px;
padding-right: 1px;
margin: 13px;
padding-top: 0px;
padding-bottom: 3px;
padding-left: 13px;
padding-right: 13px;
border: 1px solid #cac8c8;
}
.bgcolor {
color: white;
border-top-right-radius: 19px;
border-top-left-radius: 15px;
padding-top: 1;
padding-bottom: 0;
margin-top: 0;
margin-bottom: 0;
/* border-radius: 12px !important; */
background: #094875;
border-bottom: 1px solid #a7a4a4;
border-top: 1px solid #cac8c8;
margin-left: -13px;
margin-right: -13px;
}
.colEit{
border-right: 1px solid #cac8c8;
border-bottom-left-radius: -10px !important;
padding-top: 8px;
padding-bottom: 8px;
margin-left: 18px;
font-size: 12px !important;
}
.header-div {
background-color: #22C6B3;
text-transform: capitalize;
height: 160px;
// position: relative;
display: block;
margin-bottom: -28px;
}
.header-toolbar-new{
--background: #22c6b3;
}
.addClass{
background-color: #094875;
width: 80px;
height: 80px;
right: 8%;
position: fixed;
color: white;
bottom: 20%;
border-radius: 50%;
z-index: 999;
-webkit-box-shadow: 2px -1px 13px 0px rgba(0,0,0,0.59);
-moz-box-shadow: 2px -1px 13px 0px rgba(0,0,0,0.59);
box-shadow: 2px -1px 13px 0px rgba(0,0,0,0.59);
}
.hrClass{
border-width: 0;
box-sizing: content-box;
border-bottom: 1px solid #e6e6e6;
background: #fff !important;
height: 1px;
}
////////////////////////////////
.content:before {
position: absolute;
content: "";
background: #22c6b3;
height: 140px;
width: 100%;
left: 0;
top: 0px;
z-index: 1;
}
.colorBG{
--background: #f0efef;
}
.Title{
text-align: center;
color: white;
margin-top: -33px;
font-size: 17px;
}
.title{
text-align: center;
color: black;
margin-top: 5px;
font-size: 17px;
}
.today-graph{
display: block !important;
height: 196px;
width: 365px;
/* padding-left: 51px; */
margin-left: 28px !important;
}
.headerGrid{
// background-color: white !important;
// border: 1px solid #cac8c8 !important;
// border-radius: 20px !important;
// padding-top: 28px;
// padding-bottom: 53px;
// margin-left: 9px;
// margin-right: 13px;
// margin-top: -94px;
// margin-bottom: 10px;
background-color: white !important;
border: 1px solid #cac8c8 !important;
/* padding-top: 28px; */
padding-bottom: 53px;
padding-top: -30px;
margin-left: 13px;
margin-right: 13px;
/* margin-top: -86px; */
margin-bottom: 10px;
position: relative;
z-index: 1;
border-radius: 20px;
margin-top: 17px;
}
.result-graph{
font-size: 14px;
margin-left: -48px;
margin-right: 3px;
margin-bottom: -30px;
}
.green-label{
font-size: 15px !important;
margin-left: 7px !important;
margin-right: 42px;
}
.blue-label{
font-size: 15px !important;
margin-left: 7px !important;
margin-right: 13px;
}
.light-label{
font-size: 15px !important;
margin-left: 7px !important;
margin-right: -26px;
}
.light-dote{
background-color: #3CB9D5;
width: 12px;
height: 12px;
border-radius: 50% !important;
display: inline-block;
}
.blue-dote{
background-color: #22C6B3;
width: 12px;
height: 12px;
border-radius: 50% !important;
display: inline-block;
}
.green-dote{
background-color: #1FA269;
width: 12px;
height: 12px;
border-radius: 50% !important;
display: inline-block;
margin-right: -1px;
}
.col{
text-align: right;
}
.gridService{
/* margin-top: 87px; */
border-radius: 10px;
/* margin-bottom: -49px; */
margin-left: 14px;
margin-right: 14px;
}
.columns{
margin: 3px;
margin-bottom: 13px;
background: white;
border-radius: 27px;
padding-left: 30px;
padding-right: 6px;
padding-top: 19px;
padding-bottom: 8px;
border: 1px solid #cac8c8 !important;
}
.service{
font-size: 22px;
color: black;
letter-spacing: 1px;
font-weight: bold;
}
.services{
font-size: 12px;
color: black;
}
.adult-dote{
background-color: #3CB9D5;
width: 15px;
height: 15px;
border-radius: 50% !important;
display: inline-block;
margin-left: -17px;
margin-right: 5px;
}
.child-dote{
background-color: #22C6B3;
width: 15px;
height: 15px;
border-radius: 50% !important;
display: inline-block;
margin-left: -17px;
margin-right: 5px;
}
.infants-dote{
background-color: #1FA269;
width: 15px;
height: 15px;
border-radius: 50% !important;
display: inline-block;
margin-left: -17px;
margin-right: 5px;
// margin-bottom: 6px;
}

@ -40,6 +40,20 @@ export class EitListComponent implements OnInit {
private selectedIndex: number;
private pAction: number = 0;
public headerTitle: string = "";
data: any;
accrualNetInfants: any;
accrualUNetChild: any;
accrualNetAdult: any;
public options = {
cutoutPercentage: 80,
tooltips: { enabled: false },
legend: { display: false }};
gaugeType = "full";
accrualBalancesList: any;
common: any;
// gaugeValue = 11.200;
// gaugeLabel = "";
constructor(private cs: CommonService, private EITService: EitService, private ts: TranslatorService, private modalCtrl: ModalController) {
this.selMenu = this.cs.sharedService.getSharedData(MenuResponse.SHARED_DATA, false);
@ -49,6 +63,7 @@ export class EitListComponent implements OnInit {
this.menuType = this.selMenu.List_Menu.MENU_TYPE;
this.transactionNo = 0;
this.functionName = this.getPassMnuEntryObj.FUNCTION_NAME;
console.log("fN>>>>>>>>>>>>>>>>>"+this.functionName);
this.headerTitle = this.selMenu.GetMenuEntriesList.PROMPT;
this.validEitTransactionTbl = [];
this.P_PAGE_NUM = 1;
@ -57,6 +72,27 @@ export class EitListComponent implements OnInit {
ngOnInit() {
this.getEITTransactions();
this.accrualBalancesList = this.cs.sharedService.getSharedData('tickitsbalance', false);
// accrualNetInfants
// accrualUNetChild
// accrualNetAdult
this.accrualNetAdult = this.accrualBalancesList[1].ACCRUAL_NET_ENTITLEMENT;
this.accrualUNetChild = this.accrualBalancesList[2].ACCRUAL_NET_ENTITLEMENT;
this. accrualNetInfants= this.accrualBalancesList[3].ACCRUAL_NET_ENTITLEMENT;
this.data = {
// labels: ['earingTotal', 'deductionTotal'],
datasets: [
{ data: [this.accrualNetInfants, this.accrualUNetChild, this.accrualNetAdult],
backgroundColor: [
'#1FA269',
'#22C6B3',
'#3CB9D5',],
borderWidth: 2
}
]
};
}
getEITTransactions() {
@ -334,7 +370,7 @@ export class EitListComponent implements OnInit {
// this.P_TransactionID=result.SubmitEITTransactionList.P_TRANSACTION_ID;
// this.sharedData.setSharedData(result,AddEitResponse.SHARED_DATA);
// // this.sharedData.setSharedData(result.SubmitEITTransactionList.P_TRANSACTION_ID,"TransactionIDResubmit");
// //this.cs.sharedService.setSharedData(result.SubmitEITTransactionList.P_TRANSACTION_ID,"TransactionIDResubmit");
// // this.sharedData.setSharedData(this.eitRequest,EitRequest.SHARED_DATA);
this.cs.sharedService.setSharedData({ isResubmit: false, isDelete: this.isDelete }, 'confirmAddEITData')
this.cs.openConfirmEitPage();
@ -455,4 +491,6 @@ export class EitListComponent implements OnInit {
this.eitAddedList = list;
this.removeItems(item.Collection_Transaction[0].TRANSACTION_NUMBER);
}
}

@ -13,6 +13,7 @@ import { EitListComponent } from './eit-list/eit-list.component';
import { DatePicker } from '@ionic-native/date-picker/ngx';
import { WorkListAttachViewComponent } from '../notification/work-list-attach-view/work-list-attach-view.component';
import { EitUpdateListComponent } from './eit-update-list/eit-update-list.component';
import { SubmitEitModalComponent } from './submit-eit-modal/submit-eit-modal.component';
const routes: Routes = [
@ -43,6 +44,10 @@ const routes: Routes = [
{
path: 'eit-update-list',
component: EitUpdateListComponent
},
{
path: 'eit-submit-modal',
component: SubmitEitModalComponent
}
]
}
@ -63,7 +68,8 @@ const routes: Routes = [
AddEitComponent,
ConfirmAddEitComponent,
AddAttachComponent,
EitUpdateListComponent
EitUpdateListComponent,
SubmitEitModalComponent
],
entryComponents: [
WorkListAttachViewComponent

@ -1,5 +1,5 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-title color="light">{{headerTitle}}</ion-title>
<ion-buttons slot="start">
<nav-buttons backLink=""></nav-buttons>
@ -10,34 +10,82 @@
<ion-content padding>
<ion-content>
<ion-list>
<ion-item lines="none" class="custCollabs ion-item-styling" *ngFor="let menuItem of menu; let i=index"
<!--From Home List-->
<ion-list style="margin-top: 40px;border-top: 1px solid #c8c8c8;" [hidden]="pageType=='myteam'" *ngIf="pageType=='home'">
<ion-item lines="none" class="custCollabs ion-item-styling" *ngFor="let menuItem of menu.children; let i=index"
(click)="openPage(menuItem, i);">
<ion-row>
<ion-row style="width: 100%;">
<!-- Parent Pages -->
<ion-col size="12" class="menu-name">
<ion-col size="12" class="">
<div [ngClass]="{'selectedDiv': selectedMenu == i,'notSelected': selectedMenu != i }">
<ion-text>
<b>{{menuItem.PROMPT}}</b>
</ion-text>
<ion-label>
<b text-wrap>{{menuItem.PROMPT}}</b>
<ion-icon style="float: right;font-size: 25px;color: grey;" name="arrow-forward"></ion-icon>
</ion-label>
</div>
<!-- Child Pages -->
<ion-list [hidden]="selectedMenu != i">
<ion-item lines="none" class="childItem" *ngFor="let subPage of menuItem.children;let i2=index" text-wrap
<ion-list [hidden]="selectedMenu != i" lines="full">
<ion-item lines="full" class="" *ngFor="let subPage of menuItem.children;let i2=index" text-wrap
(click)="openPage(subPage)">
<ion-row>
<ion-col size="12" class="menu-name"><span ion-text color="color2">&nbsp;{{subPage.PROMPT}}</span>
</ion-col>
</ion-row>
<!-- <ion-row>
<ion-col size="10" class="menu-name"><span ion-text color="color2">&nbsp;{{subPage.PROMPT}} </span> -->
<ion-label><span ion-text color="color2">&nbsp;{{subPage.PROMPT}} </span>
<ion-icon style="float: right;font-size: 25px;color: grey;" name="arrow-forward"></ion-icon>
</ion-label>
<!-- </ion-col>
</ion-row> -->
</ion-item>
</ion-list>
</ion-col>
</ion-row>
<ion-icon [name]="selectedMenu == i? 'ios-arrow-down' : 'ios-arrow-forward'"
*ngIf="menuItem.children && menuItem.MENU_ENTRY_TYPE=='MENU'" slot="end" class="arrow-down"></ion-icon>
<!-- <ion-icon [name]="selectedMenu == i? 'ios-arrow-down' : 'ios-arrow-forward'"
*ngIf="menuItem.children && menuItem.MENU_ENTRY_TYPE=='MENU'" slot="end" class="arrow-down"></ion-icon> -->
</ion-item>
</ion-list>
<!--From My Team List-->
<ion-list style="margin-top: 40px;border-top: 1px solid #c8c8c8;" [hidden]="pageType=='home'" *ngIf="pageType=='myteam'">
<ion-item lines="none" class="custCollabs ion-item-styling" *ngFor="let menuItem of menu; let i=index"
(click)="openPage(menuItem, i);">
<ion-row style="width: 100%;">
<!-- Parent Pages -->
<ion-col size="12" class="">
<div [ngClass]="{'selectedDiv': selectedMenu == i,'notSelected': selectedMenu != i }">
<ion-label>
<b text-wrap>{{menuItem.PROMPT}}</b>
<ion-icon style="float: right;font-size: 25px;color: grey;" name="arrow-forward"></ion-icon>
</ion-label>
</div>
<!-- Child Pages -->
<ion-list [hidden]="selectedMenu != i" lines="full">
<ion-item lines="full" class="" *ngFor="let subPage of menuItem.children;let i2=index" text-wrap
(click)="openPage(subPage)">
<!-- <ion-row>
<ion-col size="10" class="menu-name"><span ion-text color="color2">&nbsp;{{subPage.PROMPT}} </span> -->
<ion-label><span ion-text color="color2">&nbsp;{{subPage.PROMPT}} </span>
<ion-icon style="float: right;font-size: 25px;color: grey;" name="arrow-forward"></ion-icon>
</ion-label>
<!-- </ion-col>
</ion-row> -->
</ion-item>
</ion-list>
</ion-col>
</ion-row>
<!-- <ion-icon [name]="selectedMenu == i? 'ios-arrow-down' : 'ios-arrow-forward'"
*ngIf="menuItem.children && menuItem.MENU_ENTRY_TYPE=='MENU'" slot="end" class="arrow-down"></ion-icon> -->
</ion-item>
</ion-list>
</ion-content>

@ -4,16 +4,16 @@ ion-item.custCollabs.item.item-block.item-ios {
}
.ion-item-styling {
-webkit-box-shadow: 0px 2px 7px 0px #7f8c8d;
-moz-box-shadow: 0px 2px 7px 0px #7f8c8d;
box-shadow: 0px 2px 7px 0px #7f8c8d;
color: #209a83 !important;
border: 0px;
border-radius: 5px;
color: black;
line-height: 2;
margin: 8px 2px;
min-height: 40px;
background-color: #ffffff;
border-bottom: 1px solid #c8c8c8;
}
.header-toolbar-new{
--background: #22c6b3;
}
ion-item.item.item-block {

@ -16,12 +16,14 @@ export class HomeComponent implements OnInit {
selMenu: MenuResponse = new MenuResponse();
// Selected Side Menu
selectedMenu: any;
pageType :string;
constructor(private cs: CommonService, private ts: TranslatorService) {
this.menu = this.cs.sharedService.getSharedData('menuEntries', false);
this.pageType = this.cs.sharedService.getSharedData('homemenuentries', false);
this.selMenu = this.cs.sharedService.getSharedData(MenuResponse.SHARED_DATA, false);
const title: string = this.ts.trPK('eit', 'my-requests');
this.headerTitle = this.selMenu.List_Menu.MENU_NAME ? this.selMenu.List_Menu.MENU_NAME : title;
this.headerTitle = this.menu.PROMPT ? this.menu.PROMPT : title;
}
ngOnInit() { }
@ -40,6 +42,7 @@ export class HomeComponent implements OnInit {
this.selectedMenu = index;
}
}
console.log("selected>>>>>>>"+this.selectedMenu);
}
goToRequest(menuEntry) {
@ -55,6 +58,9 @@ export class HomeComponent implements OnInit {
if (menuEntry.REQUEST_TYPE === 'PAYSLIP'){
this.cs.openPayslipPage();
}
if (menuEntry.REQUEST_TYPE === 'TIME_CARD') {
this.cs.openTimeCardPage();
}
}
}

@ -0,0 +1,39 @@
<ion-content padding>
<!--
<ion-col col-1
style="margin-right: -22px;margin-top: -10px;">
<ion-button class="closeIcon" (click)="closeModal()">
<img src="../assets/imgs/close.png">
</ion-button>
</ion-col> -->
<h2><div class="Header">Confirmation</div></h2>
<div>
<div *ngIf="submitAttachmentList.length==0" class="labelcheck" lines="none" style="text-align: center;">
No Attachment
</div>
<div *ngIf="eitComments==''" class="labelcheck" style="text-align: center;margin-bottom: 5px;padding-bottom: 16px;">
No Note
</div>
</div>
<ion-footer style="border-top: 1px solid grey !important;">
<ion-row class="rowBtn">
<ion-label class="labelRadio">Are you sure you want to submit</ion-label>
<ion-button class="submitOkButton" (click)="OkBtnModal()"> {{ts.trPK('general','ok')}}
</ion-button>
</ion-row>
<ion-row class="rowBtn">
<ion-button class="submitCancelButton" (click)="closeModal()"> {{ts.trPK('general','cancel')}}
</ion-button>
</ion-row>
</ion-footer>
</ion-content>

@ -0,0 +1,53 @@
.rowBtn{
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.Header{
color: black !important;
font-size: 25px !important;
font-weight: bold !important;;
margin: 0;
text-align: center;
margin-bottom: 20px;
}
.labelRadio{
color: black !important;
font-weight: bold !important;
padding-bottom: 20px;
}
.labelcheck{
color: red !important;
font-weight: bold !important;
margin-bottom: 10px;
}
.submitOkButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
--background:: #22c6b3;
width: 100% !important;
color: white!important;
border-radius: 16px !important;
}
.submitCancelButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
--background:: #094875;
width: 100% !important;
color: white!important;
border-radius: 16px !important;
}

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { SubmitEitModalComponent } from './submit-eit-modal.component';
describe('SubmitEitModalComponent', () => {
let component: SubmitEitModalComponent;
let fixture: ComponentFixture<SubmitEitModalComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ SubmitEitModalComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SubmitEitModalComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,36 @@
import { Component, OnInit } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { ModalController } from '@ionic/angular';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
@Component({
selector: 'app-submit-eit-modal',
templateUrl: './submit-eit-modal.component.html',
styleUrls: ['./submit-eit-modal.component.scss'],
})
export class SubmitEitModalComponent implements OnInit {
submitAttachmentList :any =[];
eitComments: string;
constructor( private ts: TranslatorService,private modalCtrl: ModalController, private cs: CommonService){
this.submitAttachmentList = this.cs.sharedService.getSharedData('submitAttachmentList', false);
this.eitComments = this.cs.sharedService.getSharedData('eitComments', false);
}
ngOnInit() {
console.log("modal");
//this.actionBtns = this.cs.sharedService.getSharedData("passActionMore" , false);
console.log("modal");
}
closeModal() {
this.modalCtrl.dismiss();
}
OkBtnModal() {
let data = "ok";
this.modalCtrl.dismiss(data);
}
}

@ -1,8 +0,0 @@
import { FeedbackDirective } from './feedback.directive';
describe('FeedbackDirective', () => {
it('should create an instance', () => {
const directive = new FeedbackDirective();
expect(directive).toBeTruthy();
});
});

@ -1,24 +0,0 @@
import { Directive, ElementRef, HostListener } from '@angular/core';
import { TranslatorService } from '../../services/translator/translator.service';
import { CommonService } from '../../services/common/common.service';
import { FeedbackService } from './feedback.service';
@Directive({
selector: '[feedback]'
})
export class FeedbackDirective {
constructor(
private cs: CommonService,
private ts: TranslatorService,
private el: ElementRef,
private feedBackService: FeedbackService
) {
}
@HostListener('mousedown') onMouseEnter() {
this.feedBackService.vibrate();
}
}

@ -1,12 +0,0 @@
import { TestBed } from '@angular/core/testing';
import { FeedbackService } from './feedback.service';
describe('FeedbackService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: FeedbackService = TestBed.get(FeedbackService);
expect(service).toBeTruthy();
});
});

@ -1,20 +0,0 @@
import { Injectable } from '@angular/core';
import { Vibration } from '@ionic-native/vibration/ngx';
// import { SettingsService } from 'src/app/settings/service/settings.service';
@Injectable({
providedIn: 'root'
})
export class FeedbackService {
// constructor(private vibration: Vibration, private settings: SettingsService) {}
constructor(private vibration: Vibration) {}
public async vibrate() {
try {
const on = true;
if (on) {
this.vibration.vibrate(500);
}} catch (e) {
}
}
}

@ -43,6 +43,8 @@ import { NativeStorage } from '@ionic-native/native-storage/ngx';
import { ProgressLoadingService } from './ui/progressLoading/progress-loading.service';
import { BarChartComponent } from './ui/bar-chart/bar-chart.component';
import { DonutChartComponent } from './ui/donut-chart/donut-chart.component';
// import { UserLocalNotificationService } from './services/user-local-notification/user-local-notification.service';
// import { LocalNotifications } from '@ionic-native/local-notifications/ngx';
import { EmailComponent } from './ui/email/email.component';
import { Badge } from '@ionic-native/badge/ngx';
import { PushService } from './services/push/push.service';
@ -51,6 +53,8 @@ import { HmgBrowserService } from './services/hmg-browser/hmg-browser.service';
import { GuidService } from './services/guid/guid.service';
import { TabsBarComponent } from './ui/tabs-bar/tabs-bar.component';
import { PageTrailerComponent } from './ui/spacer/page-trailer/page-trailer.component';
// import { GeofencingService } from './services/geofencing/geofencing.service';
// import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
import { ButtonComponent } from './ui/button/button.component';
import { ToolbarButtonComponent } from './ui/toolbar-button/toolbar-button.component';
import { ListboxModule } from 'primeng/listbox';
@ -78,10 +82,13 @@ import { Diagnostic } from '@ionic-native/diagnostic/ngx';
import { DetailButtonComponent } from './ui/detail-button/detail-button.component';
import { RouterModule } from '@angular/router';
import { HeaderButtonComponent } from './ui/header-button/header-button.component';
// import { CallNumber } from '@ionic-native/call-number/ngx';
import { AppRate } from '@ionic-native/app-rate/ngx';
import { RatingService } from './services/rating/rating.service';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { RateService } from './services/rate/rate.service';
// import { PaymentComponent } from './ui/payment/payment.component';
// import { PaymentService } from './ui/payment/service/payment.service';
import { MenuService } from './services/menu/menuservice.service';
import { ReplacementListComponent } from '../vacation-rule/replacement-list/replacement-list.component';
import { FileSelectDirective } from 'ng2-file-upload';
@ -89,7 +96,7 @@ import { PdfViewerModule } from 'ng2-pdf-viewer';
import { WorkListAttachViewComponent } from '../notification/work-list-attach-view/work-list-attach-view.component';
import {Camera, CameraOptions, PictureSourceType} from '@ionic-native/Camera/ngx';
import {File} from '@ionic-native/file/ngx';
import {FileUploderProfileComponent} from './ui/file-uploder-profile/file-uploder-profile.component'
import {FileUploderProfileComponent} from './ui/file-uploder-profile/file-uploder-profile.component';
import { OpenNativeSettings } from '@ionic-native/open-native-settings/ngx';
import { AccordinCustomComponent } from './ui/accordin-custom/accordin-custom.component';
import { AccordinTabCustomComponent} from './ui/accordin-custom/accordin-tab-custom/accordin-tab-custom.component'
@ -103,6 +110,11 @@ import {FabButtonComponent} from './ui/fab-button/fab-button.component'
import { AttendScanService } from './services/attend-services/attend-scan.service';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { NgCircleProgressModule } from 'ng-circle-progress';
import { CardFilterComponent } from './ui/card-filter/card-filter.component';
import { EmployeeInformationComponent } from './ui/employee-information/employee-information.component';
import { CircleCalendarComponent } from './ui/circle-calendar/circle-calendar.component';
import { NgCalendarModule } from 'ionic2-calendar';
import { DateInfoModalComponent } from './ui/circle-calendar/date-info-modal/date-info-modal.component';
import { ChartModule } from 'primeng/chart';
@NgModule({
imports: [
@ -115,6 +127,7 @@ import { ChartModule } from 'primeng/chart';
ListboxModule,
PdfViewerModule,
NgCircleProgressModule.forRoot(),
NgCalendarModule,
ChartModule,
NgxGaugeModule
],
@ -135,6 +148,7 @@ import { ChartModule } from 'primeng/chart';
DatePipeTransform,
DateTimePipe,
SafeHtmlPipe,
// TurncatePipe,
BackButtonComponent,
IfDatePipe,
DynamicTableComponent,
@ -168,7 +182,6 @@ import { ChartModule } from 'primeng/chart';
EmptyDataComponent,
DetailButtonComponent,
HeaderButtonComponent,
//PaymentComponent,
ReplacementListComponent,
FileSelectDirective,
WorkListAttachViewComponent,
@ -177,7 +190,13 @@ import { ChartModule } from 'primeng/chart';
AccordinCustomComponent,
StatsButtonComponent,
ServicesButtonComponent,
ConfirmLoginComponent
ConfirmLoginComponent,
CardFilterComponent,
EmployeeInformationComponent,
ConfirmLoginComponent,
CircleCalendarComponent,
DateInfoModalComponent
],
exports: [
FabButtonComponent,
@ -193,6 +212,7 @@ import { ChartModule } from 'primeng/chart';
DividerComponent,
NavButtonsComponent,
DatePipeTransform,
// TurncatePipe,
TranslatePipe,
DateTimePipe,
SafeHtmlPipe,
@ -237,7 +257,15 @@ import { ChartModule } from 'primeng/chart';
ServicesButtonComponent,
ConfirmLoginComponent,
NgCircleProgressModule,
ChartModule,
CardFilterComponent,
EmployeeInformationComponent,
ConfirmLoginComponent,
CircleCalendarComponent,
DateInfoModalComponent,
NgCalendarModule,
ChartModule
],
providers: [
AttendScanService,
@ -255,10 +283,14 @@ import { ChartModule } from 'primeng/chart';
NativeStorage,
ProgressLoadingService,
PushService,
// UserLocalNotificationService,
// LocalNotifications,
Badge,
LifeCycleService,
HmgBrowserService,
GuidService,
// BackgroundGeolocation,
// GeofencingService,
Keyboard,
KeyboardService,
Diagnostic,
@ -273,11 +305,12 @@ import { ChartModule } from 'primeng/chart';
RateService,
Camera,
File,
// PaymentService,
MenuService,
OpenNativeSettings,
BarcodeScanner,
]
BarcodeScanner
],
entryComponents: [DateInfoModalComponent],
})
export class HmgCommonModule { }

@ -55,7 +55,7 @@ export class AuthenticationService {
public static smsSendCode='Services/ERP.svc/REST/SendPublicActivationCode';
public static sendActivationCodeByType = 'Services/ERP.svc/REST/Mohemm_SendActivationCodebyOTPNotificationType';
public static getMobileLoginInfo ='Services/ERP.svc/REST/Mohemm_GetMobileLoginInfo';
public static getMobileLoginInfo ='Services/ERP.svc/REST/Mohemm_GetMobileLoginInfo_NEW';//Mohemm_GetMobileLoginInfo
public static insertMobileLoginInfo ='Services/ERP.svc/REST/Mohemm_InsertMobileLoginInfo';
/* register methods */
@ -82,6 +82,7 @@ export class AuthenticationService {
public static LOGIN_DATA="logindata";
public static DEVICE_TOKEN = "device_token";
public static LAST_LOGIN = 'last-login';
public static IMEI_USER_DATA = "imei-user-data";
// private static user: AuthenticatedUser;
@ -107,7 +108,6 @@ export class AuthenticationService {
request.P_USER_NAME = user.EMPLOYEE_NUMBER;
request.UserName = user.EMPLOYEE_NUMBER;
request.P_EMAIL_ADDRESS = user.EMPLOYEE_EMAIL_ADDRESS;
if (AuthenticationService.requireRelogin) {
this.sessionTimeOutDialog();
}
@ -304,11 +304,11 @@ export class AuthenticationService {
}
public getLoginInfo(
request: GetLoginInfoRequest,
request: any,
onError: any,
errorLabel: string
): Observable<GetLoginInfoResponse> {
this.setPublicFields(request);
//this.setPublicFields(request);
return this.con.post(
AuthenticationService.getMobileLoginInfo,
request,

@ -20,5 +20,7 @@ export class CheckUserAuthenticationResponse extends Response {
public IsPasswordExpired: boolean;
//public P_SESSION_ID:string;
public MemberLoginList: MemberList ;
public BasicMemberInformation: BasicInfo;
public BasicMemberInformation: BasicInfo;
public EMPLOYEE_DISPLAY_NAME: string;
public EMPLOYEE_NAME:string;
}

@ -14,6 +14,8 @@ export class GetLoginInfoRequest extends Request {
CompanyID:number;
DeviceType:string;
LoginType:number;
EMPLOYEE_NAME:string;
EmployeeName:string;
// constructor(user: AuthenticatedUser) {
// super();
// this.NationalID = user.IdentificationNo;

@ -5,7 +5,8 @@ export class GetLoginInfoResponse extends Response {
SMSLoginRequired: boolean;
isSMSSent: boolean;
LogInTokenID: string;
Mohemm_GetPatientID_List:any
Mohemm_GetPatientID_List:any //old one
Mohemm_GetMobileLoginInfoList:any
isActiveCode: boolean;
// PatientOutSA: boolean;
}

@ -6,4 +6,6 @@ export class MemberList {
public P_RETURN_MSG: string;
public P_RETURN_STATUS: string;
public P_SESSION_ID: number;
public EMPLOYEE_DISPLAY_NAME: string;
public EMPLOYEE_NAME:string;
}

@ -1,4 +1,4 @@
import { Injectable } from "@angular/core";
import { Injectable } from '@angular/core';
import {
NavController,
ToastController,
@ -6,74 +6,74 @@ import {
AlertController,
Platform,
MenuController
} from "@ionic/angular";
import { Router } from "@angular/router";
import { TranslatorService } from "../translator/translator.service";
import { AlertControllerService } from "../../ui/alert/alert-controller.service";
} from '@ionic/angular';
import { Router } from '@angular/router';
import { TranslatorService } from '../translator/translator.service';
import { AlertControllerService } from '../../ui/alert/alert-controller.service';
//import { Response } from "../models/response";
import { Response } from 'src/app/hmg-common/services/models/response';
import { Location, DatePipe } from "@angular/common";
import { ThemeableBrowser } from "@ionic-native/themeable-browser/ngx";
import { BrowserConfig } from "./models/browser-config";
import { Location, DatePipe } from '@angular/common';
import { ThemeableBrowser } from '@ionic-native/themeable-browser/ngx';
import { BrowserConfig } from './models/browser-config';
import {
LaunchNavigator,
LaunchNavigatorOptions
} from "@ionic-native/launch-navigator/ngx";
import { Device } from "@ionic-native/device/ngx";
import { ProgressLoadingService } from "../../ui/progressLoading/progress-loading.service";
import { Observable, throwError } from "rxjs";
import { SharedDataService } from "../shared-data-service/shared-data.service";
import { Badge } from "@ionic-native/badge/ngx";
import { LifeCycleService } from "../life-cycle/life-cycle.service";
import { Diagnostic } from "@ionic-native/diagnostic/ngx";
} from '@ionic-native/launch-navigator/ngx';
import { Device } from '@ionic-native/device/ngx';
import { ProgressLoadingService } from '../../ui/progressLoading/progress-loading.service';
import { Observable, throwError } from 'rxjs';
import { SharedDataService } from '../shared-data-service/shared-data.service';
import { Badge } from '@ionic-native/badge/ngx';
import { LifeCycleService } from '../life-cycle/life-cycle.service';
import { Diagnostic } from '@ionic-native/diagnostic/ngx';
//import { CallNumber } from "@ionic-native/call-number/ngx";
import { InAppBrowser } from "@ionic-native/in-app-browser/ngx";
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
@Injectable({
providedIn: "root"
providedIn: 'root'
})
export class CommonService {
public static months_en_long = [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
'January',
'February',
'March',
'April',
'May',
'June',
'July',
'August',
'September',
'October',
'November',
'December'
];
public static months_en = [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
'Aug',
'Sep',
'Oct',
'Nov',
'Dec'
];
public static months_ar = [
"يناير",
"فبراير",
"مارس",
"أبريل",
"مايو",
"يونيو",
"يوليو",
"أغسطس",
"سبتمبر",
"أكتوبر",
"نوفمبر",
"ديسمبر"
'يناير',
'فبراير',
'مارس',
'أبريل',
'مايو',
'يونيو',
'يوليو',
'أغسطس',
'سبتمبر',
'أكتوبر',
'نوفمبر',
'ديسمبر'
];
private progressLoaders: any[] = [];
@ -172,7 +172,7 @@ public getMonthNameAr(value: number): string {
public round(value: number, decimal: number): string {
const valueStr = value.toString();
const dotIndex = valueStr.indexOf(".");
const dotIndex = valueStr.indexOf('.');
if (dotIndex >= 0) {
return valueStr.toString().substr(0, dotIndex + decimal);
@ -186,13 +186,13 @@ public getMonthNameAr(value: number): string {
var hours = Math.floor(sec_num / 3600);
var minutes = Math.floor((sec_num - hours * 3600) / 60);
var seconds = sec_num - hours * 3600 - minutes * 60;
var hoursString = "";
var minutesString = "";
var secondsString = "";
hoursString = hours < 10 ? "0" + hours : hours.toString();
minutesString = minutes < 10 ? "0" + minutes : minutes.toString();
secondsString = seconds < 10 ? "0" + seconds : seconds.toString();
return minutesString + ":" + secondsString;
var hoursString = '';
var minutesString = '';
var secondsString = '';
hoursString = hours < 10 ? '0' + hours : hours.toString();
minutesString = minutes < 10 ? '0' + minutes : minutes.toString();
secondsString = seconds < 10 ? '0' + seconds : seconds.toString();
return minutesString + ':' + secondsString;
}
public toastPK(page: string, key: string) {
@ -202,9 +202,9 @@ public getMonthNameAr(value: number): string {
const toast = await this.toastController.create({
message: message,
showCloseButton: true,
position: "middle",
position: 'middle',
duration: 2000,
closeButtonText: this.ts.trPK("general", "close")
closeButtonText: this.ts.trPK('general', 'close')
});
toast.present();
}
@ -213,9 +213,9 @@ public getMonthNameAr(value: number): string {
async startLoadingOld() {
this.stopLoading();
const loader = await this.loadingController.create({
spinner: "bubbles",
spinner: 'bubbles',
duration: 30000,
message: this.ts.trPK("error", "wait"),
message: this.ts.trPK('error', 'wait'),
translucent: true
});
this.progressLoaders.push(loader);
@ -228,7 +228,7 @@ public getMonthNameAr(value: number): string {
*/
this.stopLoading();
this.progressLoadingService.presentLoading(
this.ts.trPK("general", "loading")
this.ts.trPK('general', 'loading')
);
}
@ -248,8 +248,8 @@ public getMonthNameAr(value: number): string {
onAccept();
}
},
this.ts.trPK("general", "ok"),
this.ts.trPK("general", "alert"),
this.ts.trPK('general', 'ok'),
this.ts.trPK('general', 'alert'),
message
);
}
@ -257,10 +257,10 @@ public getMonthNameAr(value: number): string {
public presentConfirmDialog(message: string, onAccept: any, onCancel?: any) {
this.confirmAlertDialog(
onAccept,
this.ts.trPK("general", "ok"),
this.ts.trPK('general', 'ok'),
onCancel,
this.ts.trPK("general", "cancel"),
this.ts.trPK("general", "confirm"),
this.ts.trPK('general', 'cancel'),
this.ts.trPK('general', 'confirm'),
message
);
}
@ -268,8 +268,8 @@ public getMonthNameAr(value: number): string {
public presentAcceptDialog(message: string, onAccept: any) {
this.alertDialog(
onAccept,
this.ts.trPK("general", "ok"),
this.ts.trPK("general", "confirm"),
this.ts.trPK('general', 'ok'),
this.ts.trPK('general', 'confirm'),
message
);
}
@ -279,8 +279,8 @@ public getMonthNameAr(value: number): string {
() => {
this.back();
},
this.ts.trPK("general", "ok"),
this.ts.trPK("general", "info"),
this.ts.trPK('general', 'ok'),
this.ts.trPK('general', 'info'),
message
);
}
@ -288,9 +288,9 @@ public getMonthNameAr(value: number): string {
this.openHome();
this.alertDialog(
() => {},
this.ts.trPK("general", "ok"),
this.ts.trPK("general", "info"),
this.ts.trPK("general", "not-allowed")
this.ts.trPK('general', 'ok'),
this.ts.trPK('general', 'info'),
this.ts.trPK('general', 'not-allowed')
);
}
@ -301,14 +301,14 @@ public getMonthNameAr(value: number): string {
) {
this.alertDialog(
onClick,
this.ts.trPK("general", "ok"),
this.ts.trPK("general", "alert"),
this.ts.trPK('general', 'ok'),
this.ts.trPK('general', 'alert'),
message
);
}
public userNeedToReLogin() {
this.presentAcceptDialog(this.ts.trPK("general", "relogin"), () => {
this.presentAcceptDialog(this.ts.trPK('general', 'relogin'), () => {
this.sharedService.clearAll();
this.openLogin();
});
@ -317,9 +317,9 @@ public getMonthNameAr(value: number): string {
public showConnectionErrorDialog(onClick: any, okLabel: string) {
this.alertDialog(
onClick,
this.ts.trPK("general", "ok"),
this.ts.trPK("general", "alert"),
this.ts.trPK("general", "connError")
this.ts.trPK('general', 'ok'),
this.ts.trPK('general', 'alert'),
this.ts.trPK('general', 'connError')
);
}
@ -327,15 +327,15 @@ public getMonthNameAr(value: number): string {
this.alertDialog(
onClick,
okLabel,
this.ts.trPK("general", "alert"),
this.ts.trPK("general", "timeout")
this.ts.trPK('general', 'alert'),
this.ts.trPK('general', 'timeout')
);
}
async JustAlertDialog(acceptLabel: string, message: string) {
this.clearAllAlerts();
const alert = await this.alertControllerIonic.create({
header: this.ts.trPK("general", "info"),
header: this.ts.trPK('general', 'info'),
message: message,
buttons: [
{
@ -360,13 +360,13 @@ public getMonthNameAr(value: number): string {
) {
this.clearAllAlerts();
const alert = await this.alertControllerIonic.create({
header: this.ts.trPK("general", "confirm"),
header: this.ts.trPK('general', 'confirm'),
message: message,
buttons: [
{
text: cancelLabel,
role: "cancel",
cssClass: "cancel-button",
role: 'cancel',
cssClass: 'cancel-button',
handler: () => {
if (onCancel) {
onCancel();
@ -399,7 +399,7 @@ public getMonthNameAr(value: number): string {
) {
this.clearAllAlerts();
const alert = await this.alertControllerIonic.create({
header: this.ts.trPK("general", "confirm"),
header: this.ts.trPK('general', 'confirm'),
message: message,
buttons: [
{
@ -433,7 +433,7 @@ public getMonthNameAr(value: number): string {
message: message,
buttons: [
{
text:this.ts.trPK("general", "ok"),
text:this.ts.trPK('general', 'ok'),
handler: () => {
if (onAccept) {
onAccept();
@ -476,7 +476,7 @@ public getMonthNameAr(value: number): string {
) {
this.clearAllAlerts();
const alert = await this.alertControllerIonic.create({
header: this.ts.trPK("general", "confirm"),
header: this.ts.trPK('general', 'confirm'),
message: message,
buttons: [
{
@ -492,7 +492,7 @@ public getMonthNameAr(value: number): string {
},
{
text: acceptLabel,
role: "Confirm",
role: 'Confirm',
cssClass: "checkOutOkBtn",
@ -558,7 +558,7 @@ public getMonthNameAr(value: number): string {
public clearAllAlerts() {
// custom solutions because of async issue
const alerts = document.getElementsByTagName("ion-alert");
const alerts = document.getElementsByTagName('ion-alert');
for (let i = 0; i < alerts.length; i++) {
const alert = alerts[i];
alert.parentNode.removeChild(alert);
@ -566,15 +566,15 @@ public getMonthNameAr(value: number): string {
}
public getDeviceInfo(): string {
if (this.platform.is("mobile")) {
const os = this.platform.is("ios") ? "Iphone" : "android";
if (this.platform.is('mobile')) {
const os = this.platform.is('ios') ? 'Iphone' : 'android';
return (
os +
" - " +
' - ' +
this.device.platform +
" - " +
' - ' +
this.device.version +
" , " +
' , ' +
this.device.manufacturer
);
} else {
@ -583,19 +583,19 @@ public getMonthNameAr(value: number): string {
}
public getDeviceType(): string {
if (this.platform.is("mobile")) {
if (this.platform.is('mobile')) {
// return "Mobile " + (this.platform.is("ios") ? "Iphone" : "android");
return (this.platform.is("ios") ? "Iphone" : "android");
return (this.platform.is('ios') ? 'Iphone' : 'android');
} else {
return "Desktop";
return 'Desktop';
}
}
public validResponse(result: Response): boolean {
if (result.MessageStatus === 1) {
return true;
} else if (result.MessageStatus === 2) {
return this.hasData(result["SameClinicApptList"]);
return this.hasData(result['SameClinicApptList']);
}
return false;
}
@ -616,15 +616,15 @@ public getMonthNameAr(value: number): string {
}
private openBrowserHtml(url, onExit?, onFaild?, onSuccess?) {
const browser = window.open(url, "_blank", "location=no");
browser.addEventListener("loadstart", () => {});
const browser = window.open(url, '_blank', 'location=no');
browser.addEventListener('loadstart', () => {});
browser.addEventListener("loaderror", () => {
browser.addEventListener('loaderror', () => {
if (onFaild) {
onFaild();
}
});
browser.addEventListener("loadstop", () => {
browser.addEventListener('loadstop', () => {
if (onSuccess) {
onSuccess();
}
@ -641,14 +641,14 @@ public getMonthNameAr(value: number): string {
this.platform.ready().then(() => {
const browser = this.iab.create(
url,
"_blank",
"closebuttoncolor=#60686b,hidenavigationbuttons=yes,hideurlbar=yes,zoom=no"
'_blank',
'closebuttoncolor=#60686b,hidenavigationbuttons=yes,hideurlbar=yes,zoom=no'
);
// browser.executeScript(...);
// browser.insertCSS(...);
browser.on("loaderror").subscribe(event => {
browser.on('loaderror').subscribe(event => {
if (onFaild) {
onFaild();
}
@ -664,13 +664,13 @@ public getMonthNameAr(value: number): string {
});
*/
browser.on("exit").subscribe(event => {
browser.on('exit').subscribe(event => {
if (onExit) {
onExit();
}
});
browser.on("loadstart").subscribe(event => {
browser.on('loadstart').subscribe(event => {
if (successURLS) {
successURLS.forEach((successURL, index) => {
if (event.url && event.url.indexOf(successURL) >= 0) {
@ -687,7 +687,7 @@ public getMonthNameAr(value: number): string {
}
public imageFromBase64(base64: string) {
return "data:image/jpeg;base64," + base64;
return 'data:image/jpeg;base64,' + base64;
}
public openLocation(lat: number, lng: number) {
@ -696,24 +696,24 @@ public getMonthNameAr(value: number): string {
() => {},
err => {
// this.failedToOpenMap();
window.open("https://maps.google.com/?q=" + lat + "," + lng);
window.open('https://maps.google.com/?q=' + lat + ',' + lng);
}
);
});
}
private failedToOpenMap() {
this.presentAlert(this.ts.trPK("error", "map"));
this.presentAlert(this.ts.trPK('error', 'map'));
}
public localizeTime(date: Date) {
if (!(date.getHours() == 0 && date.getMinutes() == 0)) {
let h = date.getHours() % 12 || 12;
let hStr = h < 10 ? "0" + h : h; // leading 0 at the left for 1 digit hours
let hStr = h < 10 ? '0' + h : h; // leading 0 at the left for 1 digit hours
const m = date.getMinutes();
let mStr = m < 10 ? "0" + m : m;
return hStr + ":" + mStr + (date.getHours() < 12 ? " AM" : " PM");
let mStr = m < 10 ? '0' + m : m;
return hStr + ':' + mStr + (date.getHours() < 12 ? ' AM' : ' PM');
}
return "";
return '';
}
public localizeDate(date: Date, time = false) {
@ -722,20 +722,20 @@ public getMonthNameAr(value: number): string {
if (lng === TranslatorService.AR) {
dateStr =
CommonService.months_ar[date.getMonth()] +
" " +
' ' +
date.getDate() +
" " +
' ' +
date.getFullYear();
} else {
dateStr =
CommonService.months_en[date.getMonth()] +
" " +
' ' +
date.getDate() +
"," +
',' +
date.getFullYear();
}
return time ? dateStr + " " + this.localizeTime(date) : dateStr;
return time ? dateStr + ' ' + this.localizeTime(date) : dateStr;
}
public localizeMonth(monthIndex) {
@ -767,21 +767,21 @@ public getMonthNameAr(value: number): string {
return (
date.getMonth() +
1 +
"/" +
'/' +
date
.getFullYear()
.toString()
.substr(2)
);
} else {
return "--";
return '--';
}
}
public convertISODateToJsonDate(isoDate: string): string {
return "/Date(" + Date.parse(isoDate) + ")/";
return '/Date(' + Date.parse(isoDate) + ')/';
}
public convertDateToJsonDate(date: Date): string {
return "/Date(" + date.getTime() + ")/";
return '/Date(' + date.getTime() + ')/';
}
/*
@ -790,13 +790,13 @@ public getMonthNameAr(value: number): string {
*/
public convertIsoDateToObject(isoDate: string, isoTime: string): Date {
const date = new Date(isoDate);
const parts = isoTime.split(":");
const parts = isoTime.split(':');
if (this.hasData(parts)) {
// remove if numbers start with 0
let hrsStr = parts[0];
let msStr = parts[1];
hrsStr = hrsStr[0] == "0" ? hrsStr.substr(1) : hrsStr;
msStr = msStr[0] == "0" ? msStr.substr(1) : msStr;
hrsStr = hrsStr[0] == '0' ? hrsStr.substr(1) : hrsStr;
msStr = msStr[0] == '0' ? msStr.substr(1) : msStr;
date.setHours(Number(hrsStr));
date.setMinutes(Number(msStr));
}
@ -824,9 +824,9 @@ public getMonthNameAr(value: number): string {
public getDateISO(date: Date): string {
return (
date.getFullYear().toString() +
"-" +
'-' +
this.trailerZero(date.getMonth() + 1) +
"-" +
'-' +
this.trailerZero(date.getDate())
);
}
@ -838,19 +838,19 @@ public getMonthNameAr(value: number): string {
public getTimeISO(date: Date): string {
return (
this.trailerZero(date.getHours()) +
":" +
':' +
this.trailerZero(date.getMinutes()) +
":00"
':00'
);
}
public getDateTimeISO(date: Date): string {
return this.getDateISO(date) + " " + this.getTimeISO(date);
return this.getDateISO(date) + ' ' + this.getTimeISO(date);
}
public getDateTimeISOFromString(dateStr: string): string {
const date = this.evaluteDateAsObject(dateStr);
return this.getDateTimeISO(date) + " " + this.getTimeISO(date);
return this.getDateTimeISO(date) + ' ' + this.getTimeISO(date);
}
public getCurrentTimeISO(): string {
@ -859,7 +859,7 @@ public getMonthNameAr(value: number): string {
private trailerZero(value: number): string {
const str = value.toString();
return str.length > 1 ? str : "0" + str;
return str.length > 1 ? str : '0' + str;
}
public hasData(array: any[]): boolean {
@ -883,13 +883,13 @@ public getMonthNameAr(value: number): string {
}
}
}
return startIndex ? message.substring(startIndex, endIndex) : "";
return startIndex ? message.substring(startIndex, endIndex) : '';
}
return null;
}
public inNumberRange(targetCode: number): boolean {
const minDigit = "0".charCodeAt(0);
const maxDigit = "9".charCodeAt(0);
const minDigit = '0'.charCodeAt(0);
const maxDigit = '9'.charCodeAt(0);
return targetCode >= minDigit && targetCode <= maxDigit;
}
@ -911,24 +911,24 @@ public getMonthNameAr(value: number): string {
title?: string
) {
this.smsAlertDialog = await this.alertControllerIonic.create({
header: title || this.ts.trPK("general", "enter-sms-code"),
header: title || this.ts.trPK('general', 'enter-sms-code'),
inputs: [
{
name: "sms",
type: "number",
name: 'sms',
type: 'number',
value: smsCode,
placeholder: this.ts.trPK("general", "enter-sms")
placeholder: this.ts.trPK('general', 'enter-sms')
}
],
buttons: [
{
text: this.ts.trPK("general", "cancel"),
role: "cancel",
cssClass: "cancel-button",
text: this.ts.trPK('general', 'cancel'),
role: 'cancel',
cssClass: 'cancel-button',
handler: () => {}
},
{
text: this.ts.trPK("general", "ok"),
text: this.ts.trPK('general', 'ok'),
handler: data => {
onAccept(data.sms);
}
@ -1031,8 +1031,8 @@ public getMonthNameAr(value: number): string {
}
const dataSets = [
this.getGraphDataSet(this.ts.trInline(title1), series1, "#d12026"),
this.getGraphDataSet(this.ts.trInline(title2), series2, "#60686b")
this.getGraphDataSet(this.ts.trInline(title1), series1, '#d12026'),
this.getGraphDataSet(this.ts.trInline(title2), series2, '#60686b')
];
return this.getGraphMultiSeries(labels, dataSets);
}
@ -1048,7 +1048,7 @@ public getMonthNameAr(value: number): string {
}
public isHtml5VideoSupported(): boolean {
const v = document.createElement("video");
const v = document.createElement('video');
if (v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"')) {
return true;
}
@ -1062,7 +1062,7 @@ public getMonthNameAr(value: number): string {
}
public isCordova(): boolean {
return this.platform.is("cordova");
return this.platform.is('cordova');
}
public pageRevisited(pageName: string): Observable<boolean> {
@ -1077,118 +1077,132 @@ public getMonthNameAr(value: number): string {
}
public openEitListPage() {
this.nav.navigateForward(["/eit/eit-list"]);
this.nav.navigateForward(['/eit/eit-list']);
}
public openAddEitPage() {
this.nav.navigateForward(["/eit/add-eit"]);
this.nav.navigateForward(['/eit/add-eit']);
}
public openConfirmEitPage() {
this.nav.navigateForward(["/eit/confirm-add-eit"]);
this.nav.navigateForward(['/eit/confirm-add-eit']);
}
public openHome() {
this.nav.navigateRoot(["/home"]);
this.nav.navigateRoot(['/home']);
}
public openForgotPassword() {
this.nav.navigateForward(["/authentication/forgot"]);
this.nav.navigateForward(['/authentication/forgot']);
}
public openChangePassword() {
this.nav.navigateForward(["/authentication/changepassowrd"]);
this.nav.navigateForward(['/authentication/changepassowrd']);
}
public openProfile() {
this.nav.navigateForward(["/profile/home"]);
this.nav.navigateForward(['/profile/home']);
}
public openEditProfile() {
this.nav.navigateForward(["/profile/editprofile"]);
}
public openAccuralPage() {
this.nav.navigateForward(["/accrual-balances/home"]);
this.nav.navigateForward(['/accrual-balances/home']);
}
public openEITPage() {
this.nav.navigateForward(["/eit/homepage"]);
this.nav.navigateForward(['/eit/homepage']);
}
public openMyTeamPage() {
this.nav.navigateForward(["/my-team/home"]);
console.log('someeeeeeee');
this.nav.navigateForward(['/my-team/home']);
}
public openMyTeamDetailPage() {
this.nav.navigateForward(['/my-team/details']);
}
public static myTeamDetailUrl =["/my-team/details","/my-team/details-2"]
public openPage(link: string) {
this.nav.navigateForward([link]);
}
public static myTeamDetailUrl =['/my-team/details','/my-team/details-2']
public openMyTeamDetails() {
this.alternateNavigate(CommonService.myTeamDetailUrl,"teamDetail-open",true);
this.alternateNavigate(CommonService.myTeamDetailUrl,'teamDetail-open',true);
// this.nav.navigateForward(["/my-team/details"]);
}
public openAbsencePage() {
this.nav.navigateForward(["/absence/home"]);
this.nav.navigateForward(['/absence/home']);
}
public openSubmitAbsencePage() {
this.nav.navigateForward(["/absence/submit-absence"]);
this.nav.navigateForward(['/absence/submit-absence']);
}
public openConfirmAbsece() {
this.nav.navigateForward(["/absence/confirm-absence"]);
this.nav.navigateForward(['/absence/confirm-absence']);
}
public openWorkListAttachViewPage() {
this.nav.navigateForward(["/notification/work-list-attach-view"]);
this.nav.navigateForward(['/notification/work-list-attach-view']);
}
public openviewAbsenceAttachment() {
this.nav.navigateForward(["/absence/view-attachements"]);
this.nav.navigateForward(['/absence/view-attachements']);
}
public openNotificationPage() {
this.nav.navigateForward(["/notification/homepage"]);
this.nav.navigateForward(['/notification/homepage']);
}
public openWorklistMainPage() {
this.nav.navigateForward(["/notification/worklist-main"]);
this.nav.navigateForward(['/notification/worklist-main']);
}
public openWorklistMainPRPage() {
this.nav.navigateForward(["/notification/worklist-main-PR"]);
this.nav.navigateForward(['/notification/worklist-main-PR']);
}
public openWorklistMainPOPage() {
this.nav.navigateForward(["/notification/worklist-main-PO"]);
this.nav.navigateForward(['/notification/worklist-main-PO']);
}
public openWorklistReplacementRollPage() {
this.nav.navigateForward(["/notification/work-list-replacement-roll"]);
this.nav.navigateForward(['/notification/work-list-replacement-roll']);
}
public openNotificationDetailsPage() {
this.nav.navigateForward(["/notification/work-list-details"]);
this.nav.navigateForward(['/notification/work-list-details']);
}
public openWorklistHistoryPage() {
this.nav.navigateForward(["/notification/work-list-action-history"]);
this.nav.navigateForward(['/notification/work-list-action-history']);
}
public openWorklistAttachPage() {
this.nav.navigateForward(["/notification/work-list-attach"]);
this.nav.navigateForward(['/notification/work-list-attach']);
}
public openWorklistRFCPage() {
this.nav.navigateForward(["/notification/work-list-rfc"]);
this.nav.navigateForward(['/notification/work-list-rfc']);
}
public openWorklistRollReplacement() {
this.nav.navigateForward(["/notification/work-list-replacement-roll"]);
this.nav.navigateForward(['/notification/work-list-replacement-roll']);
}
public openItemHistoryPage() {
this.nav.navigateForward(["/notification/item-history-PO"]);
this.nav.navigateForward(['/notification/item-history-PO']);
}
public openQutationAnalysisPage() {
this.nav.navigateForward(["/notification/qutation-analysis-PO"]);
this.nav.navigateForward(['/notification/qutation-analysis-PO']);
}
public openWorklistMainMRPage() {
this.nav.navigateForward(["/notification/worklist-main-MR"]);
this.nav.navigateForward(['/notification/worklist-main-MR']);
}
public openWorklistITGPage() {
this.nav.navigateForward(['/notification/worklist-main-ITG']);
}
public openMySpecialistPage() {
this.nav.navigateForward(["/my-specialist/home"]);
this.nav.navigateForward(['/my-specialist/home']);
}
public openMySubordinatePage() {
this.nav.navigateForward(["/my-subordinate/home"]);
this.nav.navigateForward(['/my-subordinate/home']);
}
public openChangeImagePage() {
this.nav.navigateForward(["/profile/profileImg"]);
this.nav.navigateForward(['/profile/profileImg']);
}
public openPayslipPage() {
this.nav.navigateForward(["/payslip/home"]);
this.nav.navigateForward(['/payslip/home']);
}
public openTimeCardPage() {
this.nav.navigateForward(["/time-card/time-card-details"]);
}
public openEarningsPage() {
this.nav.navigateForward(["/payslip/Earnings"]);
this.nav.navigateForward(['/payslip/Earnings']);
}
public openDeductionsPage() {
this.nav.navigateForward(["/payslip/Deductions"]);
this.nav.navigateForward(['/payslip/Deductions']);
}
public openConfirmLoginPage() {
this.nav.navigateForward(["/authentication/confirmLogin"]);
this.nav.navigateForward(['/authentication/confirmLogin']);
}
public openEditprofile() {
this.nav.navigateForward(["/profile/editProfile"]);
@ -1198,8 +1212,12 @@ public getMonthNameAr(value: number): string {
}
public navigatePage(path) {
this.nav.navigateForward([path]);
}
public reload(url: string, from: string) {
console.log("force reload called from:" + from);
console.log('force reload called from:' + from);
// window.location.reload();
location.href = url;
}
@ -1223,11 +1241,11 @@ public getMonthNameAr(value: number): string {
private alternateNavigate(paths: string[], key: string, root = false) {
let url: string;
if (localStorage.getItem(key) === "yes") {
localStorage.setItem(key, "no");
if (localStorage.getItem(key) === 'yes') {
localStorage.setItem(key, 'no');
url = paths[0];
} else {
localStorage.setItem(key, "yes");
localStorage.setItem(key, 'yes');
url = paths[1];
}
if (root) {
@ -1238,14 +1256,14 @@ public getMonthNameAr(value: number): string {
}
public openLogin() {
this.nav.navigateRoot(["/authentication/login"]);
this.nav.navigateRoot(['/authentication/login']);
}
public openUserForgot() {
this.nav.navigateForward(["/authentication/checkuser"]);
this.nav.navigateForward(['/authentication/checkuser']);
}
public openSMSPage() {
this.nav.navigateForward(["/authentication/smspage"]);
this.nav.navigateForward(['/authentication/smspage']);
}
public navigateTo(url: string) {
@ -1281,11 +1299,11 @@ public getMonthNameAr(value: number): string {
if (state == this.diagnostic.bluetoothState.POWERED_ON) {
feedback();
} else {
this.presentAlert(this.ts.trPK("bluetooth", "start"));
this.presentAlert(this.ts.trPK('bluetooth', 'start'));
}
})
.catch(e => {
this.presentAlert(this.ts.trPK("bluetooth", "start"));
this.presentAlert(this.ts.trPK('bluetooth', 'start'));
});
});
}
@ -1315,7 +1333,7 @@ public getMonthNameAr(value: number): string {
}
for (i = 0; i < list.length; i += 1) {
node = list[i];
if (node.PARENT_MENU_NAME !== "") {
if (node.PARENT_MENU_NAME !== '') {
// if you have dangling branches check that map[node.parentId] exists
list[map[node.PARENT_MENU_NAME]].children.push(node);
} else {
@ -1327,8 +1345,8 @@ public getMonthNameAr(value: number): string {
public reverseFormatDate(date) {
let FormatedDate;
if (date) {
FormatedDate = date.replace(/\//g, "-");
FormatedDate = FormatedDate.replace(/ 00:00:00/g, "");
FormatedDate = date.replace(/\//g, '-');
FormatedDate = FormatedDate.replace(/ 00:00:00/g, '');
} else {
FormatedDate = date;
}
@ -1337,7 +1355,7 @@ public getMonthNameAr(value: number): string {
public formatStandardDate(date) {
let FormatedDate;
if (date) {
FormatedDate = date.replace(/-/g, "/");
FormatedDate = date.replace(/-/g, '/');
} else {
FormatedDate = date;
}
@ -1346,7 +1364,7 @@ public getMonthNameAr(value: number): string {
public reverseFormatStandardDate(date) {
let FormatedDate;
if (date) {
FormatedDate = date.replace(/\//g, "-");
FormatedDate = date.replace(/\//g, '-');
} else {
FormatedDate = date;
}
@ -1358,8 +1376,8 @@ public getMonthNameAr(value: number): string {
if (date) {
date = date.slice(0, 10);
FormatedDate = date.replace(/-/g, "/");
FormatedDate = FormatedDate + " 00:00:00";
FormatedDate = date.replace(/-/g, '/');
FormatedDate = FormatedDate + ' 00:00:00';
} else {
FormatedDate = date;
}
@ -1371,8 +1389,8 @@ public getMonthNameAr(value: number): string {
console.log(date);
if (date) {
// FormatedDate = date.replace(/-/g, "/");
FormatedDate = date.split("T")[0];
FormatedDate = FormatedDate + " 00:00:00";
FormatedDate = date.split('T')[0];
FormatedDate = FormatedDate + ' 00:00:00';
console.log(FormatedDate);
} else {
FormatedDate = date;
@ -1381,12 +1399,12 @@ public getMonthNameAr(value: number): string {
}
public setUpdateImage (image){
console.log("setUpdateImage");
console.log('setUpdateImage');
this.setUpdateImg=image;
this.updateImage=true;
}
public getUpdateImage(){
console.log("getUpdateImage");
console.log('getUpdateImage');
const objImg={
img: this.setUpdateImg,
status: this.updateImage

@ -7,4 +7,9 @@ export class AttendanceTrackingList {
public P_SCHEDULED_HOURS: string;
public P_SHT_NAME: string;
public P_SPENT_HOURS: string;
public P_BREAK_HOURS: string;
public P_LATE_IN_HOURS: string;
public P_SWIPES_EXEMPTED_FLAG: string;
public P_SWIPE_IN: string;
public P_SWIPE_OUT: string;
}

@ -66,8 +66,8 @@ export class DashboredService {
oerrorLable
);
}
public getAttendanceTracking(onError ?: any ,oerrorLable ?: any): Observable<AttendanceTrackingResponse>{
const request = new Request();
public getAttendanceTracking(selectedEmployee: any, onError ?: any , oerrorLable ?: any): Observable<AttendanceTrackingResponse>{
const request = selectedEmployee;
this.authService.authenticateRequest(request);
return this.con.post(
DashboredService.attendancetrackingUrl,

@ -2,6 +2,9 @@ import { Request } from '../../../services/models/request'
export class GetSubordinatesAttdStatusRequest extends Request{
//public static SHARED_DATA = '';
public P_SCHEDULE_DATE_FROM :any;
public P_SCHEDULE_DATE_TO :any;
public P_SCHEDULE_DATE_FROM: any;
public P_SCHEDULE_DATE_TO: any;
public SearchMonth: string;
public SearchYear: number;
}

@ -4,5 +4,5 @@ export class GetSubordinatesLeavesRequest extends Request{
//public static SHARED_DATA = '';
public P_DATE_FROM :any;
public P_DATE_TO :any;
public P_SELECTED_EMPLOYEE_NUMBER:any;
}

@ -43,6 +43,7 @@ export class PushService {
) { }
public startReceiving() {
console.log("startReceiving");
// this.processStartReceiving();
this.processStartReceivingWithFirebase();
}
@ -161,10 +162,11 @@ export class PushService {
}
private registerInBackend(data: any) {
console.log('firebasex Token ID: ' + data);
console.log('firebasex Token ID: ' + data);
if (data) {
this.cs.sharedService.setSharedData(data, AuthenticationService.DEVICE_TOKEN);
localStorage.setItem('deviceToken', data);
}
if (this.authService.isAuthenticated()) {
this.registerAuthenticatedUser(data);
@ -216,14 +218,22 @@ export class PushService {
private processStartReceivingWithFirebase() {
console.log("processStartReceivingWithFirebase");
this.firebasex.getToken().then(token => {
console.log(token);
this.registerInBackend(token);
});
this.firebasex.onTokenRefresh().subscribe(token => {
console.log(token);
alert("token: "+ token);
this.registerInBackend(token);
});
}).catch(error => console.error('Error getting token', error));
// this.firebase.getToken()
// .then(token => console.log(`The token is ${token}`))
// .catch(error => console.error('Error getting token', error));
// this.firebasex.onTokenRefresh().subscribe(token => {
// alert("token: "+ token);
// this.registerInBackend(token);
// });
}
public onPushReceived(payload: any) {
@ -240,4 +250,7 @@ export class PushService {
}

@ -49,9 +49,9 @@
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden !important;
font-size: 0.46cm;
font-size: 16px;
width: 78%;
font-weight: bold;
font-weight: bold !important;
}

@ -0,0 +1,5 @@
<div class="main-container" [ngStyle]="active === true ? {'background': color} : {}">
<div class="main-container-radius" [ngStyle]="active === true ? {'background-color': '#ffffff'} : {'background-color': color}"></div>
<span class="number-span" [ngStyle]="active === true ? {'color': '#ffffff'} : {}">{{value}}</span>
<span class="text-span" [ngStyle]="active === true ? {'color': '#ffffff'} : {}">{{text}}</span>
</div>

@ -0,0 +1,33 @@
.main-container{
width: 72px;
background-color: white;
padding: 10px;
border-radius: 20px;
height: 70px;
text-align: right;
font-family: WorkSans-Regular;
padding-top: 25px;
box-shadow: 0 0 6px rgba(0,0,0,0.16);
position: relative;
}
.main-container-radius{
// content: "";
position: absolute;
width: 30px;
height: 6px;
border-radius: 10px;
background-color: red;
left: 10px;
top: 10px;
}
.number-span{
font-size: 19px;
display: block;
line-height: 18px;
}
.text-span{
font-size: 14px;
color: #888;
margin: -1px;
}

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CardFilterComponent } from './card-filter.component';
describe('CardFilterComponent', () => {
let component: CardFilterComponent;
let fixture: ComponentFixture<CardFilterComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CardFilterComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CardFilterComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,18 @@
import { Component, OnInit, Input } from '@angular/core';
@Component({
selector: 'app-card-filter',
templateUrl: './card-filter.component.html',
styleUrls: ['./card-filter.component.scss'],
})
export class CardFilterComponent implements OnInit {
@Input() value: number;
@Input() text: string;
@Input() active: boolean;
@Input() color: string;
constructor() { }
ngOnInit() {}
}

@ -0,0 +1,14 @@
<calendar #slider [dateFormatter]="calendar.dateFormatter"
[monthviewEventDetailTemplate]="template"
[calendarMode]="calendar.mode"
[currentDate]="currentDateParent"
[lockSwipes]="true"
(onTimeSelected)="onDayClicked($event)">
</calendar>
<ng-template #template let-showEventDetail="showEventDetail" let-selectedDate="selectedDate" let-noEventsLabel="noEventsLabel">
</ng-template>

@ -0,0 +1,124 @@
// .modalCss .modal-Wrapper {
// width: 600px;
// height: 300px;
// }
.chart-modal .modal-Wrapper {
--background: rgb(116, 108, 108) !important;
--border-color:white!important ;
width: 85%!important ;
height: 40px !important ;
}
.navbar{
font-size: 10px !important;
--background: #22C6B3 !important;
color: aliceblue !important;
// margin-top: 10px !important;
}
.menu{
// margin-left:330px !important;
margin-top: 0px !important;
font-size: 35px !important;
background: #22C6B3;
color: aliceblue;
margin-left: 0px !important;
}
.person{
margin-left:100px !important;
margin-top: 0px !important;
font-size: 23px !important;
background: #22C6B3 !important;
color: aliceblue !important;
}
.grid{
margin-bottom: 550px !important;
margin-top: 20px !important;
margin-left: 15px !important;
margin-right: 15px !important;
background-color:white !important;
border-radius: 20px !important;
height: 250px !important;
}
.ionSliders{
margin: 0px !important;
padding: 0px !important;
}
.ionSlide{
margin-top: 5px !important;
margin-left: 190px !important;
color: black !important;
}
.dateLable{
margin-left: 90px !important;
color: black !important;
font-size: small !important;
margin-top: 15px !important;
}
// h1{
// font-size: 15px !important;
// text-align: center !important;
// }
.arrowDropright{
margin-left:100px !important;
font-size: 20px !important;
color: rgb(168, 165, 165) !important;
margin-top: 15px !important;
}
.arrowDropleft{
font-size: 20px !important;
margin-left: 10px !important;
margin-top: 15px !important;
color: rgb(116, 108, 108) !important;
}
.ionLable{
font-size: 10px !important;
}
.number{
font-size: 18px !important;
font-weight: bolder !important;
color: black !important;
}
.header-div{
background:var(--primary);
background: -moz-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
background: -webkit-linear-gradient(45deg, (--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
background: #22C6B3;
// background: linear-gradient(90deg, #85C48D 0%, #85C48D 13%, #2BB5C6 98%, #2BB5C6 100%);
color:var(--light);
text-transform: capitalize;
display: block;
position: relative;
height: 210px;
margin-bottom:60px;
// border-radius: 0px 0px 70px 70px;
}
.advanced-search-modal {
--height: 12cm !important;
--width: 80% !important;
--border-radius: 0.4cm;
}

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CircleCalendarComponent } from './circle-calendar.component';
describe('CircleCalendarComponent', () => {
let component: CircleCalendarComponent;
let fixture: ComponentFixture<CircleCalendarComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CircleCalendarComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CircleCalendarComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,149 @@
import { Component, OnInit, Output, Input, ViewChild, ElementRef, EventEmitter } from '@angular/core';
import { TimeSlot } from './time.slot';
import { SharedDataService } from '../../services/shared-data-service/shared-data.service';
import { ModalController } from '@ionic/angular';
import { DateInfoModalComponent } from './date-info-modal/date-info-modal.component';
import { MenuResponse } from '../../services/menu/models/menu-response';
import * as moment from 'moment';
import { CommonService } from '../../services/common/common.service';
import { GetDayAndHoursDetailsRequest } from 'src/app/time-card/service/models/get-day-hours-type-details.request';
import { TimeCardService } from 'src/app/time-card/service/time-card.service';
import { GetShiftDetailRequest } from 'src/app/time-card/service/models/get-shift-detail.request';
import { GetSwipesRequest } from 'src/app/time-card/service/models/get-swipes-request';
@Component({
selector: 'app-circle-calendar',
templateUrl: './circle-calendar.component.html',
styleUrls: ['./circle-calendar.component.scss']
})
export class CircleCalendarComponent implements OnInit {
@Input() eventsdateDayOff: any = [];
@Input() eventsdateAttend: any = [];
@Input() eventsdateAbsent: any = [];
@Input() normalDays: any = [];
@Input() dayHoursTypeDetailsList: any = [];
@Input() currentDateParent: string;
@Output() monthTitle = new EventEmitter();
@Output() currentYear = new EventEmitter();
public monthName: any;
public yearDate: any;
public selEmp: string;
public selMenu: MenuResponse = new MenuResponse();
public respID: number;
public menuType: any;
public dayAndHoursPageNumber = 1;
public selectedFilters: any = {};
public selectedShiftFilter: any;
public arrDaysAttendance: any = [];
public arrDaysAbsent: any = [];
public arrDaysOff: any = [];
public selectedShift: any;
public shiftDetailsData: any = [];
public swipeDetailsData: any = [];
public arrOfAllList: any = [];
eventsdata: any = [];
public calendar = {
mode: 'month'
};
public currentAvailableAppoDate: any;
public eventsInput: any = [];
public events: TimeSlot[] = [];
public selectedTime: string;
public selectedDate: string;
public weekDaysEn = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
public weekDaysEnSort = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
public lockSwipeToPrev: any = true;
public currentDate: any;
public selectedDateObject: any;
public currentDateToSwipe: any;
public activeMonth: any;
public isFirst = false;
public selectedIndexData: any;
arrFutrueDays: any;
eventsdateFutrue: any;
detailData: any;
constructor(
public sharedData: SharedDataService,
public mod: ModalController,
public common: CommonService,
public timeCardService: TimeCardService) { }
@ViewChild('slider') slides: ElementRef;
ngOnInit() {
this.reRenderCalendar();
console.log(this.currentDateParent);
}
// tslint:disable-next-line: use-life-cycle-interface
ngAfterViewInit() {
setTimeout(() => {
this.reRenderCalendar();
}, 1000);
}
reRenderCalendar() {
this.renderDate(this.eventsdateAbsent, 'absent');
this.renderDate(this.eventsdateAttend, 'present');
this.renderDate(this.eventsdateDayOff, 'dayoff');
this.renderDate(this.normalDays, 'scheduleDay');
}
public async dateModal(shiftDetails) {
const modal = await this.mod.create({
component: DateInfoModalComponent,
showBackdrop: true,
backdropDismiss: true,
componentProps: {
TODAYDATE: this.selectedIndexData,
SHIFTDETAILS: shiftDetails
}
});
modal.cssClass = 'calendar-modal';
await modal.present();
}
public renderDate(arrayDays, cssClass) {
const td = document.querySelectorAll('.swiper-slide-active .monthview-datetable td:not(.text-muted)');
arrayDays.forEach(dateObj => {
const date = dateObj.startTime;
td.forEach(element => {
// tslint:disable-next-line: triple-equals
if (date.getDate() == element.textContent.trim()) {
element.classList.add(cssClass);
}
});
});
}
onDayClicked(event) {
if (this.isFirst) {
console.log(event.selectedTime.getDate());
const selectedIndex = event.selectedTime.getDate();
this.selectedIndexData = this.dayHoursTypeDetailsList[selectedIndex - 1];
if (this.selectedIndexData.present) {
const rtpID = this.selectedIndexData.RTP_ID;
this.getScheduleShiftDetails(rtpID);
}
} else {
this.isFirst = true;
}
}
getScheduleShiftDetails(RTP_ID) {
const GetShiftDetailRequestObject = new GetShiftDetailRequest();
GetShiftDetailRequestObject.P_RTP_ID = RTP_ID;
GetShiftDetailRequestObject.P_PAGE_NUM = 1;
GetShiftDetailRequestObject.P_PAGE_LIMIT = 10;
this.timeCardService.getShiftDetail(GetShiftDetailRequestObject).subscribe((result) => {
if (this.common.validResponse(result)) {
console.log(result);
this.shiftDetailsData = result.GetScheduleShiftsDetailsList;
this.dateModal(result);
}
});
}
}

@ -0,0 +1,104 @@
<!-- <ion-slides [options]="slideOptsOne" (ionSlideDidChange)="slideChanged($event)">
<ion-slide *ngFor="let shift of SHIFTDETAILS.GetScheduleShiftsDetailsList; let i=index"> -->
<!-- <div> -->
<ion-grid class="headerGrid">
<ion-row style="margin-left: -130px; margin-top: 27px;">
<ion-col size="10">
<div style="width: 100%;">
<div class="result-graph">
<div class="result-text-container">
<h2 class="percentage">{{percentage}}</h2>
<span>Completed <br><br><br><br></span>
</div>
<p-chart class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart>
</div>
</div>
</ion-col>
<ion-col size="2">
<div class="div" >
<ion-row >
<p class="p0">{{nameDay}}</p>
</ion-row>
<ion-row >
<p class="p1">{{day}}</p>
</ion-row>
<ion-row >
<p class="p2">{{nameMonth}}</p>
</ion-row>
<ion-row >
<p class="p3">{{year}}</p>
</ion-row>
<ion-row>
<p class="p5">{{ts.trPK('attendance','present')}}</p>
</ion-row>
</div>
</ion-col>
</ion-row>
</ion-grid>
<div>
<ion-grid class="grid">
<ion-row class="gridrow">
<ion-col class="liftcol">
<ion-row class="amountlabel"> <p>{{shiftTime}}</p> </ion-row>
<ion-row class="rowlabel">
<p >{{ts.trPK('attendance-tracking','shift-time')}}</p>
</ion-row>
</ion-col>
<ion-col class="rightcol">
<ion-row class="amountlabel"><p >{{scheduled}}</p> </ion-row>
<ion-row class="rowlabel">
<p >{{ts.trPK('attendance-tracking','regular')}}</p>
</ion-row>
</ion-col>
</ion-row>
<ion-row class="gridrow" >
<ion-col class="liftcol">
<ion-row class="amountlabel"><p >{{startDate}}</p> </ion-row>
<ion-row class="rowlabel">
<p >{{ts.trPK('attendance-tracking','check-in')}}</p>
</ion-row>
</ion-col>
<ion-col class="rightcol">
<ion-row class="amountlabel"> <p >{{endDate}}</p> </ion-row>
<ion-row class="rowlabel">
<p >{{ts.trPK('attendance-tracking','check-out')}} </p>
</ion-row>
</ion-col>
</ion-row >
<ion-row class="gridrow">
<ion-col class="liftcol">
<ion-row class="amountlabel"> <p >{{lateIn}}</p> </ion-row>
<ion-row class="rowlabel">
<p >{{ts.trPK('attendance-tracking','late-in')}}</p>
</ion-row>
</ion-col>
<ion-col class="rightcol">
<ion-row class="amountlabel"> <p >{{excess}}</p> </ion-row>
<ion-row class="rowlabel">
<p >{{ts.trPK('attendance-tracking','excess')}}</p>
</ion-row>
</ion-col>
</ion-row>
<ion-row class="gridrow">
<ion-col class="liftcol">
<ion-row class="amountlabel"> <p >{{shortage}}</p> </ion-row>
<ion-row class="rowlabel">
<p>{{ts.trPK('attendance-tracking','shortage')}}</p>
</ion-row>
</ion-col>
<ion-col class="rightcol">
<ion-row class="amountlabel"> <p >{{earlyOut}}</p> </ion-row>
<ion-row class="rowlabel">
<p >{{ts.trPK('attendance-tracking','early-out')}}</p>
</ion-row>
</ion-col>
</ion-row>
</ion-grid>
</div>
<!-- </div> -->
<!-- </ion-slide>
</ion-slides> -->

@ -0,0 +1,180 @@
.result-text-container {
// padding: 0;
// margin: 0;
// position: absolute;
// left: 50%;
// top: 50%;
// display: block;
// text-align: center;
// transform: translate(-50%, -50%);
//////////////////////////here
padding: 0;
margin: 0;
position: absolute;
left: 58%;
top: 67%;
display: block;
text-align: center;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
h2 {
font-size: 25px;
// font-family: WorkSans-Bold;
font-weight: bold;
margin: 0 auto;
line-height: 36px;
}
span {
width: 125px;
display: block;
margin: 0 auto;
font-size: 12px;
font-family: workSans-Regular;
color: rgb(163, 163, 163) !important;
}
}
.today-graph{
display: block;
height: 127px;
width: 288px;
}
.amountlabel{
color: black !important;
font-weight: bold !important;
font-size: 13px !important;
// border-top: 1px solid rgb(163, 163, 163) !important;
margin-left: 0px !important;
margin-bottom: -29px !important;
}
.rowlabel{
color: rgb(163, 163, 163) !important;
font-size: 13px !important;
font-family: WorkSans-Bold;
}
.grid{
padding-bottom: -20px !important;
padding-top: -20px !important;
height: 360px !important;
}
.liftcol{
// padding-top: 1px !important;
// padding-bottom: 1px !important;
border-right: 1px solid rgb(163, 163, 163) !important;
}
.rightcol{
margin-left: 5px !important;
}
.gridrow{
border-top: 1px solid rgb(163, 163, 163) !important;
margin-left: 19px;
margin-right: 12px;
}
.div{
// border: 1px solid #a3a3a3 !important;
// text-align: center;
// width: 274%;
// border-radius: 8%;
// height: 40%;
// margin-right: -11px;
border: 1px solid #a3a3a3 !important;
border-radius: 9px;
width: 241%;
margin-right: -226px;
}
.p0{
margin-bottom: -13px !important;
color: black !important;
font-weight: bold !important;
font-size: 15px !important;
margin-top: 8px;
text-align: center;
display: block;
width: 100%;
}
.p1{
margin-bottom: -7px !important;
color: black !important;
font-family: WorkSans-Bold !important;
font-size: 33px;
margin-top: 10px;
text-align: center;
display: block;
width: 100%;
}
.p2{ font-weight: bold !important;
font-size: 17px !important;
margin-bottom: 43px !important;
margin-top: 0px !important;
color: black !important;
font-weight: bold !important;
margin-left: 33px;
}
.p3{ /* margin-bottom: -72px !important; */
color: black !important;
font-weight: bold !important;
font-size: 19px;
margin-top: -43px;
margin-left: 27px;
}
.p4{ margin-bottom: 56px !important;
margin-top: -26px !important;
color: black !important;
}
// .pdiv{background-color: gray;height: 26px;}
.p5{
font-size: 14px;
text-align: center;
background-color: #094875;
color: white;
margin-top: -13px;
margin-bottom: -3px;
height: 21px;
width: 110px;
padding-top: 7px;
/* font-family: WorkSans-Bold !important; */
padding-bottom: 21px;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
}
// .less{ background-color: #22C6B3;
// background-color: #22C6B3;
// border: none;
// color: white;
// text-align: center;
// text-decoration: none;
// display: inline-block;
// font-size: 12px;
// border-radius: 30px;
// height: 26px;
// padding: 6px 24px;
// margin-left: 123px;
// /* margin-top: -19px; */
// margin-bottom: 17px;
// }

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { DateInfoModalComponent } from './date-info-modal.component';
describe('DateInfoModalComponent', () => {
let component: DateInfoModalComponent;
let fixture: ComponentFixture<DateInfoModalComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ DateInfoModalComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DateInfoModalComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,138 @@
import { Component, OnInit, Input, ViewChild } from '@angular/core';
import { ModalController, NavParams, IonInfiniteScroll } from '@ionic/angular';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { IonSlides } from '@ionic/angular';
@Component({
selector: 'app-date-info-modal',
templateUrl: './date-info-modal.component.html',
styleUrls: ['./date-info-modal.component.scss'],
})
export class DateInfoModalComponent implements OnInit {
@ViewChild('slides') slides: IonSlides;
[x: string]: any;
gaugeType = 'full';
gaugeValue = 28.3;
gaugeLabel = 'Days';
@Input() TODAYDATE: any;
@Input() SHIFTDETAILS: any;
today: any;
month: any;
monthDate: any;
excess: any;
shortage: any;
lateIn: any;
scheduled: any;
earlyOut: any;
shiftTime: any;
startDate: any;
endDate: any;
shift: any;
percentage: any;
data: any;
scheduleDate: any;
tests: any;
year: any;
nameMonth: any;
nameDay: any;
public weekDaysEn = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
public options = {
cutoutPercentage: 85,
tooltips: { enabled: false },
legend: { display: false }
};
public slideOptsOne = {
slidesPerView: 1,
spaceBetween: 0
};
constructor(
public modalController: ModalController,
public navParams: NavParams,
public ts: TranslatorService
) { }
ngOnInit() {
console.log(this.TODAYDATE);
this.excess = this.TODAYDATE.EXCESS_HRS;
this.lateIn = this.TODAYDATE.LATE_IN_HRS;
this.shortage = this.TODAYDATE.SHORTAGE_HRS;
this.scheduled = this.TODAYDATE.SCHEDULED_HRS;
this.earlyOut = this.TODAYDATE.EARLY_OUT_HRS ;
this.scheduleDate = this.TODAYDATE.SCHEDULE_DATE;
this.assignData(this.SHIFTDETAILS.GetScheduleShiftsDetailsList[0]);
}
assignData(shiftDetails) {
this.shiftTime = shiftDetails.SHT_NAME;
this.startDate = shiftDetails.SHT_ACTUAL_START_TIME;
this.endDate = shiftDetails.SHT_ACTUAL_END_TIME;
this.percentage = shiftDetails.PERCENTAGE;
this.percChart = this.percentage.substring(0, this.percentage.indexOf('%'));
const test = this.scheduleDate;
const splitdate = test.split(' ');
const date = splitdate[0];
const test1 = date.split('/');
this.day = test1[1];
this.year = test1[2];
this.month = test1[0];
// tslint:disable-next-line: radix
this.nameMonth = this.getMonthName(parseInt(this.month));
this.nameDay = this.getHeaderDay(new Date(date));
const d = new Date(date);
this.data = {
labels: ['percentage'],
datasets: [
{
data: [this.percChart],
backgroundColor: [
'#22C6B3'
],
borderWidth: 2
}]
};
}
slideChanged(ev) {
this.slides.getActiveIndex().then(index => {
const shiftDetails = this.SHIFTDETAILS[index];
this.assignData(shiftDetails);
});
}
public getMonthName(value: number): string {
switch (value) {
case 1:
return 'Jan';
case 2:
return 'Feb';
case 3:
return 'Mar';
case 4:
return 'Apr';
case 5:
return 'May';
case 6:
return 'Jun';
case 7:
return 'Jul';
case 8:
return 'Aug';
case 9:
return 'Sep';
case 10:
return 'Oct';
case 11:
return 'Nov';
case 12:
return 'Dec';
}
}
getHeaderDay(date: any) {
return this.weekDaysEn[date.getDay()];
}
}

@ -0,0 +1,21 @@
export class TimeSlot {
constructor(isoTime: string, startDate: string, end: string) {
this.isoTime = isoTime;
this.start = startDate;
this.end = end;
this.allDay = true;
this.draggable = false;
}
public eventTimeLabel() {
return new Date(this.end).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', hour12: false });
}
// event time in iso format
isoTime: string;
// start of event day
start: string;
// event date time
end: string;
allDay: boolean;
draggable: boolean;
}

@ -0,0 +1,26 @@
<div class="team-member-container">
<ion-row>
<ion-col [size]="3">
<div class="user-image-container">
<div class="user-image">
<img [src]="employeeImage" alt="Team Member Image"/>
</div>
</div>
</ion-col>
<ion-col [size]="9" style="padding: 8px 5px 0px;margin-top: 14px;">
<div>
<span class="employee-name">
<h2 class="name">{{name}}</h2>
<span class="title">{{title}}</span>
</span>
<span class="image-container">
<img src="../assets/imgs/green_call_icon.png" >
</span>
</div>
<!-- <div class="swipe-information">
<span class="check-in"><strong>Check-In:</strong> {{checkIn}}</span>
<span><strong>Check-Out:</strong> {{checkOut}}</span>
</div> -->
</ion-col>
</ion-row>
</div>

@ -0,0 +1,84 @@
.team-member-container{
background: white;
border-radius: 100px 20px 20px 100px;
margin-top: 15px;
font-family: WorkSans-Regular;
}
.user-image-container{
position: relative;
width: 70px;
height: 70px;
display: block;
margin: 0 auto;
// &:before{
// position: absolute;
// content: "";
// width: 20px;
// height: 20px;
// border-radius: 20px;
// border: 1px solid white;
// top: 0;
// right: 0;
// background-color: red;
// z-index: 9;
// }
// &.present:before{
// background-color: green !important;
// }
}
.user-image{
overflow: hidden;
position: relative;
display: block;
width: 100%;
height: 100%;
border-radius: 80px;
border: 1px solid #ccc;
margin: 0px auto 6px;
img {
width: 100%;
max-height: 100%;
}
}
.employee-name{
display: inline-block;
width: 80%;
.name{
font-size: 16px;
color: black;
margin: 0;
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.title{
font-size: 13px;
color: #888;
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
display: block;
}
}
.image-container{
width: 20%;
display: inline-block;
text-align: center;
vertical-align: top;
margin-top: 5px;
}
.swipe-information{
color: #888;
font-size: 12px;
border-top: 1px solid #ccc;
padding-top: 6px;
margin-top: 6px;
.check-in {
font-size: 12px;
margin-right: 15px;
}
}

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { EmployeeInformationComponent } from './employee-information.component';
describe('EmployeeInformationComponent', () => {
let component: EmployeeInformationComponent;
let fixture: ComponentFixture<EmployeeInformationComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ EmployeeInformationComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(EmployeeInformationComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,19 @@
import { Component, OnInit, Input } from '@angular/core';
@Component({
selector: 'app-employee-information',
templateUrl: './employee-information.component.html',
styleUrls: ['./employee-information.component.scss'],
})
export class EmployeeInformationComponent implements OnInit {
public userImage: any = '../assets/imgs/profile.png';
@Input() name: string;
@Input() title: string;
@Input() employeeImage: string;
constructor() { }
ngOnInit() {}
}

@ -1,6 +1,6 @@
<div feedback class="custom-button">
<div class="iconBox">
<img [src]="icon" class="icon">
<img [src]="'data:image/png;base64,'+icon" class="icon">
</div>
<div class="titleBox">
<p class="pClass">{{title}}</p>

@ -1,33 +1,46 @@
<ion-content has-bouncing="false" forceOverscroll="false" class="ion-no-padding">
<ion-grid padding>
<ion-row>
<!-- <ion-row>
<ion-col [size]="12">
<!-- <img [src]="logo" class="loginLogo" />
<h1 class="heading1">{{welcome}} </h1> -->
<img [src]="logo" class="loginLogo" />
<h1 class="heading1">{{welcome}} </h1>
<p class="text1" style="margin-bottom: -8px;font-weight: bold;font-size: 28px;">{{'home,welcome-back' | translate}} </p>
<p class="text1" style="font-size: 28px;margin-top: 0px;" >{{empname}}</p>
<p *ngIf="!empname" class="text1">{{welcome_txt}} </p>
<p class="text1">{{txt_account}} </p>
</ion-col>
</ion-row>
</ion-row> -->
<ion-row class="row-border" *ngIf="empname && isLastLogin">
<ion-row>
<ion-col [size]="12">
<h1 class="heading1">{{welcome}} </h1>
<p *ngIf="!user" class="text1">{{welcome_txt}} </p>
<p class="text1">{{txt_account}} </p>
</ion-col>
</ion-row>
<ion-row class="row-border" *ngIf="user && isLastLogin">
<ion-col size="6" style="padding: 5px 10px; border-right:1px solid #bbbbbb">
<p class="last-login" style="font-weight: bold">{{'login,last-login' | translate}} </p>
<!-- <p class="last-login small-font-size">{{user.EditedOn | date}}
{{lastLoginTime}}</p>-->
<p class="last-login small-font-size">{{user.EditedOn | date}}
{{lastLoginTime }}</p>
<!-- <p class="last-login "> {{lastLoginDate}}</p> -->
</ion-col>
<ion-col size="6" style="padding: 5px 10px;">
<p class="last-login" style="font-weight: bold" [ngClass]="{'fadein':empname && isLastLogin }">
<p class="last-login" style="font-weight: bold" [ngClass]="{'fadein':user && isLastLogin }">
{{'login,last-login-with' | translate}}
</p>
<p class="last-login">{{getLoginType(logintype)}}</p>
</ion-col>
</ion-row>
<ion-row class="ion-no-padding description" *ngIf="empname && isLastLogin">
<ion-row class="ion-no-padding description" *ngIf="user && isLastLogin">
<ion-col style="margin-top:-5px" class="ion-no-padding " [size]=6>
<app-confirm-login [accessFromOutSide]="true" *ngIf="empname"></app-confirm-login>
<app-confirm-login [accessFromOutSide]="true" *ngIf="user"></app-confirm-login>
</ion-col>
<ion-col [size]=6>
<app-button (click)="loginwithuser()" [title]="button.title | translate " [icon]="button.icon"
@ -44,7 +57,7 @@
</ion-content>
<ion-footer class="welcome-footer">
<ion-row class="ion-justify-content-center " *ngIf="empname">
<ion-row class="ion-justify-content-center " *ngIf="user">
<ion-col [size]="12">
<ion-button class="centerDiv button-login" expand="block" (click)="login()">

@ -69,6 +69,8 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy {
password: string;
empname: string;
logintype: any;
lastLoginDate: string;
user_name: string;
constructor(
public ts: TranslatorService,
@ -80,12 +82,32 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy {
ngOnInit() {
// retrive user info **
this.user = this.cs.sharedService.getSharedData(
AuthenticationService.IMEI_USER_DATA,
false
);
this.userName = localStorage.getItem("user");
this.password = localStorage.getItem("password");
let remember = localStorage.getItem("remember");
this.empname= localStorage.getItem("emp-name");
this.logintype= localStorage.getItem("login-type");
this.lastLoginDate= localStorage.getItem("login-at");
// this.lastLoginDate= new Date(this.lastLoginDate).toISOString()
// let day = this.lastLoginDate.getDate();
// let month = this.lastLoginDate.getMonth() + 1;
// let year = this.lastLoginDate.getFullYear();
// let todayDate = month + '/' + day + '/' + year;
// this.lastLoginTime = moment(this.cs.evaluteDateAsObject(this.lastLoginDate)).format("HH:mm");
this.logintype = parseInt(this.logintype)
console.log(" this.lastLoginTime" + this.lastLoginTime);
console.log(" this.lastLoginDate" + this.lastLoginDate);
this.welcome_txt = this.ts.trPK("home", "welcome-txt");
@ -99,7 +121,7 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy {
this.setDescription();
//later to fix below code
if (this.user) {
// this.lastLoginTime = moment(this.cs.evaluteDateAsObject(this.user.EditedOn)).format("HH:mm");
this.lastLoginTime = moment(this.cs.evaluteDateAsObject(this.user.EditedOn)).format("HH:mm");
}
}
@ -107,7 +129,7 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy {
}
private setWelcomeMessage() {
private setWelcomeMessage1() {
console.log(this.userName + "this.userName");
if (this.userName) {
@ -117,12 +139,38 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy {
this.welcome += " " + this.empname || '';
this.isLastLogin = true;
console.log(this.isLastLogin + "this.isLastLogin");
} else {
this.welcome = this.ts.trPK("home", "welcome-head");
}
}
private setWelcomeMessage() {
console.log(" setWelcomeMessage ");
if (this.user) {
console.log(" this.user.EmployeeName: "+ this.user.EmployeeName);
if(this.user.EmployeeName != null && this.user.EmployeeName !=''){
this.user_name=this.user.EmployeeName;
}
else{
this.user_name="";
}
this.welcome = this.ts.trPK("home", "welcome-back");
this.welcome += " " + this.user_name || '';
this.isLastLogin = true;
} else {
this.welcome = this.ts.trPK("home", "welcome-head");
}
}
private setDescription() {
this.txt_account = this.userName ?
this.ts.trPK("home", "account-info") :"";

@ -6,6 +6,7 @@ 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 { WorklistMainService } from '../notification/service/work-list.main.service';
const routes: Routes = [
{
@ -26,7 +27,8 @@ const routes: Routes = [
HomePage
],
providers: [
BarcodeScanner
BarcodeScanner,
WorklistMainService
]
})
export class HomePageModule { }

@ -16,12 +16,26 @@
<app-stats-button
[title]="button.title"
[statsValue]="button.statsValue"
[icon]="button.icon">
[icon]="button.icon"
(click)="openStatsButton(button.link)">
</app-stats-button>
</ion-slide>
</ion-slides>
</ion-row>
<ion-row *ngFor="let item of menuList; let i=index">
<ng-container *ngIf="item.MENU_TYPE === 'M'">
<ion-col [size]="12">
<ion-label>{{item.MENU_NAME}}</ion-label>
</ion-col>
<app-services-button
(click)="openMyTeamPage()"
[title]="item.MENU_NAME"
icon="assets/icon/new-design/leave_balance.png">
</app-services-button>
</ng-container>
</ion-row>
<ion-row *ngFor="let menuItem of menuEntries; let i=index">
<ion-row class="attendance-module" *ngIf="i == 1">
@ -45,7 +59,7 @@
<app-services-button
(click)="openPage(subMenu)"
[title]="subMenu.PROMPT"
icon="assets/icon/new-design/leave_balance.png">
[icon]="subMenu.ICON">
</app-services-button>
</ion-slide>
<ion-slide>
@ -60,94 +74,6 @@
</ion-slides>
</ion-row>
<!-- <ion-row class="attendance-module">
<ion-col [size]="8">
<h3>Monthly Attendance</h3>
<span>View your Monthly Time Sheet</span>
<ion-button>
View Detail
</ion-button>
</ion-col>
<ion-col [size]="4">
<img src="assets/icon/new-design/attendance_button_icon.png"/>
</ion-col>
</ion-row> -->
<!-- <ion-row>
<ion-col [size]="12">
<ion-label>My Travelling</ion-label>
</ion-col>
<ion-col [size]="4">
<app-services-button
title="Ticket Request"
icon="assets/icon/new-design/ticket_request.png">
</app-services-button>
</ion-col>
<ion-col [size]="4">
<app-services-button
title="Borrowing Passport"
icon="assets/icon/new-design/borrowing_passport.png">
</app-services-button>
</ion-col>
<ion-col [size]="4">
<app-services-button
title="Vacations Rules"
icon="assets/icon/new-design/vacation_rules.png">
</app-services-button>
</ion-col>
</ion-row> -->
<!-- <ion-row>
<ion-col [size]="12">
<ion-label>Miscellaneous</ion-label>
</ion-col>
<ion-col [size]="4">
<app-services-button
title="Uniform Request"
icon="assets/icon/new-design/uniform_request.png">
</app-services-button>
</ion-col>
<ion-col [size]="4">
<app-services-button
title="ID Badge Request"
icon="assets/icon/new-design/id_badge_request.png">
</app-services-button>
</ion-col>
<ion-col [size]="4">
<app-services-button
title="Separation/ Resignation"
icon="assets/icon/new-design/separation_resignation.png">
</app-services-button>
</ion-col>
</ion-row> -->
<!--
<ion-row>
<ion-col [size]="4">
<app-services-button
title="Recreational Activities"
icon="assets/icon/new-design/recreational_activities.png">
</app-services-button>
</ion-col>
<ion-col [size]="4">
<app-services-button
title="Employee Certificate"
icon="assets/icon/new-design/employee_certificate.png">
</app-services-button>
</ion-col>
<ion-col [size]="4">
<app-services-button
title="IT Forms"
icon="assets/icon/new-design/it_forms.png">
</app-services-button>
</ion-col>
</ion-row> -->
</ion-grid>
<div class="fixed-shift-timer" *ngIf="isCheckedIn" (click)="openattentracking()">
<span class="subTitle">Time Left Today</span>

@ -39,10 +39,6 @@ ion-label{
position: relative;
width: 100%;
}
.header-md:after {
height: 0px !important;
display: none !important;
}
.contentBg:before {
position: absolute;
content: "";

@ -15,24 +15,28 @@ import { attendanceSwipeScannerRequest } from './models/attendanceSwipe.Request'
import { Response } from 'src/app/hmg-common/services/models/response';
import { AttendanceService } from './services/attendance.services';
import { LoginRequest } from '../hmg-common/services/authentication/models/login.request';
import {FileUploaderComponent} from '../hmg-common/ui/file-uploader/file-uploader.component'
import { Camera} from '@ionic-native/Camera/ngx';
import { FileUploaderComponent } from '../hmg-common/ui/file-uploader/file-uploader.component';
import { Camera } from '@ionic-native/Camera/ngx';
import { File } from '@ionic-native/file/ngx';
import { DomSanitizer } from '@angular/platform-browser';
import { SharedDataService } from '../hmg-common/services/shared-data-service/shared-data.service';
import { DevicePermissionsService } from '../hmg-common/services/device-permissions/device-permissions.service';
import { DashboredService } from '../hmg-common/services/dashbored/dashbored.service';
import { OrganizationSalariesResponse } from '../hmg-common/services/dashbored/organization-salaries.response';
import { OpenMissingSwipesResponse} from '../hmg-common/services/dashbored/open-missing-swipes.response';
import {PerformanceAppraisalResponse} from '../hmg-common/services/dashbored/performance-appraisal.response';
import { OpenMissingSwipesResponse } from '../hmg-common/services/dashbored/open-missing-swipes.response';
import { PerformanceAppraisalResponse } from '../hmg-common/services/dashbored/performance-appraisal.response';
import { AttendanceTrackingResponse } from '../hmg-common/services/dashbored/attendance-tracking.response';
import { OpenPeriodDatesResponse } from '../hmg-common/services/dashbored/models/openPeriodDatesResponse';
import {GetSubordinatesAttdStatusRequest} from '../hmg-common/services/dashbored/models/GetSubordinatesAttdStatusRequest';
import {GetSubordinatesLeavesRequest} from '../hmg-common/services/dashbored/models/GetSubordinatesLeavesRequest'
import {GetOpenNotificationsResponse} from '../hmg-common/services/dashbored/models/GetOpenNotificationsResponse'
import {GetSubordinatesAttdStatusResponse} from '../hmg-common/services/dashbored/models/GetSubordinatesAttdStatusResponse'
import {GetSubordinatesLeavesResponse} from '../hmg-common/services/dashbored/models/GetSubordinatesLeavesResponse'
import { GetSubordinatesAttdStatusRequest } from '../hmg-common/services/dashbored/models/GetSubordinatesAttdStatusRequest';
import { GetSubordinatesLeavesRequest } from '../hmg-common/services/dashbored/models/GetSubordinatesLeavesRequest';
import { GetOpenNotificationsResponse } from '../hmg-common/services/dashbored/models/GetOpenNotificationsResponse';
import { GetSubordinatesAttdStatusResponse } from '../hmg-common/services/dashbored/models/GetSubordinatesAttdStatusResponse';
import { GetSubordinatesLeavesResponse } from '../hmg-common/services/dashbored/models/GetSubordinatesLeavesResponse';
import { AccrualService } from '../accrual-balances/services/accrual.service';
import { GetDayAndHoursDetailsRequest } from '../time-card/service/models/get-day-hours-type-details.request';
import * as moment from 'moment';
import { TimeCardService } from '../time-card/service/time-card.service';
import { WorklistMainService } from '../notification/service/work-list.main.service';
@Component({
selector: 'app-home',
@ -53,31 +57,39 @@ export class HomePage implements OnInit {
public fileUploder: FileUploaderComponent;
location: boolean;
camera: boolean;
ticketRequestObject : any;
leaveRequestObject : any;
missingSwipeRequestObject : any;
public statsButtons = [
{
title: 'Work List',
statsValue: 0,
icon: 'assets/icon/new-design/work_list.png'
},
{
title: 'Pending Request',
statsValue: 13,
icon: 'assets/icon/new-design/pending_request.png'
icon: 'assets/icon/new-design/work_list.png',
link: '1'
},
// {
// title: 'Pending Request',
// statsValue: 13,
// icon: 'assets/icon/new-design/pending_request.png',
// link: ''
// },
{
title: 'Missing Swipes',
statsValue: 0,
icon: 'assets/icon/new-design/missing_swipe.png'
icon: 'assets/icon/new-design/missing_swipe.png',
link: '2'
},
{
title: 'Leave Balance',
statsValue: 0,
icon: 'assets/icon/new-design/leave_balance.png'
icon: 'assets/icon/new-design/leave_balance.png',
link: '3'
},
{
title: 'Ticket Balance',
statsValue: 0,
icon: 'assets/icon/new-design/ticket_balance.png'
icon: 'assets/icon/new-design/ticket_balance.png',
link: '4'
}
];
@ -101,8 +113,8 @@ export class HomePage implements OnInit {
// ];
public slideOptsOne = {
slidesPerView: 3.5,
spaceBetween: 10
slidesPerView: 3.5,
spaceBetween: 10
};
public slideOptsTwo = {
slidesPerView: 3.2,
@ -113,10 +125,17 @@ export class HomePage implements OnInit {
public hasFinished = false;
public remainingTime: any;
public scheduledTime: any;
public spentHours: any;
public isCheckedIn = undefined;
public displayTime: any;
public menuEntries: any;
public percent: any;
public selEmp: string;
public selMenu: MenuResponse = new MenuResponse();
public respID: number;
public menuType: any;
accrualBalancesList: any;
public countAllNotification = 0;
constructor(
public ts: TranslatorService,
@ -138,31 +157,43 @@ export class HomePage implements OnInit {
private file: File,
private permissions: DevicePermissionsService,
public DS: DashboredService,
public accrualService: AccrualService
public accrualService: AccrualService,
//////////////////////////////////////// TIME AND DATE////////////////////////////
public timeCardService: TimeCardService,
///////////////////// END/////////////////////////////////////////////////////////
public workListService: WorklistMainService
) {
this.events.subscribe('img-change', displayImg => {
this.userImage = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,' + displayImg);
this.userImage = this.sanitizer.bypassSecurityTrustUrl(
'data:Image/*;base64,' + displayImg
);
console.log('html saved img: ' + this.userImage);
});
}
}
ngOnInit() {
this.getUserDetails();
// this.getUserDetails();
// this.getCount();
// this.events.subscribe('getNotCount', badge => {
// this.notBadge = badge;
// });
}
ionViewWillEnter() {
this.remainingTime = 0;
this.displayTime = '00:00:00';
this.runTimer = false;
this.getUserDetails();
}
initTimer() {
this.runTimer = false;
this.hasStarted = false;
this.hasFinished = false;
this.percent = 100 - ((this.remainingTime / this.scheduledTime) * 100);
this.percent = 100 - (this.remainingTime / this.scheduledTime) * 100;
this.displayTime = this.getSecondsAsDigitalClock(this.remainingTime);
this.startTimer();
}
}
startTimer() {
this.runTimer = true;
@ -172,11 +203,16 @@ export class HomePage implements OnInit {
timerTick() {
setTimeout(() => {
if (!this.runTimer) { return; }
if (!this.runTimer) {
return;
}
this.remainingTime--;
this.displayTime = this.getSecondsAsDigitalClock(this.remainingTime);
if (this.remainingTime > 0) {
const newPercent: any = ((this.remainingTime / this.scheduledTime) * 100).toFixed(2);
const newPercent: any = (
(this.remainingTime / this.scheduledTime) *
100
).toFixed(2);
this.percent = 100 - newPercent;
this.timerTick();
} else {
@ -188,21 +224,20 @@ export class HomePage implements OnInit {
getSecondsAsDigitalClock(inputSeconds: number) {
const secNum = parseInt(inputSeconds.toString(), 10); // don't forget the second param
const hours = Math.floor(secNum / 3600);
const minutes = Math.floor((secNum - (hours * 3600)) / 60);
const seconds = secNum - (hours * 3600) - (minutes * 60);
const minutes = Math.floor((secNum - hours * 3600) / 60);
const seconds = secNum - hours * 3600 - minutes * 60;
let hoursString = '';
let minutesString = '';
let secondsString = '';
hoursString = (hours < 10) ? '0' + hours : hours.toString();
minutesString = (minutes < 10) ? '0' + minutes : minutes.toString();
secondsString = (seconds < 10) ? '0' + seconds : seconds.toString();
hoursString = hours < 10 ? '0' + hours : hours.toString();
minutesString = minutes < 10 ? '0' + minutes : minutes.toString();
secondsString = seconds < 10 ? '0' + seconds : seconds.toString();
return hoursString + ':' + minutesString + ':' + secondsString;
}
getDeviceLocation() {
const isVirtual = this.device.isVirtual;
if (isVirtual === true){
if (isVirtual === true) {
alert('emulater>>>>>>>' + isVirtual);
alert('You are using virtual device');
return false;
@ -211,7 +246,11 @@ export class HomePage implements OnInit {
this.location = granted as boolean;
if (this.location) {
this.geolocation
.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true })
.getCurrentPosition({
maximumAge: 3000,
timeout: 10000,
enableHighAccuracy: true
})
.then(resp => {
this.lat = resp.coords.latitude;
this.longt = resp.coords.longitude;
@ -224,33 +263,35 @@ export class HomePage implements OnInit {
return false;
}
});
}
setServicesPrivilage() {
for (const servicePrivilage of AuthenticationService.servicePrivilage) {
if (servicePrivilage.Previlege === false) {
document.getElementById(servicePrivilage.ServiceName).setAttribute('disabled', 'disabled');
document.getElementById(servicePrivilage.ServiceName).style.filter = 'grayscale(1)';
document
.getElementById(servicePrivilage.ServiceName)
.setAttribute('disabled', 'disabled');
document.getElementById(servicePrivilage.ServiceName).style.filter =
'grayscale(1)';
}
}
}
// getCount() {
// const req: any = {};
// this.menuService.getNotificationCount(req).subscribe((result: any) => {
// if (this.common.validResponse(result)) {
// this.notBadge =
// result.GetOpenNotificationsNumList.P_OPEN_NOTIFICATIONS_NUM;
// if (this.notBadge <= 0) {
// this.notBadge = null;
// }
// this.events.publish("getNotCount", this.notBadge);
// }
// });
// const req: any = {};
// this.menuService.getNotificationCount(req).subscribe((result: any) => {
// if (this.common.validResponse(result)) {
// this.notBadge =
// result.GetOpenNotificationsNumList.P_OPEN_NOTIFICATIONS_NUM;
// if (this.notBadge <= 0) {
// this.notBadge = null;
// }
// this.events.publish("getNotCount", this.notBadge);
// }
// });
// }
ionViewDidLoad() {
ionViewDidEnter() {
this.geolocation
.getCurrentPosition()
.then(resp => {
@ -267,277 +308,323 @@ export class HomePage implements OnInit {
}
private getUserDetails() {
this.authService
.loadAuthenticatedUser()
.subscribe((user: AuthenticatedUser) => {
if (user) {
this.events.publish('setMenu');
this.userData = user;
this.sharedData.setSharedData(this.userData, AuthenticatedUser.SHARED_DATA);
this.userImage = user.EMPLOYEE_IMAGE ? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE : this.userImage;
this.sharedData.setSharedData(
this.userData,
AuthenticatedUser.SHARED_DATA
);
this.userImage = user.EMPLOYEE_IMAGE
? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE
: this.userImage;
this.callDashboardServices();
} else {
console.log(user);
}
});
}
}
callDashboardServices() {
this.getMenu();
this.setServicesPrivilage();
this.openNotificationsDashbored();
this.showOpenMissingSwipes();
this.showAttendanceTracking();
this.getAccrualBalance();
}
callDashboardServices() {
this.getMenu();
this.setServicesPrivilage();
this.openNotificationsDashbored();
this.showOpenMissingSwipes();
this.showAttendanceTracking();
this.getAccrualBalance();
}
public Vacation_Rule() {
this.common.navigateForward('/vacation-rule/home');
}
public Vacation_Rule() {
this.common.navigateForward('/vacation-rule/home');
}
private getMenu() {
this.menuService.getMenu().subscribe((result: MenuResponse) => {
this.handleMenuResult(result);
});
}
private getMenu() {
this.menuService.getMenu().subscribe((result: MenuResponse) => {
this.handleMenuResult(result);
});
}
private handleMenuResult(result) {
if (this.common.validResponse(result)) {
if (this.common.hasData(result.List_Menu)) {
console.log('list menu');
this.menuList = result.List_Menu;
this.getMenuDetails();
}
private handleMenuResult(result) {
if (this.common.validResponse(result)) {
if (this.common.hasData(result.List_Menu)) {
console.log('list menu');
this.menuList = result.List_Menu;
this.getMenuDetails();
}
}
}
private accrualBalance() {
this.common.openAccuralPage();
}
private accrualBalance() {
this.common.openAccuralPage();
}
private changeImage() {
this.common.openChangeImagePage();
}
private changeImage() {
this.common.openChangeImagePage();
}
public getMenuDetails() {
const item = this.menuList[0];
const selMenu: MenuResponse = new MenuResponse();
selMenu.List_Menu = item;
selMenu.userid = this.userData.EMPLOYEE_NUMBER;
console.log('menu: ' + selMenu.List_Menu);
this.common.sharedService.setSharedData(selMenu, MenuResponse.SHARED_DATA);
this.getMenuEntries(item);
// if (item.MENU_TYPE === 'M') {
// this.common.openMyTeamPage();
// // this.navCtrl.push("MySubordinatePage");
// } else if (item.MENU_TYPE === 'S') {
// this.common.sharedService.setSharedData(item, 'mySpecList');
// this.common.openMySpecialistPage();
// // this.navCtrl.push('MySpecialistPage',{"mySpecList":item});
// } else {
// this.getMenuEntries(item);
// }
}
public getMenuDetails() {
const item = this.menuList[0];
const selMenu: MenuResponse = new MenuResponse();
selMenu.List_Menu = item;
selMenu.userid = this.userData.EMPLOYEE_NUMBER;
console.log("menu: " + selMenu.List_Menu);
this.common.sharedService.setSharedData(selMenu, MenuResponse.SHARED_DATA);
this.getMenuEntries(item);
// if (item.MENU_TYPE === 'M') {
// this.common.openMyTeamPage();
// // this.navCtrl.push("MySubordinatePage");
// } else if (item.MENU_TYPE === 'S') {
// this.common.sharedService.setSharedData(item, 'mySpecList');
// this.common.openMySpecialistPage();
// // this.navCtrl.push('MySpecialistPage',{"mySpecList":item});
// } else {
// this.getMenuEntries(item);
// }
}
getMenuEntries(item) {
const request: any = {};
let selEmpNo: string = null;
let nationality: string = null;
request.P_SELECTED_RESP_ID = -999;
if (item.MENU_TYPE === 'S') {
request.P_SELECTED_RESP_ID = item.RESP_ID;
} else {
selEmpNo = this.common.sharedService.getSharedData(
LoginRequest.SHARED_DATA,
false
);
}
nationality = this.common.sharedService.getSharedData(
LoginRequest.NATIONALITY_CODE,
openMyTeamPage() {
this.common.openMyTeamPage();
}
getMenuEntries(item) {
const request: any = {};
let selEmpNo: string = null;
let nationality: string = null;
request.P_SELECTED_RESP_ID = -999;
if (item.MENU_TYPE === 'S') {
request.P_SELECTED_RESP_ID = item.RESP_ID;
} else {
selEmpNo = this.common.sharedService.getSharedData(
LoginRequest.SHARED_DATA,
false
);
request.P_SELECTED_EMPLOYEE_NUMBER = selEmpNo;
request.P_MENU_TYPE = item.MENU_TYPE;
request.NationalityCode = nationality;
// set emp and resp id
console.log('set data');
this.common.sharedService.setSharedData(
selEmpNo,
MenuResponse.SHARED_SEL_EMP
);
this.common.sharedService.setSharedData(
request.P_SELECTED_RESP_ID,
MenuResponse.SHARED_SEL_RESP_ID
);
this.eitService
.getMenuEntries(request)
.subscribe((result: MenuResponse) => {
this.handleMenuEntiresResult(result);
});
}
nationality = this.common.sharedService.getSharedData(
LoginRequest.NATIONALITY_CODE,
false
);
request.P_SELECTED_EMPLOYEE_NUMBER = selEmpNo;
request.P_MENU_TYPE = item.MENU_TYPE;
request.NationalityCode = nationality;
// set emp and resp id
console.log("set data");
this.common.sharedService.setSharedData(
selEmpNo,
MenuResponse.SHARED_SEL_EMP
);
this.common.sharedService.setSharedData(
request.P_SELECTED_RESP_ID,
MenuResponse.SHARED_SEL_RESP_ID
);
this.eitService
.getMenuEntries(request)
.subscribe((result: MenuResponse) => {
this.handleMenuEntiresResult(result);
});
}
sortMenuEntires(list) {
const tree = this.common.list_to_tree(list);
this.menuEntries = tree;
console.log(this.menuEntries);
this.common.sharedService.setSharedData(tree, 'menuEntries');
// this.common.navigateForward("/eit/homepage");
// this.common.openEITPage();
}
sortMenuEntires(list) {
const tree = this.common.list_to_tree(list);
this.menuEntries = tree;
console.log(this.menuEntries);
this.common.sharedService.setSharedData(tree, "menuEntries");
this.common.sharedService.setSharedData("home", "homemenuentries");
// this.common.navigateForward("/eit/homepage");
// this.common.openEITPage();
}
private handleMenuEntiresResult(result) {
if (this.common.validResponse(result)) {
if (this.common.hasData(result.GetMenuEntriesList)) {
this.sortMenuEntires(result.GetMenuEntriesList);
private handleMenuEntiresResult(result) {
if (this.common.validResponse(result)) {
if (this.common.hasData(result.GetMenuEntriesList)) {
for(let i=0;i<result.GetMenuEntriesList.length;i++){
if(result.GetMenuEntriesList[i].FUNCTION_NAME=="HMG_TKT_NEW_EIT_SS"){
this.ticketRequestObject=result.GetMenuEntriesList[i];
}else if(result.GetMenuEntriesList[i].FUNCTION_NAME=="HR_LOA_SS"){
this.leaveRequestObject=result.GetMenuEntriesList[i];
} else if(result.GetMenuEntriesList[i].FUNCTION_NAME=="HMG_OTL_MISSING_SWIPE_EIT_SS"){
this.missingSwipeRequestObject=result.GetMenuEntriesList[i];
}
}
this.sortMenuEntires(result.GetMenuEntriesList);
}
}
}
parentFn($event: string) {
console.log($event); // this will output 'hello from child'
}
parentFn($event: string) {
console.log($event); // this will output 'hello from child'
}
private Change_password() {
this.common.openChangePassword();
}
private Change_password() {
this.common.openChangePassword();
}
private openPayslip() {
this.common.openPayslipPage();
}
private openPayslip() {
this.common.openPayslipPage();
}
private attendance() {
this.permissions.requestCameraAutherization().then(granted => {
this.camera = granted as boolean;
if (this.camera) {
this.scanCode();
}
}
);
}
private attendance() {
this.permissions.requestCameraAutherization().then(granted => {
this.camera = granted as boolean;
if (this.camera) {
this.scanCode();
}
});
}
scanCode() {
this.barcodeScanner.scan().then(barcodeData => {
scanCode() {
this.barcodeScanner
.scan()
.then(barcodeData => {
this.scannedResult = barcodeData;
this.deviceID = this.device.uuid;
this.swipeAttendance();
}).catch(err => {
console.log('Error', err);
})
.catch(err => {
console.log("Error", err);
});
}
swipeAttendance() {
const request: attendanceSwipeScannerRequest = new attendanceSwipeScannerRequest();
request.Latitude = this.lat;
request.Longitude = this.longt;
request.QRValue = this.scannedResult.text;
request.UID = this.deviceID;
request.UserName = this.userData.EMPLOYEE_NUMBER;
console.log(JSON.stringify(request));
this.attendanceService
.attendanceSwipeScanner(request, () => {
console.log('Error inside in swipe attendance');
})
.subscribe((result: Response) => {
if (this.common.validResponse(result)) {
this.common.presentAlert(this.ts.trPK('home', 'swipeAlertSuccess'));
this.showAttendanceTracking();
} else {
this.common.presentAlert(this.ts.trPK('home', 'swipeAlertFailed'));
}
});
}
}
openPersonalInfo() {
this.common.openProfile();
}
swipeAttendance() {
const request: attendanceSwipeScannerRequest = new attendanceSwipeScannerRequest();
request.Latitude = this.lat;
request.Longitude = this.longt;
request.QRValue = this.scannedResult.text;
request.UID = this.deviceID;
request.UserName = this.userData.EMPLOYEE_NUMBER;
console.log(JSON.stringify(request));
this.attendanceService
.attendanceSwipeScanner(request, () => {
console.log("Error inside in swipe attendance");
})
.subscribe((result: Response) => {
if (this.common.validResponse(result)) {
this.common.presentAlert(this.ts.trPK("home", "swipeAlertSuccess"));
this.showAttendanceTracking();
}
// else {
// this.common.presentAlert(this.ts.trPK('home', 'swipeAlertFailed'));
// }
});
}
openPersonalInfo() {
this.common.openProfile();
}
/*************************************Dashboards Services**********************************************************8 */
/*************************************Dashboards Services**********************************************************8 */
showOrganizationSalaries() {
this.DS.getOrganizationSalaries() .subscribe((result: OrganizationSalariesResponse ) => {
});
this.DS.getOrganizationSalaries().subscribe(
(result: OrganizationSalariesResponse) => {}
);
}
showOpenMissingSwipes() {
this.DS.getOpenMissingSwipes() .subscribe((result: OpenMissingSwipesResponse) => {
if (this.common.validResponse(result)) {
const key = 'GetOpenMissingSwipesList';
this.statsButtons[2].statsValue = result[key].P_OPEN_MISSING_SWIPES;
this.DS.getOpenMissingSwipes().subscribe(
(result: OpenMissingSwipesResponse) => {
if (this.common.validResponse(result)) {
const key = "GetOpenMissingSwipesList";
this.statsButtons[1].statsValue = result[key].P_OPEN_MISSING_SWIPES;
}
}
});
);
}
showPerformanceAppraisal() {
this.DS.getPerformanceAppraisal() .subscribe((result: PerformanceAppraisalResponse) => {
});
this.DS.getPerformanceAppraisal().subscribe(
(result: PerformanceAppraisalResponse) => {}
);
}
convertInSeconds(time: any) {
const hours = parseInt(time[0], 10);
const minutes = parseInt(time[1], 10);
let seconds = parseInt(time[2], 10);
seconds = seconds + (hours * 60 * 60) + (minutes * 60);
seconds = seconds + hours * 60 * 60 + minutes * 60;
return seconds;
}
convertAndAssignTime(data) {
convertAndAssignTime(data) {
console.log(data);
this.remainingTime = this.convertInSeconds(data.P_REMAINING_HOURS.split(':'));
this.scheduledTime = this.convertInSeconds(data.P_SCHEDULED_HOURS.split(':'));
this.isCheckedIn = this.remainingTime === this.scheduledTime ? false : true;
this.initTimer();
console.log('remainingTime: ' + this.remainingTime);
console.log('scheduledTime: ' + this.scheduledTime);
console.log('isCheckedIn: ' + this.isCheckedIn);
}
this.spentHours = this.convertInSeconds(data.P_SPENT_HOURS.split(':'));
this.isCheckedIn = this.spentHours === 0 ? false : true;
if (this.isCheckedIn) {
this.initTimer();
}
}
showAttendanceTracking() {
this.DS.getAttendanceTracking() .subscribe((result: AttendanceTrackingResponse) => {
showAttendanceTracking() {
const request = {
P_SELECTED_EMPLOYEE_NUMBER: this.userData.EMPLOYEE_NUMBER
};
this.DS.getAttendanceTracking(request).subscribe((result: AttendanceTrackingResponse) => {
if (this.common.validResponse(result)) {
const key = 'GetAttendanceTrackingList';
this.convertAndAssignTime(result[key]);
}
});
}
}
openPeriodDateDashbored() {
this.DS.getOpenPeriodDates( () => {console.log('Error '); } ).subscribe((result: OpenPeriodDatesResponse) => {
openPeriodDateDashbored() {
this.DS.getOpenPeriodDates(() => { console.log('Error '); }).subscribe((result: OpenPeriodDatesResponse) => {
if (this.common.validResponse(result)) {
console.log('response');
}
});
}
openNotificationsDashbored() { // work list
this.DS.getOpenNotifications( () => { console.log('Error '); }).subscribe((result: GetOpenNotificationsResponse) => {
openNotificationsDashbored() {
// work list
this.DS.getOpenNotifications(() => {
console.log("Error ");
}).subscribe((result: GetOpenNotificationsResponse) => {
if (this.common.validResponse(result)) {
const key = 'P_OPEN_NTF_NUMBER';
this.statsButtons[0].statsValue = result[key];
this.countAllNotification = result[key];
this.ITGCountAllNotification();
this.common.sharedService.setSharedData(
result,
'worklistNotifications'
);
}
});
}
ITGCountAllNotification() {
this.workListService.getITGDetails().subscribe((result: any) => {
this.statsButtons[0].statsValue =
this.countAllNotification + result.TotalCount;
});
}
getSubordinatesLeaves() {
const request: GetSubordinatesLeavesRequest = new GetSubordinatesLeavesRequest();
request.P_DATE_FROM = '/Date(1578603600000+0300)/'; // test
request.P_DATE_TO = '/Date(1576011600000+0300)/'; // test
this.DS.getSubordinatesLeaves( request, () => {console.log('Error '); } ).subscribe((result: GetSubordinatesLeavesResponse) => {
request.P_DATE_FROM = "/Date(1578603600000+0300)/"; // test
request.P_DATE_TO = "/Date(1576011600000+0300)/"; // test
this.DS.getSubordinatesLeaves(request, () => {
console.log("Error ");
}).subscribe((result: GetSubordinatesLeavesResponse) => {
if (this.common.validResponse(result)) {
console.log('response');
console.log(result);
}
});
}
getSubordinatesAttStatus() {
getSubordinatesAttStatus() {
const request: GetSubordinatesAttdStatusRequest = new GetSubordinatesAttdStatusRequest();
request.P_SCHEDULE_DATE_FROM = '/Date(1578603600000+0300)/'; // test
request.P_SCHEDULE_DATE_TO = '/Date(1576011600000+0300)/'; // test
this.DS.getSubordinatesAttStatus( request, () => {console.log('Error '); }).subscribe((result: GetSubordinatesAttdStatusResponse) => {
request.P_SCHEDULE_DATE_FROM = "/Date(1578603600000+0300)/"; // test
request.P_SCHEDULE_DATE_TO = "/Date(1576011600000+0300)/"; // test
this.DS.getSubordinatesAttStatus(request, () => {
console.log("Error ");
}).subscribe((result: GetSubordinatesAttdStatusResponse) => {
if (this.common.validResponse(result)) {
console.log('response');
console.log(result);
@ -546,57 +633,95 @@ export class HomePage implements OnInit {
}
openPage(subMenu) {
console.log("openPage");
let selMenu: MenuResponse = new MenuResponse();
selMenu = this.common.sharedService.getSharedData(MenuResponse.SHARED_DATA, false);
selMenu = this.common.sharedService.getSharedData(
MenuResponse.SHARED_DATA,
false
);
selMenu.GetMenuEntriesList = subMenu;
this.common.sharedService.setSharedData(selMenu, MenuResponse.SHARED_DATA);
if (subMenu.REQUEST_TYPE === 'ABSENCE') {
this.common.openAbsencePage();
} else if (subMenu.REQUEST_TYPE === 'EIT') {
this.common.openEitListPage();
}
if (subMenu.REQUEST_TYPE === 'PAYSLIP') {
} else if (subMenu.REQUEST_TYPE === 'PAYSLIP') {
this.common.openPayslipPage();
} else if (subMenu.MENU_ENTRY_TYPE === 'MENU') {
this.common.sharedService.setSharedData(
selMenu.GetMenuEntriesList,
'menuEntries'
);
this.common.openEITPage();
}
if (subMenu.REQUEST_TYPE === 'TIME_CARD') {
this.common.openTimeCardPage();
}
}
getAccrualBalance() {
const today = new Date();
const day = today.getDate();
const month = today.getMonth() + 1;
const year = today.getFullYear();
const todayDate = month + '/' + day + '/' + year;
const effectiveDate = todayDate;
const request = {
P_SELECTED_EMPLOYEE_NUMBER: this.userData.EMPLOYEE_NUMBER,
P_EFFECTIVE_DATE: effectiveDate
};
this.accrualService
.getAccrualBalances(request)
.subscribe((result: any) => {
if (this.common.validResponse(result)) {
let totalTicketsLeft = 0;
for (const accrualBalance of result.GetAccrualBalancesList) {
if (accrualBalance.ACCURAL_PLAN_NAME === 'HMG Annual Vacation Accrual Plan') {
this.statsButtons[3].statsValue = accrualBalance.ACCRUAL_NET_ENTITLEMENT;
} else {
totalTicketsLeft = totalTicketsLeft + accrualBalance.ACCRUAL_NET_ENTITLEMENT;
}
}
this.statsButtons[4].statsValue = totalTicketsLeft;
const today = new Date();
const day = today.getDate();
const month = today.getMonth() + 1;
const year = today.getFullYear();
const todayDate = month + "/" + day + "/" + year;
const effectiveDate = todayDate;
const request = {
P_SELECTED_EMPLOYEE_NUMBER: this.userData.EMPLOYEE_NUMBER,
P_EFFECTIVE_DATE: effectiveDate
};
this.accrualService.getAccrualBalances(request).subscribe((result: any) => {
if (this.common.validResponse(result)) {
let totalTicketsLeft = 0;
this.accrualBalancesList = result.GetAccrualBalancesList;
for (const accrualBalance of result.GetAccrualBalancesList) {
if (
accrualBalance.ACCURAL_PLAN_NAME ===
"HMG Annual Vacation Accrual Plan"
) {
this.statsButtons[2].statsValue =
accrualBalance.ACCRUAL_NET_ENTITLEMENT;
this.common.sharedService.setSharedData(
accrualBalance,
"leaveAccrualBalance"
);
this.common.sharedService.setSharedData(
request,
"leaveAccrualBalanceDate"
);
this.common.sharedService.setSharedData(
this.accrualBalancesList,
"tickitsbalance"
);
} else {
totalTicketsLeft =
totalTicketsLeft + accrualBalance.ACCRUAL_NET_ENTITLEMENT;
}
});
}
this.statsButtons[3].statsValue = totalTicketsLeft;
}
});
}
openattentracking() {
openattentracking() {
this.common.openAttenTrackingpage();
}
}
openProfilePage() {
openProfilePage() {
this.common.openEditProfile();
}
openStatsButton(link: any) {
// console.log(link);
if (link == "1") {
this.common.openNotificationPage();
} else if (link == "2") {
this.openPage(this.missingSwipeRequestObject);
} else if (link == "3") {
this.openPage(this.leaveRequestObject);
} else if (link =="4") {
this.openPage(this.ticketRequestObject);
}
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save