fixing issues

MOHEMM-HUAWEI-RELEASE
enadhilal 4 years ago
parent 5f31778d22
commit a161484198

@ -76,7 +76,7 @@
</ion-label>
</ion-item>
<ion-item (click)="openBusinessCard()">
<ion-item *ngIf='userInfo?.show_business' (click)="openBusinessCard()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 25px !important;" src="../assets/imgs/business-card-design.png" item-left>
</ion-thumbnail>
@ -175,7 +175,7 @@
</ion-label>
</ion-item>
<ion-item (click)="openBusinessCard()">
<ion-item *ngIf='userInfo?.show_business' (click)="openBusinessCard()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 25px !important;" src="../assets/imgs/business-card-design.png" item-left>
</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-row>
<ion-col size='6'>
@ -63,8 +62,7 @@
</div>
</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-row>
<ion-col style="padding-left: 315px;">

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

@ -53,7 +53,7 @@ export class WorkListReplacementRollComponent implements OnInit {
this.P_PAGE_NUM = 1;
this.P_PAGE_LIMIT = 50;
this.getPassActionMode = this.cs.sharedService.getSharedData('passActionMode', false);
// this.getFavruite();
this.getFavruite();
this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo', false);
this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr', false);
this.pQuestion = this.cs.sharedService.getSharedData('pQuestion', false);
@ -442,9 +442,9 @@ export class WorkListReplacementRollComponent implements OnInit {
this.selectedType = 1;
this.listOfRealted = this.actionHistory;
} else if (selectValue === '4') {
if (this.favoriteUserList.length === 0 || this.favoriteUserList === undefined) {
// if (this.favoriteUserList.length === 0 || this.favoriteUserList === undefined) {
this.getFavruite();
}
// }
this.isFilter = true;
this.selectedType = 4;
} 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, () => {
}).subscribe((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.EMAIL_ADDRESS = selEmp.EMAIL_ADDRESS ? selEmp.EMAIL_ADDRESS : '';
selEmp.IsFavorite = !selEmp.IsFavorite;
if (this.favoriteUserList.some(x => x['USER_NAME'] === selEmp.USER_NAME)) {
let confirmBoxhtml = `<div>
<h4>Do you want to add ` + selEmp.EMPLOYEE_DISPLAY_NAME + ` in your favorite list </h4>
<br/>
<br/>
<div class="fav-profileImageDiv"><ion-row>`;
if (selEmp.EMPLOYEE_IMAGE) {
confirmBoxhtml += '<div class="img-box"><img class="empImgeRep" src="data:image/png;base64,' + selEmp.EMPLOYEE_IMAGE + '"></div>';
}
if (!selEmp.EMPLOYEE_IMAGE) {
confirmBoxhtml += '<div class="img-box"><img class="empImgeRep" src="../assets/imgs/profile.png"></div>';
}
let confirmBoxhtml = `<div>
<h4>Do you want to add ` + selEmp.EMPLOYEE_DISPLAY_NAME + ` in your favorite list </h4>
<br/>
<br/>
<div class="fav-profileImageDiv"><ion-row>`;
if (selEmp.EMPLOYEE_IMAGE) {
confirmBoxhtml += '<div class="img-box"><img class="empImgeRep" src="data:image/png;base64,' + selEmp.EMPLOYEE_IMAGE + '"></div>';
}
if (!selEmp.EMPLOYEE_IMAGE) {
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">
<span>` + selEmp.EMPLOYEE_DISPLAY_NAME + `</span>
</ion-label>
</div></ion-row> </div>
</div>`;
const userIndex = this.favoriteUserList.findIndex(x => x['USER_NAME'] === selEmp.USER_NAME)
if (userIndex === -1) {
this.cs.presentConfirmDialog(
confirmBoxhtml
, () => {
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': selEmp.IsFavorite
}
];
confirmBoxhtml += ` <div class="name-box"><ion-label class="fav-employee-details">
<span>` + selEmp.EMPLOYEE_DISPLAY_NAME + `</span>
</ion-label>
</div></ion-row> </div>
</div>`;
const userIndex = this.favoriteUserList.findIndex(x => x['USER_NAME'] === selEmp.USER_NAME)
if (userIndex === -1) {
this.cs.presentConfirmDialog(
confirmBoxhtml
, () => {
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': selEmp.IsFavorite
}
];
this.saveUserFavruiteList(request);
}, () => { });
} 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);
}
this.saveUserFavruiteList(request, selEmp.IsFavorite);
}, () => { });
} else {
const request =
[
@ -580,7 +571,7 @@ export class WorkListReplacementRollComponent implements OnInit {
'IsFavorite': false
}
];
this.saveUserFavruiteList(request);
this.saveUserFavruiteList(request, false);
}
}

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

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

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

Loading…
Cancel
Save