From 7bb565af80e64bd212391d47f354c9f612bb7aa2 Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Mon, 7 Jun 2021 15:56:32 +0300 Subject: [PATCH] design updated --- Mohem/src/app/app.component.ts | 10 ++++-- .../app/erm-channel/home/home.component.html | 3 +- .../app/erm-channel/home/home.component.ts | 13 +++++++- .../erm-channel/survey/survey.component.html | 15 ++++----- .../erm-channel/survey/survey.component.ts | 16 +++++++++- .../work-list-replacement-itg.component.html | 2 +- .../work-list-replacement-roll.component.html | 2 +- .../work-list-replacement-roll.component.ts | 31 ++++++++++--------- Mohem/src/assets/localization/i18n.json | 22 +++++++++++++ Mohem/src/theme/styles.scss | 7 +++-- 10 files changed, 89 insertions(+), 32 deletions(-) diff --git a/Mohem/src/app/app.component.ts b/Mohem/src/app/app.component.ts index c4c8a5cd..1fe02b87 100644 --- a/Mohem/src/app/app.component.ts +++ b/Mohem/src/app/app.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { Platform, Events, MenuController, ModalController } from '@ionic/angular'; +import { Platform, Events, MenuController, ModalController, NavController } from '@ionic/angular'; import { TranslatorService } from './hmg-common/services/translator/translator.service'; import { CommonService } from './hmg-common/services/common/common.service'; import { AuthenticationService } from './hmg-common/services/authentication/authentication.service'; @@ -53,7 +53,8 @@ export class AppComponent implements OnInit { public pushService: PushService, private splashScreen: SplashScreen, public router: Router, - public modalController: ModalController + public modalController: ModalController, + public nav: NavController, ) { this.events.subscribe('img-change', displayImg => { console.log('app compont: ' + displayImg); @@ -116,6 +117,9 @@ export class AppComponent implements OnInit { this.platform.backButton.subscribe(() => { if (this.router.isActive('/authentication/login', true)) { navigator['app'].exitApp(); + } else if (this.router.isActive('/home', true)) { + + this.nav.navigateRoot('/home'); } }); this.events.subscribe('setMenu', () => { @@ -185,7 +189,7 @@ export class AppComponent implements OnInit { public openMyRequestPage() { this.cs.openMyRequestPage(); - this.menu.toggle(); + this.menu.toggle(); } public profile() { diff --git a/Mohem/src/app/erm-channel/home/home.component.html b/Mohem/src/app/erm-channel/home/home.component.html index 45909076..5929573b 100644 --- a/Mohem/src/app/erm-channel/home/home.component.html +++ b/Mohem/src/app/erm-channel/home/home.component.html @@ -1,6 +1,7 @@
-
Skip
+
{{ts.trPK('worklistMain','skip')}}
+
{{setTime}}
diff --git a/Mohem/src/app/erm-channel/home/home.component.ts b/Mohem/src/app/erm-channel/home/home.component.ts index 92b38fc5..e82eac45 100644 --- a/Mohem/src/app/erm-channel/home/home.component.ts +++ b/Mohem/src/app/erm-channel/home/home.component.ts @@ -8,7 +8,8 @@ import { CommonService } from 'src/app/hmg-common/services/common/common.service styleUrls: ['./home.component.scss'], }) export class HomeComponent implements OnInit { - + isSkip: boolean = false; + setTime: number = 5; constructor(public nav: NavController,) { } ngOnInit() { } @@ -16,4 +17,14 @@ export class HomeComponent implements OnInit { this.nav.pop(); CommonService.SKIP = true; } + setTimer() { + setTimeout(() => { + this.setTime--; + if (this.setTime == 0) { + this.isSkip = true; + } else { + this.setTimer(); + } + }, 1000); + } } diff --git a/Mohem/src/app/erm-channel/survey/survey.component.html b/Mohem/src/app/erm-channel/survey/survey.component.html index e0a38107..3ceed796 100644 --- a/Mohem/src/app/erm-channel/survey/survey.component.html +++ b/Mohem/src/app/erm-channel/survey/survey.component.html @@ -1,16 +1,17 @@ -
Skip
+
{{ts.trPK('worklistMain','skip')}}
+
{{setTime}}
- This is to get feedback about the user experience - + + {{ts.trPK('erm-channel','fedback-about-ux')}} -

1. How would you like to rate

+

1. {{ts.trPK('erm-channel','how-would-you-like')}}

@@ -22,7 +23,7 @@ -

2. How do you satisfied about this application

+

2. {{ts.trPK('erm-channel','how-would-you-satisfied')}}

@@ -47,7 +48,7 @@
-

Please give us a comments

+

{{ts.trPK('erm-channel','give-comments')}}

@@ -56,7 +57,7 @@ - +
diff --git a/Mohem/src/app/erm-channel/survey/survey.component.ts b/Mohem/src/app/erm-channel/survey/survey.component.ts index fbcc59ea..ff04ab68 100644 --- a/Mohem/src/app/erm-channel/survey/survey.component.ts +++ b/Mohem/src/app/erm-channel/survey/survey.component.ts @@ -10,11 +10,25 @@ import { TranslatorService } from 'src/app/hmg-common/services/translator/transl }) export class SurveyComponent implements OnInit { rate: any; + isSkip: boolean = false; + setTime: number = 5; constructor(public ts: TranslatorService, public cs: CommonService, public nav: NavController) { } - ngOnInit() { } + ngOnInit() { + this.setTimer(); + } skip() { this.nav.pop(); CommonService.SKIP = true; } + setTimer() { + setTimeout(() => { + this.setTime--; + if (this.setTime == 0) { + this.isSkip = true; + } else { + this.setTimer(); + } + }, 1000); + } } diff --git a/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.html b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.html index 7a2f6d89..6382bee6 100644 --- a/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.html +++ b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.html @@ -108,7 +108,7 @@ -
+
diff --git a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html index a0af5788..5c81277e 100644 --- a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html +++ b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html @@ -75,7 +75,7 @@ {{employee.NAME}} -
+
diff --git a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts index 71b1570d..4112aa6e 100644 --- a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts +++ b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts @@ -327,7 +327,7 @@ export class WorkListReplacementRollComponent implements OnInit { data: "Success" }); if (this.selEmp && this.isAnswer == false) - this.setFavorite(); + this.setFavorite(this.selEmp); }, 5000); this.cs.openNotificationPage(); @@ -457,38 +457,41 @@ export class WorkListReplacementRollComponent implements OnInit { this.worklistService.saveFavoriteList(request, () => { }).subscribe((result) => { if (this.cs.validResponse(result)) { - console.log(result); + this.cs.toastPK("replacementRoll", "favorite-saved"); } }) } - setFavorite() { + setFavorite(selEmp) { + selEmp.EMPLOYEE_DISPLAY_NAME = selEmp.EMPLOYEE_DISPLAY_NAME ? selEmp.EMPLOYEE_DISPLAY_NAME : selEmp.NAME; + selEmp.EMPLOYEE_IMAGE = selEmp.EMPLOYEE_IMAGE ? selEmp.EMPLOYEE_IMAGE : ''; + selEmp.EMAIL_ADDRESS = selEmp.EMAIL_ADDRESS ? selEmp.EMAIL_ADDRESS : ''; var confirmBoxhtml = `
-

Do you want to add ` + this.selEmp.EMPLOYEE_DISPLAY_NAME + ` in your favorite list

+

Do you want to add ` + selEmp.EMPLOYEE_DISPLAY_NAME + ` in your favorite list



-
`; - if (this.selEmp.EMPLOYEE_IMAGE) - confirmBoxhtml += ''; - if (!this.selEmp.EMPLOYEE_IMAGE) - confirmBoxhtml += ''; +
`; + if (selEmp.EMPLOYEE_IMAGE) + confirmBoxhtml += '
'; + if (!selEmp.EMPLOYEE_IMAGE) + confirmBoxhtml += '
'; - confirmBoxhtml += ` + confirmBoxhtml += `
- ` + this.selEmp.EMPLOYEE_DISPLAY_NAME + ` + ` + selEmp.EMPLOYEE_DISPLAY_NAME + ` -
+
` - let userIndex = this.favoriteUserList.findIndex(x => x['USER_NAME'] == this.selEmp.USER_NAME) + let userIndex = this.favoriteUserList.findIndex(x => x['USER_NAME'] == selEmp.USER_NAME) if (userIndex == -1) this.cs.presentConfirmDialog( confirmBoxhtml , () => { var request = - [{ "USER_NAME": this.selEmp['USER_NAME'], "EMPLOYEE_DISPLAY_NAME": this.selEmp['EMPLOYEE_DISPLAY_NAME'], "EMAIL_ADDRESS": this.selEmp.EMAIL_ADDRESS, "EMPLOYEE_IMAGE": this.selEmp.EMPLOYEE_IMAGE, "IsFavorite": true }]; + [{ "USER_NAME": selEmp['USER_NAME'], "EMPLOYEE_DISPLAY_NAME": selEmp['EMPLOYEE_DISPLAY_NAME'], "EMAIL_ADDRESS": selEmp.EMAIL_ADDRESS, "EMPLOYEE_IMAGE": selEmp.EMPLOYEE_IMAGE, "IsFavorite": true }]; this.saveUserFavruiteList(request); }, () => { diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json index a1c75dfe..12f7fd6e 100644 --- a/Mohem/src/assets/localization/i18n.json +++ b/Mohem/src/assets/localization/i18n.json @@ -1953,6 +1953,10 @@ "en": "Enter a note", "ar": "أدخل ملاحظة" }, + "favorite-saved": { + "en": "Your Favorite saved successfully", + "ar": "تم حفظ مفضلتك بنجاح" + }, "msg": { "en": "Select a replacement", "ar": "اختر بديل" @@ -2941,5 +2945,23 @@ "en": "Whatsapp", "ar": "واتس اب" } + }, + "erm-channel": { + "fedback-about-ux": { + "en": "This is to get feedback about the user experience", + "ar": "هذا للحصول على تعليقات حول تجربة المستخدم" + }, + "how-would-you-like": { + "en": "How would you like to rate", + "ar": "كيف تريد أن تقيم" + }, + "how-would-you-satisfied": { + "en": "How do you satisfied with this application", + "ar": "ما مدى رضائك عن هذا التطبيق" + }, + "give-comments": { + "en": "Please give us a comments", + "ar": "من فضلك اعطنا تعليقات" + } } } \ No newline at end of file diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss index e47b5f2f..9809f7f8 100644 --- a/Mohem/src/theme/styles.scss +++ b/Mohem/src/theme/styles.scss @@ -1562,11 +1562,12 @@ table.monthview-datetable th small { display: block; } .fav-employee-details{ - font-size: 24px; - position: relative; - bottom: 30px; + font-size: 20px; + position: absolute; + bottom: 85px; font-weight: bold; color: black !important; + padding: 5px; } .fav-profileImageDiv{ width: 100%;