diff --git a/Mohem/src/app/app.component.html b/Mohem/src/app/app.component.html index 37e31ee2..512b0612 100644 --- a/Mohem/src/app/app.component.html +++ b/Mohem/src/app/app.component.html @@ -76,7 +76,7 @@ - + @@ -175,7 +175,7 @@ - + diff --git a/Mohem/src/app/app.component.ts b/Mohem/src/app/app.component.ts index 872f968f..82c9c5ca 100644 --- a/Mohem/src/app/app.component.ts +++ b/Mohem/src/app/app.component.ts @@ -287,7 +287,9 @@ export class AppComponent implements OnInit { return await modal.present(); } async openBusinessCard() { - this.userInfo = this.cs.sharedService.getSharedData('bussiness-card-info', false); + this.userInfo = JSON.parse(localStorage.getItem('bussiness-card-info')); + console.log(this.userInfo); + //this.userInfo = this.cs.sharedService.getSharedData('bussiness-card-info', false); const modal = await this.modalController.create({ component: BusinessCardComponent, cssClass: 'digital-id-modal-css', diff --git a/Mohem/src/app/authentication/business-card/business-card.component.html b/Mohem/src/app/authentication/business-card/business-card.component.html index 3ab67a35..58087cbc 100644 --- a/Mohem/src/app/authentication/business-card/business-card.component.html +++ b/Mohem/src/app/authentication/business-card/business-card.component.html @@ -1,11 +1,12 @@ - - + + + - https://hmgwebservices.com/images/Moheem/CS.jpg + https://hmgwebservices.com/images/Moheem/CS.jpg - + @@ -16,8 +17,7 @@ -

{{userInfo.name_ar}}

+

{{userInfo.name_ar}}

@@ -63,17 +63,17 @@ --> - - - + + + - ../assets/imgs/HMG_LOGO.png + - + diff --git a/Mohem/src/app/authentication/business-card/business-card.component.scss b/Mohem/src/app/authentication/business-card/business-card.component.scss index c356aa64..b70bdcb5 100644 --- a/Mohem/src/app/authentication/business-card/business-card.component.scss +++ b/Mohem/src/app/authentication/business-card/business-card.component.scss @@ -34,4 +34,200 @@ font-weight: bold; } +@media screen and (min-width: 400px)and (min-height:800px) and (max-height: 900px) { + // CS + .card-size{ + transform: rotate(90deg) !important; + padding: 10px !important; + padding-right: 0px !important; + } + .qr-style{ + left: 410px !important; + } + .name-ar-style{ + left: 320px !important; + } + // HMG + .logo-img-hmg-style{ + left: 360px !important; + } + .qr-img-hmg-style{ + left: 580px !important; + } +} + +@media screen and (min-width: 400px) and (min-height:700px) and (max-height: 799px){ + // CS + .card-size{ + transform: rotate(90deg) !important; + padding: 10px !important; + padding-right: 0px !important; + } + .qr-style{ + left: 324px !important; + } + .name-ar-style{ + left: 230px !important; + } + + // HMG + .logo-img-hmg-style{ + left: 275px !important; + } + .qr-img-hmg-style{ + left: 495px !important; + } +} + +@media screen and (min-width: 325px) and (max-width:399px) and (max-height: 812px){ + // CS + .card-size{ + transform: rotate(90deg) !important; + padding: 5px !important; + padding-right: 0px !important; + } + .qr-style{ + left: 400px !important; + } + .name-ar-style{ + left: 310px !important; + } + // HMG + .logo-img-hmg-style{ + left: 360px !important; + } + .qr-img-hmg-style{ + left: 550px !important; + } +} + +@media screen and (min-width: 325px) and (max-width:399px) and (max-height: 700px){ + .card-size{ + transform: rotate(90deg) !important; + padding: 5px !important; + padding-right: 0px !important; + } + .qr-style{ + left: 280px !important; + } + .name-ar-style{ + left: 190px !important; + } + // HMG + .logo-img-hmg-style{ + left: 360px !important; + } + .qr-img-hmg-style{ + left: 550px !important; + } +} + +@media screen and (min-width: 325px) and (max-width:399px) and (max-height: 699px){ + .card-size{ + transform: rotate(90deg) !important; + padding: 5px !important; + padding-right: 0px !important; + } + .qr-style{ + left: 280px !important; + } + .name-ar-style{ + left: 190px !important; + } + // HMG + .logo-img-hmg-style{ + left: 245px !important; + } + .qr-img-hmg-style{ + left: 430px !important; + } +} +@media screen and (min-width: 1px) and (max-width:320px) { + .card-size{ + transform: rotate(90deg) !important; + position: relative; + bottom: 30px; + left: 26px; + } + .qr-style{ + width: 80px !important; + margin-top: 50px !important; + position: relative !important; + left: 265px !important; + } + .name-ar-style{ + font-size: 15px !important; + position: relative !important; + left: 130px !important; + text-align: end !important; + padding: 10px !important; + width: 225px !important; + } + .logo-img-style{ + width: 80px !important; + margin-top: 50px !important; + } + + // HMG + .logo-img-hmg-style{ + width: 380px !important; + position: fixed !important; + left: 200px !important; + height: 81px !important; + bottom: 205px !important; + } + .qr-img-hmg-style{ + width: 105px !important; + margin-top: 0px !important; + position: relative !important; + left: 390px !important; + top: 160px !important; + } + .cs-card-size{ + padding: 15px !important; + padding-top: 0px !important; + padding-left: 1px !important; + } +} + + +.card-size{ + transform: rotate(90deg); +} +.qr-style{ + width: 130px; + margin-top: 0px; + position: relative; + left: 410px; +} +.name-ar-style{ + font-size: 25px; + position: relative; + left: 314px; + text-align: end; + padding: 10px; + width: 225px; +} +.logo-img-style{ + width: 120px; +} + +.logo-img-hmg-style{ + width: 380px; + position: fixed; + left: 340; + height: 81px; +} + +.qr-img-hmg-style{ + width: 130px; + margin-top: 0px; + position: relative; + left: 560px; + top: 160px; +} +.cs-card-size{ + transform: rotate(90deg); + padding: 25px; +} \ No newline at end of file diff --git a/Mohem/src/app/authentication/business-card/business-card.component.ts b/Mohem/src/app/authentication/business-card/business-card.component.ts index bdf79545..0462829a 100644 --- a/Mohem/src/app/authentication/business-card/business-card.component.ts +++ b/Mohem/src/app/authentication/business-card/business-card.component.ts @@ -18,7 +18,9 @@ export class BusinessCardComponent implements OnInit { public common: CommonService ) { } - ngOnInit() {} + ngOnInit() { + console.log(this.userInfo); + } dismiss() { diff --git a/Mohem/src/app/authentication/sms-page/sms-page.page.ts b/Mohem/src/app/authentication/sms-page/sms-page.page.ts index 85c155ae..9a3ee766 100644 --- a/Mohem/src/app/authentication/sms-page/sms-page.page.ts +++ b/Mohem/src/app/authentication/sms-page/sms-page.page.ts @@ -215,10 +215,10 @@ export class SmsPageComponent implements OnInit { // Wifi Credientials CommonService.MOHEMM_WIFI_SSID = result.Mohemm_Wifi_SSID; CommonService.MOHEMM_WIFI_PASSWORD = result.Mohemm_Wifi_Password; - // console.log('enad test'); - // console.log(this.businessInfo.toString()); - // localStorage.setItem('bussines-card-info', this.businessInfo.toString()); - this.common.sharedService.setSharedData(this.businessInfo,'bussiness-card-info'); + console.log('ENAD'); + console.log(JSON.stringify(this.businessInfo)); + localStorage.setItem('bussiness-card-info', JSON.stringify(this.businessInfo)); + // this.common.sharedService.setSharedData(this.businessInfo,'bussiness-card-info'); AuthenticationService.servicePrivilage = result.Privilege_List; this.authService.setAuthenticatedUser(result).subscribe(() => { diff --git a/Mohem/src/app/hmg-common/ui/welcome-login/welcome.component.ts b/Mohem/src/app/hmg-common/ui/welcome-login/welcome.component.ts index 7726efb1..d95ed279 100644 --- a/Mohem/src/app/hmg-common/ui/welcome-login/welcome.component.ts +++ b/Mohem/src/app/hmg-common/ui/welcome-login/welcome.component.ts @@ -103,7 +103,8 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy { this.logintype= localStorage.getItem("login-type"); this.lastLoginDate= localStorage.getItem("login-at"); this.userInfo = JSON.parse(localStorage.getItem('digitalIDUser')); - this.userBusiness = this.cs.sharedService.getSharedData('bussiness-card-info', false); + this.userBusiness = JSON.parse(localStorage.getItem('bussiness-card-info')); + // this.userBusiness = this.cs.sharedService.getSharedData('bussiness-card-info', false); diff --git a/Mohem/src/app/my-team/details/details.component.ts b/Mohem/src/app/my-team/details/details.component.ts index 4bd1e2fc..4469f7ec 100644 --- a/Mohem/src/app/my-team/details/details.component.ts +++ b/Mohem/src/app/my-team/details/details.component.ts @@ -541,7 +541,8 @@ export class DetailsComponent implements OnInit { if (this.employee) { this.getEmpSubordinate(userID); // this.isFavorite = false; - this.getFavorit(); + // this.getFavorit(); + this.isFavorite = this.employee.IsFavorite; } } diff --git a/Mohem/src/app/notification/home/home.component.ts b/Mohem/src/app/notification/home/home.component.ts index 66268864..e2d0b088 100644 --- a/Mohem/src/app/notification/home/home.component.ts +++ b/Mohem/src/app/notification/home/home.component.ts @@ -614,6 +614,8 @@ export class HomeComponent implements OnInit { Count() { const datas = []; const names = []; + this.ITGSegment = []; + this.ITGItem = []; this.workListService.getITGCount('', '', this.isPostNoLoad) .subscribe((result: any) => { if (result.RequestType.length > 0) { diff --git a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts index 539e308d..6ebede5e 100644 --- a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts +++ b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts @@ -200,12 +200,13 @@ export class WorkListMainItgComponent implements OnInit { if (this.request_info.ID === this.all_request_names[i].data[j].ID && this.request_info.ItemID === this.all_request_names[i].data[j].ItemID) { this.index2 = j + 1; - this.index = i + 1; if (this.all_request_names[i].data.length !== this.index2) {// if there is another request with same type this.clearDataArray(); this.changeITGForm(this.all_request_names[i].data[this.index2], this.all_request_names[i].code); return false; - } else if (this.index !== this.all_request_names.length) { // if there is another deffernet type. + } + this.index = i + 1; + if (this.index !== this.all_request_names.length) { // if there is another deffernet type. this.clearDataArray(); this.changeITGForm(this.all_request_names[this.index].data[0], this.all_request_names[this.index].code); return false; 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 604ac00a..ee201d5f 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 @@ -150,15 +150,20 @@ [src]="'data:image/png;base64,'+employee.EMPLOYEE_IMAGE"> - + {{employee.EMPLOYEE_DISPLAY_NAME}} -
- -
+
+ +
+
+ +
@@ -202,20 +212,26 @@
-
+
- - + + - {{employee.EMPLOYEE_DISPLAY_NAME}} + {{employee.EMPLOYEE_DISPLAY_NAME}} -
- -
+
+ +
+
+ +
@@ -255,7 +271,8 @@
- {{'general, save' | translate}} + + {{'general, save' | translate}}
diff --git a/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.ts b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.ts index 711d9aa8..a54ee2ce 100644 --- a/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.ts +++ b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.ts @@ -58,14 +58,17 @@ export class WorkListReplacementItgComponent implements OnInit { if (this.delegtedEmp === undefined) { if (!this.relatedList || this.relatedList.length === 0 || this.relatedList === undefined) { this.arr = this.cs.sharedService.getSharedData('workflow-user', false); - var lookupObject = {}; - for (var i in this.arr) { + let lookupObject = {}; + // tslint:disable-next-line: forin + for (const i in this.arr) { lookupObject[this.arr[i]['Name']] = this.arr[i]; } - for (i in lookupObject) { + // tslint:disable-next-line: forin + for (const i in lookupObject) { this.relatedList.push(lookupObject[i]); } } + this.getFavruite(); } else { this.select(this.delegtedEmp, 1); } @@ -128,6 +131,8 @@ export class WorkListReplacementItgComponent implements OnInit { if (this.cs.validResponse(result)) { if (this.cs.hasData(result.ReplacementList)) { this.ReplacementList = result.ReplacementList; + console.log("___________________________________") + console.log(this.ReplacementList); this.P_PAGE_NUM++; let lastItemIndex = this.ReplacementList.length - 1; if (result.ReplacementList[lastItemIndex]) { @@ -189,9 +194,9 @@ export class WorkListReplacementItgComponent implements OnInit { this.listOfFav = this.favoriteUserList; this.isFilter = true; this.ReplacementList = []; - if(this.favoriteUserList.length === 0 || this.favoriteUserList === undefined){ - this.getFavruite(); - } + // if(this.favoriteUserList.length === 0 || this.favoriteUserList === undefined){ + this.getFavruite(); + // } } else if (selectValue === '2' || selectValue === '3' || selectValue === '5') { this.isSelect = true; this.isFilter = false; @@ -223,56 +228,69 @@ export class WorkListReplacementItgComponent implements OnInit { 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

+ console.log(selEmp); + let name = selEmp.EMPLOYEE_DISPLAY_NAME ? selEmp.EMPLOYEE_DISPLAY_NAME : selEmp.Name; + let userImg = selEmp.EMPLOYEE_IMAGE ? selEmp.EMPLOYEE_IMAGE : ''; + let userEmail = selEmp.Email ? selEmp.Email : selEmp.EMAIL_ADDRESS; + let userID = selEmp.EmployeeID ? selEmp.EmployeeID : selEmp.USER_NAME; + console.log(name) + console.log(userImg) + console.log(userEmail) + let confirmBoxhtml = `
+

Do you want to add ` + name + ` in your favorite list



`; - if (selEmp.EMPLOYEE_IMAGE) - confirmBoxhtml += '
'; - if (!selEmp.EMPLOYEE_IMAGE) + if (userImg) { + confirmBoxhtml += '
'; + } + if (!userImg) { confirmBoxhtml += '
'; + } confirmBoxhtml += `
+ ` + name + `
`; - ` + selEmp.EMPLOYEE_DISPLAY_NAME + ` - - - -
-
` - let userIndex = this.favoriteUserList.findIndex(x => x['USER_NAME'] == selEmp.USER_NAME) - if (userIndex == -1) + const userIndex = this.favoriteUserList.findIndex(x => x['USER_NAME'] === userID); + console.log(userIndex); + if (userIndex === -1) { + selEmp.IsFavorite = !selEmp.IsFavorite; this.cs.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 }]; - + const request = + [ + { + 'USER_NAME': userID, + "EMPLOYEE_DISPLAY_NAME": name, + "EMAIL_ADDRESS": userEmail, + "EMPLOYEE_IMAGE": userImg, + "IsFavorite": selEmp.IsFavorite + } + ]; this.saveUserFavruiteList(request); }, () => { - - }) - - // if (selectValue == "1" || selectValue == "2" || selectValue == "3") { - // this.isSelect = true; - // } - // else { - // this.isSelect = false; - - - - // } + }); + } else { + selEmp.IsFavorite = false; + const request = + [ + { + 'USER_NAME': userID, + "EMPLOYEE_DISPLAY_NAME": name, + "EMAIL_ADDRESS": userEmail, + "EMPLOYEE_IMAGE": userImg, + "IsFavorite": false + } + ]; + this.saveUserFavruiteList(request); + } } saveUserFavruiteList(request) { this.worklistService.saveFavoriteList(request, () => { }).subscribe((result) => { if (this.cs.validResponse(result)) { this.cs.toastPK("replacementRoll", "favorite-saved"); - } }) } @@ -284,13 +302,24 @@ export class WorkListReplacementItgComponent implements OnInit { if (this.cs.validResponse(result)) { this.cs.stopLoading(); this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList']; - console.log(this.favoriteUserList); + 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 = []; - listOfFav = [] + listOfFav = []; filterList(event) { const val = event.target.value; 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 d23640aa..5b46275e 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 @@ -24,23 +24,33 @@ -

{{'replacementRoll, workflow' | translate}}

+ +

{{'replacementRoll, workflow' | translate}}

+
-

{{'replacementRoll, favorite' | translate}}

+ +

{{'replacementRoll, favorite' | translate}}

+
-

{{'replacementRoll, employee-id' | translate}}

+ +

{{'replacementRoll, employee-id' | translate}}

+
-

{{'replacementRoll, employee-email' | translate}}

+ +

{{'replacementRoll, employee-email' | translate}}

+
-

{{'replacementRoll, employee-name' | translate}}

+ +

{{'replacementRoll, employee-name' | translate}}

+
@@ -76,8 +86,7 @@ -
+
{{'replacementRoll, related' | translate}}
@@ -94,10 +103,12 @@ {{employee.NAME}} -
+
-
+
@@ -108,9 +119,8 @@
-
-
+
+
{{'replacementRoll, favorite' | translate}}
@@ -127,7 +137,12 @@ {{employee.EMPLOYEE_DISPLAY_NAME}} -
+
+ +
+
@@ -150,7 +165,7 @@
-
+
@@ -159,13 +174,18 @@ - {{employee.EMPLOYEE_DISPLAY_NAME}} + {{employee.EMPLOYEE_DISPLAY_NAME}} -
+
+
+ +
@@ -209,7 +229,7 @@ (click)="submitAction()"> {{'general, submit' | translate}} - {{'general, submit' | translate}} 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 df8aa22c..ed3c7ca8 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 @@ -47,7 +47,7 @@ export class WorkListReplacementRollComponent implements OnInit { userSelected: boolean; actionHistory = []; arr = []; - favoriteUserList: [] = []; + favoriteUserList: any = []; isFilter = true; constructor(public worklistService: WorklistService, private cs: CommonService, public ts: TranslatorService, public workListMainService: WorklistMainService, public modalCtrl: ModalController) { this.P_PAGE_NUM = 1; @@ -488,8 +488,10 @@ export class WorkListReplacementRollComponent implements OnInit { this.cs.stopLoading(); this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList']; this.listOfFav = this.favoriteUserList; - - /**** THIS CODE TO CHECK STAR OF EMPLOYEE IF THE IT IS IN FAVOORIT LIST AND SHOW IN WORKFLOW LIST****/ + this.favoriteUserList.forEach((obj) => { + obj.IsFavorite = true; + }); + /**** THIS CODE TO CHECK STAR OF EMPLOYEE IF IT IS IN FAVORITE LIST AND SHOW IN WORKFLOW LIST****/ // this.actionHistory.forEach((obj, i) => { // if(this.favoriteUserList.some(x => x['USER_NAME'] === obj.USER_NAME)) { // this.actionHistory[i].isInFavorite = true; @@ -517,6 +519,7 @@ export class WorkListReplacementRollComponent implements OnInit { 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 : ''; + selEmp.IsFavorite = !selEmp.IsFavorite; if (this.favoriteUserList.some(x => x['USER_NAME'] === selEmp.USER_NAME)) { let confirmBoxhtml = `

Do you want to add ` + selEmp.EMPLOYEE_DISPLAY_NAME + ` in your favorite list

@@ -547,12 +550,24 @@ export class WorkListReplacementRollComponent implements OnInit { 'EMPLOYEE_DISPLAY_NAME': selEmp['EMPLOYEE_DISPLAY_NAME'], 'EMAIL_ADDRESS': selEmp.EMAIL_ADDRESS, 'EMPLOYEE_IMAGE': selEmp.EMPLOYEE_IMAGE, - 'IsFavorite': true + '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); } } else { const request = @@ -565,10 +580,11 @@ export class WorkListReplacementRollComponent implements OnInit { 'IsFavorite': false } ]; - this.saveUserFavruiteList(request); + this.saveUserFavruiteList(request); } } + listOfRealted: any = []; listOfFav: any = []; diff --git a/Mohem/src/assets/icon/HMG_LOGO.png b/Mohem/src/assets/icon/HMG_LOGO.png new file mode 100644 index 00000000..d2dbe038 Binary files /dev/null and b/Mohem/src/assets/icon/HMG_LOGO.png differ