fixed itg

MOHEMM-Q3-DEV-LATEST
enadhilal 4 years ago
parent a22d3c64de
commit 27fc8ebb72

@ -142,7 +142,7 @@ export class AuthenticationService {
} else { } else {
mobileType = 'android'; mobileType = 'android';
} }
request.VersionID = 3.2; request.VersionID = 3.3;//3.2;
request.Channel = 31; request.Channel = 31;
request.LanguageID = TranslatorService.getCurrentLanguageCode(); request.LanguageID = TranslatorService.getCurrentLanguageCode();
request.MobileType = mobileType; request.MobileType = mobileType;

@ -31,6 +31,8 @@ export class WorklistMainService {
public static getPRNotificationBody = "Services/ERP.svc/REST/GET_PR_NOTIFICATION_BODY"; public static getPRNotificationBody = "Services/ERP.svc/REST/GET_PR_NOTIFICATION_BODY";
public static getICNotificationBody = "Services/ERP.svc/REST/GET_ITEM_CREATION_NTF_BODY"; public static getICNotificationBody = "Services/ERP.svc/REST/GET_ITEM_CREATION_NTF_BODY";
public static getBasicDetailNotificationBody = "Services/ERP.svc/REST/GET_BASIC_DET_NTF_BODY"; public static getBasicDetailNotificationBody = "Services/ERP.svc/REST/GET_BASIC_DET_NTF_BODY";
public static getPhoneNotificationBody = "Services/ERP.svc/REST/GET_PHONES_NOTIFICATION_BODY";
public static getTerminationNotificationBody = "Services/ERP.svc/REST/GET_TERM_NOTIFICATION_BODY";
public static getStampMSNotificationBody = "Services/ERP.svc/REST/GET_STAMP_MS_NOTIFICATION_BODY"; public static getStampMSNotificationBody = "Services/ERP.svc/REST/GET_STAMP_MS_NOTIFICATION_BODY";
public static getStampNSNotificationBody = "Services/ERP.svc/REST/GET_STAMP_NS_NOTIFICATION_BODY"; public static getStampNSNotificationBody = "Services/ERP.svc/REST/GET_STAMP_NS_NOTIFICATION_BODY";
public static getAddressNotificationBody = "Services/ERP.svc/REST/GET_ADDRESS_NOTIFICATION_BODY"; public static getAddressNotificationBody = "Services/ERP.svc/REST/GET_ADDRESS_NOTIFICATION_BODY";
@ -189,6 +191,37 @@ export class WorklistMainService {
); );
} }
public getPhoneNotificationBody(
WorkListBodyRequest: any,
onError?: any,
errorLabel?: string
): Observable<any> {
const request = WorkListBodyRequest;
this.authService.authenticateRequest(request);
return this.api.post(
WorklistMainService.getPhoneNotificationBody,
request,
onError,
errorLabel
);
}
public getTerminationNotificationBody(
WorkListBodyRequest: any,
onError?: any,
errorLabel?: string
): Observable<any> {
const request = WorkListBodyRequest;
this.authService.authenticateRequest(request);
return this.api.post(
WorklistMainService.getTerminationNotificationBody,
request,
onError,
errorLabel
);
}
public getPOItemHistory( public getPOItemHistory(
POItemHistoryReq: any, POItemHistoryReq: any,
onError?: any, onError?: any,

@ -6,6 +6,7 @@ import { WorkListReplacmentEmployeeRequest } from '../models/ReplacmentEmployeeR
import { WorkListActionHistoryRequest } from '../models/ActionHistoryReq'; import { WorkListActionHistoryRequest } from '../models/ActionHistoryReq';
import { WorKListRFCEmployeeResponse } from '../models/RFC-EmployeeRes'; import { WorKListRFCEmployeeResponse } from '../models/RFC-EmployeeRes';
import { WorkListActionHistoryResponse } from '../models/ActionHistoryRes'; import { WorkListActionHistoryResponse } from '../models/ActionHistoryRes';
import { Request } from 'src/app/hmg-common/services/models/request';
@Injectable() @Injectable()
@ -16,6 +17,7 @@ export class WorklistService {
public static getRFCEmployeeList = 'Services/ERP.svc/REST/GET_RFC_EMPLOYEE_LIST'; public static getRFCEmployeeList = 'Services/ERP.svc/REST/GET_RFC_EMPLOYEE_LIST';
public static getActionHistory = 'Services/ERP.svc/REST/GET_ACTION_HISTORY'; public static getActionHistory = 'Services/ERP.svc/REST/GET_ACTION_HISTORY';
public static getFavorite = 'Services/ERP.svc/REST/Mohemm_GetFavoriteReplacements'; public static getFavorite = 'Services/ERP.svc/REST/Mohemm_GetFavoriteReplacements';
public static getFavoriteWithoutImage = 'Services/ERP.svc/REST/Mohemm_GetFavoriteReplacementsWithoutImage';
public static saveFavorite = 'Services/ERP.svc/REST/Mohemm_ChangeFavoriteReplacements'; public static saveFavorite = 'Services/ERP.svc/REST/Mohemm_ChangeFavoriteReplacements';
constructor( constructor(
public api: ConnectorService, public api: ConnectorService,
@ -53,6 +55,15 @@ export class WorklistService {
public getFavorite(req: any, onError?: any, errorLabel?: string): Observable<WorkListActionHistoryResponse> { public getFavorite(req: any, onError?: any, errorLabel?: string): Observable<WorkListActionHistoryResponse> {
this.authService.authenticateRequest(req); this.authService.authenticateRequest(req);
console.log(req);
return this.api.post(WorklistService.getFavorite, req, onError, errorLabel);
}
public getFavoriteByLetter(letter: string, onError?: any, errorLabel?: string): Observable<WorkListActionHistoryResponse> {
const req = new Request();
this.authService.authenticateRequest(req);
req['ItgFilter'] = letter;
console.log(letter);
return this.api.post(WorklistService.getFavorite, req, onError, errorLabel); return this.api.post(WorklistService.getFavorite, req, onError, errorLabel);
} }
public saveFavoriteList(request: any, onError?: any, errorLabel?: string): Observable<any> { public saveFavoriteList(request: any, onError?: any, errorLabel?: string): Observable<any> {
@ -63,6 +74,11 @@ export class WorklistService {
return this.api.post(WorklistService.saveFavorite, req, onError, errorLabel); return this.api.post(WorklistService.saveFavorite, req, onError, errorLabel);
} }
public getFavoriteWithoutImage(req: any, onError?: any, errorLabel?: string): Observable<WorkListActionHistoryResponse> {
this.authService.authenticateRequest(req);
return this.api.post(WorklistService.getFavoriteWithoutImage, req, onError, errorLabel);
}
public getFavoriteMyTeam(req: any, onError?: any, errorLabel?: string): Observable<any> { public getFavoriteMyTeam(req: any, onError?: any, errorLabel?: string): Observable<any> {
this.authService.authenticateRequest(req); this.authService.authenticateRequest(req);
return this.api.post(WorklistService.getFavorite, req, onError, errorLabel); return this.api.post(WorklistService.getFavorite, req, onError, errorLabel);

@ -135,6 +135,16 @@
</ion-list> </ion-list>
<div style="font-weight: bold;" *ngIf="searchKeySelect === '4'">
<ion-slides [options]="slideOptsOne">
<ion-slide *ngFor="let filter of favLetter; let i=index">
<div [ngClass]="returnIsActiveFunction(i)? 'isFavLetterActive':''">
<p (click)='selectedLetter(favLetter[i])'>{{filter}}</p>
</div>
</ion-slide>
</ion-slides>
</div>
<!-- <ion-item> <!-- <ion-item>
<ion-list [(ngModel)]="selEmp" *ngIf="ReplacementList"> <ion-list [(ngModel)]="selEmp" *ngIf="ReplacementList">
<ion-item *ngFor="let employee of ReplacementList;let i=index;"> <ion-item *ngFor="let employee of ReplacementList;let i=index;">

@ -1,280 +1,286 @@
.disabledButton {
.disabledButton{ opacity: 0.5;
opacity:.5; }
} .radio-label {
margin: 4px;
.radio-label{ position: relative;
margin: 4px; bottom: 4px;
position: relative; }
bottom: 4px; ion-radio {
} --color-checked: #269db8;
ion-radio{ }
--color-checked: #269db8; .center {
} text-align: center;
.center{text-align: center;} }
.boldTxtNav{ .boldTxtNav {
font-weight: bold; font-weight: bold;
} }
.employee-details{ .employee-details {
display:inline-block; display: inline-block;
margin: 10px; margin: 10px;
} }
.empImgeRep{ .empImgeRep {
display: inline-block; display: inline-block;
height: 40px; height: 40px;
width: 40px; width: 40px;
} }
.star-fav{ .star-fav {
float: right; float: right;
margin: 10px; margin: 10px;
} }
.star-fav-left{ .star-fav-left {
float: left; float: left;
margin: 10px 5px; margin: 10px 5px;
} }
.uk-margin{margin: 15px 15px 0px 15px; .uk-margin {
font-weight: bold; margin: 15px 15px 0px 15px;
clear: both; font-weight: bold;
position: relative; clear: both;
top: 10px;} position: relative;
.uk-padding{ padding: 20px;} top: 10px;
.uk-padding .employee-details{ }
bottom: 10px; .uk-padding {
position: relative;} padding: 20px;
}
.filterInput{ .uk-padding .employee-details {
border: solid var(--gray) 1px; bottom: 10px;
border-radius: 21px; position: relative;
padding-left: 10px !important; }
}
.filterInput-ar{ .filterInput {
border: solid var(--gray) 1px;
border: solid var(--gray) 1px; border-radius: 21px;
border-radius: 21px; padding-left: 10px !important;
--padding-start: 10px !important; }
.filterInput-ar {
} border: solid var(--gray) 1px;
.square-container{ border-radius: 21px;
width:100%; --padding-start: 10px !important;
clear: both; }
} .square-container {
.square{ width: 100%;
clear: both; clear: both;
} }
.top-radio-row{ .square {
font-size: 12px; clear: both;
} }
.top-radio-row {
button.item-button.button.button-md.button-clear.button-clear-md { font-size: 12px;
background-color: transparent; }
}
button.item-button.button.button-md.button-clear.button-clear-md {
.footer-button { background-color: transparent;
background: #dbdbdb; }
border-radius: 10px;
color: black; .footer-button {
--background: transparent; background: #dbdbdb;
font-weight: bold; border-radius: 10px;
width: 75%; color: black;
} --background: transparent;
font-weight: bold;
// ion-item { width: 75%;
// margin-top: 5%; }
// margin-right: 7%;
// width: 100%; // ion-item {
// } // margin-top: 5%;
.ionItem{ // margin-right: 7%;
border: #e4e4e4 solid; // width: 100%;
/* margin: 6px; */ // }
/* padding: 11px; */ .ionItem {
height: 85px; border: #e4e4e4 solid;
width: 164px; /* margin: 6px; */
border-radius: 5px; /* padding: 11px; */
text-align: center; height: 85px;
width: 164px;
} border-radius: 5px;
text-align: center;
}
.profileImageDiv{
.profileImageDiv {
z-index: 3; z-index: 3;
position: relative; position: relative;
top: 0; top: 0;
}
} .profileImage {
.profileImage{ width: 60px !important;
width:60px !important; }
} .activated {
border: #209a83 0.02cm solid;
.activated{ }
border: #209a83 0.02cm solid ; .deactivated {
} border: #e4e4e4 0.02cm solid;
.deactivated{ border: #e4e4e4 0.02cm solid; }
} .repContentDiv {
.repContentDiv{ text-align: center;
text-align: center; width: 85%;
width: 85%; font-size: 14px;
font-size: 14px; border: #e4e4e4 solid;
border: #e4e4e4 solid; border-radius: 5px;
border-radius: 5px; padding: 20px 8px 8px 8px;
padding: 20px 8px 8px 8px; margin-top: -9px;
margin-top: -9px; margin-right: -35px;
margin-right: -35px }
.selIEmpDiv {
} text-align: right;
.selIEmpDiv{ margin-bottom: -26px;
text-align: right; margin-right: 0px;
margin-bottom: -26px; z-index: 3;
margin-right: 0px; position: relative;
z-index: 3; top: 0;
position: relative; }
top: 0;
} .selIEmpImage {
width: 22px !important;
.selIEmpImage{ }
width:22px !important
.noteInput {
} border: solid var(--gray) 1px;
border-radius: 15px;
.noteInput{ margin: 8px 17px 0px 17px;
border: solid var(--gray) 1px; padding: 10px 2px 10px 2px;
border-radius: 15px; }
margin: 8px 17px 0px 17px; .filterInput {
padding: 10px 2px 10px 2px; border: solid var(--gray) 1px;
} border-radius: 21px;
.filterInput{ padding-left: 10px !important;
border: solid var(--gray) 1px; }
border-radius: 21px;
padding-left: 10px !important; .filterInput-ar {
} // border: solid var(--gray) 1px;
// border-radius: 21px;
.filterInput-ar{ // padding-left: 10px !important;
// border: solid var(--gray) 1px; border: solid var(--gray) 1px;
// border-radius: 21px; border-radius: 21px;
// padding-left: 10px !important; // width:250px
border: solid var(--gray) 1px; // padding-left: 145px !important;
border-radius: 21px; //margin-left: 123px;
// width:250px // padding-right: 129px;
// padding-left: 145px !important; //margin-right: -136px;
//margin-left: 123px; }
// padding-right: 129px; .filterBtn {
//margin-right: -136px; background: var(--newgreen);
--background: var (--newgreen);
} border-radius: 50%;
.filterBtn{ height: 60px;
background: var(--newgreen); width: 60px;
--background: var (--newgreen); }
border-radius: 50%; .filterBtn-ar {
height: 60px; // background: var(--newgreen);
width: 60px; // --background: var (--newgreen);
} // border-radius: 50%;
.filterBtn-ar{ // height: 60px;
// background: var(--newgreen); // width: 60px;
// --background: var (--newgreen); background: var(--newgreen);
// border-radius: 50%; --background: var (--newgreen);
// height: 60px; border-radius: 50%;
// width: 60px; height: 60px;
background: var(--newgreen); width: 60px;
--background: var (--newgreen); margin-left: -183px;
border-radius: 50%; margin-right: 260px;
height: 60px; }
width: 60px;
margin-left: -183px; * {
margin-right: 260px; box-sizing: border-box;
} }
.square-container {
// padding: 8px;
*{ width: 100%;
box-sizing: border-box; }
} .square {
// width:calc(100% / 2);
.square-container{ width: 100%;
// padding: 8px; float: left;
width:100%; position: relative;
} // padding-bottom: calc(100% / 2);
.square{ }
// width:calc(100% / 2);
width:100%; .square .content {
float:left; width: calc(100% - 16px) !important;
position: relative; height: calc(100% - 16px) !important;
// padding-bottom: calc(100% / 2); margin: 8px;
} padding: 16px;
// position: absolute;
.square .content{ color: white;
width: calc(100% - 16px) !important; border-radius: 9px;
height: calc(100% - 16px) !important; text-align: center;
margin: 8px; min-height: 92px;
padding: 16px; // background-color: #0095ff;
// position: absolute; // box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26);
color: white; }
border-radius: 9px;
text-align: center; .disabledButton {
min-height: 92px; opacity: 0.5;
// background-color: #0095ff; }
// box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26);
} .radio-label {
font-size: 9px;
.disabledButton{ margin: 4px;
opacity:.5; position: relative;
bottom: 4px;
} }
ion-radio {
.radio-label{ --color-checked: #269db8;
font-size: 9px; }
margin: 4px; .center {
position: relative; text-align: center;
bottom: 4px; padding: 5px;
} }
ion-radio{ .boldTxtNav {
--color-checked: #269db8; font-weight: bold;
} padding: 5px;
.center{text-align: center;padding: 5px;} }
.boldTxtNav{ .employee-details {
font-weight: bold; display: inline-block;
padding: 5px; margin: 10px;
} text-overflow: ellipsis;
.employee-details{ white-space: nowrap;
display:inline-block; width: 70%;
margin: 10px; }
text-overflow: ellipsis; .empImgeRep {
white-space: nowrap; display: inline-block;
width: 70%; height: 40px;
} width: 40px;
.empImgeRep{ }
display: inline-block; .star-fav {
height: 40px; float: right;
width: 40px; margin: 15px 0px 0px 0px;
} }
.star-fav{ .uk-margin {
float: right; margin: 15px 15px 0px 15px;
margin: 15px 0px 0px 0px; font-weight: bold;
} clear: both;
.uk-margin{margin: 15px 15px 0px 15px; position: relative;
font-weight: bold; top: 10px;
clear: both; }
position: relative; .uk-padding {
top: 10px;} padding: 20px;
.uk-padding{ padding: 20px;} }
.uk-padding .employee-details{ .uk-padding .employee-details {
bottom: 10px; bottom: 10px;
position: relative;} position: relative;
}
// .star-fav-left{
// float: left; // .star-fav-left{
// margin: 10px 5px; // float: left;
// } // margin: 10px 5px;
.top-radio-row{ // }
font-size: 12px; .top-radio-row {
display: block; font-size: 12px;
padding-bottom: 25px; display: block;
padding-top: 15px; padding-bottom: 25px;
} padding-top: 15px;
.textSearchType{ }
padding-top: 8px; .textSearchType {
font-size: 12px; padding-top: 8px;
} font-size: 12px;
}
.isFavLetterActive {
background: #269db8;
width: 55px;
border-radius: 60px;
color: white;
}

@ -40,6 +40,11 @@ export class WorkListReplacementItgComponent implements OnInit {
public direction = ''; public direction = '';
arr = []; arr = [];
delegtedEmp; delegtedEmp;
public slideOptsOne = {
slidesPerView: 6,
spaceBetween: 5
};
constructor(public vacationRuleService: VacationRuleServiceService, constructor(public vacationRuleService: VacationRuleServiceService,
public ts: TranslatorService, public ts: TranslatorService,
public cs: CommonService, public cs: CommonService,
@ -308,28 +313,56 @@ export class WorkListReplacementItgComponent implements OnInit {
} }
}); });
} }
favLetter = [];
favIsActive = [];
getFavruite() { getFavruite() {
this.cs.startLoading(); this.cs.startLoading();
this.worklistService.getFavorite({}, () => { this.worklistService.getFavoriteWithoutImage({}, () => {
}).subscribe((result) => { }).subscribe((result) => {
if (this.cs.validResponse(result)) { if (this.cs.validResponse(result)) {
this.cs.stopLoading();
this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList']; this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList'];
this.favoriteUserList.forEach((obj) => { this.favoriteUserList.forEach((obj) => {
obj.IsFavorite = true; obj.IsFavorite = true;
this.favLetter.push(obj.EMPLOYEE_DISPLAY_NAME.charAt(0).toUpperCase());
}); });
this.relatedList.forEach((obj) => { this.favLetter = this.favLetter.filter((elem, index, self) => {
if (this.favoriteUserList.some(x => x.USER_NAME === obj.EmployeeID)) { return index === self.indexOf(elem);
obj.IsFavorite = true; });
this.favLetter.forEach((obj, index) => {
if (index === 0) {
this.favIsActive.push(true);
} else { } else {
obj.IsFavorite = false; this.favIsActive.push(false);
} }
}); });
console.log('enad test'); console.log(this.favLetter);
console.log(this.relatedList); console.log(this.favIsActive);
} }
}); });
// this.cs.startLoading();
// this.worklistService.getFavorite({}, () => {
// }).subscribe((result) => {
// if (this.cs.validResponse(result)) {
// this.cs.stopLoading();
// this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList'];
// this.favoriteUserList.forEach((obj) => {
// obj.IsFavorite = true;
// });
// this.relatedList.forEach((obj) => {
// if (this.favoriteUserList.some(x => x.USER_NAME === obj.EmployeeID)) {
// obj.IsFavorite = true;
// } else {
// obj.IsFavorite = false;
// }
// });
// console.log('enad test');
// console.log(this.relatedList);
// }
// });
} }
listOfRealted = []; listOfRealted = [];
@ -367,4 +400,29 @@ export class WorkListReplacementItgComponent implements OnInit {
return true; return true;
else { return false; } else { return false; }
} }
selectedLetter(el) {
this.favLetter.forEach((letter, index) => {
if (letter === el) {
this.favIsActive[index] = true;
this.worklistService.getFavoriteByLetter(letter,() => {
}).subscribe((result) => {
if (this.cs.validResponse(result)) {
this.cs.stopLoading();
this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList'];
this.listOfFav = this.favoriteUserList;
this.favoriteUserList.forEach((obj) => {
obj.IsFavorite = true;
});
}
});
} else {
this.favIsActive[index] = false;
}
});
}
returnIsActiveFunction(i) {
return this.favIsActive[i];
}
} }

@ -85,6 +85,16 @@
</ion-list> </ion-list>
<div style="font-weight: bold;" *ngIf="searchBy === '4'">
<ion-slides [options]="slideOptsOne">
<ion-slide *ngFor="let filter of favLetter; let i=index">
<div [ngClass]="returnIsActiveFunction(i)? 'isFavLetterActive':''">
<p (click)='selectedLetter(favLetter[i])'>{{filter}}</p>
</div>
</ion-slide>
</ion-slides>
</div>
<div class="noteInput" *ngIf="isAnswer==true"> <div class="noteInput" *ngIf="isAnswer==true">
<ion-label class="boldTxtNav" padding>{{"replacementRoll, question" | translate}} : <ion-label class="boldTxtNav" padding>{{"replacementRoll, question" | translate}} :
{{pQuestion}} ?</ion-label> {{pQuestion}} ?</ion-label>

@ -16,7 +16,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
// margin-right: 7%; // margin-right: 7%;
// width: 100%; // width: 100%;
// } // }
.ionItem{ .ionItem {
border: #e4e4e4 solid; border: #e4e4e4 solid;
/* margin: 6px; */ /* margin: 6px; */
/* padding: 11px; */ /* padding: 11px; */
@ -24,28 +24,24 @@ button.item-button.button.button-md.button-clear.button-clear-md {
width: 164px; width: 164px;
border-radius: 5px; border-radius: 5px;
text-align: center; text-align: center;
} }
.profileImageDiv {
.profileImageDiv{
z-index: 3; z-index: 3;
position: relative; position: relative;
top: 0; top: 0;
} }
.profileImage{ .profileImage {
width:60px !important; width: 60px !important;
} }
.activated{ .activated {
border: #209a83 0.02cm solid ; border: #209a83 0.02cm solid;
} }
.deactivated{ border: #e4e4e4 0.02cm solid; .deactivated {
border: #e4e4e4 0.02cm solid;
} }
.repContentDiv{ .repContentDiv {
text-align: center; text-align: center;
width: 85%; width: 85%;
font-size: 14px; font-size: 14px;
@ -53,10 +49,9 @@ button.item-button.button.button-md.button-clear.button-clear-md {
border-radius: 5px; border-radius: 5px;
padding: 20px 8px 8px 8px; padding: 20px 8px 8px 8px;
margin-top: -9px; margin-top: -9px;
margin-right: -35px margin-right: -35px;
} }
.selIEmpDiv{ .selIEmpDiv {
text-align: right; text-align: right;
margin-bottom: -26px; margin-bottom: -26px;
margin-right: 0px; margin-right: 0px;
@ -65,24 +60,23 @@ button.item-button.button.button-md.button-clear.button-clear-md {
top: 0; top: 0;
} }
.selIEmpImage{ .selIEmpImage {
width:22px !important width: 22px !important;
} }
.noteInput{ .noteInput {
border: solid var(--gray) 1px; border: solid var(--gray) 1px;
border-radius: 15px; border-radius: 15px;
margin: 8px 17px 0px 17px; margin: 8px 17px 0px 17px;
padding: 10px 2px 10px 2px; padding: 10px 2px 10px 2px;
} }
.filterInput{ .filterInput {
border: solid var(--gray) 1px; border: solid var(--gray) 1px;
border-radius: 21px; border-radius: 21px;
padding-left: 10px !important; padding-left: 10px !important;
} }
.filterInput-ar{ .filterInput-ar {
// border: solid var(--gray) 1px; // border: solid var(--gray) 1px;
// border-radius: 21px; // border-radius: 21px;
// padding-left: 10px !important; // padding-left: 10px !important;
@ -93,16 +87,15 @@ button.item-button.button.button-md.button-clear.button-clear-md {
//margin-left: 123px; //margin-left: 123px;
// padding-right: 129px; // padding-right: 129px;
//margin-right: -136px; //margin-right: -136px;
} }
.filterBtn{ .filterBtn {
background: var(--newgreen); background: var(--newgreen);
--background: var (--newgreen); --background: var (--newgreen);
border-radius: 50%; border-radius: 50%;
height: 60px; height: 60px;
width: 60px; width: 60px;
} }
.filterBtn-ar{ .filterBtn-ar {
// background: var(--newgreen); // background: var(--newgreen);
// --background: var (--newgreen); // --background: var (--newgreen);
// border-radius: 50%; // border-radius: 50%;
@ -117,25 +110,23 @@ button.item-button.button.button-md.button-clear.button-clear-md {
margin-right: 260px; margin-right: 260px;
} }
* {
*{
box-sizing: border-box; box-sizing: border-box;
} }
.square-container{ .square-container {
// padding: 8px; // padding: 8px;
width:100%; width: 100%;
} }
.square{ .square {
// width:calc(100% / 2); // width:calc(100% / 2);
width:100%; width: 100%;
float:left; float: left;
position: relative; position: relative;
// padding-bottom: calc(100% / 2); // padding-bottom: calc(100% / 2);
} }
.square .content{ .square .content {
width: calc(100% - 16px) !important; width: calc(100% - 16px) !important;
height: calc(100% - 16px) !important; height: calc(100% - 16px) !important;
margin: 8px; margin: 8px;
@ -149,64 +140,75 @@ button.item-button.button.button-md.button-clear.button-clear-md {
// box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26); // box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26);
} }
.disabledButton{ .disabledButton {
opacity:.5; opacity: 0.5;
} }
.radio-label{ .radio-label {
font-size: 9px; font-size: 9px;
margin: 4px; margin: 4px;
position: relative; position: relative;
bottom: 4px; bottom: 4px;
} }
ion-radio{ ion-radio {
--color-checked: #269db8; --color-checked: #269db8;
} }
.center{text-align: center;padding: 5px;} .center {
.boldTxtNav{ text-align: center;
padding: 5px;
}
.boldTxtNav {
font-weight: bold; font-weight: bold;
padding: 5px; padding: 5px;
} }
.employee-details{ .employee-details {
display:inline-block; display: inline-block;
margin: 10px; margin: 10px;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
width: 70%; width: 70%;
} }
.empImgeRep{ .empImgeRep {
display: inline-block; display: inline-block;
height: 40px; height: 40px;
width: 40px; width: 40px;
} }
.star-fav{ .star-fav {
float: right; float: right;
margin: 15px 0px 0px 0px; margin: 15px 0px 0px 0px;
} }
.uk-margin{margin: 15px 15px 0px 15px; .uk-margin {
margin: 15px 15px 0px 15px;
font-weight: bold; font-weight: bold;
clear: both; clear: both;
position: relative; position: relative;
top: 10px;} top: 10px;
.uk-padding{ padding: 20px;} }
.uk-padding .employee-details{ .uk-padding {
padding: 20px;
}
.uk-padding .employee-details {
bottom: 10px; bottom: 10px;
position: relative;} position: relative;
}
.star-fav-left{
float: left;
margin: 10px 5px;
}
.top-radio-row{
font-size: 12px;
display: block;
padding-bottom: 25px;
padding-top: 15px;
}
.textSearchType{
padding-top: 8px;
font-size: 12px;
}
.star-fav-left {
float: left;
margin: 10px 5px;
}
.top-radio-row {
font-size: 12px;
display: block;
padding-bottom: 25px;
padding-top: 15px;
}
.textSearchType {
padding-top: 8px;
font-size: 12px;
}
.isFavLetterActive {
background: #269db8;
width: 55px;
border-radius: 60px;
color: white;
}

@ -49,6 +49,12 @@ export class WorkListReplacementRollComponent implements OnInit {
arr = []; arr = [];
favoriteUserList: any = []; favoriteUserList: any = [];
isFilter = true; isFilter = true;
public slideOptsOne = {
slidesPerView: 6,
spaceBetween: 5
};
constructor(public worklistService: WorklistService, private cs: CommonService, public ts: TranslatorService, public workListMainService: WorklistMainService, public modalCtrl: ModalController) { constructor(public worklistService: WorklistService, private cs: CommonService, public ts: TranslatorService, public workListMainService: WorklistMainService, public modalCtrl: ModalController) {
this.P_PAGE_NUM = 1; this.P_PAGE_NUM = 1;
this.P_PAGE_LIMIT = 50; this.P_PAGE_LIMIT = 50;
@ -433,7 +439,7 @@ export class WorkListReplacementRollComponent implements OnInit {
} }
selectedType; selectedType;
counter=0; counter = 0;
onChangeSelect(select) { onChangeSelect(select) {
let selectValue = select.detail.value; let selectValue = select.detail.value;
@ -442,15 +448,14 @@ export class WorkListReplacementRollComponent implements OnInit {
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') {
@ -474,9 +479,9 @@ export class WorkListReplacementRollComponent implements OnInit {
this.ReplacementList = []; this.ReplacementList = [];
clearTimeout(this.typingTimer); clearTimeout(this.typingTimer);
// this.typingTimer = setTimeout(() => { // this.typingTimer = setTimeout(() => {
// if (this.inputSearch.length > 2) { // if (this.inputSearch.length > 2) {
this.getreplacmentemployee(); this.getreplacmentemployee();
// } // }
// }, 3000); // }, 3000);
@ -490,26 +495,52 @@ export class WorkListReplacementRollComponent implements OnInit {
} }
getPlaceHolder() { getPlaceHolder() {
return this.searchBy === '1' ? return this.searchBy === '1' ?
this.ts.trPK('replacementRoll', 'searchbyname') : this.ts.trPK('replacementRoll', 'searchbyname') :
this.searchBy === '2' ? this.searchBy === '2' ?
this.ts.trPK('replacementRoll', 'searchbyusername') : this.ts.trPK('replacementRoll', 'searchbyusername') :
this.ts.trPK('replacementRoll', 'searchbyemail'); this.ts.trPK('replacementRoll', 'searchbyemail');
} }
favLetter = [];
favIsActive = [];
getFavruite() { getFavruite() {
this.cs.startLoading(); this.cs.startLoading();
this.worklistService.getFavorite({}, () => { this.worklistService.getFavoriteWithoutImage({}, () => {
}).subscribe((result) => { }).subscribe((result) => {
if (this.cs.validResponse(result)) { if (this.cs.validResponse(result)) {
this.cs.stopLoading();
this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList']; this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList'];
this.listOfFav = this.favoriteUserList;
this.favoriteUserList.forEach((obj) => { this.favoriteUserList.forEach((obj) => {
obj.IsFavorite = true; obj.IsFavorite = true;
this.favLetter.push(obj.EMPLOYEE_DISPLAY_NAME.charAt(0).toUpperCase());
});
this.favLetter = this.favLetter.filter((elem, index, self) => {
return index === self.indexOf(elem);
});
this.favLetter.forEach((obj, index) => {
if (index === 0) {
this.selectedLetter(obj);
this.favIsActive.push(true);
} else {
this.favIsActive.push(false);
}
}); });
console.log(this.favLetter);
console.log(this.favIsActive);
} }
}); });
// this.worklistService.getFavorite({}, () => {
// }).subscribe((result) => {
// if (this.cs.validResponse(result)) {
// this.cs.stopLoading();
// this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList'];
// this.listOfFav = this.favoriteUserList;
// this.favoriteUserList.forEach((obj) => {
// obj.IsFavorite = true;
// });
// }
// });
} }
saveUserFavruiteList(request, isFav: boolean) { saveUserFavruiteList(request, isFav: boolean) {
@ -586,6 +617,7 @@ export class WorkListReplacementRollComponent implements OnInit {
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) {
@ -608,4 +640,29 @@ export class WorkListReplacementRollComponent implements OnInit {
return; return;
} }
} }
selectedLetter(el) {
this.favLetter.forEach((letter, index) => {
if (letter === el) {
this.favIsActive[index] = true;
this.worklistService.getFavoriteByLetter(letter,() => {
}).subscribe((result) => {
if (this.cs.validResponse(result)) {
this.cs.stopLoading();
this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList'];
this.listOfFav = this.favoriteUserList;
this.favoriteUserList.forEach((obj) => {
obj.IsFavorite = true;
});
}
});
} else {
this.favIsActive[index] = false;
}
});
}
returnIsActiveFunction(i) {
return this.favIsActive[i];
}
} }

@ -47,8 +47,10 @@
<ion-row> <ion-row>
<!-- NOT ADDRESS & BASIC_DETAILS --> <!-- NOT ADDRESS & BASIC_DETAILS -->
<ion-col <ion-col *ngIf="getPassNotificationDetails?.REQUEST_TYPE != 'ADDRESS' &&
*ngIf="getPassNotificationDetails?.REQUEST_TYPE != 'ADDRESS' && getPassNotificationDetails?.REQUEST_TYPE != 'BASIC_DETAILS' "> getPassNotificationDetails?.REQUEST_TYPE != 'BASIC_DETAILS' &&
getPassNotificationDetails?.REQUEST_TYPE != 'PHONE_NUMBERS' &&
getPassNotificationDetails?.REQUEST_TYPE != 'TERMINATION'">
<div *ngIf="showInformation"> <div *ngIf="showInformation">
<p>{{'worklist, loading'| translate}} <img style="width: 3%;" <p>{{'worklist, loading'| translate}} <img style="width: 3%;"
@ -171,7 +173,7 @@
<label class="colItemReq"> <label class="colItemReq">
Actual Swipe(s)</label> Actual Swipe(s)</label>
<br /> <br />
<ion-col size="6"> <ion-col size="6">
<label class="colItemReq"> <label class="colItemReq">
Start</label> Start</label>
<br /> <br />
@ -180,7 +182,7 @@
<label <label
*ngIf="item.SHT_ACTUAL_START_TIME == ''">--</label> *ngIf="item.SHT_ACTUAL_START_TIME == ''">--</label>
</ion-col> </ion-col>
<ion-col size="6"> <ion-col size="6">
<label class="colItemReq"> <label class="colItemReq">
End</label> End</label>
<br /> <br />
@ -293,7 +295,9 @@
<!-- IF BASIC_DETAILS --> <!-- IF BASIC_DETAILS -->
<ion-col *ngIf="getPassNotificationDetails?.REQUEST_TYPE == 'BASIC_DETAILS' || <ion-col *ngIf="getPassNotificationDetails?.REQUEST_TYPE == 'BASIC_DETAILS' ||
getPassNotificationDetails?.REQUEST_TYPE == 'ADDRESS'"> getPassNotificationDetails?.REQUEST_TYPE == 'ADDRESS' &&
getPassNotificationDetails?.REQUEST_TYPE != 'PHONE_NUMBERS' &&
getPassNotificationDetails?.REQUEST_TYPE != 'TERMINATION'">
<div *ngIf="showInformation"> <div *ngIf="showInformation">
<p>{{'worklist, loading'| translate}} <img style="width: 3%;" <p>{{'worklist, loading'| translate}} <img style="width: 3%;"
src="../assets/icon/progress-loading.gif" /></p> src="../assets/icon/progress-loading.gif" /></p>
@ -337,8 +341,67 @@
</ion-card> </ion-card>
</div> </div>
</ion-col> </ion-col>
</ion-row>
<!-- IF PHONE -->
<ion-col *ngIf="getPassNotificationDetails?.REQUEST_TYPE != 'BASIC_DETAILS' &&
getPassNotificationDetails?.REQUEST_TYPE != 'ADDRESS' &&
getPassNotificationDetails?.REQUEST_TYPE == 'PHONE_NUMBERS' &&
getPassNotificationDetails?.REQUEST_TYPE != 'TERMINATION'">
<div *ngIf="showInformation">
<p>{{'worklist, loading'| translate}} <img style="width: 3%;"
src="../assets/icon/progress-loading.gif" /></p>
</div>
<div class="no-data-div" *ngIf="notificationBodyRes?.length === 0 && !showInformation">
<p>{{ 'general, empty' | translate}}</p>
</div>
<div *ngIf='notificationBodyRes.length > 0'>
<ion-card style="width: 91%;">
<ion-card-content>
<div>
<ion-row *ngFor="let item of notificationBodyRes;let i=index;">
<ion-col class="rowBorder" [hidden]="item.UPDATED_FLAG == 'N'">
<label class="colItemReq">{{item.PHONE_TYPE_MEANING}}</label>
<br />
<label>{{item.PROPOSED_PHONE_NUMBER}}</label>
</ion-col>
</ion-row>
</div>
</ion-card-content>
</ion-card>
</div>
</ion-col>
<!-- IF TERMINATION -->
<ion-col *ngIf="getPassNotificationDetails?.REQUEST_TYPE != 'BASIC_DETAILS' &&
getPassNotificationDetails?.REQUEST_TYPE != 'ADDRESS' &&
getPassNotificationDetails?.REQUEST_TYPE != 'PHONE_NUMBERS' &&
getPassNotificationDetails?.REQUEST_TYPE == 'TERMINATION'">
<div *ngIf="showInformation">
<p>{{'worklist, loading'| translate}} <img style="width: 3%;"
src="../assets/icon/progress-loading.gif" /></p>
</div>
<div class="no-data-div" *ngIf="notificationBodyRes?.length === 0 && !showInformation">
<p>{{ 'general, empty' | translate}}</p>
</div>
<div *ngIf='notificationBodyRes.length > 0'>
<ion-card style="width: 91%;">
<ion-card-content>
<div>
<ion-row *ngFor="let item of notificationBodyRes;let i=index;">
<ion-col class="rowBorder" [hidden]="item.UPDATED_FLAG == 'N'">
<label class="colItemReq">{{item.SEGMENT_PROMPT}}</label>
<br />
<label>{{item.SEGMENT_VALUE_DSP}}</label>
</ion-col>
</ion-row>
</div>
</ion-card-content>
</ion-card>
</div>
</ion-col>
</ion-row>
</ion-grid> </ion-grid>
</ng-container> </ng-container>
</ion-slide> </ion-slide>

@ -288,6 +288,10 @@ export class WorklistMainComponent implements OnInit {
this.getStampMSNotification(this.WorkListBodyObj); this.getStampMSNotification(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE === 'STAMP_NS') { } else if (this.getPassNotificationDetails.REQUEST_TYPE === 'STAMP_NS') {
this.getStampNSNotification(this.WorkListBodyObj); this.getStampNSNotification(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE === 'TERMINATION') {
this.getTerminationNotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE === 'PHONE_NUMBERS') {
this.getPhoneNotificationDetails(this.WorkListBodyObj);
} }
} }
@ -307,6 +311,22 @@ export class WorklistMainComponent implements OnInit {
}); });
} }
getTerminationNotificationDetails(notificationBodyObj) {
this.worklistMainService
.getTerminationNotificationBody(notificationBodyObj)
.subscribe((result: PRNotificatonBodyResponse) => {
this.handleWorkListBodyResult(result, "TERMINATION");
});
}
getPhoneNotificationDetails(notificationBodyObj) {
this.worklistMainService
.getPhoneNotificationBody(notificationBodyObj)
.subscribe((result: PRNotificatonBodyResponse) => {
this.handleWorkListBodyResult(result, "PHONE_NUMBERS");
});
}
getBasicDetailsNotification(notificationBodyObj) { getBasicDetailsNotification(notificationBodyObj) {
this.worklistMainService this.worklistMainService
.getBasicDetailNotificationBody(notificationBodyObj) .getBasicDetailNotificationBody(notificationBodyObj)
@ -421,6 +441,20 @@ export class WorklistMainComponent implements OnInit {
console.log(result); console.log(result);
} }
} }
else if (Type === "PHONE_NUMBERS"){
if (result.GetPhonesNotificationBodyList) {
this.notificationBodyRes =
result.GetPhonesNotificationBodyList;
console.log(result);
}
}
else if (Type === "TERMINATION"){
if (result.GetTermNotificationBodyList) {
this.notificationBodyRes =
result.GetTermNotificationBodyList;
console.log(result);
}
}
} }
} //End handleWorkListBodyResult } //End handleWorkListBodyResult

Loading…
Cancel
Save