fixing issues

MOE_DEV_NEW_TEMPORARY_DESIGN
enadhilal 5 years ago
parent 5f31778d22
commit a161484198

@ -76,7 +76,7 @@
</ion-label> </ion-label>
</ion-item> </ion-item>
<ion-item (click)="openBusinessCard()"> <ion-item *ngIf='userInfo?.show_business' (click)="openBusinessCard()">
<ion-thumbnail slot="start" class="menu-thumb"> <ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 25px !important;" src="../assets/imgs/business-card-design.png" item-left> <img style= "height: 25px !important;" src="../assets/imgs/business-card-design.png" item-left>
</ion-thumbnail> </ion-thumbnail>
@ -175,7 +175,7 @@
</ion-label> </ion-label>
</ion-item> </ion-item>
<ion-item (click)="openBusinessCard()"> <ion-item *ngIf='userInfo?.show_business' (click)="openBusinessCard()">
<ion-thumbnail slot="start" class="menu-thumb"> <ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 25px !important;" src="../assets/imgs/business-card-design.png" item-left> <img style= "height: 25px !important;" src="../assets/imgs/business-card-design.png" item-left>
</ion-thumbnail> </ion-thumbnail>

@ -1,5 +1,4 @@
<ion-content dir="ltr" *ngIf="false"> <ion-content dir="ltr" *ngIf="userInfo.company_type == 'CS'">
<!-- <ion-content dir="ltr" *ngIf="userInfo.company_type == 'CS'"> -->
<ion-grid class="card-size"> <ion-grid class="card-size">
<ion-row> <ion-row>
<ion-col size='6'> <ion-col size='6'>
@ -63,8 +62,7 @@
</div> </div>
</ion-footer> --> </ion-footer> -->
<ion-content dir="ltr" *ngIf="true"> <ion-content dir="ltr" *ngIf="userInfo.company_type != 'CS'">
<!-- <ion-content dir="ltr" *ngIf="userInfo.company_type != 'CS'"> -->
<ion-grid class="cs-card-size"> <ion-grid class="cs-card-size">
<ion-row> <ion-row>
<ion-col style="padding-left: 315px;"> <ion-col style="padding-left: 315px;">

@ -27,8 +27,8 @@ export class ConnectorService {
public static retryTimes = 0; public static retryTimes = 0;
public static timeOut = 120 * 1000; public static timeOut = 120 * 1000;
// public static host = 'https://uat.hmgwebservices.com/'; public static host = 'https://uat.hmgwebservices.com/';
public static host = 'https://hmgwebservices.com/'; // public static host = 'https://hmgwebservices.com/';
constructor(public httpClient: HttpClient, constructor(public httpClient: HttpClient,
public cs: CommonService, public cs: CommonService,

@ -53,7 +53,7 @@ export class WorkListReplacementRollComponent implements OnInit {
this.P_PAGE_NUM = 1; this.P_PAGE_NUM = 1;
this.P_PAGE_LIMIT = 50; this.P_PAGE_LIMIT = 50;
this.getPassActionMode = this.cs.sharedService.getSharedData('passActionMode', false); this.getPassActionMode = this.cs.sharedService.getSharedData('passActionMode', false);
// this.getFavruite(); this.getFavruite();
this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo', false); this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo', false);
this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr', false); this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr', false);
this.pQuestion = this.cs.sharedService.getSharedData('pQuestion', false); this.pQuestion = this.cs.sharedService.getSharedData('pQuestion', false);
@ -442,9 +442,9 @@ export class WorkListReplacementRollComponent implements OnInit {
this.selectedType = 1; this.selectedType = 1;
this.listOfRealted = this.actionHistory; this.listOfRealted = this.actionHistory;
} else if (selectValue === '4') { } else if (selectValue === '4') {
if (this.favoriteUserList.length === 0 || this.favoriteUserList === undefined) { // if (this.favoriteUserList.length === 0 || this.favoriteUserList === undefined) {
this.getFavruite(); this.getFavruite();
} // }
this.isFilter = true; this.isFilter = true;
this.selectedType = 4; this.selectedType = 4;
} else if (selectValue === '2' || selectValue === '3' || selectValue === '5') { } else if (selectValue === '2' || selectValue === '3' || selectValue === '5') {
@ -505,11 +505,15 @@ export class WorkListReplacementRollComponent implements OnInit {
} }
}); });
} }
saveUserFavruiteList(request) { 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)) {
this.cs.toastPK("replacementRoll", "favorite-saved"); if(isFav){
this.cs.toastPK("replacementRoll", "favorite-saved");
} else{
this.cs.toastPK("replacementRoll", "favorite-unsaved");
}
} }
}) })
@ -520,55 +524,42 @@ export class WorkListReplacementRollComponent implements OnInit {
selEmp.EMPLOYEE_IMAGE = selEmp.EMPLOYEE_IMAGE ? selEmp.EMPLOYEE_IMAGE : ''; selEmp.EMPLOYEE_IMAGE = selEmp.EMPLOYEE_IMAGE ? selEmp.EMPLOYEE_IMAGE : '';
selEmp.EMAIL_ADDRESS = selEmp.EMAIL_ADDRESS ? selEmp.EMAIL_ADDRESS : ''; selEmp.EMAIL_ADDRESS = selEmp.EMAIL_ADDRESS ? selEmp.EMAIL_ADDRESS : '';
selEmp.IsFavorite = !selEmp.IsFavorite; selEmp.IsFavorite = !selEmp.IsFavorite;
if (this.favoriteUserList.some(x => x['USER_NAME'] === selEmp.USER_NAME)) { let confirmBoxhtml = `<div>
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)
if (userIndex === -1) { const userIndex = this.favoriteUserList.findIndex(x => x['USER_NAME'] === selEmp.USER_NAME)
this.cs.presentConfirmDialog( if (userIndex === -1) {
confirmBoxhtml this.cs.presentConfirmDialog(
, () => { confirmBoxhtml
const request = , () => {
[ const request =
{ [
'USER_NAME': selEmp['USER_NAME'], {
'EMPLOYEE_DISPLAY_NAME': selEmp['EMPLOYEE_DISPLAY_NAME'], 'USER_NAME': selEmp['USER_NAME'],
'EMAIL_ADDRESS': selEmp.EMAIL_ADDRESS, 'EMPLOYEE_DISPLAY_NAME': selEmp['EMPLOYEE_DISPLAY_NAME'],
'EMPLOYEE_IMAGE': selEmp.EMPLOYEE_IMAGE, 'EMAIL_ADDRESS': selEmp.EMAIL_ADDRESS,
'IsFavorite': selEmp.IsFavorite 'EMPLOYEE_IMAGE': selEmp.EMPLOYEE_IMAGE,
} 'IsFavorite': selEmp.IsFavorite
]; }
];
this.saveUserFavruiteList(request); this.saveUserFavruiteList(request, selEmp.IsFavorite);
}, () => { }); }, () => { });
} else {
const request =
[
{
'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);
}
} else { } else {
const request = const request =
[ [
@ -580,7 +571,7 @@ export class WorkListReplacementRollComponent implements OnInit {
'IsFavorite': false 'IsFavorite': false
} }
]; ];
this.saveUserFavruiteList(request); this.saveUserFavruiteList(request, false);
} }
} }

@ -342,13 +342,10 @@
<div class="containerNote" <div class="containerNote"
[ngClass]="actionHistory.visible ? 'show' : '' "> [ngClass]="actionHistory.visible ? 'show' : '' ">
Note: {{actionHistory.NOTE}} Note: {{actionHistory.NOTE}}
</div> </div>
<button class="showMore" <button class="showMore"
(click)="actionHistory.visible = !actionHistory.visible">{{ (click)="actionHistory.visible = !actionHistory.visible">
actionHistory.visible ? 'Show less': 'Show More' }}</button> {{actionHistory.visible ? 'Show less': 'Show More' }}</button>
</div> </div>
</div> </div>
<ion-label <ion-label

@ -2205,6 +2205,10 @@
"en": "Your Favorite saved successfully", "en": "Your Favorite saved successfully",
"ar": "تم حفظ مفضلتك بنجاح" "ar": "تم حفظ مفضلتك بنجاح"
}, },
"favorite-unsaved": {
"en": "Your Favorite had been deleted successfully",
"ar": "تم حفظ مفضلتك بنجاح"
},
"msg": { "msg": {
"en": "Select a replacement", "en": "Select a replacement",
"ar": "اختر بديل" "ar": "اختر بديل"

@ -523,7 +523,7 @@ left: 66px;
.containerNote { .containerNote {
font-size: 14px; font-size: 14px;
line-height: 14px; line-height: 14px;
height: 15px; height: 30px;
overflow: hidden; overflow: hidden;
text-align: justify; text-align: justify;
} }

Loading…
Cancel
Save