diff --git a/Mohem/src/app/app.component.ts b/Mohem/src/app/app.component.ts
index 97d796fa..817f5241 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 @@
-
+
@@ -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/my-team/details/details.component.ts b/Mohem/src/app/my-team/details/details.component.ts
index feb95a7d..02118570 100644
--- a/Mohem/src/app/my-team/details/details.component.ts
+++ b/Mohem/src/app/my-team/details/details.component.ts
@@ -13,6 +13,7 @@ import { GetDayAndHoursDetailsRequest } from 'src/app/time-card/service/models/g
import { GetTimeCardSummaryRequest } from 'src/app/time-card/service/models/get-time-card-summary.request';
import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service';
import { AttendanceTrackingResponse } from 'src/app/hmg-common/services/dashbored/attendance-tracking.response';
+import { WorklistService } from 'src/app/notification/service/worklist.service';
@Component({
selector: 'app-details',
templateUrl: './details.component.html',
@@ -57,7 +58,7 @@ export class DetailsComponent implements OnInit {
public yearTitle: string;
public activeMonth: any;
public currentMonthName = '';
-
+ favoriteUserList: [] = [];
public showAttendence = false;
public showData = false;
public currentYear = new Date().getFullYear();
@@ -90,9 +91,9 @@ export class DetailsComponent implements OnInit {
public EmpTotal = [];
public selectedFilter = '';
public itemType = '';
- public monthNo : any;
-
-
+ public monthNo: any;
+
+
public filters = [
{
@@ -100,7 +101,7 @@ export class DetailsComponent implements OnInit {
name: 'JAN',
active: true,
color: '#0a0a0a',
- key: 'January',
+ key: 'January',
monthNo: 1,
disable: false
},
@@ -208,7 +209,7 @@ export class DetailsComponent implements OnInit {
slidesPerView: 7,
spaceBetween: 1
};
-
+
constructor(
public timeCardService: TimeCardService,
public menuService: MenuService,
@@ -218,6 +219,7 @@ export class DetailsComponent implements OnInit {
public modalController: ModalController,
public authService: AuthenticationService,
public dashboardService: DashboredService,
+ public worklistService: WorklistService,
) {
this.direction = TranslatorService.getCurrentLanguageName();
}
@@ -229,7 +231,7 @@ export class DetailsComponent implements OnInit {
// tslint:disable-next-line: max-line-length
this.currentMonthName = this.direction === 'en' ? this.common.getMonthName(this.monthIndex) : this.common.getMonthNameAr(this.monthIndex);
this.getSuborinatesAttStatus();
-
+
}
showAttendanceTracking() {
@@ -239,11 +241,11 @@ export class DetailsComponent implements OnInit {
P_SELECTED_EMPLOYEE_NUMBER: this.employee.EMPLOYEE_NUMBER
};
this.dashboardService.getAttendanceTracking(request).subscribe((result: AttendanceTrackingResponse) => {
- if (this.common.validResponse(result)) {
- const key = 'GetAttendanceTrackingList';
- this.attendanceTrackingList = result[key];
- }
- });
+ if (this.common.validResponse(result)) {
+ const key = 'GetAttendanceTrackingList';
+ this.attendanceTrackingList = result[key];
+ }
+ });
}
public segmentChanged(event: any) {
@@ -264,7 +266,10 @@ export class DetailsComponent implements OnInit {
this.showData = false;
this.nextMonth = new Date().getMonth() + 2;
this.preMonth = new Date().getMonth();
- this.calendarConfig(this.common.getMonthName(new Date().getMonth() + 1) , new Date().getFullYear());
+ // this.currentActiveIndex = this.nextMonth -1;
+ this.activeFilter(this.preMonth);
+ this.calendarConfig(this.common.getMonthName(new Date().getMonth() + 1), new Date().getFullYear());
+
}
calendarConfig(month?, year?) {
@@ -301,31 +306,38 @@ export class DetailsComponent implements OnInit {
});
}
- monthCardSliders(monthNo){
- console.log(monthNo+"__________________")
- // this.common.startLoading();
- // this.showData = false;
- // this.currentMonth = this.nextMonth - 1;
- // this.currentDate = new Date(this.currentYear, (this.preMonth + 1), 1);
- this.calendarConfig(this.getMonthName(this.monthNo) , this.currentYear);
- console.log("next month =" + this.nextMonth );
- console.log(" Month Name =" + this.currentMonthName);
-
+ monthCardSliders(monthNo) {
+ console.log(monthNo + "__________________")
+
+ /* change
+ */
+ this.currentMonthName = this.direction === 'en' ? this.common.getMonthName(this.monthIndex) : this.common.getMonthNameAr(this.monthIndex);
+ this.currentYear = new Date().getFullYear();
+ this.currentDate = new Date(new Date().getFullYear(), monthNo - 1);
+ this.showData = false;
+ this.nextMonth = monthNo;//new Date().getMonth() + 2;
+ this.preMonth = monthNo - 1;///new Date().getMonth();
+
+ //end
+ this.calendarConfig(this.getMonthName(monthNo), this.currentYear);
+ console.log("next month =" + this.nextMonth);
+ console.log(" Month Name =" + this.currentMonthName);
+
}
nextSlide() {
if (this.currentMonthName !== this.month) {
- this.common.startLoading();
- this.showData = false;
- if (this.nextMonth > 12) {
- this.currentYear = this.currentYear + 1;
- this.nextMonth = 1;
- }
- this.currentDate = new Date(this.currentYear, (this.nextMonth - 1), 1);
- this.calendarConfig(this.getMonthName(this.nextMonth) , this.currentYear);
- this.nextMonth = this.nextMonth + 1;
- this.preMonth = this.nextMonth - 2;
-
+ this.common.startLoading();
+ this.showData = false;
+ if (this.nextMonth > 12) {
+ this.currentYear = this.currentYear + 1;
+ this.nextMonth = 1;
+ }
+ this.currentDate = new Date(this.currentYear, (this.nextMonth - 1), 1);
+ this.calendarConfig(this.getMonthName(this.nextMonth), this.currentYear);
+ this.nextMonth = this.nextMonth + 1;
+ this.preMonth = this.nextMonth - 2;
+
}
}
@@ -333,12 +345,12 @@ export class DetailsComponent implements OnInit {
this.common.startLoading();
this.showData = false;
if (this.preMonth === 0) {
- this.currentYear = this.currentYear - 1;
- this.preMonth = 12;
+ this.currentYear = this.currentYear - 1;
+ this.preMonth = 12;
}
this.currentDate = new Date(this.currentYear, (this.preMonth - 1), 1);
console.log(this.currentDate);
- this.calendarConfig(this.getMonthName(this.preMonth) , this.currentYear);
+ this.calendarConfig(this.getMonthName(this.preMonth), this.currentYear);
this.preMonth = this.preMonth - 1;
this.nextMonth = this.preMonth + 2;
}
@@ -363,14 +375,14 @@ export class DetailsComponent implements OnInit {
allDays[i].customDaysOff = false;
allDays[i].customSchedule = false;
allDays[i].customScheduleDate = new Date(allDays[i].SCHEDULE_DATE);
- // tslint:disable-next-line: triple-equals
+ // tslint:disable-next-line: triple-equals
} else if (allDays[i].ATTENDED_FLAG == 'N' && allDays[i].ABSENT_FLAG == 'Y') {
allDays[i].customPresent = false;
allDays[i].customAbsent = true;
allDays[i].customDaysOff = false;
allDays[i].customSchedule = false;
allDays[i].customScheduleDate = new Date(allDays[i].SCHEDULE_DATE);
- // tslint:disable-next-line: triple-equals
+ // tslint:disable-next-line: triple-equals
} else if (allDays[i].ATTENDED_FLAG == 'N' && allDays[i].DAY_TYPE === 'OFF') {
allDays[i].customPresent = false;
allDays[i].customAbsent = false;
@@ -424,12 +436,12 @@ export class DetailsComponent implements OnInit {
],
borderWidth: 1,
// cutoutPrecentage:20 ,
-
+
}],
- labels: [
- 'Apsent',
- 'Present'
-
+ labels: [
+ 'Apsent',
+ 'Present'
+
]
};
}
@@ -455,7 +467,7 @@ export class DetailsComponent implements OnInit {
return 'July';
case 8:
return 'August';
- case 9 :
+ case 9:
return 'September';
case 10:
return 'October';
@@ -468,32 +480,32 @@ export class DetailsComponent implements OnInit {
}
public getMonthNameAr(value: any): any {
switch (value) {
- case 1:
- return 'يناير';
- case 2:
- return ' فبراير';
- case 3:
- return 'مارس';
- case 4:
- return 'أبريل';
- case 5:
- return 'مايو';
- case 6:
- return 'يونيو';
- case 7:
- return 'يوليو';
- case 8:
- return 'أغسطس';
- case 9:
- return 'سبتمبر';
- case 10:
- return ' اكتوبر';
- case 11:
- return ' نوفمبر';
- case 12:
- return 'ديسمبر';
+ case 1:
+ return 'يناير';
+ case 2:
+ return ' فبراير';
+ case 3:
+ return 'مارس';
+ case 4:
+ return 'أبريل';
+ case 5:
+ return 'مايو';
+ case 6:
+ return 'يونيو';
+ case 7:
+ return 'يوليو';
+ case 8:
+ return 'أغسطس';
+ case 9:
+ return 'سبتمبر';
+ case 10:
+ return ' اكتوبر';
+ case 11:
+ return ' نوفمبر';
+ case 12:
+ return 'ديسمبر';
}
-}
+ }
intializeMemberDetail(userID?) {
@@ -502,8 +514,8 @@ export class DetailsComponent implements OnInit {
this.pageLimit = 50;
this.pageNum = 1;
this.employee = this.common.sharedService.getSharedData(MyTeamService.EMPLOYEE_SHARED_DATA, false);
- const employees = this.common.sharedService.getSharedData( DetailsComponent.opendEmployeesARR, false);
- if ( employees ) {
+ const employees = this.common.sharedService.getSharedData(DetailsComponent.opendEmployeesARR, false);
+ if (employees) {
this.opendEmployees.push(this.employee);
this.common.sharedService.setSharedData(this.opendEmployees, DetailsComponent.opendEmployeesARR);
}
@@ -524,14 +536,14 @@ export class DetailsComponent implements OnInit {
} else {
// tslint:disable-next-line: prefer-for-of
for (let i = 0; i < this.opendEmployees.length; i++) {
- if (this.opendEmployees[i].EMPLOYEE_NUMBER === this.employee.SUPERVISOR_NUMBER) {
- this.common.sharedService.setSharedData(
- this.opendEmployees[i],
- MyTeamService.EMPLOYEE_SHARED_DATA
- );
- break;
+ if (this.opendEmployees[i].EMPLOYEE_NUMBER === this.employee.SUPERVISOR_NUMBER) {
+ this.common.sharedService.setSharedData(
+ this.opendEmployees[i],
+ MyTeamService.EMPLOYEE_SHARED_DATA
+ );
+ break;
+ }
}
- }
this.intializeMemberDetail(this.employee.SUPERVISOR_NUMBER);
}
}
@@ -562,8 +574,8 @@ export class DetailsComponent implements OnInit {
if (userID) {
selEmpNo = userID;
} else {
- selEmpNo = this.employee.EMPLOYEE_NUMBER;
- }
+ selEmpNo = this.employee.EMPLOYEE_NUMBER;
+ }
const body = {
P_SELECTED_EMPLOYEE_NUMBER: selEmpNo,
P_SEARCH_EMPLOYEE_NUMBER: searchEmpNum,
@@ -576,8 +588,8 @@ export class DetailsComponent implements OnInit {
this.myTeamService.getEmployeeSubordinates(body).subscribe((result: any) => {
console.log('one');
if (this.common.validResponse(result)) {
- this.handleEmpResult(result.GetEmployeeSubordinatesList);
- }
+ this.handleEmpResult(result.GetEmployeeSubordinatesList);
+ }
});
}
@@ -607,23 +619,23 @@ export class DetailsComponent implements OnInit {
} else {
this.empSubordinate = [];
}
-}
+ }
-doInfinite(infiniteScroll) {
- if (!this.isReachEnd) {
- this.myTeamService.getEmployeeSubordinates(this.getEmployeeSubordinatesRequestObject).subscribe((result: any) => {
+ doInfinite(infiniteScroll) {
+ if (!this.isReachEnd) {
+ this.myTeamService.getEmployeeSubordinates(this.getEmployeeSubordinatesRequestObject).subscribe((result: any) => {
console.log('two');
if (this.common.validResponse(result)) {
this.handleEmpResult(result.GetEmployeeSubordinatesList);
}
this.infiniteScroll.complete();
});
- } else {
- if (this.infiniteScroll) {
- this.infiniteScroll.complete();
+ } else {
+ if (this.infiniteScroll) {
+ this.infiniteScroll.complete();
+ }
}
}
-}
getDetails(index) {
this.common.sharedService.setSharedData(this.empSubordinate[index], MyTeamService.EMPLOYEE_SHARED_DATA);
@@ -692,17 +704,17 @@ doInfinite(infiniteScroll) {
this.showEmailInput = true;
}
}
-
- showCalender(){
- if(this.showAttendence){
- this.showAttendence = false
- }else{
+ showCalender() {
+ if (this.showAttendence) {
+ this.showAttendence = false
+
+ } else {
this.showAttendence = true
}
}
- getSuborinatesAttStatus(){
+ getSuborinatesAttStatus() {
const request = {
// VersionID:2.8,
// Channel:37,
@@ -714,53 +726,121 @@ doInfinite(infiniteScroll) {
// P_USER_NAME:"111209",
// UserName:"111209",
// P_EMAIL_ADDRESS:"Faisal.AlQurashi@cloudsolutions.com.sa",
- SearchMonth:"January",
- SearchYear:2021
+ SearchMonth: "January",
+ SearchYear: 2021
};
// this.myTeamService.getSuborinatesAttStatus().subscribe((result: any) =>
- this.myTeamService.getSuborinatesAttStatus(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=>
- {
- this.handleRespondSuborinatesAttStatusResult(result);
-
- })
- }
+ this.myTeamService.getSuborinatesAttStatus(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => {
+ this.handleRespondSuborinatesAttStatusResult(result);
- handleRespondSuborinatesAttStatusResult(result){
- // this.EmpTotal = result.GetSubordinatesAttdStatusList.length;
- this.EmpTotal = result.GetSubordinatesAttdStatusList[0].NUMBER_OF_EMPLOYEES;
- console.log("total no "+this.EmpTotal)
+ })
+ }
+
+ handleRespondSuborinatesAttStatusResult(result) {
+ // this.EmpTotal = result.GetSubordinatesAttdStatusList.length;
+ this.EmpTotal = result.GetSubordinatesAttdStatusList[0].NUMBER_OF_EMPLOYEES;
+ console.log("total no " + this.EmpTotal)
+ }
+
+ activeFilter(index: number) {
+ console.log(this.filters);
+ if (this.currentActiveIndex !== index) {
+ this.previousActiveIndex = this.currentActiveIndex;
+ this.currentActiveIndex = index;
+ this.filters[this.previousActiveIndex].active = false;
+ this.filters[this.currentActiveIndex].active = true;
+ this.selectedFilter = this.filters[this.currentActiveIndex].key;
+ }
+ }
+
+ disableFilters() {
+ for (const filter of this.filters) {
+ if (filter.key === this.itemType) {
+ filter.disable = false;
+ filter.active = true;
+ // filter.value = this.nextMonth - 1;
+ this.selectedFilter = filter.name;
+ } else if (this.itemType === '') {
+ filter.disable = false;
+ filter.active = false;
+ } else {
+ filter.disable = true;
+ filter.active = false;
}
+ }
+ if (this.itemType === '') {
+ this.filters[0].active = true;
+ }
+ }
- activeFilter(index: number) {
- console.log(this.filters);
- if (this.currentActiveIndex !== index) {
- this.previousActiveIndex = this.currentActiveIndex;
- this.currentActiveIndex = index;
- this.filters[this.previousActiveIndex].active = false;
- this.filters[this.currentActiveIndex].active = true;
- this.selectedFilter = this.filters[this.currentActiveIndex].key;
- }
+ //save favorite here
+
+ 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 ` + selEmp.EMPLOYEE_DISPLAY_NAME + ` in your favorite list
+
+
+
`;
+ if (selEmp.EMPLOYEE_IMAGE)
+ confirmBoxhtml += '';
+ if (!selEmp.EMPLOYEE_IMAGE)
+ confirmBoxhtml += '';
+
+ confirmBoxhtml += `
+
+ ` + selEmp.EMPLOYEE_DISPLAY_NAME + `
+
+
+
+
+
`
+ let userIndex = this.favoriteUserList.findIndex(x => x['USER_NAME'] == selEmp.USER_NAME)
+ if (userIndex == -1)
+ this.common.presentConfirmDialog(
+ confirmBoxhtml
+ , () => {
+ var request =
+ [{ "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);
+ }, () => {
+
+ })
+
+ // if (selectValue == "1" || selectValue == "2" || selectValue == "3") {
+ // this.isSelect = true;
+ // }
+ // else {
+ // this.isSelect = false;
+
+
+
+ // }
+ }
+
+ getFavruite() {
+
+ this.worklistService.getFavorite({}, () => {
+
+ }).subscribe((result) => {
+ if (this.common.validResponse(result)) {
+ this.common.stopLoading();
+ this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList'];
}
+ })
+ }
+ saveUserFavruiteList(request) {
+ this.worklistService.saveFavoriteList(request, () => {
+ }).subscribe((result) => {
+ if (this.common.validResponse(result)) {
+ this.common.toastPK("replacementRoll", "favorite-saved");
- disableFilters() {
- for (const filter of this.filters) {
- if (filter.key === this.itemType) {
- filter.disable = false;
- filter.active = true;
- // filter.value = this.nextMonth - 1;
- this.selectedFilter = filter.name;
- } else if (this.itemType === '') {
- filter.disable = false;
- filter.active = false;
- } else {
- filter.disable = true;
- filter.active = false;
- }
- }
- if (this.itemType === '') {
- this.filters[0].active = true;
- }
}
-
+ })
+ }
+
}
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 5c39b1f6..d2741d65 100644
--- a/Mohem/src/assets/localization/i18n.json
+++ b/Mohem/src/assets/localization/i18n.json
@@ -2105,6 +2105,10 @@
"en": "Enter a note",
"ar": "أدخل ملاحظة"
},
+ "favorite-saved": {
+ "en": "Your Favorite saved successfully",
+ "ar": "تم حفظ مفضلتك بنجاح"
+ },
"msg": {
"en": "Select a replacement",
"ar": "اختر بديل"
@@ -3093,5 +3097,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 f2d975f2..54ccb3c6 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%;