Merge branch 'enad-pre-live' of https://gitlab.com/haroon6138/mohemmionic5 into enad-pre-live

MOHEMM-Q3-DEV-LATEST
Sultan Khan 4 years ago
commit 3529b60ebc

@ -32,7 +32,7 @@ export class AbsenceReplacementListComponent implements OnInit {
P_PAGE_NUM: number; P_PAGE_NUM: number;
P_PAGE_LIMIT: number; P_PAGE_LIMIT: number;
ReplacementList: any = []; ReplacementList: any = [];
searchBy: string = ""; searchBy: string = "2";
IsReachEnd: boolean = false; IsReachEnd: boolean = false;
ReplacmentListRes: WorKListReplacmentEmployeeResponse; ReplacmentListRes: WorKListReplacmentEmployeeResponse;
private WorkListReplacmentEmployeeObj: WorkListReplacmentEmployeeRequest = new WorkListReplacmentEmployeeRequest(); private WorkListReplacmentEmployeeObj: WorkListReplacmentEmployeeRequest = new WorkListReplacmentEmployeeRequest();

@ -49,7 +49,7 @@
</ion-col> </ion-col>
</ion-row> </ion-row>
</ion-grid> --> </ion-grid> -->
<div style="height: 300px; width: 300px; transform: rotate(90deg) !important;"> <div style="height: 320px; width: 320px; transform: rotate(90deg) !important;">
<img style="width: 100px; margin-left: 20px; margin-top: 26px;" [src]='userInfo.company_logo' alt="https://hmgwebservices.com/images/Moheem/CS.jpg"/> <img style="width: 100px; margin-left: 20px; margin-top: 26px;" [src]='userInfo.company_logo' alt="https://hmgwebservices.com/images/Moheem/CS.jpg"/>
<h1 class='font-text-style' style="font-size: 25px !important; margin-left: 20px; margin-top: 5px; margin-bottom: 0px;">{{userInfo.name_en}}</h1> <h1 class='font-text-style' style="font-size: 25px !important; margin-left: 20px; margin-top: 5px; margin-bottom: 0px;">{{userInfo.name_en}}</h1>
<h5 class='font-text-style' style="margin-left: 20px; margin-top: 0px; ">{{jobName}}</h5> <h5 class='font-text-style' style="margin-left: 20px; margin-top: 0px; ">{{jobName}}</h5>

@ -60,9 +60,14 @@ export class HomeComponent implements OnInit {
}, ( }, (
) => { }, this.ts.trPK('general', 'ok')).subscribe((result) => { ) => { }, this.ts.trPK('general', 'ok')).subscribe((result) => {
CommonService.SKIP = true; if (this.cs.validResponse(result)){
this.cs.openHome(); this.cs.greenToastPK("erm-channel", "viedo-success");
}) CommonService.SKIP = true;
this.cs.openHome();
}else{
this.cs.redToastPK("erm-channel", "erm-failed");
}
});
} }
} }

@ -52,9 +52,14 @@ export class SurveyComponent implements OnInit {
this.authService.saveAdsStatus(request, () => { }, this.ts.trPK('general', 'ok')).subscribe((result) => { this.authService.saveAdsStatus(request, () => { }, this.ts.trPK('general', 'ok')).subscribe((result) => {
CommonService.SKIP = true; if (this.cs.validResponse(result)){
this.cs.openHome(); this.cs.greenToastPK("erm-channel", "survey-success");
}) CommonService.SKIP = true;
this.cs.openHome();
}else{
this.cs.redToastPK("erm-channel", "erm-failed");
}
});
} }
select(rating) { select(rating) {
this.satisfied = rating; this.satisfied = rating;

@ -216,7 +216,7 @@ export class CommonService {
const toast = await this.toastController.create({ const toast = await this.toastController.create({
message: message, message: message,
showCloseButton: true, showCloseButton: true,
position: 'middle', position: 'top',
duration: 2000, duration: 2000,
closeButtonText: this.ts.trPK('general', 'close') closeButtonText: this.ts.trPK('general', 'close')
}); });
@ -235,7 +235,7 @@ export class CommonService {
const toast = await this.toastController.create({ const toast = await this.toastController.create({
message: message, message: message,
showCloseButton: true, showCloseButton: true,
position: 'middle', position: 'top',
duration: 2000, duration: 2000,
color: 'danger', color: 'danger',
closeButtonText: this.ts.trPK('general', 'close') closeButtonText: this.ts.trPK('general', 'close')
@ -246,7 +246,7 @@ export class CommonService {
const toast = await this.toastController.create({ const toast = await this.toastController.create({
message: message, message: message,
showCloseButton: true, showCloseButton: true,
position: 'middle', position: 'top',
duration: 2000, duration: 2000,
color: 'success', color: 'success',
closeButtonText: this.ts.trPK('general', 'close') closeButtonText: this.ts.trPK('general', 'close')

@ -235,7 +235,7 @@ export class DetailsComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.common.startLoading(); this.common.startLoading();
this.intializeMemberDetail(); this.intializeMemberDetail();
this.showAttendanceTracking(); // this.showAttendanceTracking();
// tslint:disable-next-line: max-line-length // tslint:disable-next-line: max-line-length
this.currentMonthName = this.direction === 'en' ? this.common.getMonthName(this.monthIndex) : this.common.getMonthNameAr(this.monthIndex); this.currentMonthName = this.direction === 'en' ? this.common.getMonthName(this.monthIndex) : this.common.getMonthNameAr(this.monthIndex);
} }
@ -266,6 +266,7 @@ export class DetailsComponent implements OnInit {
if (this.activeSegment === 'Attendance') { if (this.activeSegment === 'Attendance') {
this.common.startLoading(); this.common.startLoading();
this.initAttendance(); this.initAttendance();
this.showAttendanceTracking();
} }
else if (this.activeSegment != 'Attendance' && this.activeSegment != 'TeamMembers') { else if (this.activeSegment != 'Attendance' && this.activeSegment != 'TeamMembers') {
this.activeSegment = 'About'; this.activeSegment = 'About';

@ -149,28 +149,28 @@ export class WorkListMainItgComponent implements OnInit {
return '../assets/imgs/mohemm-action/info.png'; return '../assets/imgs/mohemm-action/info.png';
} }
if (actionName === 'Grant') { if (actionName === 'Grant') {
return '../assets/imgs/mohemm-action/info.png'; return '../assets/imgs/mohemm-action/grant.png';
} }
if (actionName === 'Delegate') { if (actionName === 'Delegate') {
return '../assets/imgs/mohemm-action/delegate.png'; return '../assets/imgs/mohemm-action/delegate.png';
} }
if (actionName === 'Answer') { if (actionName === 'Answer') {
return '../assets/imgs/mohemm-action/info.png'; return '../assets/imgs/mohemm-action/answer.png';
} }
if (actionName === 'Question') { if (actionName === 'Question') {
return '../assets/imgs/mohemm-action/info.png'; return '../assets/imgs/mohemm-action/question.png';
} }
if (actionName === 'ReportGenerated') { if (actionName === 'ReportGenerated') {
return '../assets/imgs/mohemm-action/ReportGenerated.png'; return '../assets/imgs/mohemm-action/ReportGenerated.png';
} }
if (actionName === 'Doable') { if (actionName === 'Doable') {
return '../assets/imgs/mohemm-action/info.png'; return '../assets/imgs/mohemm-action/Doable.png';
} }
if (actionName === 'NotDoable') { if (actionName === 'NotDoable') {
return '../assets/imgs/mohemm-action/info.png'; return '../assets/imgs/mohemm-action/notDoable.png';
} }
if (actionName === 'DataCorrected') { if (actionName === 'DataCorrected') {
return '../assets/imgs/mohemm-action/info.png'; return '../assets/imgs/mohemm-action/data-corrected.png';
} }
} }

@ -170,7 +170,7 @@
</ion-list> </ion-list>
<div style="font-weight: bold;" *ngIf="searchKeySelect === '4' && !isFavoriteLetterActive"> <!-- <div style="font-weight: bold;" *ngIf="searchKeySelect === '4' && !isFavoriteLetterActive">
<ion-slides [options]="slideOptsOne"> <ion-slides [options]="slideOptsOne">
<ion-slide *ngFor="let filter of favLetter; let i=index"> <ion-slide *ngFor="let filter of favLetter; let i=index">
<div> <div>
@ -178,9 +178,28 @@
</div> </div>
</ion-slide> </ion-slide>
</ion-slides> </ion-slides>
</div> -->
<div class="letterDiv" *ngIf="searchKeySelect === '4' && !isFavoriteLetterActive && !userSelected">
<!-- <ion-slides [options]="slideOptsOne">
<ion-slide *ngFor="let filter of favLetter; let i=index"> -->
<div *ngFor="let filter of favLetter; let i=index" class="letterDivLoop">
<p (click)='selectedLetter(favLetter[i])'>{{filter}}</p>
</div>
<!-- </ion-slide>
</ion-slides> -->
</div>
<div class="letterDiv" *ngIf="searchKeySelect === '4' && isFavoriteLetterActive && !userSelected">
<!-- <ion-slides [options]="slideOptsOne">
<ion-slide *ngFor="let filter of favLetter; let i=index"> -->
<div [ngClass]="returnIsActiveFunction(i)? 'isFavLetterActive':'letterDivLoop'" *ngFor="let filter of favLetter; let i=index">
<p (click)='selectedLetter(favLetter[i])'>{{filter}}</p>
</div>
<!-- </ion-slide>
</ion-slides> -->
</div> </div>
<div style="font-weight: bold;" *ngIf="searchKeySelect === '4' && isFavoriteLetterActive"> <!-- <div style="font-weight: bold;" *ngIf="searchKeySelect === '4' && isFavoriteLetterActive">
<ion-slides [options]="slideOptsOne"> <ion-slides [options]="slideOptsOne">
<ion-slide *ngFor="let filter of favLetter; let i=index"> <ion-slide *ngFor="let filter of favLetter; let i=index">
<div [ngClass]="returnIsActiveFunction(i)? 'isFavLetterActive':''"> <div [ngClass]="returnIsActiveFunction(i)? 'isFavLetterActive':''">
@ -188,7 +207,7 @@
</div> </div>
</ion-slide> </ion-slide>
</ion-slides> </ion-slides>
</div> </div> -->
<!-- <ion-item> <!-- <ion-item>
<ion-list [(ngModel)]="selEmp" *ngIf="ReplacementList"> <ion-list [(ngModel)]="selEmp" *ngIf="ReplacementList">
@ -209,7 +228,7 @@
</ion-item> </ion-item>
</ion-radio-group> </ion-radio-group>
</ion-list> --> </ion-list> -->
<div *ngIf="!userSelected"> <div *ngIf="!userSelected" style="float: right;">
<div *ngIf="ReplacementList.length>0" class="uk-margin"> <div *ngIf="ReplacementList.length>0" class="uk-margin">
{{'replacementRoll, search-result' | translate}} {{'replacementRoll, search-result' | translate}}
</div> </div>
@ -282,7 +301,7 @@
</div> </div>
<!-- favorite list --> <!-- favorite list -->
<div [hidden]="isAnswer==true" <div [hidden]="isAnswer==true" style="width: 90%; float: left;"
*ngIf="favoriteUserList.length> 0 && !userSelected && ReplacementList.length ==0 && searchKeySelect == '4' && isFavoriteLetterActive"> *ngIf="favoriteUserList.length> 0 && !userSelected && ReplacementList.length ==0 && searchKeySelect == '4' && isFavoriteLetterActive">
<div class="uk-margin"> <div class="uk-margin">
{{'replacementRoll, favorite' | translate}} {{'replacementRoll, favorite' | translate}}
@ -314,16 +333,20 @@
</div> </div>
</div> </div>
<div *ngIf="favLetter.length > 0 && searchKeySelect == '4' && favoriteUserList.length === 0"> <div style="margin: 180px 15px 0px 15px !important;" *ngIf="favLetter.length > 0 && searchKeySelect == '4' && favoriteUserList.length === 0">
<ion-label> <ion-label>
<p style="text-align: center;"> <p style="text-align: center;">
{{'general, fav-showData' | translate}} {{'general, fav-showData' | translate}}
</p> </p>
</ion-label> </ion-label>
</div> </div>
<div *ngIf="favoriteUserList.length === 0 && searchKeySelect == '4' && favLetter.length ===0"> <div style="margin: -21px 15px 0px 15px !important;" *ngIf="favoriteUserList.length === 0 && searchKeySelect == '4' && favLetter.length ===0">
<ion-label> <ion-label>
<p style="text-align: center;"> <p style=" margin: 15px 15px 0px 15px;
font-weight: bold;
clear: both;
position: relative;
top: 10px;">
{{'general, fav-noData' | translate}} {{'general, fav-noData' | translate}}
</p> </p>
</ion-label> </ion-label>

@ -281,18 +281,33 @@ ion-radio {
} }
.isFavLetterActive { .isFavLetterActive {
background: #269db8; color: #269db8;
width: 55px; display: block;
border-radius: 60px; width: 60%;
color: white; float: right;
transition-duration: 0ms;
height: 35px;
} }
.vl { .vl {
border-left: 2px solid lightgray; border-left: 2px solid lightgray;
height: 36px; height: 42px;
} }
.searchText{ .searchText{
background: transparent; background: transparent;
color: #D55D5C; color: #269db8;
font-weight: bold; font-weight: bold;
text-decoration: underline; text-decoration: underline;
} }
.letterDiv{
font-weight: bold;
width: 10%;
float: right;
}
.letterDivLoop{
display: block;
width: 60%;
float: right;
transition-duration: 0ms;
height: 35px;
}

@ -177,10 +177,10 @@ export class WorkListReplacementItgComponent implements OnInit {
if (this.selEmp) { if (this.selEmp) {
data = this.selEmp; data = this.selEmp;
// this.messageSuccess = true; // this.messageSuccess = true;
this.cs.greenToastPK('worklist', 'save-successfully'); // this.cs.greenToastPK('worklist', 'save-successfully');
} else { } else {
data = null; data = null;
this.cs.redToastPK('worklist', 'save-error'); // this.cs.redToastPK('worklist', 'save-error');
} }
if (typeof this.callback == 'function') { if (typeof this.callback == 'function') {
this.callback(data); this.callback(data);
@ -300,10 +300,10 @@ export class WorkListReplacementItgComponent implements OnInit {
const userIndex = this.favoriteUserList.findIndex(x => x['USER_NAME'] === userID); const userIndex = this.favoriteUserList.findIndex(x => x['USER_NAME'] === userID);
console.log(userIndex); console.log(userIndex);
if (userIndex === -1) { if (userIndex === -1) {
selEmp.IsFavorite = !selEmp.IsFavorite;
this.cs.presentConfirmDialog( this.cs.presentConfirmDialog(
confirmBoxhtml confirmBoxhtml
, () => { , () => {
selEmp.IsFavorite = !selEmp.IsFavorite;
const request = const request =
[ [
{ {

@ -86,7 +86,7 @@
</div> --> </div> -->
<div style="border: 1px solid lightgray; border-radius: 100px; width: 100%;"> <div style="border: 1px solid lightgray; border-radius: 100px; width: 100%;">
<ion-grid style="height: 50px; padding: 1px 1px 1px 1px;"> <ion-grid style="height: 54px; padding: 1px 1px 1px 1px;">
<ion-row> <ion-row>
<ion-col size="7"> <ion-col size="7">
<div *ngIf="isFilter" style="height: 0px;"> <div *ngIf="isFilter" style="height: 0px;">
@ -126,24 +126,24 @@
</ion-grid> </ion-grid>
</ion-list> </ion-list>
<div style="font-weight: bold;" *ngIf="searchBy === '4' && !isFavoriteLetterActive && !userSelected"> <div class="letterDiv" *ngIf="searchBy === '4' && !isFavoriteLetterActive && !userSelected">
<ion-slides [options]="slideOptsOne"> <!-- <ion-slides [options]="slideOptsOne">
<ion-slide *ngFor="let filter of favLetter; let i=index"> <ion-slide *ngFor="let filter of favLetter; let i=index"> -->
<div> <div *ngFor="let filter of favLetter; let i=index" class="letterDivLoop">
<p (click)='selectedLetter(favLetter[i])'>{{filter}}</p> <p (click)='selectedLetter(favLetter[i])'>{{filter}}</p>
</div> </div>
</ion-slide> <!-- </ion-slide>
</ion-slides> </ion-slides> -->
</div> </div>
<div style="font-weight: bold;" *ngIf="searchBy === '4' && isFavoriteLetterActive && !userSelected"> <div class="letterDiv" *ngIf="searchBy === '4' && isFavoriteLetterActive && !userSelected">
<ion-slides [options]="slideOptsOne"> <!-- <ion-slides [options]="slideOptsOne">
<ion-slide *ngFor="let filter of favLetter; let i=index"> <ion-slide *ngFor="let filter of favLetter; let i=index"> -->
<div [ngClass]="returnIsActiveFunction(i)? 'isFavLetterActive':''"> <div [ngClass]="returnIsActiveFunction(i)? 'isFavLetterActive':'letterDivLoop'" *ngFor="let filter of favLetter; let i=index">
<p (click)='selectedLetter(favLetter[i])'>{{filter}}</p> <p (click)='selectedLetter(favLetter[i])'>{{filter}}</p>
</div> </div>
</ion-slide> <!-- </ion-slide>
</ion-slides> </ion-slides> -->
</div> </div>
<div class="noteInput" *ngIf="isAnswer==true"> <div class="noteInput" *ngIf="isAnswer==true">
@ -191,8 +191,8 @@
<br /> <br />
<!-- <div [hidden]="isAnswer==true" <!-- <div [hidden]="isAnswer==true"
*ngIf="favoriteUserList.length> 0 && !userSelected && ReplacementList.length ==0 && searchBy == '4'"> --> *ngIf="favoriteUserList.length> 0 && !userSelected && ReplacementList.length ==0 && searchBy == '4'"> -->
<div [hidden]="isAnswer==true" *ngIf="favoriteUserList.length >0 && !userSelected && searchBy === '4'"> <div style="width: 90%; float: left;" [hidden]="isAnswer==true" *ngIf="favoriteUserList.length >0 && !userSelected && searchBy === '4'">
<div class="uk-margin"> <div class="uk-margin" style="margin: -21px 15px 0px 15px !important;">
{{'replacementRoll, favorite' | translate}} {{'replacementRoll, favorite' | translate}}
</div> </div>
@ -222,16 +222,16 @@
</div> </div>
</div> </div>
<div *ngIf="favLetter.length > 0 && searchBy == '4' && favoriteUserList.length === 0"> <div style="padding-top: 190px;" *ngIf="favLetter.length > 0 && searchBy == '4' && favoriteUserList.length === 0">
<ion-label> <ion-label>
<p style="text-align: center;"> <p style="text-align: center; text-align: center; font-size: 20px; padding: 0px 35px 20px 0px;">
{{'general, fav-showData' | translate}} {{'general, fav-showData' | translate}}
</p> </p>
</ion-label> </ion-label>
</div> </div>
<div *ngIf="favoriteUserList.length === 0 && searchBy == '4' && favLetter.length ===0"> <div *ngIf="favoriteUserList.length === 0 && searchBy == '4' && favLetter.length ===0">
<ion-label> <ion-label>
<p style="text-align: center;"> <p style="text-align: center; font-size: 20px; padding: 0px 35px 20px 0px;">
{{'general, fav-noData' | translate}} {{'general, fav-noData' | translate}}
</p> </p>
</ion-label> </ion-label>

@ -208,14 +208,19 @@ ion-radio {
font-size: 12px; font-size: 12px;
} }
.isFavLetterActive { .isFavLetterActive {
background: #269db8; // background: #269db8;
width: 55px; // width: 55px;
border-radius: 60px; // border-radius: 60px;
color: white; color: #269db8;
display: block;
width: 60%;
float: right;
transition-duration: 0ms;
height: 35px;
} }
.vl { .vl {
border-left: 2px solid lightgray; border-left: 2px solid lightgray;
height: 36px; height: 42px;
} }
.clearText{ .clearText{
background: transparent; background: transparent;
@ -225,7 +230,7 @@ ion-radio {
} }
.searchText{ .searchText{
background: transparent; background: transparent;
color: #D55D5C; color: #269db8;
font-weight: bold; font-weight: bold;
text-decoration: underline; text-decoration: underline;
} }
@ -233,3 +238,16 @@ ion-radio {
box-shadow: none !important; box-shadow: none !important;
-webkit-box-shadow: none !important; -webkit-box-shadow: none !important;
} }
.letterDiv{
font-weight: bold;
width: 10%;
float: right;
}
.letterDivLoop{
display: block;
width: 60%;
float: right;
transition-duration: 0ms;
height: 35px;
}

@ -445,21 +445,20 @@ export class WorkListReplacementRollComponent implements OnInit {
counter = 0; counter = 0;
onChangeSelect(select) { onChangeSelect(select) {
let selectValue = select.detail.value; let selectValue = select.detail.value;
if (selectValue == '1') { if (selectValue == '1') {
this.isSelect = true; this.isSelect = true;
this.isFilter = true; this.isFilter = true;
this.selectedType = 1; this.selectedType = 1;
this.listOfRealted = this.actionHistory; this.listOfRealted = this.actionHistory;
if (this.counter > 0) { // if (this.counter > 0) {
this.actionHistory.forEach((obj, i) => { this.actionHistory.forEach((obj, i) => {
if (this.favoriteUserList.find(x => x['USER_NAME'] === obj.USER_NAME)) { if (this.favoriteUserList.find(x => x['USER_NAME'] === obj.USER_NAME)) {
this.actionHistory[i].IsFavorite = true; this.actionHistory[i].IsFavorite = true;
} else { } else {
this.actionHistory[i].IsFavorite = false; this.actionHistory[i].IsFavorite = false;
} }
}); });
} // }
this.counter = 1; this.counter = 1;
} else if (selectValue === '4') { } else if (selectValue === '4') {
// if (this.favoriteUserList.length === 0 || this.favoriteUserList === undefined) { // if (this.favoriteUserList.length === 0 || this.favoriteUserList === undefined) {
@ -523,7 +522,9 @@ export class WorkListReplacementRollComponent implements OnInit {
}); });
this.favLetter.forEach((obj, index) => { this.favLetter.forEach((obj, index) => {
if (this.activeSelectedLetter) { } if (this.activeSelectedLetter) {
this.selectedLetter(this.activeSelectedLetter);
}
if (index === 0) { if (index === 0) {
// this.selectedLetter(obj); // this.selectedLetter(obj);
this.favIsActive.push(true); this.favIsActive.push(true);
@ -531,150 +532,154 @@ export class WorkListReplacementRollComponent implements OnInit {
this.favIsActive.push(false); this.favIsActive.push(false);
} }
}); });
console.log(this.favLetter); console.log(this.favLetter);
console.log(this.favIsActive); console.log(this.favIsActive);
} }
}); });
// this.worklistService.getFavorite({}, () => { // this.worklistService.getFavorite({}, () => {
// }).subscribe((result) => { // }).subscribe((result) => {
// if (this.cs.validResponse(result)) { // if (this.cs.validResponse(result)) {
// this.cs.stopLoading(); // this.cs.stopLoading();
// this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList']; // this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList'];
// this.listOfFav = this.favoriteUserList; // this.listOfFav = this.favoriteUserList;
// this.favoriteUserList.forEach((obj) => { // this.favoriteUserList.forEach((obj) => {
// obj.IsFavorite = true; // obj.IsFavorite = true;
// }); // });
// } // }
// }); // });
} }
saveUserFavruiteList(request, isFav: boolean) { saveUserFavruiteList(request, isFav: boolean) {
this.worklistService.saveFavoriteList(request, () => { this.worklistService.saveFavoriteList(request, () => {
}).subscribe((result) => { }).subscribe((result) => {
if (this.cs.validResponse(result)) { if (this.cs.validResponse(result)) {
if (isFav) { if (isFav) {
this.cs.greenToastPK("replacementRoll", "favorite-saved"); this.cs.greenToastPK("replacementRoll", "favorite-saved");
} else { } else {
this.cs.redToastPK("replacementRoll", "favorite-unsaved"); this.cs.redToastPK("replacementRoll", "favorite-unsaved");
}
this.getFavruite();
} }
this.getFavruite(); });
} }
});
}
setFavorite(selEmp) { setFavorite(selEmp) {
selEmp.EMPLOYEE_DISPLAY_NAME = selEmp.EMPLOYEE_DISPLAY_NAME ? selEmp.EMPLOYEE_DISPLAY_NAME : selEmp.NAME; let confirmBoxhtml = `<div>
selEmp.EMPLOYEE_IMAGE = selEmp.EMPLOYEE_IMAGE ? selEmp.EMPLOYEE_IMAGE : '';
selEmp.EMAIL_ADDRESS = selEmp.EMAIL_ADDRESS ? selEmp.EMAIL_ADDRESS : '';
selEmp.IsFavorite = !selEmp.IsFavorite;
let confirmBoxhtml = `<div>
<h4>Do you want to add ` + selEmp.EMPLOYEE_DISPLAY_NAME + ` in your favorite list </h4> <h4>Do you want to add ` + selEmp.EMPLOYEE_DISPLAY_NAME + ` in your favorite list </h4>
<br/> <br/>
<br/> <br/>
<div class="fav-profileImageDiv"><ion-row>`; <div class="fav-profileImageDiv"><ion-row>`;
if (selEmp.EMPLOYEE_IMAGE) { if (selEmp.EMPLOYEE_IMAGE) {
confirmBoxhtml += '<div class="img-box"><img class="empImgeRep" src="data:image/png;base64,' + selEmp.EMPLOYEE_IMAGE + '"></div>'; confirmBoxhtml += '<div class="img-box"><img class="empImgeRep" src="data:image/png;base64,' + selEmp.EMPLOYEE_IMAGE + '"></div>';
} }
if (!selEmp.EMPLOYEE_IMAGE) { if (!selEmp.EMPLOYEE_IMAGE) {
confirmBoxhtml += '<div class="img-box"><img class="empImgeRep" src="../assets/imgs/profile.png"></div>'; confirmBoxhtml += '<div class="img-box"><img class="empImgeRep" src="../assets/imgs/profile.png"></div>';
} }
confirmBoxhtml += ` <div class="name-box"><ion-label class="fav-employee-details"> confirmBoxhtml += ` <div class="name-box"><ion-label class="fav-employee-details">
<span>` + selEmp.EMPLOYEE_DISPLAY_NAME + `</span> <span>` + selEmp.EMPLOYEE_DISPLAY_NAME + `</span>
</ion-label> </ion-label>
</div></ion-row> </div> </div></ion-row> </div>
</div>`; </div>`;
const userIndex = this.favoriteUserList.findIndex(x => x['USER_NAME'] === selEmp.USER_NAME) const userIndex = this.favoriteUserList.findIndex(x => x['USER_NAME'] === selEmp.USER_NAME)
if (userIndex === -1) { if (userIndex === -1) {
this.cs.presentConfirmDialog( this.cs.presentConfirmDialog(
confirmBoxhtml confirmBoxhtml
, () => { , () => {
const request = 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 : '';
'USER_NAME': selEmp['USER_NAME'], selEmp.IsFavorite = !selEmp.IsFavorite;
'EMPLOYEE_DISPLAY_NAME': selEmp['EMPLOYEE_DISPLAY_NAME'], const request =
'EMAIL_ADDRESS': selEmp.EMAIL_ADDRESS, [
'EMPLOYEE_IMAGE': selEmp.EMPLOYEE_IMAGE, {
'IsFavorite': selEmp.IsFavorite 'USER_NAME': selEmp['USER_NAME'],
} 'EMPLOYEE_DISPLAY_NAME': selEmp['EMPLOYEE_DISPLAY_NAME'],
]; 'EMAIL_ADDRESS': selEmp.EMAIL_ADDRESS,
'EMPLOYEE_IMAGE': selEmp.EMPLOYEE_IMAGE,
this.saveUserFavruiteList(request, selEmp.IsFavorite); 'IsFavorite': selEmp.IsFavorite
}, () => { }); }
} else { ];
const request =
[ this.saveUserFavruiteList(request, selEmp.IsFavorite);
{ }, () => { });
'USER_NAME': selEmp['USER_NAME'], } else {
'EMPLOYEE_DISPLAY_NAME': selEmp['EMPLOYEE_DISPLAY_NAME'], selEmp.EMPLOYEE_DISPLAY_NAME = selEmp.EMPLOYEE_DISPLAY_NAME ? selEmp.EMPLOYEE_DISPLAY_NAME : selEmp.NAME;
'EMAIL_ADDRESS': selEmp.EMAIL_ADDRESS, selEmp.EMPLOYEE_IMAGE = selEmp.EMPLOYEE_IMAGE ? selEmp.EMPLOYEE_IMAGE : '';
'EMPLOYEE_IMAGE': selEmp.EMPLOYEE_IMAGE, selEmp.EMAIL_ADDRESS = selEmp.EMAIL_ADDRESS ? selEmp.EMAIL_ADDRESS : '';
'IsFavorite': false selEmp.IsFavorite = !selEmp.IsFavorite;
} const request =
]; [
this.saveUserFavruiteList(request, false); {
'USER_NAME': selEmp['USER_NAME'],
'EMPLOYEE_DISPLAY_NAME': selEmp['EMPLOYEE_DISPLAY_NAME'],
'EMAIL_ADDRESS': selEmp.EMAIL_ADDRESS,
'EMPLOYEE_IMAGE': selEmp.EMPLOYEE_IMAGE,
'IsFavorite': false
}
];
this.saveUserFavruiteList(request, false);
}
} }
}
listOfRealted: any = []; listOfRealted: any = [];
listOfFav: any = []; listOfFav: any = [];
filterList(event) { filterList(event) {
const val = event.target.value; const val = event.target.value;
if (this.selectedType === 1) { if (this.selectedType === 1) {
if (val === '') { if (val === '') {
this.actionHistory = this.listOfRealted; this.actionHistory = this.listOfRealted;
} else { } else {
this.actionHistory = this.listOfRealted.filter((item) => { this.actionHistory = this.listOfRealted.filter((item) => {
return (item.NAME.toLowerCase().indexOf(val.toLowerCase()) > -1); return (item.NAME.toLowerCase().indexOf(val.toLowerCase()) > -1);
}); });
} }
} else if (this.selectedType === 4) { } else if (this.selectedType === 4) {
if (val === '') { if (val === '') {
this.favoriteUserList = this.listOfFav; this.favoriteUserList = this.listOfFav;
} else {
this.favoriteUserList = this.listOfFav.filter((item) => {
return (item.EMPLOYEE_DISPLAY_NAME.toLowerCase().indexOf(val.toLowerCase()) > -1);
});
}
} else { } else {
this.favoriteUserList = this.listOfFav.filter((item) => { return;
return (item.EMPLOYEE_DISPLAY_NAME.toLowerCase().indexOf(val.toLowerCase()) > -1);
});
} }
} else {
return;
} }
}
selectedLetter(el) { selectedLetter(el) {
this.isFavoriteLetterActive = true; this.isFavoriteLetterActive = true;
this.favLetter.forEach((letter, index) => { this.favLetter.forEach((letter, index) => {
if (letter === el) { if (letter === el) {
this.favIsActive[index] = true; this.favIsActive[index] = true;
this.activeSelectedLetter = el; this.activeSelectedLetter = el;
this.worklistService.getFavoriteByLetter(letter, () => { this.worklistService.getFavoriteByLetter(letter, () => {
}).subscribe((result) => { }).subscribe((result) => {
if (this.cs.validResponse(result)) { if (this.cs.validResponse(result)) {
this.cs.stopLoading(); this.cs.stopLoading();
this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList']; this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList'];
this.listOfFav = this.favoriteUserList; this.listOfFav = this.favoriteUserList;
this.favoriteUserList.forEach((obj) => { this.favoriteUserList.forEach((obj) => {
obj.IsFavorite = true; obj.IsFavorite = true;
}); });
} }
}); });
} else { } else {
this.favIsActive[index] = false; this.favIsActive[index] = false;
} }
}); });
} }
returnIsActiveFunction(i) { returnIsActiveFunction(i) {
return this.favIsActive[i]; return this.favIsActive[i];
} }
clearSearchInput(){ clearSearchInput() {
this.inputSearch = ''; this.inputSearch = '';
} }
} }

@ -381,12 +381,12 @@ export class WorklistMainIcComponent implements OnInit {
this.common.sharedService.setSharedData(this.notificationButtonRes, "passActionMore"); this.common.sharedService.setSharedData(this.notificationButtonRes, "passActionMore");
// console.log("test" + this.notificationButtonRes.length); // console.log("test" + this.notificationButtonRes.length);
for (let i = 0; i < this.notificationButtonRes.length; i++) { for (let i = 0; i < this.notificationButtonRes.length; i++) {
if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVE") { if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVE" || this.notificationButtonRes[i].BUTTON_ACTION == "APPROVED") {
this.approve_label = this.notificationButtonRes[i].BUTTON_LABEL; this.approve_label = this.notificationButtonRes[i].BUTTON_LABEL;
this.approveDis = true; this.approveDis = true;
} else } else
if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECT") { if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECT" || this.notificationButtonRes[i].BUTTON_ACTION == "REJECTED") {
this.reject_label = this.notificationButtonRes[i].BUTTON_LABEL; this.reject_label = this.notificationButtonRes[i].BUTTON_LABEL;
this.rejectDis = true; this.rejectDis = true;
} else } else
@ -401,7 +401,7 @@ export class WorklistMainIcComponent implements OnInit {
this.closeDis = true; this.closeDis = true;
} }
else if ( else if (
this.notificationButtonRes[i].BUTTON_ACTION != "APPROVE" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECT" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO" && this.notificationButtonRes[i].BUTTON_ACTION != "CLOSE") { this.notificationButtonRes[i].BUTTON_ACTION != "APPROVE" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECT" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO" && this.notificationButtonRes[i].BUTTON_ACTION != "CLOSE" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECTED" && this.notificationButtonRes[i].BUTTON_ACTION != "APPROVED") {
this.moreDisabled = false; this.moreDisabled = false;
} }

@ -18,15 +18,15 @@
<ion-list> <ion-list>
<ion-item> <ion-item>
<ion-label> <ion-label>
<p *ngIf="direction == 'ltr'" style="color: black; padding: 5px; font-size: 16px; font-family: 'Poppins'; font-weight: bolder;">item type</p> <p style="color: black; padding: 5px; font-size: 16px; font-family: 'Poppins'; font-weight: bolder;">item type</p>
</ion-label> </ion-label>
<p *ngIf="direction == 'ltr'" style="color: black; padding: 5px; font-size: 16px; font-family: 'Poppins'; font-weight: bolder;">FYA</p> <p style="color: black; padding: 5px; font-size: 16px; font-family: 'Poppins'; font-weight: bolder;">FYA</p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<p *ngIf="direction == 'ltr'" style="color: black; padding: 5px; font-size: 16px; font-family: 'Poppins'; font-weight: bolder;">FYI</p> <p style="color: black; padding: 5px; font-size: 16px; font-family: 'Poppins'; font-weight: bolder;">FYI</p>
</ion-item> </ion-item>
<ion-item *ngFor="let data of notificationList"> <ion-item *ngFor="let data of notificationList">
<ion-label> <ion-label>
<p *ngIf="direction == 'ltr'" style="color: black; padding: 5px; font-size: 16px; font-family: 'Poppins'; padding-bottom: 10px;">{{data.ITEM_TYPE}}</p> <p style="color: black; padding: 5px; font-size: 16px; font-family: 'Poppins'; padding-bottom: 10px;">{{data.ITEM_TYPE}}</p>
</ion-label> </ion-label>
<ion-toggle (ionChange)="chnageToggle(data, 'FYA', data.FYA_ENABLED_FALG)" [checked]="data.FYA_ENABLED_FALG === 'Y'"></ion-toggle> <ion-toggle (ionChange)="chnageToggle(data, 'FYA', data.FYA_ENABLED_FALG)" [checked]="data.FYA_ENABLED_FALG === 'Y'"></ion-toggle>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;

@ -852,7 +852,7 @@ $actionBtnSize : 36px;
font-size: 18px; font-size: 18px;
} }
span{ span{
font-size: 11px; font-size: 9px;
} }
} }
} }

@ -184,7 +184,7 @@ export class TimeCardDetailsComponent implements OnInit {
{ {
data: [this.absentDays, this.attendedDays], data: [this.absentDays, this.attendedDays],
backgroundColor: [ backgroundColor: [
'#269DB8', '#292F42',
'#269DB8' '#269DB8'
], ],
borderWidth: 2 borderWidth: 2

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -3458,6 +3458,17 @@
"give-comments": { "give-comments": {
"en": "Please give us a comments", "en": "Please give us a comments",
"ar": "من فضلك اعطنا تعليقات" "ar": "من فضلك اعطنا تعليقات"
},
"survey-success":{
"en":"Your survey has been submitted successfully",
"ar":"تم تقديم الاستبيان الخاص بك بنجاح"
},
"erm-failed":{
"en":"Something went wrong please try again",
"ar":"حدث خطأ ما. أعد المحاولة من فضلك"
},"viedo-success":{
"en":"Thank you for watching this video",
"ar":"شكرا لك على مشاهدة هذا الفيديو"
} }
}, },
"transaction": { "transaction": {

Loading…
Cancel
Save