From 780f515449d7da9464e2cb7a696813b78aac3c84 Mon Sep 17 00:00:00 2001 From: enadhilal Date: Thu, 3 Jun 2021 11:41:05 +0300 Subject: [PATCH 1/9] add announcement service --- .../announcement/announcement.component.ts | 21 +++++++++++-- .../announcement.service.spec.ts | 12 ++++++++ .../announcement.service.ts | 30 +++++++++++++++++++ .../services/connector/connector.service.ts | 4 +-- 4 files changed, 62 insertions(+), 5 deletions(-) create mode 100644 Mohem/src/app/hmg-common/services/announcement-services/announcement.service.spec.ts create mode 100644 Mohem/src/app/hmg-common/services/announcement-services/announcement.service.ts diff --git a/Mohem/src/app/backend-integrations/announcement/announcement.component.ts b/Mohem/src/app/backend-integrations/announcement/announcement.component.ts index 3b4379e7..b1fcb5e7 100644 --- a/Mohem/src/app/backend-integrations/announcement/announcement.component.ts +++ b/Mohem/src/app/backend-integrations/announcement/announcement.component.ts @@ -1,5 +1,8 @@ import { Component, OnInit } from '@angular/core'; import { detachEmbeddedView } from '@angular/core/src/view'; +import { AnnouncementService } from 'src/app/hmg-common/services/announcement-services/announcement.service'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; @Component({ selector: 'app-announcement', @@ -7,8 +10,8 @@ import { detachEmbeddedView } from '@angular/core/src/view'; styleUrls: ['./announcement.component.scss'], }) export class AnnouncementComponent implements OnInit { - dt = new Date().toJSON().slice(0,10).replace(/-/g,'/'); - public arr =[ + dt = new Date().toJSON().slice(0, 10).replace(/-/g, '/'); + public arr = [ { title:"Basic Microsoft Excel Cource", body:" is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.", @@ -33,10 +36,15 @@ export class AnnouncementComponent implements OnInit { ]; public arrList = []; - constructor() { } + constructor( + public announcementService: AnnouncementService, + public translate: TranslatorService, + public common: CommonService + ) { } ngOnInit() { this.arrList = this.arr; + this.getAnnouncementListService(); } filterList(event) { @@ -59,4 +67,11 @@ export class AnnouncementComponent implements OnInit { }); } + getAnnouncementListService(){ + this.announcementService.getAnnouncementListService().subscribe((result: any) => { + if (this.common.validResponse(result)) { + } + }); + } + } diff --git a/Mohem/src/app/hmg-common/services/announcement-services/announcement.service.spec.ts b/Mohem/src/app/hmg-common/services/announcement-services/announcement.service.spec.ts new file mode 100644 index 00000000..4add8a78 --- /dev/null +++ b/Mohem/src/app/hmg-common/services/announcement-services/announcement.service.spec.ts @@ -0,0 +1,12 @@ +import { TestBed } from '@angular/core/testing'; + +import { AnnouncementService } from './announcement.service'; + +describe('AnnouncementService', () => { + beforeEach(() => TestBed.configureTestingModule({})); + + it('should be created', () => { + const service: AnnouncementService = TestBed.get(AnnouncementService); + expect(service).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/hmg-common/services/announcement-services/announcement.service.ts b/Mohem/src/app/hmg-common/services/announcement-services/announcement.service.ts new file mode 100644 index 00000000..0034c8ae --- /dev/null +++ b/Mohem/src/app/hmg-common/services/announcement-services/announcement.service.ts @@ -0,0 +1,30 @@ +import { Injectable } from '@angular/core'; +import { Request } from 'src/app/hmg-common/services/models/request'; +import { Observable } from 'rxjs'; +import { AuthenticationService } from '../authentication/authentication.service'; +import { ConnectorService } from '../connector/connector.service'; + +@Injectable({ + providedIn: 'root' +}) +export class AnnouncementService { + public static getAnnouncemntList = ''; + + constructor( + public authService: AuthenticationService, + public con: ConnectorService, + ) { } + + + getAnnouncementListService(onError ?: any , oerrorLable ?: any) { + const request = new Request(); + this.authService.authenticateRequest(request); + console.log(request); + return this.con.post( + AnnouncementService.getAnnouncemntList, + request, + onError, + oerrorLable + ); + } +} diff --git a/Mohem/src/app/hmg-common/services/connector/connector.service.ts b/Mohem/src/app/hmg-common/services/connector/connector.service.ts index 9405295d..e3d2cc13 100644 --- a/Mohem/src/app/hmg-common/services/connector/connector.service.ts +++ b/Mohem/src/app/hmg-common/services/connector/connector.service.ts @@ -27,8 +27,8 @@ export class ConnectorService { public static retryTimes = 0; public static timeOut = 120 * 1000; -// public static host = 'https://uat.hmgwebservices.com/'; - public static host = 'https://hmgwebservices.com/'; + public static host = 'https://uat.hmgwebservices.com/'; + // public static host = 'https://hmgwebservices.com/'; constructor(public httpClient: HttpClient, public cs: CommonService, From e6109e95d5668283caf17a15ac65a2683cd3f940 Mon Sep 17 00:00:00 2001 From: umasoodch Date: Thu, 3 Jun 2021 15:11:36 +0300 Subject: [PATCH 2/9] fixed live URL --- .../app/hmg-common/services/connector/connector.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mohem/src/app/hmg-common/services/connector/connector.service.ts b/Mohem/src/app/hmg-common/services/connector/connector.service.ts index 97a29e98..352d691d 100644 --- a/Mohem/src/app/hmg-common/services/connector/connector.service.ts +++ b/Mohem/src/app/hmg-common/services/connector/connector.service.ts @@ -27,8 +27,8 @@ export class ConnectorService { public static retryTimes = 0; public static timeOut = 120 * 1000; - public static host = 'https://uat.hmgwebservices.com/'; - //public static host = 'https://hmgwebservices.com/'; + // public static host = 'https://uat.hmgwebservices.com/'; + public static host = 'https://hmgwebservices.com/'; constructor(public httpClient: HttpClient, public cs: CommonService, From 1f0c78d5041a46e4b7015e0b4aaabb94b929ece4 Mon Sep 17 00:00:00 2001 From: umasoodch Date: Thu, 3 Jun 2021 15:20:22 +0300 Subject: [PATCH 3/9] pushed package.json --- Mohem/package.json | 224 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 224 insertions(+) create mode 100644 Mohem/package.json diff --git a/Mohem/package.json b/Mohem/package.json new file mode 100644 index 00000000..47068303 --- /dev/null +++ b/Mohem/package.json @@ -0,0 +1,224 @@ +{ + "name": "MOHEM", + "version": "0.0.1", + "author": "Cloud Solutions", + "homepage": "http://www.cloudsolution-sa.com/", + "private": true, + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build", + "test": "ng test", + "lint": "ng lint", + "e2e": "ng e2e" + }, + "dependencies": { + "@angular/animations": "^7.2.15", + "@angular/common": "^7.2.2", + "@angular/core": "^7.2.2", + "@angular/forms": "^7.2.2", + "@angular/http": "^7.2.2", + "@angular/platform-browser": "^7.2.2", + "@angular/platform-browser-dynamic": "^7.2.2", + "@angular/router": "^7.2.2", + "@ionic-native/android-permissions": "^5.18.0", + "@ionic-native/app-availability": "^5.18.0", + "@ionic-native/app-rate": "^5.18.0", + "@ionic-native/background-geolocation": "^5.30.0", + "@ionic-native/badge": "^5.18.0", + "@ionic-native/barcode-scanner": "^5.18.0", + "@ionic-native/base64": "^5.18.0", + "@ionic-native/ble": "^5.18.0", + "@ionic-native/camera": "^5.18.0", + "@ionic-native/core": "^5.8.0", + "@ionic-native/date-picker": "^5.10.0", + "@ionic-native/device": "^5.18.0", + "@ionic-native/diagnostic": "^5.18.0", + "@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.21.5", + "@ionic-native/geolocation": "^5.10.0", + "@ionic-native/globalization": "^5.18.0", + "@ionic-native/health": "^5.4.0", + "@ionic-native/in-app-browser": "^5.17.0", + "@ionic-native/keyboard": "^5.17.0", + "@ionic-native/launch-navigator": "^5.17.0", + "@ionic-native/local-notifications": "^5.17.0", + "@ionic-native/native-storage": "^5.17.0", + "@ionic-native/nfc": "^5.30.0", + "@ionic-native/open-native-settings": "^5.14.0", + "@ionic-native/splash-screen": "^5.0.0", + "@ionic-native/sqlite": "^5.18.0", + "@ionic-native/status-bar": "^5.0.0", + "@ionic-native/themeable-browser": "^5.18.0", + "@ionic-native/wifi-wizard-2": "^5.31.1", + "@ionic-native/zbar": "^5.10.0", + "@ionic/angular": "^4.1.0", + "@ng-bootstrap/ng-bootstrap": "^4.2.2", + "@swimlane/ngx-charts": "^10.1.0", + "angular-calendar": "^0.26.11", + "app": "0.1.0", + "chart.js": "^2.9.3", + "com-badrit-base64": "^0.2.0", + "cordova-android": "^8.1.0", + "cordova-android-support-gradle-release": "^3.0.1", + "cordova-open-native-settings": "^1.5.2", + "cordova-opentok-android-permissions": "^1.0.1", + "cordova-plugin-actionsheet": "^2.3.3", + "cordova-plugin-add-swift-support": "^2.0.2", + "cordova-plugin-android-permissions": "^1.0.2", + "cordova-plugin-androidx": "^1.0.2", + "cordova-plugin-androidx-adapter": "^1.1.0", + "cordova-plugin-appavailability": "^0.4.2", + "cordova-plugin-apprate": "^1.4.0", + "cordova-plugin-badge": "^0.8.8", + "cordova-plugin-ble-central": "^1.2.4", + "cordova-plugin-camera": "^4.1.0", + "cordova-plugin-datepicker": "^0.9.3", + "cordova-plugin-device": "^2.0.3", + "cordova-plugin-dialogs": "^2.0.2", + "cordova-plugin-file": "^6.0.2", + "cordova-plugin-filepath": "^1.5.6", + "cordova-plugin-fingerprint-aio": "^3.0.0", + "cordova-plugin-firebasex": "^7.0.2", + "cordova-plugin-geolocation": "^4.0.2", + "cordova-plugin-globalization": "^1.11.0", + "cordova-plugin-inappbrowser": "^3.1.0", + "cordova-plugin-ionic-keyboard": "^2.2.0", + "cordova-plugin-ionic-webview": "^4.1.0", + "cordova-plugin-local-notification": "^0.9.0-beta.2", + "cordova-plugin-nativestorage": "^2.3.2", + "cordova-plugin-splashscreen": "^5.0.3", + "cordova-plugin-statusbar": "^2.4.3", + "cordova-plugin-themeablebrowser": "^0.2.18", + "cordova-plugin-whitelist": "^1.3.4", + "cordova-plugin-wifiwizard2": "^3.1.1", + "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", + "es6-promise-plugin": "^4.1.0", + "ionic2-calendar": "^0.5.8", + "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.14.11", + "phonegap-nfc": "^1.2.0", + "phonegap-plugin-barcodescanner": "^8.1.0", + "phonegap-plugin-multidex": "^1.0.0", + "primeicons": "^1.0.0", + "primeng": "^7.1.3", + "run": "1.4.0", + "rxjs": "~6.3.3", + "tslib": "^1.10.0", + "uk.co.workingedge.phonegap.plugin.launchnavigator": "^3.2.2", + "xlsx": "^0.14.3", + "zone.js": "~0.8.29" + }, + "devDependencies": { + "@angular-devkit/architect": "~0.12.3", + "@angular-devkit/build-angular": "^0.13.9", + "@angular-devkit/core": "~7.2.3", + "@angular-devkit/schematics": "~7.2.3", + "@angular/cli": "^7.3.6", + "@angular/compiler": "~7.2.2", + "@angular/compiler-cli": "~7.2.2", + "@angular/language-service": "~7.2.2", + "@ionic/angular-toolkit": "~1.4.0", + "@ionic/lab": "3.1.2", + "@types/jasmine": "~2.8.8", + "@types/jasminewd2": "~2.0.3", + "@types/node": "~10.12.0", + "codelyzer": "~4.5.0", + "cordova-ios": "^6.2.0", + "cordova-plugin-wifiwizard2": "^3.1.1", + "es6-promise-plugin": "^4.1.0", + "jasmine-core": "~2.99.1", + "jasmine-spec-reporter": "~4.2.1", + "karma": "^4.0.1", + "karma-chrome-launcher": "~2.2.0", + "karma-coverage-istanbul-reporter": "~2.0.1", + "karma-jasmine": "~1.1.2", + "karma-jasmine-html-reporter": "^0.2.2", + "node-sass": "^4.13.1", + "protractor": "^5.4.3", + "ts-node": "~8.0.0", + "tslint": "~5.12.0", + "typescript": "3.1.6" + }, + "description": "An Ionic project", + "cordova": { + "plugins": { + "cordova-plugin-whitelist": {}, + "cordova-plugin-statusbar": {}, + "cordova-plugin-device": {}, + "cordova-plugin-splashscreen": {}, + "cordova-plugin-nativestorage": {}, + "cordova-plugin-globalization": {}, + "cordova-plugin-android-permissions": {}, + "cordova-plugin-badge": {}, + "cordova-plugin-ionic-keyboard": {}, + "cordova-plugin-datepicker": {}, + "cordova-plugin-geolocation": {}, + "phonegap-plugin-barcodescanner": { + "ANDROID_SUPPORT_V4_VERSION": "27.+" + }, + "cordova-plugin-ionic-webview": { + "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+" + }, + "cordova-android-support-gradle-release": { + "ANDROID_SUPPORT_VERSION": "27.+" + }, + "cordova.plugins.diagnostic": { + "ANDROID_SUPPORT_VERSION": "28.+" + }, + "cordova-open-native-settings": {}, + "cordova-plugin-camera": { + "ANDROID_SUPPORT_V4_VERSION": "27.+" + }, + "cordova-plugin-file": {}, + "cordova-plugin-filepath": {}, + "com-badrit-base64": {}, + "cordova-sqlite-storage": {}, + "cordova-plugin-ble-central": {}, + "uk.co.workingedge.phonegap.plugin.launchnavigator": {}, + "cordova-plugin-themeablebrowser": {}, + "cordova-plugin-inappbrowser": {}, + "cordova-plugin-local-notification": {}, + "cordova-opentok-android-permissions": {}, + "cordova-plugin-appavailability": {}, + "cordova-plugin-apprate": {}, + "cordova-plugin-fingerprint-aio": { + "FACEID_USAGE_DESCRIPTION": "User Authentication" + }, + "cordova-plugin-firebasex": { + "FIREBASE_ANALYTICS_COLLECTION_ENABLED": "true", + "FIREBASE_PERFORMANCE_COLLECTION_ENABLED": "true", + "FIREBASE_CRASHLYTICS_COLLECTION_ENABLED": "true", + "ANDROID_ICON_ACCENT": "#FF00FFFF", + "ANDROID_PLAY_SERVICES_TAGMANAGER_VERSION": "17.0.0", + "ANDROID_FIREBASE_ANALYTICS_VERSION": "17.2.1", + "ANDROID_FIREBASE_MESSAGING_VERSION": "20.0.0", + "ANDROID_FIREBASE_CONFIG_VERSION": "19.0.3", + "ANDROID_FIREBASE_PERF_VERSION": "19.0.1", + "ANDROID_FIREBASE_AUTH_VERSION": "19.1.0", + "ANDROID_CRASHLYTICS_VERSION": "2.10.1", + "ANDROID_CRASHLYTICS_NDK_VERSION": "2.1.1" + }, + "cordova-plugin-androidx": {}, + "cordova-plugin-androidx-adapter": {}, + "cordova-plugin-background-geolocation": { + "GOOGLE_PLAY_SERVICES_VERSION": "+" + }, + "phonegap-nfc": {}, + "wifiwizard2": {} + }, + "platforms": [ + "android", + "ios" + ] + } +} From 1cd876d1735c1d27f1b156788f695084cad833bc Mon Sep 17 00:00:00 2001 From: umasoodch Date: Thu, 3 Jun 2021 15:50:39 +0300 Subject: [PATCH 4/9] added ionic4-rating module in package.json --- Mohem/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Mohem/package.json b/Mohem/package.json index 47068303..3caf1fb0 100644 --- a/Mohem/package.json +++ b/Mohem/package.json @@ -8,7 +8,7 @@ "ng": "ng", "start": "ng serve", "build": "ng build", - "test": "ng test", + "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, @@ -101,6 +101,7 @@ "date-fns": "^1.30.1", "es6-promise-plugin": "^4.1.0", "ionic2-calendar": "^0.5.8", + "ionic4-rating": "^1.0.9", "ng-circle-progress": "^1.5.1", "ng2-file-upload": "^1.3.0", "ng2-pdf-viewer": "^5.3.2", From 5d14466b4972ec9156e79bf650d536290b60a79e Mon Sep 17 00:00:00 2001 From: enadhilal Date: Thu, 3 Jun 2021 15:51:44 +0300 Subject: [PATCH 5/9] update --- .../backend-integrations/announcement/announcement.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mohem/src/app/backend-integrations/announcement/announcement.component.ts b/Mohem/src/app/backend-integrations/announcement/announcement.component.ts index b1fcb5e7..899669a0 100644 --- a/Mohem/src/app/backend-integrations/announcement/announcement.component.ts +++ b/Mohem/src/app/backend-integrations/announcement/announcement.component.ts @@ -44,7 +44,7 @@ export class AnnouncementComponent implements OnInit { ngOnInit() { this.arrList = this.arr; - this.getAnnouncementListService(); + // this.getAnnouncementListService(); } filterList(event) { From f692fe9d33ab1b9521f35088d84bea8cca8b88ea Mon Sep 17 00:00:00 2001 From: enadhilal Date: Thu, 3 Jun 2021 16:18:58 +0300 Subject: [PATCH 6/9] add announcement icon --- .../services/connector/connector.service.ts | 4 ++-- .../services-button.component.html | 1 + Mohem/src/app/home/home.page.html | 5 +++++ .../assets/icon/home/announcementIntegration.png | Bin 0 -> 3840 bytes 4 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 Mohem/src/assets/icon/home/announcementIntegration.png diff --git a/Mohem/src/app/hmg-common/services/connector/connector.service.ts b/Mohem/src/app/hmg-common/services/connector/connector.service.ts index 352d691d..dae990dc 100644 --- a/Mohem/src/app/hmg-common/services/connector/connector.service.ts +++ b/Mohem/src/app/hmg-common/services/connector/connector.service.ts @@ -27,8 +27,8 @@ export class ConnectorService { public static retryTimes = 0; public static timeOut = 120 * 1000; - // public static host = 'https://uat.hmgwebservices.com/'; - public static host = 'https://hmgwebservices.com/'; + public static host = 'https://uat.hmgwebservices.com/'; + // public static host = 'https://hmgwebservices.com/'; constructor(public httpClient: HttpClient, public cs: CommonService, diff --git a/Mohem/src/app/hmg-common/ui/services-button/services-button.component.html b/Mohem/src/app/hmg-common/ui/services-button/services-button.component.html index a41dd15d..69f19614 100644 --- a/Mohem/src/app/hmg-common/ui/services-button/services-button.component.html +++ b/Mohem/src/app/hmg-common/ui/services-button/services-button.component.html @@ -8,6 +8,7 @@ +
diff --git a/Mohem/src/app/home/home.page.html b/Mohem/src/app/home/home.page.html index aada661e..057bec61 100644 --- a/Mohem/src/app/home/home.page.html +++ b/Mohem/src/app/home/home.page.html @@ -72,6 +72,11 @@ + + + + + diff --git a/Mohem/src/assets/icon/home/announcementIntegration.png b/Mohem/src/assets/icon/home/announcementIntegration.png new file mode 100644 index 0000000000000000000000000000000000000000..f80dd0541a2321242ac9eee6ca2b911187a983ea GIT binary patch literal 3840 zcmV+b5C8CqP)Px#IAvH#W=%~1DgXcg2mk?xX#fNO00031000^Q000000-yo_1ONa40RR91o}dE& z1ONa40RR91kN^Mx0A172Bme*oc1c7*RCodHT`{lhRuSHWM?fTmmGVGHNW@e?Lsp^% zF{z--<`-P2puQVAsx=km+teUkBSC!^IvUmpQNrEOAgXl`6i5$Z6eU0e3E$kjlUVny z&za+M?6ti!()a8=XXcxk&$IU3`!;#Anc5T;NYK<3@Fws+a06TbYN|kI3ar6w29AfW zj;qeHD)HGWKn1jfNQW^`{${icHK&WC8B&Et4#ygssIf-F9i~` zy91hrsLlF$DX86gDZr1_HPB|TTrpmSsPp+KKxp* zs2FuR4+SpKX6T293LKK*I}b&*OREBe-5WqMFgBkJIQWyV&ByG)P3>G2;13U1fEk9i z#{wJ+fQ-vNgSfZB$AQ^}zp9=9SfhHu(BcM{3u_} z1R;k^u|RP*!V7I1h7CC8ks2joJ(1EWO`i(zkURiv!z9_;gJTi7a1z!PIjz!lt-u8m z#CWW(Ix3XFD;fHZ(kpFj1riYM0LewQ`Q+f>J7!l#AhzW+6V3g_p%|eMi9Wvd=0aYR+n2w0|1~m({!C?>?fbYv?fj-0 zk`aoL=-^XxF613`|<@F)1%ag%EvuGzz~g4RK3=wb7}3lkk90);GY14G(uHl zyvwnut3fLIQBj0bGX%EdM-k0uxsa=#CvB!X?al(}$2fFb)SaAGI#G6lSA7tg&Rt}= zkf+X{x=2s8KgOXeAr_rVuoii_*7`6so!h8$AxE7%wGp0jZ;s>#pkC}4&QGaXo7^PS zxQROx#@DZ1+C(;l^-YV0>dl?%d7?EV{p2P`03GfoY#S!3Z zF1^A{SwVKK%)P zsn)*&dtu7pq2oMH9!ZvBZ3pPk9T8{3OC@@H&Cy?!q2nBP2QS4M-|6N+Z}z#%@93Sb zH?^&aGVH#7#N(e>dl|@&?6q2|KWh07$3xevJ^hU@&+dKp*0<00Ddh zDu5i|y=Yb+yz6MJ9z@T6`)eNF>e`b6Ir1<%GxMm;kRjpXCyJ15O1{0xlyse9Pse`{${E89Yh%KY`NvZ@MwDNoh?J)0L2d@KVCqg;zvJV}+F4Y}3_a5c* zf8-O}_&c4I4qj|or^VOB&v>_-I(X9>l-S*5AmlFq$1>)+9X$O#UMxwc%afwD9H2+Q z!P^Q%Y=OOr)WI`K=+UM?flWp<(?@MIDV4}a0UbOawbVD70y=onq*Njw1$6Ly)KcGQ z3h3ZPlTwL%6yU*={B}C=Ayr>hz@-2W-iN|+0RNo#8Ng);95R=a?yCYW1^7{0 z0UMWN7yJKx_*NIR$~giBc<|VG@FbsZZ=GZP@jndSyKg*vnEgZlQM+EWwj@cgx3=uhu@`Oljtw5?-U2+`KLC39(7}(~hd=ri z(y5(Dfkcou+VC|E9@kI-8NkV21YQGv{Ro{5UuTI$ z8NMeZnIiaX!C^iniRkzrU-{J6zjTXx&pi|MpPk~t{@V|KA*rJ;eI&I=d%yk*X@THzjndVM)eD$&Z;&t!*hB@{;@U|&90 zsF^Rw(2Y=_L=#sZlO4WPD3CMMBsxfIZ!>(kl>F3w848eyH8h`V)SUoBGD0yDoqTHc9X@_CIL-D8WM}Z1 zJ1o)v4X~cL4i)+%;B{f2Jg9>=E|T9Nl6UEleGce>fKwZx0Etd*>f~#+7x0%7a`SyW ziEkG^8<28CF5|zVTe_Sa`&Zac96oKgnRf?lfmeYNn3`2+h=2lk0cf(kX=5ns3lt)G zce2kauxRqgC9TQkw?@8sV9jm92|>2H%w8LA6T^M&8}jh_;BAKrjS#kD8KIMdFjoP; z1lR($nk0Lia|!fmgk+N1V$_s@#0(%G`Ssu}MTHW9*oS}+%MdKhwWuW`oR@$!w#jb? zjs)n#2uYgisIT`?%iwa%QPDvtP!U)?=aPPS$s2NISg(Nkg==%Z1_#&Er4h&_wRKs; zV7W7)I4ocSgjkMX$%Wv-vJFLo{jHG8mhS+LCD4@-h;8}JURU`C%bTDw=^ZEw>|%j< zBed(d66PZKm4J)SwZ8)g*B9Fegs$AYe|C0_jwQlW@S6v!!xvYQt89^n2bF7-@Y{SI zfFrcedif-*sU9==bEznNq0&G#INo-_>wDBP7Y|Gh)VbQ6^Aq3#h+za0NewY_jfUe! zD9S#tBOZu@FjoDA`LJzN65 zMhLL+nmu3MQTk^>F)H{aK#1iCHsacjoQsE~D!5F-RjL}#BA=)+PZ;USmS)#P^t4#^vZgt_20ZQG%}CNb;lCHy49+SKB^L!Gnf zd~YM^V2}IS2y1Jqnb#$cUlQhl+jNc4noY?1UK%I^$JhC6=M`^ z1O;}UA>Ih;Iwpa+VukaYWdpeCb?x&TZe1&igq*dI>725t(mPNd*mi<=*TpgWSzxX% z!V{1dfT^+V@c<5b1PKRRr)Sc4a)s7;NJH!z!4jcM_=V;QsnZp^ghL5Pda?Q32sz+3 zEnA=+n=tjgEU>LZ-r7#UF4sH^in`sp>tPAFU%p{j#0R}mpspA-p_6+l-* z$Gnp=eq2b!V&4#3Ay}G=LK2-YmNhB?X`eoRCu}Qz>Vr_EA~5wF@qK-G2`n{Acm|dV z@EI(ZZ!Nh=(S`76_J#n}sAA zXe^M zfGfnz?X-{WEUS6iOeI%!ofAw?G+lU1UjWt62Rvj*EEp)*FAJZlsVS= z`tWij{iv2$s~l+3xWL||j2kY1riOjiufdZ5#&VoU;w$)Z9cmxEfeQ#>bYpEYV6v8? zvl1{3ha4Y(XX(MUg0I?{E0CdoewT#|o=wfhH3j(RzYGW&K#pY| zHC4b{fdmmb;QM%G{}fPD1%eb$ropPf9R-$nT>`EFB>1SQ0?`#%fw2OP z4PY8Qn-cb}z!SY^lqa0SH3j%C$W{V5PylKpSK$A%S!^4BHjzF60000 Date: Sun, 6 Jun 2021 09:55:30 +0300 Subject: [PATCH 7/9] fix icon issue --- .../ui/services-button/services-button.component.html | 2 +- Mohem/src/app/home/home.page.html | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Mohem/src/app/hmg-common/ui/services-button/services-button.component.html b/Mohem/src/app/hmg-common/ui/services-button/services-button.component.html index 69f19614..3e705489 100644 --- a/Mohem/src/app/hmg-common/ui/services-button/services-button.component.html +++ b/Mohem/src/app/hmg-common/ui/services-button/services-button.component.html @@ -1,6 +1,6 @@
- + diff --git a/Mohem/src/app/home/home.page.html b/Mohem/src/app/home/home.page.html index 057bec61..d9a4bb30 100644 --- a/Mohem/src/app/home/home.page.html +++ b/Mohem/src/app/home/home.page.html @@ -63,11 +63,12 @@ {{'general,other-services' | translate}} + - + @@ -77,6 +78,7 @@ + From 68371b371a9e687a0004517011f9bd4751fe11f1 Mon Sep 17 00:00:00 2001 From: Fatimah Alshammari Date: Sun, 6 Jun 2021 11:08:17 +0300 Subject: [PATCH 8/9] fixed mowadhafi --- Mohem/src/app/app-routing.module.ts | 5 +- Mohem/src/app/app.component.html | 8 + .../services/common/common.service.ts | 8 +- .../hr-request/hr-request.component.html | 91 +++++---- .../hr-request/hr-request.component.scss | 186 ++++++++++++++---- .../hr-request/hr-request.component.spec.ts | 2 +- .../hr-request/hr-request.component.ts | 105 ++++++++-- Mohem/src/app/mowadhafi/mowadhafi.module.ts | 46 +++++ Mohem/src/app/mowadhafi/mowadhafi.page.html | 10 + Mohem/src/app/mowadhafi/mowadhafi.page.scss | 0 .../src/app/mowadhafi/mowadhafi.page.spec.ts | 27 +++ Mohem/src/app/mowadhafi/mowadhafi.page.ts | 15 ++ .../app/mowadhafi/mowadhafi.service.spec.ts | 12 ++ Mohem/src/app/mowadhafi/mowadhafi.service.ts | 92 +++++++++ .../my-request/my-request.component.html | 34 ++++ .../my-request/my-request.component.scss | 63 ++++++ .../my-request/my-request.component.spec.ts | 0 .../my-request/my-request.component.ts | 31 ++- .../request-details.component.html | 66 +++++++ .../request-details.component.scss | 174 ++++++++++++++++ .../request-details.component.spec.ts | 27 +++ .../request-details.component.ts | 75 +++++++ .../my-team/details/details.component.html | 2 +- .../my-team/details/details.component.scss | 12 +- .../my-request/my-request.component.html | 22 --- .../my-request/my-request.component.scss | 33 ---- Mohem/src/app/my-team/my-team.module.ts | 15 +- .../app/my-team/service/my-team.service.ts | 9 +- Mohem/src/assets/localization/i18n.json | 138 ++++++++----- 29 files changed, 1093 insertions(+), 215 deletions(-) rename Mohem/src/app/{my-team => mowadhafi}/hr-request/hr-request.component.html (70%) rename Mohem/src/app/{my-team => mowadhafi}/hr-request/hr-request.component.scss (66%) rename Mohem/src/app/{my-team => mowadhafi}/hr-request/hr-request.component.spec.ts (94%) rename Mohem/src/app/{my-team => mowadhafi}/hr-request/hr-request.component.ts (57%) create mode 100644 Mohem/src/app/mowadhafi/mowadhafi.module.ts create mode 100644 Mohem/src/app/mowadhafi/mowadhafi.page.html create mode 100644 Mohem/src/app/mowadhafi/mowadhafi.page.scss create mode 100644 Mohem/src/app/mowadhafi/mowadhafi.page.spec.ts create mode 100644 Mohem/src/app/mowadhafi/mowadhafi.page.ts create mode 100644 Mohem/src/app/mowadhafi/mowadhafi.service.spec.ts create mode 100644 Mohem/src/app/mowadhafi/mowadhafi.service.ts create mode 100644 Mohem/src/app/mowadhafi/my-request/my-request.component.html create mode 100644 Mohem/src/app/mowadhafi/my-request/my-request.component.scss rename Mohem/src/app/{my-team => mowadhafi}/my-request/my-request.component.spec.ts (100%) rename Mohem/src/app/{my-team => mowadhafi}/my-request/my-request.component.ts (67%) create mode 100644 Mohem/src/app/mowadhafi/request-details/request-details.component.html create mode 100644 Mohem/src/app/mowadhafi/request-details/request-details.component.scss create mode 100644 Mohem/src/app/mowadhafi/request-details/request-details.component.spec.ts create mode 100644 Mohem/src/app/mowadhafi/request-details/request-details.component.ts delete mode 100644 Mohem/src/app/my-team/my-request/my-request.component.html delete mode 100644 Mohem/src/app/my-team/my-request/my-request.component.scss diff --git a/Mohem/src/app/app-routing.module.ts b/Mohem/src/app/app-routing.module.ts index c2bbba01..082f65cf 100644 --- a/Mohem/src/app/app-routing.module.ts +++ b/Mohem/src/app/app-routing.module.ts @@ -22,7 +22,10 @@ const routes: Routes = [ { path: 'payslip', loadChildren: './payslip/payslip.module#PayslipPageModule' }, { path: 'attendance-tracking', loadChildren: './attendance-tracking/attendance-tracking.module#AttendanceTrackingPageModule' }, { path: 'itemforsale', loadChildren: './itemforsale/itemforsale.module#ItemforsalePageModule' }, - { path: 'offersdiscount', loadChildren: './offersdiscount/offersdiscount.module#OffersdiscountPageModule' } + { path: 'offersdiscount', loadChildren: './offersdiscount/offersdiscount.module#OffersdiscountPageModule' }, + // { path: 'mowadhafi', loadChildren: './mowadhafi/mowadhafi/mowadhafi.module#MowadhafiPageModule' }, + { path: 'mowadhafi', loadChildren: './mowadhafi/mowadhafi.module#MowadhafiPageModule' } + diff --git a/Mohem/src/app/app.component.html b/Mohem/src/app/app.component.html index d86016fd..f0c5d562 100644 --- a/Mohem/src/app/app.component.html +++ b/Mohem/src/app/app.component.html @@ -131,6 +131,14 @@ {{ts.trPK('myTeam','myTeam-header')}} + + + + + + HR REQUEST + + diff --git a/Mohem/src/app/hmg-common/services/common/common.service.ts b/Mohem/src/app/hmg-common/services/common/common.service.ts index 0548c4d1..e9981889 100644 --- a/Mohem/src/app/hmg-common/services/common/common.service.ts +++ b/Mohem/src/app/hmg-common/services/common/common.service.ts @@ -1119,11 +1119,15 @@ public getMonthNameAr(value: number): string { this.nav.navigateForward(['/my-team/details']); } public openMyRequestPage() { - this.nav.navigateForward(['/my-team/my-request']); + this.nav.navigateForward(['/mowadhafi/my-request']); } public openHRRequestPage() { - this.nav.navigateForward(['/my-team/hr-request']); + this.nav.navigateForward(['/mowadhafi/hr-request']); } + public openRequestDetailsPage() { + this.nav.navigateForward(['/mowadhafi/request-details']); + } + public openPage(link: string) { diff --git a/Mohem/src/app/my-team/hr-request/hr-request.component.html b/Mohem/src/app/mowadhafi/hr-request/hr-request.component.html similarity index 70% rename from Mohem/src/app/my-team/hr-request/hr-request.component.html rename to Mohem/src/app/mowadhafi/hr-request/hr-request.component.html index ed115638..77005a95 100644 --- a/Mohem/src/app/my-team/hr-request/hr-request.component.html +++ b/Mohem/src/app/mowadhafi/hr-request/hr-request.component.html @@ -5,7 +5,7 @@ - {{ts.trPK('userProfile','HR-request')}} + {{ts.trPK('userProfile','createHR-Request')}} @@ -89,9 +89,11 @@
-
- {{ts.trPK('userProfile','createHR-Request')}} + +
+ {{ts.trPK('userProfile','createHR-Request')}}
+
@@ -128,7 +130,9 @@ -
+
+ +
{{ts.trPK('userProfile','ServiceType')}}
@@ -149,47 +153,64 @@
-
- {{ts.trPK('userProfile','DeptName')}} -
-
- -
-
- {{ts.trPK('userProfile','RelatedSection')}} -
-
- -
-
- {{ts.trPK('userProfile','RelatedTopic')}} -
-
- -
+ +
+
+ + + + + + + + + + + + + + +
+ +
{{ts.trPK('userProfile','SupportingDocument')}}
-
- +
+
{{ts.trPK('userProfile','Description')}}
-
- -
+ + + + + + - -
- Cancel -
-
- Submit - + + + +
+ +
- +
+ \ No newline at end of file diff --git a/Mohem/src/app/my-team/hr-request/hr-request.component.scss b/Mohem/src/app/mowadhafi/hr-request/hr-request.component.scss similarity index 66% rename from Mohem/src/app/my-team/hr-request/hr-request.component.scss rename to Mohem/src/app/mowadhafi/hr-request/hr-request.component.scss index 961623fc..6147cc4e 100644 --- a/Mohem/src/app/my-team/hr-request/hr-request.component.scss +++ b/Mohem/src/app/mowadhafi/hr-request/hr-request.component.scss @@ -230,31 +230,29 @@ ion-input { font-family: 'WorkSans-Bold'; } - .radio-list{ - background: white; - margin-left: 18px; - /* margin-right: 10px; */ - margin-top: 12px; - } + // .radio-list{ + // background: white; + // margin-left: 18px; + // /* margin-right: 10px; */ + // margin-top: 12px; + // } .result-serviceType{ position: relative; background: white; - padding-bottom: 20px; border-radius: 20px; z-index: 1; - border-radius: 20px; + border-radius: 25px; border: 1px solid #ccc; - padding-top: 12px; - margin: 25px 22px 2px 22px; - padding-bottom: 241px; + margin: 15px; } .request-heading { span { display: block; - padding-top: 8px; - padding-left: 15px; + margin-bottom: 15px; + // padding-top: 8px; + // padding-left: 15px; /* font-weight: bold; */ font-size: 14px; font-family: 'WorkSans-Bold'; @@ -269,15 +267,29 @@ ion-input { padding-top: 6px !important; color: #636161; padding-bottom: 15px; + padding-right: 252px; } .filedDesc{ border-radius: 30px; border: 1px solid #d3d5d5 !important; - margin: 10px; - padding-left: 11px !important; + // margin: 10px; + padding-left: 20px !important; + padding-top: 6px !important; + color: #636161; + --padding-bottom: 90px; + font-size: 13px; + text-align: start; + } + .filedDesc-ar{ + border-radius: 30px; + border: 1px solid #d3d5d5 !important; + // margin: 10px; + padding-right: 20px !important; padding-top: 6px !important; color: #636161; - padding-bottom: 110px; + --padding-bottom: 90px; + font-size: 13px; + text-align: start; } .labelDesc{ @@ -299,30 +311,120 @@ ion-input { color: black; } - .cancelRequest{ - padding: 10px 0px 10px 10px; - ion-button{ - border-radius: 7px; - padding: 12px 25px 12px 25px; - background: #d00a0a; - --background: transparent; - --box-shadow: none !important; - height: auto; - min-height: inherit; - font-size: 16px; - font-weight: bold; - } - } - .submitRequest{ - padding: 10px 10px 10px 1px; - ion-button{ - border-radius: 7px; - padding: 12px 25px 12px 25px; + + // .cancelRequest{ + // padding: 10px 7px 10px 0px; + // ion-button{ + // border-radius: 7px; + // padding: 12px 30px 12px 30px; + // background: #d00a0a; + // --background: transparent; + // --box-shadow: none !important; + // height: auto; + // min-height: inherit; + // font-size: 16px; + // font-weight: bold; + // margin-top: -5px; + // }} + // .submitRequest{ + // padding: 10px 7px 10px 0px; + // ion-button{ + // border-radius: 7px; + // padding: 12px 30px 12px 30px; + // background: #19a163; + // --background: transparent; + // --box-shadow: none !important; + // height: auto; + // min-height: inherit; + // font-size: 16px; + // font-weight: bold; + // margin-top: -5px; + // }} + + +.gridDiv{ + width: 100%; + height: 40px; + margin-top: 18px; + font-size: 14px; +} + +.gridCancelBtn{ + min-width: auto; + // margin: 0px; + padding: 10px; + border: 1px solid var(--cusgray); + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + width: 45%; + height: 100%; + border-radius: 8px; + background: #d00a0a; + color: white; + margin-left: 15px; + margin-right: 5px; + font-family: 'WorkSans-bold'; +} + +.gridSubmitBtn{ + min-width: auto; + // margin: 0px; + padding: 10px; + border: 1px solid var(--cusgray); + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + width: 45%; + height: 100%; + border-radius: 8px; background: #19a163; - --background: transparent; - --box-shadow: none !important; - height: auto; - min-height: inherit; - font-size: 16px; - font-weight: bold; - }} \ No newline at end of file + color: white; + // margin-left: 15px; + // margin-right: 5px; + font-family: 'WorkSans-bold';} + + + .filed-container{ + margin-right: -17px; + margin-left: -25px; + } + + .labels{ + display: block; + margin-top: 15px; + padding-top: 8px; + padding-left: 15px; + font-size: 14px; + font-family: 'WorkSans-Bold'; + } + + .CreateBtn{ + --background: var(--newgreen) !important; + background: var(--newgreen) !important; + white-space: normal; + color: var(--light); + text-transform: capitalize; + min-height: 1.0cm; + --border-radius: 7px !important; + border-radius: 7px !important; + --min-height: 1.6cm !important; + width: 315px; + } + .footer{ + padding: 15px 0px 0px 0px; + background-color: var(--light) !important; + border: 0px !important; + box-shadow: none !important; + -webkit-box-shadow: none; + } + .Btn{ + margin: auto; text-align: center; display: block; + } + .footer2{ + padding: 15px 0px 0px 24px; + background-color: var(--light) !important; + border: 0px !important; + box-shadow: none !important; + -webkit-box-shadow: none; + } \ No newline at end of file diff --git a/Mohem/src/app/my-team/hr-request/hr-request.component.spec.ts b/Mohem/src/app/mowadhafi/hr-request/hr-request.component.spec.ts similarity index 94% rename from Mohem/src/app/my-team/hr-request/hr-request.component.spec.ts rename to Mohem/src/app/mowadhafi/hr-request/hr-request.component.spec.ts index 0b5ad557..c5507cea 100644 --- a/Mohem/src/app/my-team/hr-request/hr-request.component.spec.ts +++ b/Mohem/src/app/mowadhafi/hr-request/hr-request.component.spec.ts @@ -3,7 +3,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { HRRequestComponent } from './hr-request.component'; -describe('HRRequestComponent', () => { +describe('HrRequestComponent', () => { let component: HRRequestComponent; let fixture: ComponentFixture; diff --git a/Mohem/src/app/my-team/hr-request/hr-request.component.ts b/Mohem/src/app/mowadhafi/hr-request/hr-request.component.ts similarity index 57% rename from Mohem/src/app/my-team/hr-request/hr-request.component.ts rename to Mohem/src/app/mowadhafi/hr-request/hr-request.component.ts index 64913439..2ed8bda9 100644 --- a/Mohem/src/app/my-team/hr-request/hr-request.component.ts +++ b/Mohem/src/app/mowadhafi/hr-request/hr-request.component.ts @@ -5,7 +5,7 @@ import { TranslatorService } from 'src/app/hmg-common/services/translator/transl import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user'; import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service'; -import { MyTeamService } from '../service/my-team.service'; +import { MowadhafiService } from '../mowadhafi.service'; import { Location } from '@angular/common'; import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response'; import { LoginModel } from 'src/app/authentication/models/LoginModel'; @@ -36,6 +36,7 @@ export class HRRequestComponent implements OnInit { public searchKeySelect = 'Complaints'; myColor: string = 'secondary'; public showRequestDetails = false; + public proID= "CS" public direction: string; @@ -45,16 +46,22 @@ export class HRRequestComponent implements OnInit { public authService: AuthenticationService, public sharedData: SharedDataService, public events: Events, - public myTeamService: MyTeamService, + public MowadhafiService: MowadhafiService, private location: Location, private menu: MenuController, ) { - this.direction = TranslatorService.getCurrentDirection(); + this.direction = TranslatorService.getCurrentLanguageName(); } ngOnInit() { this.getUserInformation(); + this.getTicketTypes(); + this.getProject(); + this.getProjectDepartments(); + this.getDepartmentSections(); + this.getSectionTopics(); + } @@ -65,13 +72,13 @@ export class HRRequestComponent implements OnInit { getUserInformation(){ const request = { - P_SELECTED_EMPLOYEE_NUMBER:"121816", + // P_SELECTED_EMPLOYEE_NUMBER:"121816", P_SELECTED_RESP_ID:-999, P_PAGE_NUM:1, P_PAGE_LIMIT:1 }; - this.myTeamService.getUserInfo(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=> + this.MowadhafiService.getUserInfo(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=> { this.handleUserInfoResult(result); @@ -96,17 +103,91 @@ export class HRRequestComponent implements OnInit { // console.log("total no "+this.EmpTotal) } + getTicketTypes(){ + const request = { + // TokenID:"xxx", + // EmployeeNumber:"191817" + + }; + this.MowadhafiService.getTicketTypes(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=> + { + this.handlegetTicketTypesResult(result); + + }) } + handlegetTicketTypesResult(result){ + + } + + + getProject(){ + const request = { + // TokenID:"xxx", + // EmployeeNumber:"191817", + ItgProjectCode:"CS" + + }; + this.MowadhafiService.getProject(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=> + { + this.handlegetProjectResult(result); + + }) } + handlegetProjectResult(result){ + + } + + + getProjectDepartments(){ + const request = { + // TokenID:"xxx", + // EmployeeNumber:"191817", + ItgProjectId:11, + + + }; + this.MowadhafiService.getProjectDepartments(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=> + { + this.handlegetProjectDepartmentsResult(result); + + }) } + handlegetProjectDepartmentsResult(result){ + + } + + getDepartmentSections(){ + const request = { + // TokenID:"xxx", + // EmployeeNumber:"191817", + ItgProjectDepartmentId:1 + + }; + this.MowadhafiService.getDepartmentSections(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=> + { + this.handlegetDepartmentSectionsResult(result); + + }) } + handlegetDepartmentSectionsResult(result){ + + } + + getSectionTopics(){ + const request = { + // TokenID:"xxx", + // EmployeeNumber:"191817", + ItgDepartmentSectionId:1 + + }; + this.MowadhafiService.getSectionTopics(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=> + { + this.handlegetSectionTopicsResult(result); + + }) } + handlegetSectionTopicsResult(result){ + + } - - - // public sendActivationCode() { - - // } - // VerifyCode(){ - // } createRequest(){ if(this.showRequestDetails){ this.showRequestDetails = false diff --git a/Mohem/src/app/mowadhafi/mowadhafi.module.ts b/Mohem/src/app/mowadhafi/mowadhafi.module.ts new file mode 100644 index 00000000..f5823cf8 --- /dev/null +++ b/Mohem/src/app/mowadhafi/mowadhafi.module.ts @@ -0,0 +1,46 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; +import { Routes, RouterModule } from '@angular/router'; + +import { IonicModule } from '@ionic/angular'; + +import { MowadhafiPage } from './mowadhafi.page'; +import { HmgCommonModule } from '../hmg-common/hmg-common.module'; +import {MyRequestComponent} from './my-request/my-request.component'; +import {HRRequestComponent} from './hr-request/hr-request.component'; +import {RequestDetailsComponent} from'./request-details/request-details.component'; + +const routes: Routes = [ + { + path: '', + component: MowadhafiPage, + children:[{ + path: 'my-request', + component: MyRequestComponent + }, + { + path: 'hr-request', + component: HRRequestComponent + }, + { + path: 'request-details', + component: RequestDetailsComponent + } + + + ] + } +]; + +@NgModule({ + imports: [ + HmgCommonModule, + CommonModule, + FormsModule, + IonicModule, + RouterModule.forChild(routes) + ], + declarations: [MowadhafiPage,MyRequestComponent,HRRequestComponent,RequestDetailsComponent] +}) +export class MowadhafiPageModule {} diff --git a/Mohem/src/app/mowadhafi/mowadhafi.page.html b/Mohem/src/app/mowadhafi/mowadhafi.page.html new file mode 100644 index 00000000..f5a9c2de --- /dev/null +++ b/Mohem/src/app/mowadhafi/mowadhafi.page.html @@ -0,0 +1,10 @@ + + + + + diff --git a/Mohem/src/app/mowadhafi/mowadhafi.page.scss b/Mohem/src/app/mowadhafi/mowadhafi.page.scss new file mode 100644 index 00000000..e69de29b diff --git a/Mohem/src/app/mowadhafi/mowadhafi.page.spec.ts b/Mohem/src/app/mowadhafi/mowadhafi.page.spec.ts new file mode 100644 index 00000000..0cbe6701 --- /dev/null +++ b/Mohem/src/app/mowadhafi/mowadhafi.page.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { MowadhafiPage } from './mowadhafi.page'; + +describe('MowadhafiPage', () => { + let component: MowadhafiPage; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ MowadhafiPage ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(MowadhafiPage); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/mowadhafi/mowadhafi.page.ts b/Mohem/src/app/mowadhafi/mowadhafi.page.ts new file mode 100644 index 00000000..f1bfcc21 --- /dev/null +++ b/Mohem/src/app/mowadhafi/mowadhafi.page.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-mowadhafi', + templateUrl: './mowadhafi.page.html', + styleUrls: ['./mowadhafi.page.scss'], +}) +export class MowadhafiPage implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/Mohem/src/app/mowadhafi/mowadhafi.service.spec.ts b/Mohem/src/app/mowadhafi/mowadhafi.service.spec.ts new file mode 100644 index 00000000..11f58d27 --- /dev/null +++ b/Mohem/src/app/mowadhafi/mowadhafi.service.spec.ts @@ -0,0 +1,12 @@ +import { TestBed } from '@angular/core/testing'; + +import { MowadhafiService } from './mowadhafi.service'; + +describe('MowadhafiService', () => { + beforeEach(() => TestBed.configureTestingModule({})); + + it('should be created', () => { + const service: MowadhafiService = TestBed.get(MowadhafiService); + expect(service).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/mowadhafi/mowadhafi.service.ts b/Mohem/src/app/mowadhafi/mowadhafi.service.ts new file mode 100644 index 00000000..bfa4eba3 --- /dev/null +++ b/Mohem/src/app/mowadhafi/mowadhafi.service.ts @@ -0,0 +1,92 @@ +import { Injectable } from '@angular/core'; +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' +}) +export class MowadhafiService { + public static EMPLOYEE_SHARED_DATA = 'employee'; + public static getMyTeam = 'Services/ERP.svc/REST/GET_EMPLOYEE_SUBORDINATES'; + public static getSuborinateStatus = 'Services/ERP.svc/REST/GET_SUBORDINATES_ATTD_STATUS'; + public static getUserInfo ='Services/ERP.svc/REST/Get_UserInformation'; + public static getTicketTypes ='Services/COCWS.svc/REST/Mohemm_ITG_GetTicketTypes'; + public static getProject ='Services/COCWS.svc/REST/Mohemm_ITG_GetProjects'; + public static getProjectDepartments ='Services/COCWS.svc/REST/Mohemm_ITG_GetProjectDepartments'; + public static getDepartmentSections ='Services/COCWS.svc/REST/Mohemm_ITG_GetDepartmentSections'; + public static getSectionTopics ='Services/COCWS.svc/REST/Mohemm_ITG_GetSectionTopics'; + public static getTicketsByEmployee ='Services/COCWS.svc/REST/Mohemm_ITG_GetTicketsByEmployee'; + public static getTicketStatisticsByEmp ='Services/COCWS.svc/REST/Mohemm_ITG_GetTicketStatisticsByEmployee'; + public static getTicketTransaction ='Services/COCWS.svc/REST/Mohemm_ITG_GetTicketTransaction'; + public static getTicketDetails =' Services/COCWS.svc/REST/Mohemm_ITG_GetTicketDetails'; + + constructor( + public con: ConnectorService, + private authService: AuthenticationService + ) { } + public getEmployeeSubordinates(absence: any, onError?: any, errorLabel?: string){ + const request = absence; + this.authService.authenticateRequest(request); + return this.con.post(MowadhafiService.getMyTeam, request, onError, errorLabel); + } + + public getSuborinatesAttStatus(absence: any, onError?: any, errorLabel?: string){ + const request = absence; + this.authService.authenticateRequest(request); + return this.con.post(MowadhafiService.getSuborinateStatus, request, onError, errorLabel); + } + + public getUserInfo(absence: any, onError?: any, errorLabel?: string){ + const request = absence; + this.authService.authenticateRequest(request); + return this.con.post(MowadhafiService.getUserInfo, request, onError, errorLabel); + } + public getTicketTypes(absence: any, onError?: any, errorLabel?: string){ + const request = absence; + this.authService.authenticateRequest(request); + return this.con.post(MowadhafiService.getTicketTypes, request, onError, errorLabel); + } + public getProject(absence: any, onError?: any, errorLabel?: string){ + const request = absence; + this.authService.authenticateRequest(request); + return this.con.post(MowadhafiService.getProject, request, onError, errorLabel); + } + public getProjectDepartments(absence: any, onError?: any, errorLabel?: string){ + const request = absence; + this.authService.authenticateRequest(request); + return this.con.post(MowadhafiService.getProjectDepartments, request, onError, errorLabel); + } + public getDepartmentSections(absence: any, onError?: any, errorLabel?: string){ + const request = absence; + this.authService.authenticateRequest(request); + return this.con.post(MowadhafiService.getDepartmentSections, request, onError, errorLabel); + } + public getSectionTopics(absence: any, onError?: any, errorLabel?: string){ + const request = absence; + this.authService.authenticateRequest(request); + return this.con.post(MowadhafiService.getSectionTopics, request, onError, errorLabel); + } + public getTicketsByEmployee(absence: any, onError?: any, errorLabel?: string){ + const request = absence; + this.authService.authenticateRequest(request); + return this.con.post(MowadhafiService.getTicketsByEmployee, request, onError, errorLabel); + } + + public getTicketStatisticsByEmp(absence: any, onError?: any, errorLabel?: string){ + const request = absence; + this.authService.authenticateRequest(request); + return this.con.post(MowadhafiService.getTicketStatisticsByEmp, request, onError, errorLabel); + } + + public getTicketTransaction(absence: any, onError?: any, errorLabel?: string){ + const request = absence; + this.authService.authenticateRequest(request); + return this.con.post(MowadhafiService.getTicketTransaction, request, onError, errorLabel); + } + + public getTicketDetails(absence: any, onError?: any, errorLabel?: string){ + const request = absence; + this.authService.authenticateRequest(request); + return this.con.post(MowadhafiService.getTicketDetails, request, onError, errorLabel); + } +} diff --git a/Mohem/src/app/mowadhafi/my-request/my-request.component.html b/Mohem/src/app/mowadhafi/my-request/my-request.component.html new file mode 100644 index 00000000..b551b619 --- /dev/null +++ b/Mohem/src/app/mowadhafi/my-request/my-request.component.html @@ -0,0 +1,34 @@ + + + + + + + + {{ts.trPK('userProfile','MyHR-request')}} + + + + + +
+ + + + Complaints + {{ts.trPK('userProfile','postedDate')}} May2,2021 + + There is some Complaints + Pending + + +
+
+ +
+ {{ts.trPK('userProfile','createHR-Request')}} +
+
+ diff --git a/Mohem/src/app/mowadhafi/my-request/my-request.component.scss b/Mohem/src/app/mowadhafi/my-request/my-request.component.scss new file mode 100644 index 00000000..78a526c9 --- /dev/null +++ b/Mohem/src/app/mowadhafi/my-request/my-request.component.scss @@ -0,0 +1,63 @@ + + + + .empty-en{ + color: black; + text-align: center; + font-size: 15px; + font-family: WorkSans-Bold; + margin: 50px 0px 0px 100px; + } + .empty-ar{ + color: black; + text-align: center; + font-size: 15px; + font-family: WorkSans-Bold; + margin: 50px 100px 0px 0px; + } + + .result-container{ + position: relative; + background: white; + /* padding-bottom: 3px; */ + border-radius: 20px; + z-index: 1; + margin: 15px; + border-radius: 10px; + border: 1px solid #ccc; + } + .text{ + font-size: 15px; + margin-top: -9px; + font-family: 'WorkSans-bold'; + } + .date{ + margin-top: -9px; + margin-right: -49px; + color: gray; + font-size: 12px; + } + + + .CreateBtn{ + --background: var(--newgreen) !important; + background: var(--newgreen) !important; + white-space: normal; + color: var(--light); + text-transform: capitalize; + min-height: 1.0cm; + --border-radius: 7px !important; + border-radius: 7px !important; + --min-height: 1.6cm !important; + width: 315px; + } + .footer{ + padding: 15px 0px; + background-color: var(--light) !important; + border: 0px !important; + box-shadow: none !important; + -webkit-box-shadow: none; + } + .Btn{ + margin: auto; text-align: center; display: block; + } \ No newline at end of file diff --git a/Mohem/src/app/my-team/my-request/my-request.component.spec.ts b/Mohem/src/app/mowadhafi/my-request/my-request.component.spec.ts similarity index 100% rename from Mohem/src/app/my-team/my-request/my-request.component.spec.ts rename to Mohem/src/app/mowadhafi/my-request/my-request.component.spec.ts diff --git a/Mohem/src/app/my-team/my-request/my-request.component.ts b/Mohem/src/app/mowadhafi/my-request/my-request.component.ts similarity index 67% rename from Mohem/src/app/my-team/my-request/my-request.component.ts rename to Mohem/src/app/mowadhafi/my-request/my-request.component.ts index 9213d2d4..d1b82775 100644 --- a/Mohem/src/app/my-team/my-request/my-request.component.ts +++ b/Mohem/src/app/mowadhafi/my-request/my-request.component.ts @@ -5,7 +5,7 @@ import { TranslatorService } from 'src/app/hmg-common/services/translator/transl import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user'; import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service'; -import { MyTeamService } from '../service/my-team.service'; +import { MowadhafiService } from '../mowadhafi.service'; import { Location } from '@angular/common'; @Component({ @@ -23,7 +23,7 @@ public direction : String; public authService: AuthenticationService, public sharedData: SharedDataService, public events: Events, - public myTeamService: MyTeamService, + public MowadhafiService: MowadhafiService, private location: Location, private menu: MenuController, @@ -31,7 +31,9 @@ public direction : String; this.direction = TranslatorService.getCurrentLanguageName(); } - ngOnInit() {} + ngOnInit() { + this.getTicketsByEmployee(); + } goback() { this.location.back(); @@ -43,4 +45,27 @@ public direction : String; this.menu.toggle(); } +public openRequestDetailsPage() { + this.cs.openRequestDetailsPage(); + this.menu.toggle(); +} + + +getTicketsByEmployee(){ + const request = { + // TokenID:"xxx", + // EmployeeNumber:"191817", + ItgPageSize:10, + ItgPageNo:1 + + }; + this.MowadhafiService.getTicketsByEmployee(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=> + { + this.handlegetTicketsByEmployeeResult(result); + + }) } + handlegetTicketsByEmployeeResult(result){ + + } + } diff --git a/Mohem/src/app/mowadhafi/request-details/request-details.component.html b/Mohem/src/app/mowadhafi/request-details/request-details.component.html new file mode 100644 index 00000000..603b60a5 --- /dev/null +++ b/Mohem/src/app/mowadhafi/request-details/request-details.component.html @@ -0,0 +1,66 @@ + + + + + + + + + + {{ts.trPK('userProfile','MyHR-request')}} + + + + + +
+ + + + Pending + {{ts.trPK('userProfile','postedDate')}} May2,2021 + + +

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

+

453388

+
+ +

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

+

Employee

+
+ +

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

+

Change Tiket

+
+ +

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

+

descriptions

+
+
+
+
+ +
+ + +
+
+
+ + Action By +
+

descriptions

+ May 16,2021 +
+
+
+
+
+
+
+ +
+ + diff --git a/Mohem/src/app/mowadhafi/request-details/request-details.component.scss b/Mohem/src/app/mowadhafi/request-details/request-details.component.scss new file mode 100644 index 00000000..06ad71a7 --- /dev/null +++ b/Mohem/src/app/mowadhafi/request-details/request-details.component.scss @@ -0,0 +1,174 @@ + + + + .sendCodeBtn{ + --background: #269DB8; + color: white; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 12px; + margin-left: 23px !important; + margin-top: 15px !important; + margin-bottom: 20px !important; + /* border-radius: 4px; */ + height: 26px; + /* padding: 6px 24px; */ + font-size: 15px; + width: 322px; + } + + .empty-en{ + color: black; + text-align: center; + font-size: 15px; + font-family: WorkSans-Bold; + margin: 50px 0px 0px 100px; + } + .empty-ar{ + color: black; + text-align: center; + font-size: 15px; + font-family: WorkSans-Bold; + margin: 50px 100px 0px 0px; + } + + .result-container{ + position: relative; + background: white; + /* padding-bottom: 3px; */ + border-radius: 20px; + z-index: 1; + margin: 15px; + border-radius: 10px; + border: 1px solid #ccc; + } + + .result-containerList{ + position: relative; + background: white; + /* padding-bottom: 3px; */ + border-radius: 20px; + z-index: 1; + margin: 15px; + border-radius: 10px; + border: 1px solid #ccc; + } + .text{ + font-size: 15px; + // margin-top: -9px; + font-family: 'WorkSans-bold'; + } + .date{ + // margin-top: -9px; + margin-right: -49px; + color: gray; + font-size: 12px; + } + + .labels{ + font-size: 13px; + margin-bottom: 0px; + margin-top: -10px; + color: gray; + } + + .request-list-container { + position: relative; + padding-left: 37px; + clear: both; + min-height: 200px; + margin-bottom: 80px; + padding-top: 15px; + } + .request-list-container:before{ + content: ""; + position: absolute; + height: 100%; + width: 4px; + left: 7px; + top: 15px; + background-color: #f5f4f4; + } + .request-list-container-ar { + position: relative; + padding-left: 60px; + clear: both; + min-height: 200px; + margin-bottom: 80px; + padding-top: 15px; + } + .request-list-container-ar:before{ + content: ""; + position: absolute; + height: 100%; + width: 4px; + left: 30px; + top: 15px; + right: 6px; + background-color: #dddddd; + } + + .text-span { + position: relative; + display: block; + // margin-bottom: 10px; + font-family: 'WorkSans-bold'; + } + .text-span:before{ + content: ""; + position: absolute; + left: -35px; + border-radius: 50%; + width: 15px; + height: 15px; + background-color: #269db8; + top: 1px; + } + + .text-span-ar{ + position: relative; + display: block; + // margin-bottom: 10px; + /* margin-top: 10px; */ + margin-right: 30px; + } + .text-span-ar:before{ + content: ""; + position: absolute; + right: -29px; + border-radius: 50%; + width: 15px; + height: 15px; + background-color: #269db8; + top: 1px; + } + + .action-data{ + background-color: white; + padding: 1px; + border-radius: 20px; + font-family: WorkSans-Regular; + // padding-left: 15px; + margin-right: 20px; + margin-bottom: 15px; + p{ + font-size: 14px; + } + } + + .date-span{ + font-size: 13px; + margin-bottom: 0px; + margin-top: -10px; + color: gray; + margin-left: 178px; + + } + .date-span-ar{ + font-size: 13px; + margin-bottom: 0px; + margin-top: -10px; + color: gray; + margin-right: 155px; + } \ No newline at end of file diff --git a/Mohem/src/app/mowadhafi/request-details/request-details.component.spec.ts b/Mohem/src/app/mowadhafi/request-details/request-details.component.spec.ts new file mode 100644 index 00000000..8d0a3756 --- /dev/null +++ b/Mohem/src/app/mowadhafi/request-details/request-details.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RequestDetailsComponent } from './request-details.component'; + +describe('RequestDetailsComponent', () => { + let component: RequestDetailsComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ RequestDetailsComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(RequestDetailsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/mowadhafi/request-details/request-details.component.ts b/Mohem/src/app/mowadhafi/request-details/request-details.component.ts new file mode 100644 index 00000000..8895bdbd --- /dev/null +++ b/Mohem/src/app/mowadhafi/request-details/request-details.component.ts @@ -0,0 +1,75 @@ +import { Component, OnInit } from '@angular/core'; +import { Platform, Events, MenuController } from '@ionic/angular'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; +import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user'; +import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service'; +import { MowadhafiService } from '../mowadhafi.service'; +import { Location } from '@angular/common'; + +@Component({ + selector: 'app-request-details', + templateUrl: './request-details.component.html', + styleUrls: ['./request-details.component.scss'], +}) +export class RequestDetailsComponent implements OnInit { + public direction : String; + + constructor( + public ts: TranslatorService, + public cs: CommonService, + public authService: AuthenticationService, + public sharedData: SharedDataService, + public events: Events, + public MowadhafiService: MowadhafiService, + private location: Location, + private menu: MenuController, + + ) { + this.direction = TranslatorService.getCurrentLanguageName(); + } + + ngOnInit() { + this.getTicketTransaction(); + this.getTicketDetails() + } + + goback() { + this.location.back(); + + } + + + + getTicketTransaction(){ + const request = { + // EmployeeNumber:"191817", + ItgTicketId:"5a10de61-c4db-4c77-e464-08d8a1beaaac", + + }; + this.MowadhafiService.getTicketTransaction(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=> + { + this.handlegetTicketTransactionResult(result); + + }) } + handlegetTicketTransactionResult(result){ + + } + + getTicketDetails(){ + const request = { + // EmployeeNumber:"191817", + ItgTicketId:"5a10de61-c4db-4c77-e464-08d8a1beaaac", + + }; + this.MowadhafiService.getTicketDetails(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=> + { + this.handlegetTicketDetailsResult(result); + + }) } + handlegetTicketDetailsResult(result){ + + } + +} diff --git a/Mohem/src/app/my-team/details/details.component.html b/Mohem/src/app/my-team/details/details.component.html index 6a478493..a7a6a422 100644 --- a/Mohem/src/app/my-team/details/details.component.html +++ b/Mohem/src/app/my-team/details/details.component.html @@ -17,7 +17,7 @@
- Team Member Image + Team Member Image
diff --git a/Mohem/src/app/my-team/details/details.component.scss b/Mohem/src/app/my-team/details/details.component.scss index a4c35a1d..546fb604 100644 --- a/Mohem/src/app/my-team/details/details.component.scss +++ b/Mohem/src/app/my-team/details/details.component.scss @@ -232,7 +232,17 @@ ion-title{ padding: 15px; border-bottom: 1px solid #ccc; } - + .img{ + width: 100px; + height: 100px; + display: inline-flex; + overflow: hidden; + border-radius: 78% !important; + position: relative; + /* top: 34px; */ + background: transparent; + margin-left: -3px; + } ///////////////////////// Team Members css //////////////////////@extend .filters-row { diff --git a/Mohem/src/app/my-team/my-request/my-request.component.html b/Mohem/src/app/my-team/my-request/my-request.component.html deleted file mode 100644 index ff0ade4d..00000000 --- a/Mohem/src/app/my-team/my-request/my-request.component.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - {{ts.trPK('userProfile','MyHR-request')}} - - - - -
- {{ts.trPK('general','empty')}} -
-
- - -
- {{ts.trPK('userProfile','createHR-Request')}} -
-
diff --git a/Mohem/src/app/my-team/my-request/my-request.component.scss b/Mohem/src/app/my-team/my-request/my-request.component.scss deleted file mode 100644 index d94d7212..00000000 --- a/Mohem/src/app/my-team/my-request/my-request.component.scss +++ /dev/null @@ -1,33 +0,0 @@ - - - .sendCodeBtn{ - --background: #269DB8; - color: white; - text-align: center; - text-decoration: none; - display: inline-block; - font-size: 12px; - margin-left: 23px !important; - margin-top: 15px !important; - margin-bottom: 20px !important; - /* border-radius: 4px; */ - height: 26px; - /* padding: 6px 24px; */ - font-size: 15px; - width: 322px; - } - - .empty-en{ - color: black; - text-align: center; - font-size: 15px; - font-family: WorkSans-Bold; - margin: 50px 0px 0px 100px; - } - .empty-ar{ - color: black; - text-align: center; - font-size: 15px; - font-family: WorkSans-Bold; - margin: 50px 100px 0px 0px; - } \ No newline at end of file diff --git a/Mohem/src/app/my-team/my-team.module.ts b/Mohem/src/app/my-team/my-team.module.ts index 54b8a875..dec9d371 100644 --- a/Mohem/src/app/my-team/my-team.module.ts +++ b/Mohem/src/app/my-team/my-team.module.ts @@ -8,8 +8,7 @@ import { IonicModule } from '@ionic/angular'; import { MyTeamPage } from './my-team.page'; import { HmgCommonModule } from '../hmg-common/hmg-common.module'; -import {MyRequestComponent} from './my-request/my-request.component'; -import {HRRequestComponent} from './/hr-request/hr-request.component'; +import { from } from 'rxjs'; const routes: Routes = [ @@ -28,14 +27,7 @@ const routes: Routes = [ path: 'details-2', component: DetailsComponent }, - { - path: 'my-request', - component: MyRequestComponent - }, - { - path: 'hr-request', - component: HRRequestComponent - } + ] } @@ -49,6 +41,7 @@ const routes: Routes = [ IonicModule, RouterModule.forChild(routes) ], - declarations: [MyTeamPage,HomeComponent,DetailsComponent,MyRequestComponent,HRRequestComponent] + declarations: [MyTeamPage,HomeComponent,DetailsComponent, + ] }) export class MyTeamPageModule {} diff --git a/Mohem/src/app/my-team/service/my-team.service.ts b/Mohem/src/app/my-team/service/my-team.service.ts index 6adcf6bf..31354d76 100644 --- a/Mohem/src/app/my-team/service/my-team.service.ts +++ b/Mohem/src/app/my-team/service/my-team.service.ts @@ -8,7 +8,8 @@ export class MyTeamService { public static EMPLOYEE_SHARED_DATA = 'employee'; public static getMyTeam = 'Services/ERP.svc/REST/GET_EMPLOYEE_SUBORDINATES'; public static getSuborinateStatus = 'Services/ERP.svc/REST/GET_SUBORDINATES_ATTD_STATUS'; - public static getUserInfo ='Services/ERP.svc/REST/Get_UserInformation'; + + constructor( public con: ConnectorService, private authService: AuthenticationService @@ -25,11 +26,7 @@ export class MyTeamService { return this.con.post(MyTeamService.getSuborinateStatus, request, onError, errorLabel); } - public getUserInfo(absence: any, onError?: any, errorLabel?: string){ - const request = absence; - this.authService.authenticateRequest(request); - return this.con.post(MyTeamService.getUserInfo, request, onError, errorLabel); - } + } diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json index 66beb226..e1bf2045 100644 --- a/Mohem/src/assets/localization/i18n.json +++ b/Mohem/src/assets/localization/i18n.json @@ -38,8 +38,8 @@ "ar": "هل أنت متأكد من إغلاق الحساب" }, "forgot-id": { - "en": "Forgot Patient ID", - "ar": "نسيت رقم الملف" + "en": "Forgot Employee ID", + "ar": "نسيت رقم الموظف" }, "forgot-password": { "en": "Forgot Password", @@ -62,12 +62,12 @@ "ar": "كشف بالراتب" }, "forgot-your-id": { - "en": "Forgot Your Patient ID", - "ar": "هل نسيت رقم ملف المريض" + "en": "Forgot Your Employee ID", + "ar": "هل نسيت رقمك الوظيفي" }, "forgot-desc": { - "en": "Enter your mobile number to receive your patient file number via SMS", - "ar": "أدخل رقم جوالك لاستلام رقم الملف الخاص بك عن طريق الرسائل النصية" + "en": "Enter your mobile number to receive your ID number via SMS", + "ar": "أدخل رقم جوالك لاستلام الرقم الوظيفي الخاص بك عن طريق الرسائل النصية" }, "enter-email": { "en": "Please you need to enter your email", @@ -98,8 +98,8 @@ "ar": "دخول / تسجيل" }, "id-or-file": { - "en": "ID or File No", - "ar": "هوية أو رقم الملف" + "en": "Employee ID ", + "ar": "الرقم الوظيفي" }, "national-id-or-iqama": { "en": "National ID or Iqama", @@ -122,12 +122,12 @@ "ar": "الرجاء التحقق من تسجيل الدخول باستخدام أحد هذه الخيارات" }, "verify-with-fingerprint": { - "en": "Verify with fingerprint", - "ar": "تحقق باستخدام بصمة" + "en": "Verify with fingerprint", + "ar": "تحقق باستخدام بصمة الإصبع" }, "verify-with-faceid": { - "en": "Verify with face ID", - "ar": "تحقق باستخدام معرف الوجه" + "en": "Verify with face ID", + "ar": "تحقق باستخدام بصمة الوجه" }, "verify-with-sms": { "en": "Verify with SMS", @@ -142,12 +142,12 @@ "ar": ":آخر تسجيل دخول" }, "last-login-with": { - "en": "Last login using:", - "ar": "آخر تسجيل دخول مع" + "en": "Last login using:", + "ar": "آخر تسجيل دخول بإستخدام" }, "biometric-support": { - "en": "It seems that your phone is supporting biometric feature, do you want login with with biometric?", - "ar": "يبدو أن هاتفك يدعم ميزة البيومترية ، هل تريد تسجيل الدخول باستخدام البيومترية؟" + "en": "It seems that your phone is supporting biometric feature, do you want login with biometric?", + "ar": "يبدو أن هاتفك يدعم ميزة البصمة ، هل تريد تسجيل الدخول باستخدام البصمة؟" }, "verify-fingerprint": { "en": "To activate fingerprint login service, please verify by using one of the following options. ", @@ -654,8 +654,8 @@ "ar": "إستخدم الرقم التعريفي" }, "auth-please": { - "en": "Please Authenticated", - "ar": "عرف نفسك" + "en": "Please Authenticated", + "ar": "عرف نفسك" }, "dial-code": { "en": "Dial Code", @@ -715,7 +715,7 @@ }, "send-email-short": { "en": "Email", - "ar": "بريد" + "ar": "بريد إلكتروني" }, "hi": { "en": "HI", @@ -730,8 +730,8 @@ "ar": "تمت مزامنة البيانات بنجاح" }, "already-synced": { - "en": "Latest data already synced", - "ar": "أحدث البيانات المتزامنة بالفعل" + "en": "Latest data has already been synced", + "ar": "تمت مزامنة أحدث البيانات مسبقاً" }, "weekly": { "en": "Weekly", @@ -762,8 +762,8 @@ "ar": "الخطوات المغطاة" }, "hours-asleep": { - "en": "Time asleep in hours", - "ar": "الوقت نائم في ساعات" + "en": "Time asleep in hours", + "ar": "وقت النوم بالساعات" }, "bad": { "en": "Bad", @@ -898,8 +898,8 @@ "ar": "فشل التحقق ، يرجى زيارة أقرب مكتب استقبال في الفرع" }, "forget-wifi-connection-text": { - "en": "Invalid Wi-Fi configuration exists with 'HMG-MOHEMM', please forget the Wi-Fi from settings.", - "ar": "فشل الاتصال بشبكة 'HMG-MOHEMM' الرجاء اختيار نسيت الاتصال من اعدادت الشبكة" + "en": "Invalid Wi-Fi configuration exists with 'HMG-MOHEMM', please forget the network from settings.", + "ar": "الرجاء اختيار نسيان الشبكه من اعدادت الشبكة 'HMG-MOHEMM'فشل الاتصال بشبكة " }, "qr-text": { "en": "QR Code", @@ -931,7 +931,7 @@ }, "wifi-connect-message": { "en": "Connecting", - "ar": "توصيل" + "ar": "جاري الإتصال" }, "success-attendance": { "en": "Your attendance is marked successfully.", @@ -976,8 +976,8 @@ "ar": "طلبات قيد الانتظار" }, "missing-swipes": { - "en": "Missing Swipes", - "ar": "فقدان البصمة" + "en": "Missing Swipes", + "ar": "تسجيل بصمة حضور سابقة " }, "leave-balance": { "en": "Leave Balance", @@ -1042,8 +1042,8 @@ }, "work-list": { "open-analysis": { - "en": "Open Request Analysis", - "ar": "فتح تحليل الطلب" + "en": "Open Request Analysis", + "ar": "تحليل الطلبات المفتوحة" }, "total": { "en": "Total", @@ -1066,8 +1066,8 @@ "ar": "بحث متقدم" }, "No-data-available": { - "en": "No History Available", - "ar": "لا يوجد محفوظات متاحة" + "en": "No History Available", + "ar": "لايوجد سجل بيانات سابقة " } }, "userProfile": { @@ -1083,6 +1083,54 @@ "en": "Edit Profile", "ar": "تعديل المعلومات" }, + "ServiceType": { + "en": "Service Type", + "ar": "نوع الخدمة" + }, + "DeptName": { + "en": "Department Name", + "ar": "اسم القسم" + }, + "refrence": { + "en": "Tiket Reference", + "ar": "مرجع التذكره" + }, + "section": { + "en": "Section", + "ar": " القسم" + }, + "topic": { + "en": "Topic", + "ar": "العنوان" + }, + "postedDate": { + "en": "Posted on", + "ar": "نشر في" + }, + "RelatedSection": { + "en": "Related Section", + "ar": "قسم ذو صله" + }, + "RelatedTopic": { + "en": "Related Topic", + "ar": "عنوان ذو صله" + }, + "SupportingDocument": { + "en": "Supporting Document", + "ar": "ارفاق ملف" + }, + "Description": { + "en": "Description", + "ar": "الوصف" + }, + "MyHR-request": { + "en": "MY HR REQUEST", + "ar": "طلباتي" + }, + "createHR-Request": { + "en": "CREATE HR REQUEST", + "ar": "انشاء طلب" + }, "performance-evaluation": { "en": "Performance Evaluation", "ar": "تقييم الاداء" @@ -1137,7 +1185,7 @@ }, "payrol": { "en": "Payroll", - "ar": "المشروع" + "ar": "سجل الرواتب" }, "orgEmail": { "en": "Organization Email Address", @@ -1251,7 +1299,7 @@ "vacation-rule": { "vacationRule": { "en": "Vacation Rule", - "ar": "الإنابة بالإجازات" + "ar": "الإنابة بالإجازات" }, "apply-for-vacation-rule": { "en": "Apply for vacation Rule", @@ -1330,8 +1378,8 @@ "ar": "التالى" }, "notification-type": { - "en": "Notification Type", - "ar": "نوع إعلام" + "en": "Notification Type", + "ar": "نوع الإشعار" }, "notification-tip": { "en": "Indicate the notification format that will activate this rule", @@ -1427,7 +1475,7 @@ }, "confirmation": { "en": "Confirmation", - "ar": "البريد الإلكتروني" + "ar": "تأكيد" }, "rule-success": { "en": "Rule created successfully", @@ -1443,11 +1491,11 @@ }, "confirm-msg-success": { "en": "Are you sure, you want to Apply for Vacation Rule?", - "ar": " تريد التقديم على قواعد الاجازات ؟, هل انت متأكد" + "ar": " هل أنت متأكد من رغبتك في التقديم على قواعد الإجازات ؟" }, "update-msg-success": { "en": "Are you sure, you want to Update this Vacation Rule?", - "ar": "تريد تحديث قواعد الاجازات ؟, هل انت متأكد" + "ar": "هل أنت متأكد من رغبتك في تحديث قاعدة الإجازات هذه ؟" } }, "absenceList": { @@ -2326,23 +2374,23 @@ "ar": "رمز" }, "itemReq": { - "en": "Items Requsted", + "en": "Requsted Items", "ar": "العناصر المطلوبة" }, "approveMsg": { - "en": "

Are you sure to Approve this request ?

", + "en": "Requsted Items", "ar": "العناصر المطلوبة" }, "rejectMsg": { - "en": "

Are you sure to Reject this request ?

", + "en": "Requsted Items", "ar": "العناصر المطلوبة" }, "delMsg": { - "en": "

Are you sure to Delete this request ?

", + "en": "Requsted Items", "ar": "العناصر المطلوبة" }, "closeMsg": { - "en": "

Are you sure to Close this request ?

", + "en": "Requsted Items", "ar": "العناصر المطلوبة" }, "Supplier": { @@ -2869,7 +2917,7 @@ }, "shift-time": { "en": "Shift Time", - "ar": "وقت التناوب" + "ar": "وقت المناوبة " }, "shift-type": { "en": "Shift Type", From 3787a1856012dbefab1e7613568ceeed06fe3e26 Mon Sep 17 00:00:00 2001 From: enadhilal Date: Thu, 10 Jun 2021 10:12:34 +0300 Subject: [PATCH 9/9] swipe component between profile/home and profile/edit and change the design --- Mohem/src/app/app.component.ts | 2 +- Mohem/src/app/app.scss | 5 + .../edit-profile/edit-profile.component.html | 236 ++-- .../edit-profile/edit-profile.component.scss | 310 ++--- .../edit-profile/edit-profile.component.ts | 118 +- .../src/app/profile/home/home.component.html | 646 ++++++++-- .../src/app/profile/home/home.component.scss | 1111 +++++++++++++++-- Mohem/src/app/profile/home/home.component.ts | 177 ++- .../edit-detail-profile.component.html | 39 + .../edit-detail-profile.component.scss | 3 + .../edit-detail-profile.component.spec.ts | 27 + .../edit-detail-profile.component.ts | 30 + Mohem/src/app/profile/profile.module.ts | 5 +- Mohem/src/assets/localization/i18n.json | 106 +- Mohem/src/theme/styles.scss | 2 +- 15 files changed, 2169 insertions(+), 648 deletions(-) create mode 100644 Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.html create mode 100644 Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.scss create mode 100644 Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.spec.ts create mode 100644 Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.ts diff --git a/Mohem/src/app/app.component.ts b/Mohem/src/app/app.component.ts index c4c8a5cd..97d796fa 100644 --- a/Mohem/src/app/app.component.ts +++ b/Mohem/src/app/app.component.ts @@ -189,7 +189,7 @@ export class AppComponent implements OnInit { } public profile() { - this.cs.openEditProfile(); + this.cs.openProfile(); this.menu.toggle(); } diff --git a/Mohem/src/app/app.scss b/Mohem/src/app/app.scss index 2dd0d349..08bb1e93 100644 --- a/Mohem/src/app/app.scss +++ b/Mohem/src/app/app.scss @@ -30,4 +30,9 @@ } .start-badge{ right:16px; +} + +.my-custom-modal-css .modal-wrapper { + width: 90%; + height: 55%; } \ No newline at end of file diff --git a/Mohem/src/app/profile/edit-profile/edit-profile.component.html b/Mohem/src/app/profile/edit-profile/edit-profile.component.html index 32b4dd9d..86ee5a08 100644 --- a/Mohem/src/app/profile/edit-profile/edit-profile.component.html +++ b/Mohem/src/app/profile/edit-profile/edit-profile.component.html @@ -1,121 +1,153 @@ + [headerText]="'userProfile, title' | translate">
- - - -
- - +
- +
- +
-

{{User_name_Emp}}

-

{{User_Job_name}}

+

{{personalInfo.EMPLOYEE_NAME}}

-
- - -
- - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - -
+ +
+
- +
+
-
- -
-

{{ts.trPK('userProfile','Years of Services')}}

-
+ + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - {{ts.trPK('userProfile','edit-profile')}} - - - - - - - - - - - {{ts.trPK('userProfile','performance-evaluation')}} - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + +
\ No newline at end of file diff --git a/Mohem/src/app/profile/edit-profile/edit-profile.component.scss b/Mohem/src/app/profile/edit-profile/edit-profile.component.scss index 4d784a03..85728b60 100644 --- a/Mohem/src/app/profile/edit-profile/edit-profile.component.scss +++ b/Mohem/src/app/profile/edit-profile/edit-profile.component.scss @@ -1,216 +1,130 @@ +ion-col.colBold, ion-col.colBold > label{ + font-weight:bold; +} - -.list-ios { - // margin-left: 0; - // margin-right: 0; - // margin-top: 32px; - // margin-bottom: 32px; - // background: var(--ion-item-background,var(--ion-background-color,#fff)); - margin-left: 0; - margin-right: 0; - margin-top: -15px; - margin-bottom: 32px; - border: 1px solid #d8d8d8; - background: var(--ion-item-background, var(--ion-background-color, #fff)); - border-radius: 10px; - padding-top: 60px; +.colorBG{ +--background: #f0efef; +} +.header-div{ + text-transform: capitalize; + background: #269DB8; + display: block; + position: relative; + height: 160px; + margin-bottom: 60px; } -.header-toolbar-new{ - --background: #269DB8; +// .profileCont{ +// background-color: #d9d7d7 !important; + + +.menubutton { +background: #f0ecec; +min-height: 39px; +width: 35px !important; +height: 20px; +border-radius: 50%; } -.colorBG{ - --background: #f0efef; - } - .header-div{ - text-transform: capitalize; - background: #269DB8; - display: block; + +.changeIcon{ + /* background: #c1c1c1; */ + width: 21px; + /* height: 26px; */ + border-radius: 50% !important; position: relative; - height: 113px; - margin-bottom: 60px; - } + color: #7f8c8d; + height: 35px; + +} +.changeImgBtn{ + position: absolute; + top: 80%; + left: 65%; +} +.changeImgBtn-ar{ + position: absolute; + top: 80%; + left: 66%; +} .profileImg{ width: 160px; - height: 160px; - display: -webkit-inline-box; - display: inline-flex; - overflow: hidden; - /* background: transparent; */ - border-radius: 78% !important; - position: relative; - top: 34px; - // background: white; - background: transparent; - margin-left: -3px; + height: 160px; + display: -webkit-inline-box; + display: inline-flex; + overflow: hidden; + // background: transparent; + border-radius: 69% !important; + position: relative; + top: 34px; + // background: white; + background: transparent; +} +.Text { + margin: 0; + padding: 0; + text-align: center; + font-weight: bolder; + color: black; + font-size: 16px; + margin-top: 34px; + text-align: center; } -.proTitles { - margin: 0; - padding: 0; - font-size: 16px; - text-align: center; - font-weight: bolder; - color: white; - margin-top: -33px; - } - - .Text { - margin: 0; - padding: 0; - text-align: center; - font-weight: bolder; - color: black; - font-size: 16px; - margin-top: 34px; - margin-bottom: 10px; - text-align: center; - } - - - - ion-thumbnail.menu-thumb{ - width:20px; - height:20px; - // margin-top: 5px !important; - } - - .profile{ - color: black !important; - // font-weight: bolder !important; - - } - - .gridService-en{ - margin-top: 87px; - border-radius: 10px; - margin-bottom: -49px; - margin-left: 30px; - margin-right: 30px; - } - .gridService-ar{ - margin-top: 87px; - border-radius: 10px; - margin-bottom: -49px; - margin-left: 17px; - margin-right: 17px; - } - - .columns{ - // margin: 10px; - // background: #0B4775; - // border-radius: 27px; - // padding-left: 30px; - // padding-right: 6px; - // padding-top: 19px; - // padding-bottom: 26px; - } - .columns-ar{ - // margin: 10px; - // background: #0B4775; - // border-radius: 27px; - // padding-left: 7px; - // padding-right: 3px; - // padding-top: 19px; - // padding-bottom: 26px; - } - - .service{ - font-size: 28px; - // font-weight: bolder; - color: white; - letter-spacing: 1px; - font-weight: bold; - } - .services{ - - font-size: 12px; - color: white; - } - .service-ar{ - font-size: 28px; - color: white; - letter-spacing: 1px; - font-weight: bold; - margin-right: 26px; - } - .services-ar{ - font-size: 20px; - color: white; - margin-right: 25px; - } - - .list{ - margin-left: 14px; - margin-right: 14px; - border-radius: 10px; - // background: white; - border:#bebbbb !important; - padding: 2px; - } - .p{ - color: black !important; - font-size: medium; - text-align: center; - border-bottom: rgb(190, 187, 187) solid 1px; - } - .itemline{ - border-bottom: rgb(190, 187, 187) solid 1px; - } - .itemlins{ - border-bottom: rgb(190, 187, 187) solid 1px; - margin-bottom: 209px; +.line{ + + padding-top: 0px !important; + /* margin-bottom: 0px; */ + /* margin: 0px; */ + border-right: 1px #c5c2c2 solid !important; + line-height: 10px !important; +} +.proTitles { + margin: 0; + padding: 0; + font-size: 16px; + text-align: center; + font-weight: bolder; + color: white; + margin-top: -33px; +} + + +.profileGrid{ + border: #bebbbb solid 1px; + border-radius: 9px; + padding: 0px; + margin-top: 54px; + margin-left: 10px; + margin-right: 10px; + margin-bottom: 10px; + color: black; + // font-weight: bold; + background: white; - } - .empName { - margin: 0; - padding: 0; - text-align: center; - font-weight: bolder; - color: black; - font-size: 16px; - margin-top: 38px; - - } - .empJob{ - - margin: 0; - padding: 0; - text-align: center; - color: black; - font-size: 16px; - margin-top: 4px; - - } - .arrow{ - width: 20px; - height: 22px !important; - } - .arrow-ar{ - float: left; - font-size: 25px; - color: grey; - -webkit-transform: rotate(180deg); - transform: rotate(180deg); - } - - .verticalLine { - width:1%; - height:50px; - background:white; - margin-top: 100%; - // margin-left: 10%; } -.service-row-en{ - width: 79%; - margin: -12px 0px 0px 35px; + + + +.lebl{ + + color: black; + font-size: 14px !important; + font-weight: bold !important; + padding-top: 9px; + padding-left: 5px; + } -.service-row-ar{ - width: 95%; - margin: -12px 0px 35px 0px; +.rowBolds{ + color: black !important; + font-size: 14px !important; + /* padding: 6px !important; */ + padding-bottom: 9px; + padding-left: 5px; + padding-top: 4px; + } \ No newline at end of file diff --git a/Mohem/src/app/profile/edit-profile/edit-profile.component.ts b/Mohem/src/app/profile/edit-profile/edit-profile.component.ts index 16b4fe15..c59b712d 100644 --- a/Mohem/src/app/profile/edit-profile/edit-profile.component.ts +++ b/Mohem/src/app/profile/edit-profile/edit-profile.component.ts @@ -1,14 +1,11 @@ import { Component, OnInit } from '@angular/core'; -import { Platform, Events, MenuController } from '@ionic/angular'; import { CommonService } from 'src/app/hmg-common/services/common/common.service'; import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user'; -import { PerformanceAppraisalResponse } from 'src/app/hmg-common/services/dashbored/performance-appraisal.response'; -import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service'; -import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service'; +import { Events } from '@ionic/angular'; import { DomSanitizer } from '@angular/platform-browser'; -// import { DomSanitizer } from '@angular/platform-browser'; + @Component({ @@ -17,47 +14,35 @@ import { DomSanitizer } from '@angular/platform-browser'; styleUrls: ['./edit-profile.component.scss'], }) export class EditProfileComponent implements OnInit { - - - User_name_Emp: string = ''; - User_Job_name: string; - public direction: string; - private menu: MenuController; - setImage:any; - // imageSrc: any = "../assets/imgs/profile.png"; - user_image: any = '../assets/imgs/profile.png'; personalInfo: any; - appraisalArr :any =[]; - public performanceData: any=[]; - public static PERFORMANCE_DATA = 'perAppData'; - + setImage:any; + imageSrc: any = '../assets/imgs/profile.png'; + public direction: string; + // user_image: any = "../assets/imgs/profile.png"; constructor( public ts: TranslatorService, public cs: CommonService, public authService: AuthenticationService, - public DS :DashboredService, - public sharedData: SharedDataService, - public events: Events, + private events: Events, private sanitizer: DomSanitizer, - // private events: Events, - // private sanitizer: DomSanitizer, - ) - { - this.direction = TranslatorService.getCurrentDirection(); - this.events.subscribe('img-change', displayImg => { - console.log('app compont: '+displayImg); - this.user_image = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,'+displayImg); - - }); + ) { + this.direction = TranslatorService.getCurrentDirection(); + this.events.subscribe('img-change', displayImg => { + // alert("1 - profile home : "+displayImg); + //this.user_image = "data:image/png;base64"+displayImg; + this.setImage = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,'+displayImg); + this.imageSrc = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,'+displayImg); + + }); + } ngOnInit() { - this.getProfile(); + this.getProfile(); } - getProfile() { console.log('getProfile'); this.authService @@ -65,60 +50,27 @@ export class EditProfileComponent implements OnInit { .subscribe((user: AuthenticatedUser) => { if (user) { this.personalInfo = user; - this.User_name_Emp=this.personalInfo.EMPLOYEE_NAME; - this.User_Job_name=this.personalInfo.JOB_NAME; - if(this.cs.getUpdateImage().status){ - this.user_image =this.sanitizer.bypassSecurityTrustUrl('data:image/png;base64,'+this.cs.getUpdateImage().img); - }else{ - this.user_image = user.EMPLOYEE_IMAGE - ? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE - : '../assets/imgs/profile.png'; - } console.log('name: '+ this.personalInfo.EMPLOYEE_NAME); console.log('user name: '+ user.EMPLOYEE_NAME); - console.log('name: '+ this.personalInfo.JOB_NAME); - console.log('job name: '+ user.JOB_NAME); - - }}); -} - -openEditprofile(){ - this.cs.openProfile(); -} - -openPerormance(){ - this.showPerformanceAppraisal(); - -} - -showPerformanceAppraisal(){ - this.DS.getPerformanceAppraisal(()=>{ - this.showPerformanceAppraisal(); - }).subscribe((result: PerformanceAppraisalResponse) => { - this.handlePerformanceAppraisalResult(result); - - }); -} - -private handlePerformanceAppraisalResult(result){ - if (this.cs.validResponse(result)) { - if (this.cs.hasData(result.GetPerformanceAppraisalList)) { - this.appraisalArr =result.GetPerformanceAppraisalList; - this.performanceData=[]; - - for(let i=0;i + -
-
-
- - -
- - -
-

{{personalInfo.EMPLOYEE_NAME}}

+
+
+
+ - - -
- + - -
-
- - - - - -
- - -
- - + +
+ + + + + + + + - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - + + + + - - + + + +
+
+
- - - - - - - - - - +
- - - - - - - - - + + + +

{{ts.trPK('userProfile','personal-informaion')}}

+
+
+ +

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

+
+

part-time

+
+ +

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

+
+

DR.Sulaiman Alhabib Medical Group

+
+ +

{{ts.trPK('userProfile','phone-no')}}

+
+

0567845661

+
+ +

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

+
+

CORP Cloud Solutions

+
+ +

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

+
+

Cloud Solutions Payroll

+
+
+
- - - - - - - - - - - + + + + + + +

{{ts.trPK('general','basic-details')}}

+
+
- - - - - - - - - - + + + +
+
+
+ +

{{ts.trPK('general','full-name')}}

+
+

ENAD HILAL NASSER MOHAMMED

+
+ +

{{ts.trPK('general','marital-status')}}

+
+

Married

+
+ +

{{ts.trPK('general','birth_date')}}

+
+

01-FEB-1991

+
+ +

{{ts.trPK('general','civil-identity-number')}}

+
+

2093486013

+
+
- - - - - - - - - - - + + +

{{ts.trPK('general','basic-details')}}

+
- - - - - - - - - - + +

{{ts.trPK('general','effective-date')}}

+
- - - - - - - - - - - + +
-
+ +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + + + + + + + + + + + +

{{ts.trPK('general','other')}}

+
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+
+ + + + + + + +

{{ts.trPK('general','main-address')}}

+
+
+ + + + +
+
+ +

{{ts.trPK('general','address')}}

+
+

Riyadh

+
+ +

{{ts.trPK('general','street')}}

+
+

-

+
+ +

{{ts.trPK('general','area')}}

+
+

-

+
+ +

{{ts.trPK('general','p-o-box')}}

+
+

22617

+
+ +

{{ts.trPK('general','city')}}

+
+

Riyadh

+
+ +

{{ts.trPK('general','postal-code')}}

+
+

11416

+
+
+ + + +

{{ts.trPK('general','address')}}

+
+ + +

{{ts.trPK('general','effective-date')}}

+
+ +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+
+ + + - -
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
+
+
+ + +
+ +
+

{{ts.trPK('userProfile','Years of Services')}}

+
+ + + + + + + + {{ts.trPK('userProfile','edit-profile')}} + + + + + + + + + + + {{ts.trPK('userProfile','performance-evaluation')}} + + + + +
+
--> + + + + + + + Cancel + + + + Update + + + + + \ No newline at end of file diff --git a/Mohem/src/app/profile/home/home.component.scss b/Mohem/src/app/profile/home/home.component.scss index e8143682..f23b9670 100644 --- a/Mohem/src/app/profile/home/home.component.scss +++ b/Mohem/src/app/profile/home/home.component.scss @@ -1,130 +1,1041 @@ -ion-col.colBold, ion-col.colBold > label{ - font-weight:bold; +.list-ios { + // margin-left: 0; + // margin-right: 0; + // margin-top: 32px; + // margin-bottom: 32px; + // background: var(--ion-item-background,var(--ion-background-color,#fff)); + margin-left: 0; + margin-right: 0; + margin-top: -15px; + margin-bottom: 32px; + border: 1px solid #d8d8d8; + background: var(--ion-item-background, var(--ion-background-color, #fff)); + border-radius: 10px; + padding-top: 60px; } -.colorBG{ +.header-toolbar-new { + --background: #269db8; +} +.colorBG { --background: #f0efef; - } -.header-div{ - text-transform: capitalize; - background: #269DB8; +} +.header-div { + text-transform: capitalize; + background: #269db8; + display: block; + position: relative; + height: 113px; + margin-bottom: 60px; +} + +.profileImg { + width: 160px; + height: 160px; + display: -webkit-inline-box; + display: inline-flex; + overflow: hidden; + /* background: transparent; */ + border-radius: 78% !important; + position: relative; + top: 34px; + // background: white; + background: transparent; + margin-left: -3px; +} + +.proTitles { + margin: 0; + padding: 0; + font-size: 16px; + text-align: center; + font-weight: bolder; + color: white; + margin-top: -33px; +} + +.Text { + margin: 0; + padding: 0; + text-align: center; + font-weight: bolder; + color: black; + font-size: 16px; + margin-top: 34px; + margin-bottom: 10px; + text-align: center; +} + +ion-thumbnail.menu-thumb { + width: 20px; + height: 20px; + // margin-top: 5px !important; +} + +.profile { + color: black !important; + // font-weight: bolder !important; +} + +.gridService-en { + // margin-top: 87px; + // border-radius: 10px; + margin-bottom: -49px; + // margin-left: 30px; + // margin-right: 30px; +} +.gridService-ar { + // margin-top: 87px; + // border-radius: 10px; + margin-bottom: -49px; + // margin-left: 17px; + // margin-right: 17px; +} + +.columns { + // margin: 10px; + // background: #0B4775; + // border-radius: 27px; + // padding-left: 30px; + // padding-right: 6px; + // padding-top: 19px; + // padding-bottom: 26px; +} +.columns-ar { + // margin: 10px; + // background: #0B4775; + // border-radius: 27px; + // padding-left: 7px; + // padding-right: 3px; + // padding-top: 19px; + // padding-bottom: 26px; +} + +.service { + font-size: 12px; + // font-weight: bolder; + color: white; + // letter-spacing: 1px; + font-weight: bold; +} +.services { + font-size: 12px; + color: white; +} +.service-ar { + font-size: 28px; + color: white; + // letter-spacing: 1px; + font-weight: bold; + margin-right: 26px; +} +.services-ar { + font-size: 20px; + color: white; + margin-right: 25px; +} + +.list { + margin-left: 14px; + margin-right: 14px; + border-radius: 10px; + // background: white; + border: #bebbbb !important; + padding: 2px; +} +.p { + color: black !important; + font-size: medium; + text-align: center; + border-bottom: rgb(190, 187, 187) solid 1px; +} +.itemline { + border-bottom: rgb(190, 187, 187) solid 1px; +} +.itemlins { + border-bottom: rgb(190, 187, 187) solid 1px; + margin-bottom: 209px; +} +.empName { + margin: 0; + padding: 0; + text-align: center; + font-weight: bolder; + color: black; + font-size: 16px; + margin-top: 38px; +} +.empJob { + margin: 0; + padding: 0; + text-align: center; + color: black; + font-size: 16px; + margin-top: 4px; +} +.arrow { + width: 20px; + height: 22px !important; +} +.arrow-ar { + float: left; + font-size: 25px; + color: grey; + -webkit-transform: rotate(180deg); + transform: rotate(180deg); +} + +.verticalLine { + width: 1%; + height: 50px; + background: white; + margin-top: 100%; + // margin-left: 10%; +} + +.service-row-en { + width: 79%; + margin: -12px 0px 0px 35px; +} +.service-row-ar { + width: 95%; + margin: -12px 0px 35px 0px; +} + +ion-content { + --ion-background-color: whitesmoke; +} +ion-title { + color: white; + position: absolute; + top: 0; + text-align: center; + left: 15%; + right: 15%; + font-size: 0.5cm; + font-weight: bold; + height: 100%; + font-family: WorkSans-Regular; +} +.contentBg { + padding: 0px 20px; +} + +.contentBg:before { + position: absolute; + content: ""; + background: #269db8; + height: 140px; + width: 100%; + left: 0; + top: 0px; + z-index: 1; +} + +.user-info { + text-align: center; + margin-bottom: 15px; + .user-image-container { + position: relative; + width: 100%; + height: 24px; + justify-content: space-between; + display: flex; + margin: 0 auto; + align-items: center; + } + // position: relative; + // width: 80px; + // height: 80px; + // 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; + // } +} + +@media screen and (min-width: 1px) and (max-width: 767px) { + .user-image { + position: relative; display: block; + width: 30%; + height: 100%; + border-radius: 80px; + /* border: 1px solid #ccc; */ + margin-top: -125px; + } +} +@media screen and (min-width: 768px) and (max-width: 1024px) { + .user-image { position: relative; - height: 160px; - margin-bottom: 60px; + display: block; + width: 30%; + height: 100%; + border-radius: 80px; + margin-bottom: 371px; } +} +h1 { + margin: 0; + padding: 0; + font-family: WorkSans-Bold; + font-size: 18px; + margin-bottom: 4px; +} +span { + font-size: 11px; + display: block; + // color: #888 +} -// .profileCont{ -// background-color: #d9d7d7 !important; +$actionBtnSize: 36px; +.user-actions { + text-align: center; + .action-button { + font-size: 11px; + font-weight: bold; + // white-space: nowrap; + // color: #888; + .action-button-icon { + width: $actionBtnSize; + height: $actionBtnSize; + border-radius: $actionBtnSize; + margin: 0 auto; + display: block; + background-color: #269db8; + line-height: $actionBtnSize; + margin-bottom: 3px; + img { + margin: 0 auto; + vertical-align: middle; + } + } + } +} +.employee-information-indetail { + background: white; + margin-top: 15px; + border-radius: 20px; + margin-bottom: 15px; + border-radius: 20px; + border: 1px solid #ccc; + ion-col { + padding: 15px; + // border-bottom: 1px solid #ccc; + } + h2 { + font-size: 13px; + // font-family: WorkSans-Bold; + margin: 0; + font-weight: bold; + color: rgb(128, 124, 124); + } + p { + font-size: 13px; + margin: 0; + font-family: WorkSans-Bold; + // margin-bottom: 10px; + } +} +.segments-container { + border-radius: 100px; + overflow: hidden; + margin-top: 15px; + background: white; + color: black; +} -.menubutton { - background: #f0ecec; - min-height: 39px; - width: 35px !important; - height: 20px; - border-radius: 50%; -} - - .changeIcon{ - /* background: #c1c1c1; */ - width: 21px; - /* height: 26px; */ - border-radius: 50% !important; - position: relative; - color: #7f8c8d; - height: 35px; - - - } - - .changeImgBtn{ +@media screen and (min-width: 1px) and (max-width: 767px) { + .active-Segment { + width: 11%; + max-width: 11%; + min-width: 11%; + height: 30% !important; + min-height: 36px; + padding-right: -10px; + border-radius: 50% !important; + margin-right: 22px; + margin-left: 22px; + background-color: #269db8; + } +} +@media screen and (min-width: 768px) and (max-width: 1024px) { + .active-Segment { + width: 11%; + max-width: 11%; + min-width: 11%; + height: 56% !important; + min-height: 68px; + padding-right: -10px; + border-radius: 50% !important; + margin-right: 62px; + margin-left: 45px; + background: #269db8 !important; + padding-left: 17px; + } +} + +@media screen and (min-width: 1px) and (max-width: 767px) { + .normal-Segment { + width: 11%; + max-width: 11%; + min-width: 11%; + height: 30% !important; + min-height: 36px; + padding-right: -10px; + border-radius: 50% !important; + margin-right: 22px; + margin-left: 22px; + background: #414040 !important; + } +} +@media screen and (min-width: 768px) and (max-width: 1024px) { + .normal-Segment { + width: 11%; + max-width: 11%; + min-width: 11%; + height: 56% !important; + min-height: 68px; + padding-right: -10px; + border-radius: 50% !important; + margin-right: 62px; + margin-left: 45px; + background: #414040 !important; + padding-left: 17px; + } +} + +@media screen and (min-width: 1px) and (max-width: 767px) { + .imgSize { position: absolute; - top: 80%; - left: 65%; + /* right: 15px; */ + top: 0; + bottom: 0; + left: 7px; + margin: auto; + height: 18px; } - .changeImgBtn-ar{ +} +@media screen and (min-width: 768px) and (max-width: 1024px) { + .imgSize { position: absolute; - top: 80%; - left: 66%; - } -.profileImg{ - width: 160px; - height: 160px; - display: -webkit-inline-box; - display: inline-flex; - overflow: hidden; - // background: transparent; - border-radius: 69% !important; + top: 0; + bottom: 0; + left: 9px; + margin: auto; + height: 28px; + } +} + +.colum-container { + padding: 15px; + border-bottom: 1px solid #ccc; +} +.img { + width: 100px; + height: 100px; + display: inline-flex; + overflow: hidden; + border-radius: 78% !important; + position: relative; + /* top: 34px; */ + background: transparent; + margin-left: 119%; +} +.img-ar { + width: 100px; + height: 100px; + display: inline-flex; + overflow: hidden; + border-radius: 78% !important; + position: relative; + /* top: 34px; */ + background: transparent; + margin-right: 119%; +} +///////////////////////// Team Members css //////////////////////@extend + +.filters-row { + margin-top: 10px; +} + +.search-dropdown { + background: #269db8; + ion-select { + .select-text { + margin-left: -10px; + } + .select-icon { + .select-icon-inner { + opacity: 1; + color: white; + margin-top: -1px; + } + } + } +} + +.input-container { + background: white; + ion-input { + border-bottom-color: transparent; + } +} + +.search-container { + margin-top: 15px; + ion-col { + background: white; + border-radius: 12px; + padding-right: 10px; + flex: none; + ion-icon { + margin-right: 3px; + font-size: 14px; + margin-left: 3px; + vertical-align: middle; + } + span { + font-size: 12px; + vertical-align: middle; + } + } +} + +/////////////////////////////////////////////////////// Attendance /////////////////////// +.header { + // margin-top: 20px; + margin-top: 1px; +} + +.slidPrev { + margin-left: 10px; + background: transparent; +} + +.slidNext { + background: transparent; + margin-top: -1px; + margin-left: 43px; +} +.activeArrow { + height: 20px; + width: 20px; + color: #269db8; +} +.disabledArrow { + height: 20px; + width: 20px; + color: gray; +} + +.activeArrow-ar { + height: 20px; + width: 20px; + color: #269db8; + margin-right: 275px; +} +.disabledArrow-ar { + height: 20px; + width: 20px; + color: gray; + /* margin-left: 136px; */ + margin-right: -251px; +} + +@media screen and (min-width: 1px) and (max-width: 767px) { + .result-graph { position: relative; - top: 34px; - // background: white; - background: transparent; + background: white; + // margin-top: 20px; + padding-bottom: 20px; + border-radius: 20px; + z-index: 1; + margin-bottom: 10px; + margin-top: 56px; + border-radius: 20px; + border: 1px solid #ccc; + padding-top: 12px; + width: 90%; + left: 5%; + } + .result-graph-ar { + position: relative; + background: white; + // margin-top: 20px; + padding-bottom: 20px; + border-radius: 20px; + z-index: 1; + margin-bottom: 10px; + margin-top: 56px; + border-radius: 20px; + border: 1px solid #ccc; + padding-top: 12px; + width: 90%; + right: 5%; + } } - .Text { - margin: 0; - padding: 0; - text-align: center; - font-weight: bolder; - color: black; - font-size: 16px; - margin-top: 34px; - text-align: center; +@media screen and (min-width: 768px) and (max-width: 1024px) { + .result-graph { + position: relative; + background: white; + // margin-top: 20px; + padding-bottom: 20px; + border-radius: 20px; + z-index: 1; + margin-bottom: 10px; + margin-top: 89px; + border-radius: 20px; + border: 1px solid #ccc; + padding-top: 114px !important; + width: 90%; + left: 5%; + } + + .result-graph-ar { + position: relative; + background: white; + // margin-top: 20px; + padding-bottom: 20px; + border-radius: 20px; + z-index: 1; + margin-bottom: 10px; + margin-top: 89px; + border-radius: 20px; + border: 1px solid #ccc; + padding-top: 114px !important; + width: 90%; + right: 5%; + } +} +.result-graph-attendence { + position: relative; + background: white; + // margin-top: 20px; + padding-bottom: 20px; + border-radius: 20px; + z-index: 1; + margin-bottom: 10px; + margin-top: 10px; + border-radius: 20px; + border: 1px solid #ccc; +} + +.request-heading { + text-align: left; + display: block; + padding-top: 8px; + margin-bottom: 10px; + margin-left: 10px; +} +.request-heading-ar { + text-align: right; + display: block; + padding-top: 8px; + margin-bottom: 10px; + margin-right: 12px; +} + +.result-text-container { + padding: 0; + margin: 0; + position: absolute; + left: 85%; + 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; + } +} +.today-graph { + // width: 100%; + max-height: 4cm; + display: block; + height: 132px; + width: 264px; + margin-left: 154px; +} + +.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; +} - .line{ +.blue-amount { + font-size: 17px; + font-family: WorkSans-Bold; + margin-top: -4px; +} + +.labelGrid { + background-color: white !important; + border-radius: 20px !important; + height: 88px !important; + border: 1px solid #d6d4d4; + position: relative; + padding: 10px; - padding-top: 0px !important; - /* margin-bottom: 0px; */ - /* margin: 0px; */ - border-right: 1px #c5c2c2 solid !important; - line-height: 10px !important; - + label { + font-size: 9px; + line-height: 11px !important; + display: block; } - .proTitles { + h2 { + font-size: 25px; + font-weight: bold; + display: block; + text-align: right; margin: 0; - padding: 0; - font-size: 16px; - text-align: center; - font-weight: bolder; - color: white; - margin-top: -33px; + position: absolute; + bottom: 0; + left: 0; + width: 100%; + padding: 10px; } +} +.bodyGrid { + margin-top: 7px !important; + margin-left: 15px !important; + margin-right: 15px !important; + background-color: white !important; + border-radius: 20px !important; + height: 321px !important; + border: 1px solid #d6d4d4 !important; +} - .profileGrid{ - border: #bebbbb solid 1px; - border-radius: 9px; - padding: 0px; - margin-top: 54px; - margin-left: 10px; - margin-right: 10px; - margin-bottom: 10px; - color: black; - // font-weight: bold; - background: white; +.attendance-information { + background: white; + border-radius: 20px; + padding: 9px; + font-weight: bolder; + // border-right: 1px solid rgb(221, 221, 221); + @media screen and (min-width: 300px) and (max-width: 359px) { + h2 { + padding: 0; + margin: 0; + font-size: 14px; + } + span { + font-size: 9px; + } } - + @media screen and (min-width: 360px) { + h2 { + padding: 0; + margin: 0; + font-size: 14px; + } + span { + font-size: 11px; + margin-bottom: 3px; + } + } +} + +.month-year-span { + font-size: 16px; + // font-family: WorkSans-Bold; + font-weight: bold; +} + +.green-label-container { + // border-top: 5px solid #269DB8; + // padding: 1px 0px; + // margin: 15px 0px + width: 12px; + height: 12px; + padding-right: -10px; + border-radius: 100%; + background-color: #269db8; +} + +.blue-label-container { + // border-top: 5px solid #292F42; + // padding: 1px 0px; + // margin: 15px 0px + width: 12px; + height: 12px; + padding-right: -10px; + border-radius: 100%; + background-color: #292f42; + margin-top: 30px; +} +.span-one { + // display: block; + // font-size: 12px; + // color: black; + display: block; + font-size: 12px; + color: black; + margin-left: 6px; + margin-top: -2px; + font-weight: bold; +} +.span-two { + // display: block; + // font-size: 22px; + display: block; + font-size: 12px; + color: black; + margin-left: 6px; + margin-top: -2px; + font-weight: bold; + font-family: WorkSans-Bold; +} - - .lebl{ +.spa-one { + // display: block; + // font-size: 12px; + // color: black; + display: block; + font-size: 12px; + color: black; + margin-left: 6px; + margin-top: 28px; + font-weight: bold; +} +.spa-two { + // display: block; + // font-size: 22px; + display: block; + font-size: 12px; + color: black; + margin-left: 6px; + margin-top: 28px; + font-weight: bold; + font-family: WorkSans-Bold; +} +.graph-container { + margin-left: -50px; + position: relative; + margin-right: 50px; +} +.label-container { + position: absolute; + // width: 20%; + // right: 30px; + top: 50%; + margin-top: -27px; + left: 20px; +} +.attendance-summary .attendance-information { + span { + height: 32px; + display: block; + line-height: 14px; + } + h2 { + // text-align: right; + // font-family: WorkSans-Bold; + font-weight: bolder; + font-size: 13px; + } +} - color: black; - font-size: 14px !important; - font-weight: bold !important; - padding-top: 9px; - padding-left: 5px; - +.calendar-container { + background: white; + margin-bottom: 100px; + margin-top: 10px; + border-radius: 20px; + border: 1px solid #ccc; + padding-bottom: 25px; + span { + text-align: left; + display: block; + padding-top: 8px; + margin-bottom: 10px; + margin-left: 10px; + } +} +.calendar-container-ar { + background: white; + margin-bottom: 100px; + margin-top: 20px; + border-radius: 20px; + span { + text-align: right; + display: block; + padding-top: 8px; + margin-bottom: 6px; + margin-right: 12px; } - .rowBolds{ - color: black !important; - font-size: 14px !important; - /* padding: 6px !important; */ - padding-bottom: 9px; - padding-left: 5px; - padding-top: 4px; +} + +.Boldtext { + font-size: 13px; + font-family: WorkSans-Bold; + color: black !important; + display: block !important; + // line-height: 0px !important; +} + +.attendence { + position: relative; + background: white; + border-radius: 20px; + border: 1px solid #ccc; +} + +.attendence-text { + margin-bottom: 1px; + margin-left: 10px; + font-family: WorkSans-Bold; + font-size: 16px; +} +.stats { + color: #289db8; + font-size: 9px; + margin-right: 5px; + font-family: "WorkSans-Bold"; +} + +.text { + font-size: 16px; + font-weight: bolder; + font-family: "WorkSans-Bold"; + margin-top: 27px; +} + +.number { + width: 20px; + height: 20px; + padding-right: -10px; + border-radius: 100%; + background-color: #269db8; + z-index: 9; + margin-top: 26px; +} - } \ No newline at end of file +.numberEmp { + color: white; + font-size: 13px; + font-weight: bolder; + margin-left: 6px; +} + +.slider-container { + padding-bottom: 20px; +} + +.filters-row { + margin-top: 10px; + margin-left: 20px; +} + +.disable-filter { + pointer-events: none; + opacity: 0.3; +} + +.header-background-style-card { + padding-top: 1px; + background: #269db8; + height: 15%; +} + +.text-years { + text-align: center; + width: 58px; +} + +.grid-card { + right: 5px; + position: relative; + display: block; + z-index: 5; + width: 103%; +} + +.grid-card-ar { + left: 5px; + position: relative; + display: block; + z-index: 5; + width: 103%; +} + +.changeImgBtn { + position: absolute; + left: 60%; + bottom: 150%; +} +.changeImgBtn-ar { + position: absolute; + left: 60%; + bottom: 150%; +} +.menubutton { + background: #f0ecec; + min-height: 25px; + width: 24px !important; + height: 20px; + border-radius: 50%; +} + +.changeIcon { + bottom: 6px; + width: 10px; + border-radius: 50% !important; + position: relative; + color: #7f8c8d; + height: 35px; +} + +.card-style-details-info { + background: white; + // margin-top: 20px; + padding-bottom: 20px; + border-radius: 20px; + z-index: 1; + margin-bottom: 10px; + margin-top: 56px; + border-radius: 20px; + border: 1px solid #ccc; + padding-top: 12px; + width: 90%; + left: 5%; +} + +.login-input { + border: none; +} diff --git a/Mohem/src/app/profile/home/home.component.ts b/Mohem/src/app/profile/home/home.component.ts index befdf290..805a3499 100644 --- a/Mohem/src/app/profile/home/home.component.ts +++ b/Mohem/src/app/profile/home/home.component.ts @@ -1,45 +1,68 @@ import { Component, OnInit } from '@angular/core'; +import { Platform, Events, MenuController, ModalController } from '@ionic/angular'; import { CommonService } from 'src/app/hmg-common/services/common/common.service'; import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user'; -import { Events } from '@ionic/angular'; +import { PerformanceAppraisalResponse } from 'src/app/hmg-common/services/dashbored/performance-appraisal.response'; +import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service'; +import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service'; import { DomSanitizer } from '@angular/platform-browser'; +import { EditDetailProfileComponent } from '../modal/edit-detail-profile/edit-detail-profile.component'; @Component({ selector: 'app-home', templateUrl: './home.component.html', styleUrls: ['./home.component.scss'] }) export class HomeComponent implements OnInit { - personalInfo: any; - setImage:any; - imageSrc: any = '../assets/imgs/profile.png'; + + + User_name_Emp: string = ''; + User_Job_name: string; public direction: string; - // user_image: any = "../assets/imgs/profile.png"; + private menu: MenuController; + setImage: any; + // imageSrc: any = "../assets/imgs/profile.png"; + user_image: any = '../assets/imgs/profile.png'; + personalInfo: any; + appraisalArr: any = []; + public performanceData: any = []; + public static PERFORMANCE_DATA = 'perAppData'; + + public personalInfoSegment = true; + public basicDetailsSegment = false; + public addressSegment = false; + + public editBasic = false; + public editAddress = false; + constructor( public ts: TranslatorService, public cs: CommonService, public authService: AuthenticationService, - private events: Events, + public DS: DashboredService, + public sharedData: SharedDataService, + public events: Events, private sanitizer: DomSanitizer, - + public modalController: ModalController + // private events: Events, + // private sanitizer: DomSanitizer, ) { this.direction = TranslatorService.getCurrentDirection(); this.events.subscribe('img-change', displayImg => { - // alert("1 - profile home : "+displayImg); - //this.user_image = "data:image/png;base64"+displayImg; - this.setImage = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,'+displayImg); - this.imageSrc = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,'+displayImg); - + console.log('app compont: ' + displayImg); + this.user_image = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,' + displayImg); + }); - + } ngOnInit() { this.getProfile(); } + getProfile() { console.log('getProfile'); this.authService @@ -47,28 +70,122 @@ export class HomeComponent implements OnInit { .subscribe((user: AuthenticatedUser) => { if (user) { this.personalInfo = user; - console.log('name: '+ this.personalInfo.EMPLOYEE_NAME); - console.log('user name: '+ user.EMPLOYEE_NAME); - - if(this.cs.getUpdateImage().status){ - // this.imageSrc = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+this.cs.getUpdateImage().img); - this.imageSrc =this.sanitizer.bypassSecurityTrustUrl('data:image/png;base64,'+this.cs.getUpdateImage().img); - }else{ - this.imageSrc = user.EMPLOYEE_IMAGE - ? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE - : this.imageSrc; - console.log('2-'+user); - } - } - else { - console.log('3-'+user); + this.User_name_Emp = this.personalInfo.EMPLOYEE_NAME; + this.User_Job_name = this.personalInfo.JOB_NAME; + if (this.cs.getUpdateImage().status) { + this.user_image = this.sanitizer.bypassSecurityTrustUrl('data:image/png;base64,' + this.cs.getUpdateImage().img); + } else { + this.user_image = user.EMPLOYEE_IMAGE + ? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE + : '../assets/imgs/profile.png'; + } + console.log(user); + console.log(this.personalInfo); + console.log('name: ' + this.personalInfo.EMPLOYEE_NAME); + console.log('user name: ' + user.EMPLOYEE_NAME); + console.log('name: ' + this.personalInfo.JOB_NAME); + console.log('job name: ' + user.JOB_NAME); + + } }); } + openEditprofile() { + this.cs.openProfile(); + } + + openPerormance() { + this.showPerformanceAppraisal(); + + } + + showPerformanceAppraisal() { + this.DS.getPerformanceAppraisal(() => { + this.showPerformanceAppraisal(); + }).subscribe((result: PerformanceAppraisalResponse) => { + this.handlePerformanceAppraisalResult(result); - public ChangeImage() { - this.cs.openChangeImagePage(); + }); + } + + private handlePerformanceAppraisalResult(result) { + if (this.cs.validResponse(result)) { + if (this.cs.hasData(result.GetPerformanceAppraisalList)) { + this.appraisalArr = result.GetPerformanceAppraisalList; + this.performanceData = []; + + for (let i = 0; i < this.appraisalArr.length; i++) { + this.performanceData.push({ name: this.appraisalArr[i].APPRAISAL_YEAR, value: parseInt(this.appraisalArr[i].APPRAISAL_SCORE).toFixed() }); + } + console.log('PerformanceAppraisalResponse'); + this.sharedData.setSharedData(this.performanceData, PerformanceAppraisalResponse.PERFORMANCE_DATA); + //localStorage.setItem("performanceData", this.performanceData) + this.cs.openPerformanceevaluation(); + } else { + let msg: string = this.ts.trPK("userProfile", "no-appraisal"); + this.cs.presentAlert(msg); + + } + } + } + + selectedSegment(segmentData){ + switch (segmentData){ + case "personal": + this.personalInfoSegment = true; + this.basicDetailsSegment = false; + this.addressSegment = false; + this.editBasic = false; + this.editAddress = false; + break; + case "basic": + this.personalInfoSegment = false; + this.basicDetailsSegment = true; + this.addressSegment = false; + this.editBasic = false; + this.editAddress = false; + break; + case "address": + this.personalInfoSegment = false; + this.basicDetailsSegment = false; + this.addressSegment = true; + this.editBasic = false; + this.editAddress = false; + break; + } + } + + allowEdit(allowVal){ + switch(allowVal){ + case 1: + this.editBasic = true; + break; + case 2: + this.editAddress = true; + break; + } + } + + disableEdit(disableVal){ + switch(disableVal){ + case 1: + this.editBasic = false; + break; + case 2: + this.editAddress = false; + break; + } + + } + + + async presentModal() { + const modal = await this.modalController.create({ + component: EditDetailProfileComponent, + cssClass: 'my-custom-modal-css' + }); + return await modal.present(); } } diff --git a/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.html b/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.html new file mode 100644 index 00000000..b6dbd408 --- /dev/null +++ b/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.html @@ -0,0 +1,39 @@ + + +

+ {{ts.trPK('general','type-of-change')}}

+
+ + + + + + +

{{ts.trPK('general','correct-or-complete')}}

+ +
+ + + +

{{ts.trPK('general','new-info')}}

+
+ +
+ +
+
+ + + + + + {{ts.trPK('userProfile','cancel-text')}} + + + + {{ts.trPK('general','next')}} + + + + +
\ No newline at end of file diff --git a/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.scss b/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.scss new file mode 100644 index 00000000..38c1b5ac --- /dev/null +++ b/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.scss @@ -0,0 +1,3 @@ +ion-label{ + white-space: normal; +} \ No newline at end of file diff --git a/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.spec.ts b/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.spec.ts new file mode 100644 index 00000000..588a31d3 --- /dev/null +++ b/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { EditDetailProfileComponent } from './edit-detail-profile.component'; + +describe('EditDetailProfileComponent', () => { + let component: EditDetailProfileComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ EditDetailProfileComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(EditDetailProfileComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.ts b/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.ts new file mode 100644 index 00000000..13dc6ec2 --- /dev/null +++ b/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.ts @@ -0,0 +1,30 @@ +import { Component, OnInit } from '@angular/core'; +import { ModalController } from '@ionic/angular'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; + +@Component({ + selector: 'app-edit-detail-profile', + templateUrl: './edit-detail-profile.component.html', + styleUrls: ['./edit-detail-profile.component.scss'], +}) +export class EditDetailProfileComponent implements OnInit { + + + constructor( + public modalController: ModalController, + public ts: TranslatorService, + ) { } + + colorRadio = "#269db8" + + ngOnInit() {} + + dismiss() { + // using the injected ModalController this page + // can "dismiss" itself and optionally pass back data + this.modalController.dismiss({ + 'dismissed': true + }); + } + +} diff --git a/Mohem/src/app/profile/profile.module.ts b/Mohem/src/app/profile/profile.module.ts index c1bd6191..c77c723e 100644 --- a/Mohem/src/app/profile/profile.module.ts +++ b/Mohem/src/app/profile/profile.module.ts @@ -15,6 +15,7 @@ import {EditProfileComponent} from './edit-profile/edit-profile.component'; import {ProfileImageComponent} from './profile-image/profile-image.component' import {PerformanceEvaluationComponent} from './performance-evaluation/performance-evaluation.component' import { from } from 'rxjs'; +import { EditDetailProfileComponent } from './modal/edit-detail-profile/edit-detail-profile.component'; const routes: Routes = [ { @@ -70,9 +71,9 @@ const routes: Routes = [ IonicModule, HmgCommonModule, NgxChartsModule, - RouterModule.forChild(routes) ], - declarations: [ProfilePage , HomeComponent,ProfileImageComponent,EditProfileComponent,PerformanceEvaluationComponent] + declarations: [ProfilePage ,EditDetailProfileComponent, HomeComponent,ProfileImageComponent,EditProfileComponent,PerformanceEvaluationComponent], + entryComponents:[EditDetailProfileComponent] }) export class ProfilePageModule {} diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json index 1379abef..5c39b1f6 100644 --- a/Mohem/src/assets/localization/i18n.json +++ b/Mohem/src/assets/localization/i18n.json @@ -361,6 +361,10 @@ "en": "Nationality", "ar": "الجنسية" }, + "religion":{ + "en":"Religion", + "ar":"الديانة" + }, "empty": { "en": "Sorry no data avaiable", "ar": "لا يوجد بيانات" @@ -427,7 +431,7 @@ }, "other": { "en": "Other", - "ar": "أخري" + "ar": "أخرى" }, "provide-missing": { "en": "Please provide required information", @@ -956,6 +960,50 @@ "appreciate-service": { "en": "We appreciate you for completing the service of", "ar": "نحن نقدر لك استكمال خدمة" + }, + "basic-details":{ + "en":"Basic Details", + "ar":"المعلومات الاساسية" + }, + "full-name":{ + "en":"Full Name", + "ar":"الاسم كامل" + }, + "marital-status":{ + "en":"Marital Status", + "ar":"الاحالة الاجتماعية" + }, + "civil-identity-number":{ + "en":"Civil identity number", + "ar":"رقم الهوية المدنية" + }, + "effective-date":{ + "en":"Effective Date", + "ar":"تاريخ الفعالية " + }, + "gender":{ + "en":"Gender", + "ar":"النوع" + }, + "education-level":{ + "en":"Education Level", + "ar":"المستوى التعليمي" + }, + "main-address":{ + "en":"Main Address", + "ar":"العنوان الرئيسي" + }, + "correct-or-complete":{ + "en":"correct or complete the current details", + "ar":"تعديل او اكمال التفاصيل الحالية" + }, + "new-info":{ + "en":"enter new Information because of a real change to the current details (e.g because of a change in marital status)", + "ar":"أدخل معلومات جديدة بسبب تغيير حقيقي في التفاصيل الحالية (على سبيل المثال بسبب تغيير في الحالة الاجتماعية)" + }, + "type-of-change":{ + "en":" Select the type of change you want to make.", + "ar":" حدد نوع التغيير الذي تريد القيام به." } }, "home": { @@ -1242,6 +1290,62 @@ "successChange": { "en": "Profile Photo changed successfully ", "ar": "تم تغيير الصورة الشخصية بنجاح" + }, + "personal-informaion":{ + "en":"Personal Informaion", + "ar":"المعلومات الشخصية" + }, + "family-name":{ + "en":"Family Name", + "ar":"اسم العائلة" + }, + "preferred-name":{ + "en":"Preferred Name", + "ar":"الاسم المفضل" + }, + "previous-family-name":{ + "en":"Previous Family Name", + "ar":"اسم العائلة السابق" + }, + "father-name":{ + "en":"Father Name<", + "ar":"اسم الاب" + }, + "grand-father-name":{ + "en":"GrandFather Name", + "ar":"اسم الجد" + }, + "arabic-first-name":{ + "en":"Arabic First Name", + "ar":"الاسم الاول بالعربي" + }, + "arabic-father-name":{ + "en":"Arabic Father Name", + "ar":"اسم الاب بالعربي" + }, + "arabic-grand-father-name":{ + "en":"Arabic GrandFather Name", + "ar":"اسم الجد بالعربي" + }, + "street":{ + "en":"Street", + "ar":"شارع" + }, + "area":{ + "en":"Area", + "ar":"المنطقة" + }, + "p-o-box":{ + "en":"P.O Box", + "ar":"صندوق البريد" + }, + "city":{ + "en":"City", + "ar":"المدينة" + }, + "postal-code":{ + "en":"Postal Code", + "ar":"الرمز البريدي" } }, "changePassword": { diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss index e47b5f2f..f2d975f2 100644 --- a/Mohem/src/theme/styles.scss +++ b/Mohem/src/theme/styles.scss @@ -1584,4 +1584,4 @@ ion-segment-button { background: #fff; width: 75%; margin: auto; - } \ No newline at end of file + }