diff --git a/Mohem/src/app/absence/submit-absence/submit-absence.component.html b/Mohem/src/app/absence/submit-absence/submit-absence.component.html index 98bb9c31..9a17288e 100644 --- a/Mohem/src/app/absence/submit-absence/submit-absence.component.html +++ b/Mohem/src/app/absence/submit-absence/submit-absence.component.html @@ -5,19 +5,19 @@ -
+ + {{ts.trPK('submitAbsence','absenceType')}} - --> + - + {{ts.trPK('submitAbsence','startDate')}} diff --git a/Mohem/src/app/app.component.html b/Mohem/src/app/app.component.html index 37e31ee2..5b40ba6e 100644 --- a/Mohem/src/app/app.component.html +++ b/Mohem/src/app/app.component.html @@ -1,6 +1,6 @@ - +
@@ -99,7 +99,7 @@ - +
diff --git a/Mohem/src/app/app.component.ts b/Mohem/src/app/app.component.ts index 82c9c5ca..47934fec 100644 --- a/Mohem/src/app/app.component.ts +++ b/Mohem/src/app/app.component.ts @@ -150,7 +150,9 @@ export class AppComponent implements OnInit { const user = this.authService.loadAuthenticatedUser().subscribe((user: AuthenticatedUser) => { if (user) { console.log(user); - + this.userInfo = JSON.parse(localStorage.getItem('bussiness-card-info')); + console.log('ENAD TEST') + console.log(this.userInfo) localStorage.setItem("digitalIDUser", JSON.stringify(user)); this.digitalIDUser = user//JSON.stringify(user); this.companyUrl = user.CompanyImageURL ? user.CompanyImageURL : '../assets/imgs/CSLogo.png'; @@ -287,7 +289,7 @@ export class AppComponent implements OnInit { return await modal.present(); } async openBusinessCard() { - this.userInfo = JSON.parse(localStorage.getItem('bussiness-card-info')); + // 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({ 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 94fb5ef2..6cabace2 100644 --- a/Mohem/src/app/authentication/business-card/business-card.component.html +++ b/Mohem/src/app/authentication/business-card/business-card.component.html @@ -11,7 +11,7 @@ -

{{userInfo.name_en}}

+

{{userInfo.name_en}}

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 b70bdcb5..f85bbad2 100644 --- a/Mohem/src/app/authentication/business-card/business-card.component.scss +++ b/Mohem/src/app/authentication/business-card/business-card.component.scss @@ -38,14 +38,17 @@ // CS .card-size{ transform: rotate(90deg) !important; - padding: 10px !important; + // padding: 5% !important; + // padding-right: 0px !important; padding-right: 0px !important; + padding-left: 15% !important; } .qr-style{ - left: 410px !important; + left: 260% !important; } .name-ar-style{ - left: 320px !important; + left: 175% !important; + padding: 0%; } // HMG .logo-img-hmg-style{ @@ -60,14 +63,15 @@ // CS .card-size{ transform: rotate(90deg) !important; - padding: 10px !important; - padding-right: 0px !important; + padding: 6% !important; + padding-right: 2% !important; } .qr-style{ - left: 324px !important; + width: 80%; + left: 220% !important; } .name-ar-style{ - left: 230px !important; + left: 140% !important; } // HMG @@ -83,14 +87,14 @@ // CS .card-size{ transform: rotate(90deg) !important; - padding: 5px !important; + padding: 6% !important; padding-right: 0px !important; } .qr-style{ - left: 400px !important; + left: 280% !important; } .name-ar-style{ - left: 310px !important; + left: 205%!important; } // HMG .logo-img-hmg-style{ @@ -125,14 +129,14 @@ @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; + padding: 6% !important; + padding-right: 0% !important; } .qr-style{ - left: 280px !important; + left: 200% !important; } .name-ar-style{ - left: 190px !important; + left: 116% !important; } // HMG .logo-img-hmg-style{ @@ -146,26 +150,26 @@ .card-size{ transform: rotate(90deg) !important; position: relative; - bottom: 30px; - left: 26px; + bottom: 3%; + left: 8%; } .qr-style{ - width: 80px !important; - margin-top: 50px !important; + width: 70% !important; + margin-top: 30% !important; position: relative !important; - left: 265px !important; + left: 200% !important; } .name-ar-style{ font-size: 15px !important; position: relative !important; - left: 130px !important; + left: 115% !important; text-align: end !important; - padding: 10px !important; - width: 225px !important; + padding: 1% !important; + width: 170% !important; } .logo-img-style{ - width: 80px !important; - margin-top: 50px !important; + width: 60% !important; + margin-top: 35% !important; } // HMG @@ -193,23 +197,24 @@ .card-size{ transform: rotate(90deg); + padding: 6%; } .qr-style{ - width: 130px; + width: 70%; margin-top: 0px; position: relative; - left: 410px; + left: 200%; } .name-ar-style{ - font-size: 25px; + font-size: 20px; position: relative; - left: 314px; + left: 120%; text-align: end; - padding: 10px; - width: 225px; + padding: 1%; + width: 145%; } .logo-img-style{ - width: 120px; + width: 70%; } .logo-img-hmg-style{ 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 0462829a..28a3bde3 100644 --- a/Mohem/src/app/authentication/business-card/business-card.component.ts +++ b/Mohem/src/app/authentication/business-card/business-card.component.ts @@ -10,7 +10,7 @@ import { TranslatorService } from 'src/app/hmg-common/services/translator/transl }) export class BusinessCardComponent implements OnInit { - @Input() userInfo: any; + public userInfo: any; public userJobName: any; constructor( public modalCtrl: ModalController, @@ -19,6 +19,7 @@ export class BusinessCardComponent implements OnInit { ) { } ngOnInit() { + this.userInfo = JSON.parse(localStorage.getItem('bussiness-card-info')); console.log(this.userInfo); } diff --git a/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts b/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts index 9e719df8..2e345b5c 100644 --- a/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts +++ b/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts @@ -475,11 +475,12 @@ export class ConfirmLoginComponent implements OnInit { return await modal.present(); } - checkAccess(el: any, isDigitalID = false, buttonType?) { + checkAccess(el: any, isDigitalID = false, buttonType?, isBusinessID = false,) { const data = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false); - if (isDigitalID) { + if (isDigitalID || isBusinessID) { + const sourceType = isDigitalID === true ? 'digitalID' : 'businessID'; this.button(); - this.checkButtonType(buttonType); + this.checkButtonType(buttonType, sourceType); } else { console.log(data); @@ -497,7 +498,7 @@ export class ConfirmLoginComponent implements OnInit { } } - checkButtonType(typeNumber) { + checkButtonType(typeNumber, sourceType) { let buttonSelected; this.buttons.forEach(element => { element.forEach(elementValue => { @@ -508,7 +509,11 @@ export class ConfirmLoginComponent implements OnInit { } }); }); - this.sharedData.setSharedData(true, "loginWithDigitalIDButton"); + if (sourceType === 'digitalID') { + this.sharedData.setSharedData(true, "loginWithDigitalIDButton"); + } else { + this.sharedData.setSharedData(true, "loginWithBusinessIDButton"); + } this.loginType = buttonSelected; this.checkAppUpdated(); } 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 9a3ee766..0bc5507f 100644 --- a/Mohem/src/app/authentication/sms-page/sms-page.page.ts +++ b/Mohem/src/app/authentication/sms-page/sms-page.page.ts @@ -215,8 +215,6 @@ 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'); - console.log(JSON.stringify(this.businessInfo)); localStorage.setItem('bussiness-card-info', JSON.stringify(this.businessInfo)); // this.common.sharedService.setSharedData(this.businessInfo,'bussiness-card-info'); diff --git a/Mohem/src/app/hmg-common/services/attend-services/attend-scan.service.ts b/Mohem/src/app/hmg-common/services/attend-services/attend-scan.service.ts index 30002b70..29c24f36 100644 --- a/Mohem/src/app/hmg-common/services/attend-services/attend-scan.service.ts +++ b/Mohem/src/app/hmg-common/services/attend-services/attend-scan.service.ts @@ -34,7 +34,7 @@ export class AttendScanService { userData: any = {}; public isFakeLocationUsed = false; public isGpsRequired = false; - public collection = 'HMG'; + public collection = 'CS'; constructor(private device: Device, private zbar: ZBar, diff --git a/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts b/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts index 3de2022e..fe589875 100644 --- a/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts +++ b/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts @@ -142,8 +142,8 @@ export class AuthenticationService { } else { mobileType = 'android'; } - request.VersionID = 3.1; - request.Channel = 33; + request.VersionID = 3.2; + request.Channel = 31; request.LanguageID = TranslatorService.getCurrentLanguageCode(); request.MobileType = mobileType; @@ -218,7 +218,7 @@ export class AuthenticationService { public login(request: LoginRequest, onError: any, errorLabel: string): Observable { this.setPublicFields(request); - request.P_APP_VERSION = "HMG"; + request.P_APP_VERSION = "CS"; return this.con.post(AuthenticationService.login, request, onError, errorLabel); } @@ -475,7 +475,7 @@ export class AuthenticationService { public checkUserAuthentication(request: CheckUserAuthenticationRequest, onError: any, errorLabel: string) : Observable { this.setPublicFields(request); - request.P_APP_VERSION = "HMG"; + request.P_APP_VERSION = "CS"; return this.con.post(AuthenticationService.userChecking, request, onError, errorLabel); } diff --git a/Mohem/src/app/hmg-common/ui/welcome-login/welcome.component.html b/Mohem/src/app/hmg-common/ui/welcome-login/welcome.component.html index ba7fd550..b0a33fd3 100644 --- a/Mohem/src/app/hmg-common/ui/welcome-login/welcome.component.html +++ b/Mohem/src/app/hmg-common/ui/welcome-login/welcome.component.html @@ -1,4 +1,4 @@ - + + + + + + + + + + + + + + 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 a54ee2ce..bd1ab765 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 @@ -100,6 +100,12 @@ export class WorkListReplacementItgComponent implements OnInit { this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = ""; break; } + case '5': { + this.P_SEARCH_EMAIL_ADDRESS = ""; + this.P_SEARCH_USER_NAME = ""; + this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = this.searchKey; + break; + } default: { this.P_SEARCH_USER_NAME = ""; this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = ""; @@ -211,12 +217,13 @@ export class WorkListReplacementItgComponent implements OnInit { } onChangeInput() { this.ReplacementList = []; - clearTimeout(this.typingTimer); - this.typingTimer = setTimeout(() => { - if (this.searchKey.length > 2) { - this.SearchReplacementList(); - } - }, 3000); + this.SearchReplacementList(); + // clearTimeout(this.typingTimer); + // this.typingTimer = setTimeout(() => { + // if (this.searchKey.length > 2) { + // this.SearchReplacementList(); + // } + // }, 3000); } select(selectEmp, index) { this.selEmp = selectEmp @@ -268,7 +275,7 @@ export class WorkListReplacementItgComponent implements OnInit { "IsFavorite": selEmp.IsFavorite } ]; - this.saveUserFavruiteList(request); + this.saveUserFavruiteList(request, selEmp.IsFavorite); }, () => { }); } else { @@ -283,16 +290,21 @@ export class WorkListReplacementItgComponent implements OnInit { "IsFavorite": false } ]; - this.saveUserFavruiteList(request); + this.saveUserFavruiteList(request, false); } } - 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.greenToastPK("replacementRoll", "favorite-saved"); + } else { + this.cs.redToastPK("replacementRoll", "favorite-unsaved"); + } + this.getFavruite(); } - }) + }); } getFavruite() { this.cs.startLoading(); 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 5b46275e..cd1fb3b3 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 @@ -60,10 +60,21 @@
- - + + + + + + + + + + + +
@@ -156,12 +167,12 @@

-
+
{{'replacementRoll, search-result' | translate}}

- +
diff --git a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.scss b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.scss index 64b9ebd1..7bd616a2 100644 --- a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.scss +++ b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.scss @@ -209,3 +209,4 @@ ion-radio{ font-size: 12px; } + 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 b64d7209..f39e81c2 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 @@ -340,17 +340,17 @@ export class WorkListReplacementRollComponent implements OnInit { this.messageSuccess = true; - setTimeout(() => { - this.messageSuccess = false; - //this.modalCtrl.dismiss(succ); - this.modalCtrl.dismiss({ - 'dismissed': true, - data: "Success" - }); - if (this.selEmp && this.isAnswer == false) { - this.setFavorite(this.selEmp); - } - }, 5000); + // setTimeout(() => { + this.messageSuccess = false; + //this.modalCtrl.dismiss(succ); + this.modalCtrl.dismiss({ + 'dismissed': true, + data: "Success" + }); + // if (this.selEmp && this.isAnswer == false) { + // this.setFavorite(this.selEmp); + // } + // }, 5000); this.cs.openNotificationPage(); // this.messageSuccess = true; @@ -433,6 +433,7 @@ export class WorkListReplacementRollComponent implements OnInit { } selectedType; + counter=0; onChangeSelect(select) { let selectValue = select.detail.value; @@ -441,9 +442,20 @@ export class WorkListReplacementRollComponent implements OnInit { this.isFilter = true; this.selectedType = 1; this.listOfRealted = this.actionHistory; + if(this.counter > 0) + { + this.actionHistory.forEach((obj, i) => { + if(this.favoriteUserList.find(x => x['USER_NAME'] === obj.USER_NAME)) { + this.actionHistory[i].IsFavorite = true; + }else{ + this.actionHistory[i].IsFavorite = false; + } + }); + } + this.counter = 1; } else if (selectValue === '4') { // if (this.favoriteUserList.length === 0 || this.favoriteUserList === undefined) { - this.getFavruite(); + this.getFavruite(); // } this.isFilter = true; this.selectedType = 4; @@ -461,11 +473,11 @@ export class WorkListReplacementRollComponent implements OnInit { onChangeInput() { this.ReplacementList = []; clearTimeout(this.typingTimer); - this.typingTimer = setTimeout(() => { - if (this.inputSearch.length > 2) { + // this.typingTimer = setTimeout(() => { + // if (this.inputSearch.length > 2) { this.getreplacmentemployee(); - } - }, 3000); + // } + // }, 3000); // if (this.inputSearch.length > 0) { @@ -509,12 +521,12 @@ export class WorkListReplacementRollComponent implements OnInit { this.worklistService.saveFavoriteList(request, () => { }).subscribe((result) => { if (this.cs.validResponse(result)) { - if(isFav){ - this.cs.toastPK("replacementRoll", "favorite-saved"); - } else{ - this.cs.toastPK("replacementRoll", "favorite-unsaved"); + if (isFav) { + this.cs.greenToastPK("replacementRoll", "favorite-saved"); + } else { + this.cs.redToastPK("replacementRoll", "favorite-unsaved"); } - + this.getFavruite(); } }) } diff --git a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html index 37ba1670..0c4f4e38 100644 --- a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html +++ b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html @@ -542,7 +542,7 @@ for="">{{ts.trPK('worklistMain','TotalPOAmountWithVAT')}}
- + diff --git a/Mohem/src/app/notification/worklist-main/worklist-main.component.html b/Mohem/src/app/notification/worklist-main/worklist-main.component.html index 08aff5a2..0d6073b6 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.html +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.html @@ -46,7 +46,9 @@ - + +
@@ -117,6 +119,45 @@ + + + +
+ + +
+ + + +

Current

+
+
+ + +

Proposed

+
+
+
+ + + +
+ +
+ + +
+ +
+
+
+
+
+
+
@@ -304,7 +345,7 @@ - +
@@ -345,7 +386,8 @@
+ {{actionHistory.visible ? 'Show less': 'Show More' + }}
{ + this.handleWorkListBodyResult(result, "BASIC_DETAILS"); + }); + } + getAddressNotification(notificationBodyObj) { + this.worklistMainService + .getAddressNotificationBody(notificationBodyObj) + .subscribe((result: PRNotificatonBodyResponse) => { + this.handleWorkListBodyResult(result, "ADDRESS"); + }); + } + getPRNotificationDetails(notificationBodyObj) { this.worklistMainService .getPRNotificationBody(notificationBodyObj) @@ -343,11 +362,23 @@ export class WorklistMainComponent implements OnInit { this.getSubordinatesleave(obj) } - } else if (Type == "PR") { + } else if (Type === "PR") { if (result.GetAbsenceCollectionNotificationBodyList) { this.notificationBodyRes = result.GetAbsenceCollectionNotificationBodyList; } + } else if (Type === "ADDRESS"){ + if (result.GetAddressNotificationBodyList) { + this.notificationBodyRes = + result.GetAddressNotificationBodyList; + console.log(result); + } + } else if (Type === "BASIC_DETAILS"){ + if (result.GetBasicDetNtfBodyList) { + this.notificationBodyRes = + result.GetBasicDetNtfBodyList; + console.log(result); + } } } } //End handleWorkListBodyResult diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json index c5501baa..077e6689 100644 --- a/Mohem/src/assets/localization/i18n.json +++ b/Mohem/src/assets/localization/i18n.json @@ -2202,11 +2202,11 @@ "ar": "أدخل ملاحظة" }, "favorite-saved": { - "en": "Your Favorite saved successfully", + "en": "Your Favorite has been saved successfully", "ar": "تم حفظ مفضلتك بنجاح" }, "favorite-unsaved": { - "en": "Your Favorite had been deleted successfully", + "en": "Your Favorite has been deleted successfully", "ar": "تم حفظ مفضلتك بنجاح" }, "msg": { diff --git a/Mohem/src/theme/worklist.scss b/Mohem/src/theme/worklist.scss index 62e99142..cb20fcf3 100644 --- a/Mohem/src/theme/worklist.scss +++ b/Mohem/src/theme/worklist.scss @@ -612,3 +612,10 @@ left: 66px; font-size: 16px; text-align: left; } + ion-input .replacmentSearchBar .native-input{ + position: absolute !important; + } + + ion-input .replacmentSearchBar .input-clear-icon{ + display: none !important; + } \ No newline at end of file