Merge branch 'enad-pre-live' of https://gitlab.com/haroon6138/mohemmionic5 into enad-pre-live

MOE_DEV_NEW_TEMPORARY_DESIGN
Sultan Khan 4 years ago
commit bb6f606443

@ -35,6 +35,7 @@
"@ionic-native/device": "^5.18.0",
"@ionic-native/diagnostic": "^5.18.0",
"@ionic-native/file": "^5.18.0",
"@ionic-native/file-opener": "^5.36.0",
"@ionic-native/file-path": "^5.18.0",
"@ionic-native/fingerprint-aio": "^5.18.0",
"@ionic-native/firebase-x": "^5.34.0",
@ -81,6 +82,7 @@
"cordova-plugin-device": "^2.0.3",
"cordova-plugin-dialogs": "^2.0.2",
"cordova-plugin-file": "^6.0.2",
"cordova-plugin-file-opener2": "^3.0.5",
"cordova-plugin-filepath": "^1.5.6",
"cordova-plugin-fingerprint-aio": "^3.0.0",
"cordova-plugin-firebasex": "^13.0.0",
@ -236,6 +238,9 @@
},
"cordova-plugin-sms-retriever-manager": {
"PLAY_SERVICES_VERSION": "15.0.1"
},
"cordova-plugin-file-opener2": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
}
},
"platforms": [
@ -243,4 +248,4 @@
"ios"
]
}
}
}

@ -35,7 +35,14 @@
{{ts.trPK('userProfile','title')}}
</ion-label>
</ion-item>
<ion-item (click)="performanceEvaluation()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 24px !important;" src="../assets/icon/bar-chart.svg" item-left>
</ion-thumbnail>
<ion-label class="profile">
{{ts.trPK('userProfile','performance-evaluation')}}
</ion-label>
</ion-item>
<ion-item [hidden]="TeamFlag!='true'" (click)="openMyTeamPage()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 14px !important;" src="../assets/imgs/my_team_icon.png" item-left>

@ -271,7 +271,10 @@ export class AppComponent implements OnInit {
this.cs.openProfile('sideMenu');
this.menu.toggle();
}
public performanceEvaluation() {
this.cs.openPerformanceevaluation();
this.menu.toggle();
}
public openNotification() {
this.cs.openNotificationPage();
this.menu.toggle();

@ -41,10 +41,10 @@
minLength="8" min="8">
</ion-input>
</ion-item>
<ion-item lines='none'>
<img class="item-icon" src="../assets/icon/yellow.svg" item-start />
<ion-label><p>{{recentPasswordNote.text}}</p></ion-label>
<img class="item-icon " src="../assets/imgs/req info.svg" item-start />
<ion-label><p class="info">{{recentPasswordNote.text}}</p></ion-label>
</ion-item>
<ion-item lines='none'>
<img class="item-icon" [src]="checkerFuncation(1)" item-start />

@ -33,3 +33,7 @@
opacity:.5;
}
.info{
color: #000;
font-weight: bold;
}

@ -36,47 +36,55 @@ export class ChangePasswordComponent implements OnInit {
public recentPasswordNote = {
yellowImg: '../assets/icon/yellow.svg',
text: 'Do not user recent password'
text: 'Do not user recent password',
};
public isLowerCase = {
blankImg: '../assets/icon/blank.svg',
greenImg: '../assets/icon/green.svg',
redImg: '../assets/imgs/close.svg',
text: 'At least one lowercase',
isMatch: false
};
public isUpperCase = {
blankImg: '../assets/icon/blank.svg',
greenImg: '../assets/icon/green.svg',
redImg: '../assets/imgs/close.svg',
text: 'At least one uppdercase',
isMatch: false
};
public isHasDigit = {
blankImg: '../assets/icon/blank.svg',
greenImg: '../assets/icon/green.svg',
redImg: '../assets/imgs/close.svg',
text: 'At least one nomeric',
isMatch: false
};
public isMinLength = {
blankImg: '../assets/icon/blank.svg',
greenImg: '../assets/icon/green.svg',
redImg: '../assets/imgs/close.svg',
text: 'Minimum 8 characters',
isMatch: false
};
public isRepeatedLetter = {
blankImg: '../assets/icon/blank.svg',
greenImg: '../assets/icon/green.svg',
redImg: '../assets/imgs/close.svg',
text: 'Do not add repeating letters',
isMatch: false
};
public isContainSpecialChar = {
blankImg: '../assets/icon/blank.svg',
greenImg: '../assets/icon/green.svg',
redImg: '../assets/imgs/close.svg',
text: 'It should contain special character',
isMatch: false
};
public confirmMatchNew = {
blankImg: '../assets/icon/blank.svg',
greenImg: '../assets/icon/green.svg',
redImg: '../assets/imgs/close.svg',
text: 'Confirm Password does not match.',
isMatch: false
};
@ -244,7 +252,7 @@ export class ChangePasswordComponent implements OnInit {
return this.isLowerCase.greenImg;
} else {
this.isLowerCase.isMatch = false;
return this.isLowerCase.blankImg;
return this.isLowerCase.redImg;
}
case 2:
if (/[A-Z]/.test(this.P_NEW_PASSWORD)) {
@ -252,7 +260,7 @@ export class ChangePasswordComponent implements OnInit {
return this.isUpperCase.greenImg;
} else {
this.isUpperCase.isMatch = false;
return this.isUpperCase.blankImg;
return this.isUpperCase.redImg;
}
case 3:
if (/[0-9]/.test(this.P_NEW_PASSWORD)) {
@ -260,7 +268,7 @@ export class ChangePasswordComponent implements OnInit {
return this.isHasDigit.greenImg;
} else {
this.isHasDigit.isMatch = false;
return this.isHasDigit.blankImg;
return this.isHasDigit.redImg;
}
case 4:
if (this.P_NEW_PASSWORD.length >= 8) {
@ -268,12 +276,12 @@ export class ChangePasswordComponent implements OnInit {
return this.isMinLength.greenImg;
} else {
this.isMinLength.isMatch = false;
return this.isMinLength.blankImg;
return this.isMinLength.redImg;
}
case 5:
if (/([a-z])\1/i.test(this.P_NEW_PASSWORD)) {
this.isRepeatedLetter.isMatch = false;
return this.isRepeatedLetter.blankImg;
return this.isRepeatedLetter.redImg;
} else {
this.isRepeatedLetter.isMatch = true;
return this.isRepeatedLetter.greenImg;
@ -284,14 +292,14 @@ export class ChangePasswordComponent implements OnInit {
return this.isContainSpecialChar.greenImg;
} else {
this.isContainSpecialChar.isMatch = false;
return this.isContainSpecialChar.blankImg;
return this.isContainSpecialChar.redImg;
}
case 7:
if (this.P_NEW_PASSWORD !== this.P_Confirm_NEW_PASSWORD) {
this.confirmMatchNew.isMatch = true;
return this.confirmMatchNew.blankImg;
} else {
this.confirmMatchNew.isMatch = false;
return this.confirmMatchNew.redImg;
} else {
this.confirmMatchNew.isMatch = true;
return this.confirmMatchNew.greenImg;
}
}
@ -302,7 +310,7 @@ export class ChangePasswordComponent implements OnInit {
disabledSubmitBtn() {
if (this.isLowerCase.isMatch && this.isUpperCase.isMatch && this.isHasDigit.isMatch && this.isMinLength.isMatch
&& this.isRepeatedLetter.isMatch && this.P_NEW_PASSWORD !== '' && this.NEW_PASSWORD
&& this.Confirm_NEW_PASSWORD && this.OLD_PASSWORD && this.isContainSpecialChar) {
&& this.Confirm_NEW_PASSWORD && this.OLD_PASSWORD && this.isContainSpecialChar.isMatch && this.confirmMatchNew.isMatch) {
return false;
} else { return true; }
}

@ -61,7 +61,7 @@ export class CheckUserComponent implements OnInit {
private checkUserResult: CheckUserAuthenticationResponse;
private sendSMSForForgotPassword() {
public sendSMSForForgotPassword() {
this.cs.startLoading();
let changePwdObj= new LoginRequest();
// changePwdObj.MobileNumber= this.checkUserResult.BasicMemberInformation.P_MOBILE_NUMBER;

@ -41,8 +41,8 @@
</ion-item>
<ion-item lines='none'>
<img class="item-icon" src="../assets/icon/yellow.svg" item-start />
<ion-label><p>{{recentPasswordNote.text}}</p></ion-label>
<img class="item-icon" src="../assets/imgs/req info.svg" item-start />
<ion-label><p class="info">{{recentPasswordNote.text}}</p></ion-label>
</ion-item>
<ion-item lines='none'>
<img class="item-icon" [src]="checkerFuncation(1)" item-start />
@ -81,7 +81,7 @@
<ion-footer>
<div class="centerDiv">
<button [disabled]="disabledSubmitBtn()"
[ngClass]=" disabledSubmitBtn() ? 'disabledButton' : '' "
[ngClass]="disabledSubmitBtn() ? 'disabledButton' : 'enable' "
class="button-login" ion-button (click)="forgotpassword()">{{ts.trPK('login','changepassword')}}</button>
</div>
</ion-footer>

@ -2,4 +2,7 @@
opacity:.5;
}
.info{
color: #000;
font-weight: bold;
}

@ -23,48 +23,55 @@ export class ForgotComponent implements OnInit {
public P_USER_NAME: string;
public logo = "assets/icon/login/lock.png";
public recentPasswordNote = {
yellowImg: '../assets/icon/yellow.svg',
yellowImg: '../assets/imgs/mohemm-action/info.png',
text: 'Do not user recent password'
};
public isLowerCase = {
blankImg: '../assets/icon/blank.svg',
greenImg: '../assets/icon/green.svg',
redImg: '../assets/imgs/close.svg',
text: 'At least one lowercase',
isMatch: false
};
public isUpperCase = {
blankImg: '../assets/icon/blank.svg',
greenImg: '../assets/icon/green.svg',
redImg: '../assets/imgs/close.svg',
text: 'At least one uppdercase',
isMatch: false
};
public isHasDigit = {
blankImg: '../assets/icon/blank.svg',
greenImg: '../assets/icon/green.svg',
redImg: '../assets/imgs/close.svg',
text: 'At least one nomeric',
isMatch: false
};
public isMinLength = {
blankImg: '../assets/icon/blank.svg',
greenImg: '../assets/icon/green.svg',
redImg: '../assets/imgs/close.svg',
text: 'Minimum 8 characters',
isMatch: false
};
public isRepeatedLetter = {
blankImg: '../assets/icon/blank.svg',
greenImg: '../assets/icon/green.svg',
redImg: '../assets/imgs/close.svg',
text: 'Do not add repeating letters',
isMatch: false
};
public isContainSpecialChar = {
blankImg: '../assets/icon/blank.svg',
greenImg: '../assets/icon/green.svg',
redImg: '../assets/imgs/close.svg',
text: 'It should contain special character',
isMatch: false
};
public confirmMatchNew = {
blankImg: '../assets/icon/blank.svg',
greenImg: '../assets/icon/green.svg',
redImg: '../assets/imgs/close.svg',
text: 'Confirm Password does not match.',
isMatch: false
};
@ -157,7 +164,7 @@ export class ForgotComponent implements OnInit {
return this.isLowerCase.greenImg;
} else {
this.isLowerCase.isMatch = false;
return this.isLowerCase.blankImg;
return this.isLowerCase.redImg;
}
case 2:
if (/[A-Z]/.test(this.P_NEW_PASSWORD)) {
@ -165,7 +172,7 @@ export class ForgotComponent implements OnInit {
return this.isUpperCase.greenImg;
} else {
this.isUpperCase.isMatch = false;
return this.isUpperCase.blankImg;
return this.isUpperCase.redImg;
}
case 3:
if (/[0-9]/.test(this.P_NEW_PASSWORD)) {
@ -173,7 +180,7 @@ export class ForgotComponent implements OnInit {
return this.isHasDigit.greenImg;
} else {
this.isHasDigit.isMatch = false;
return this.isHasDigit.blankImg;
return this.isHasDigit.redImg;
}
case 4:
if (this.P_NEW_PASSWORD.length >= 8) {
@ -181,12 +188,12 @@ export class ForgotComponent implements OnInit {
return this.isMinLength.greenImg;
} else {
this.isMinLength.isMatch = false;
return this.isMinLength.blankImg;
return this.isMinLength.redImg;
}
case 5:
if (/([a-z])\1/i.test(this.P_NEW_PASSWORD)) {
this.isRepeatedLetter.isMatch = false;
return this.isRepeatedLetter.blankImg;
return this.isRepeatedLetter.redImg;
} else {
this.isRepeatedLetter.isMatch = true;
return this.isRepeatedLetter.greenImg;
@ -197,14 +204,14 @@ export class ForgotComponent implements OnInit {
return this.isContainSpecialChar.greenImg;
} else {
this.isContainSpecialChar.isMatch = false;
return this.isContainSpecialChar.blankImg;
return this.isContainSpecialChar.redImg;
}
case 7:
if (this.P_NEW_PASSWORD !== this.P_Confirm_NEW_PASSWORD) {
this.confirmMatchNew.isMatch = true;
return this.confirmMatchNew.blankImg;
} else {
this.confirmMatchNew.isMatch = false;
return this.confirmMatchNew.redImg;
} else {
this.confirmMatchNew.isMatch = true;
return this.confirmMatchNew.greenImg;
}
}
@ -213,9 +220,9 @@ export class ForgotComponent implements OnInit {
disabledSubmitBtn() {
if (this.isLowerCase.isMatch && this.isUpperCase.isMatch && this.isHasDigit.isMatch && this.isMinLength.isMatch
&& this.isRepeatedLetter.isMatch && this.P_NEW_PASSWORD !== '' && this.P_NEW_PASSWORD
&& this.P_Confirm_NEW_PASSWORD && this.isContainSpecialChar) {
return false;
&& this.isRepeatedLetter.isMatch && this.P_NEW_PASSWORD !== '' && this.P_NEW_PASSWORD
&& this.P_Confirm_NEW_PASSWORD && this.isContainSpecialChar && this.confirmMatchNew.isMatch) {
return false;
} else { return true; }
}
}
}

@ -113,7 +113,7 @@ import { AttendanceOptionsComponent } from '../home/attendance-options/attendanc
import { CardCalendarComponent } from './ui/card-calendar/card-calendar.component';
import { WorklistSettingComponent } from '../notification/worklist-setting/worklist-setting.component';
import { SubmitAddressModalComponent } from '../profile/submit-eit-modal/submit-address-modal.component';
import { FileOpener } from '@ionic-native/file-opener/ngx';
@NgModule({
imports: [
CommonModule,
@ -309,7 +309,8 @@ import { SubmitAddressModalComponent } from '../profile/submit-eit-modal/submit-
MenuService,
OpenNativeSettings,
BarcodeScanner,
BackgroundGeolocation
BackgroundGeolocation,
FileOpener
],
entryComponents: [DateInfoModalComponent, WorklistSettingComponent],
})

@ -25,10 +25,10 @@ export class ConnectorService {
headers: new HttpHeaders({ 'Content-Type': 'application/json' })
};
public static retryTimes = 0;
public static timeOut = 120 * 1000;
public static timeOut = 180 * 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,

@ -31,8 +31,8 @@
</ion-col>
<ion-col *ngIf="worklistSetting" [size]="2" style="padding: 0;" (click)="openNotifictionSetting()">
<div class="profile-image-container">
<ion-icon name='settings' style="width: 30px;height: 30px;margin-top: 5px; color: white;"></ion-icon>
<div class="profile-image-container setting-conatainer">
<ion-icon src="../assets/icon/settings-not.svg" style="width: 30px;height: 30px;margin-top: 5px; color: white;"></ion-icon>
</div>
</ion-col>

@ -23,4 +23,8 @@
}
.header-toolbar-new {
--background: #269DB8;
}
.setting-conatainer{
height: 40px !important;
width: 40px !important;
}

@ -60,7 +60,7 @@
<ion-col size="4" *ngFor="let category of categories">
<div class="sale-icon" (click)="nextStep(category)">
<div class="top">
<div class="top" [innerHTML]="category.content | sanitizeHTMLPipe" >
<div class="top-icon" [innerHTML]="category.content | sanitizeHTMLPipe" >
</div>
<div class="bottom-icon">
<p *ngIf="direction == 'ltr'">{{category.title}}</p>

@ -394,4 +394,8 @@ ion-radio{
width: 21px;
margin-top: 5px;
}
.sale-icon .top-icon{
position: relative;
margin: 5px 8px;
}

@ -131,7 +131,7 @@
</ion-col>
<ion-col>
<!-- <img class="icon" src="assets/imgs/itemsforsale/delete.svg" /> -->
<img class="icon" *ngIf="item.status!='Approved'" src="assets/imgs/itemsforsale/delete.svg" (click)="deleteItems(item)"/>
<img [class]="direction =='ltr' ? 'icon edit' : 'icon edit-ar'" src="assets/imgs/itemsforsale/edit.svg" (click)="editItems(item)" />
</ion-col>
</ion-row>

@ -18,6 +18,8 @@
}
.top{
position: relative;
margin: 5px 10px;
}
.bottom{
height: 100%;

@ -6,6 +6,7 @@ import { deepCopy } from '@angular-devkit/core/src/utils/object';
import * as moment from 'moment';
import { DomSanitizer, SafeUrl } from '@angular/platform-browser';
import { ActivatedRoute } from '@angular/router';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
@Component({
selector: 'app-items',
@ -21,7 +22,7 @@ export class ItemsComponent implements OnInit {
pageNo: number = 1;
tempSearch: any = [];
itemsByEmployee: any = [];
constructor(public ts: TranslatorService, public route: ActivatedRoute, private sanitizer: DomSanitizer, public cs: CommonService, private itemService: ItemForSaleService) {
constructor(public ts: TranslatorService, public route: ActivatedRoute, private sanitizer: DomSanitizer, public cs: CommonService, private itemService: ItemForSaleService, private authService: AuthenticationService) {
this.route
.params.subscribe(val => {
setTimeout(() => {
@ -128,5 +129,24 @@ export class ItemsComponent implements OnInit {
this.cs.sharedService.setSharedData(items, ItemForSaleService.EDIT_ITEMS);
this.cs.openCreateitems();
}
deleteItems(item) {
var authUser = this.authService.getAuthenticatedRequest();
this.cs.startLoading();
var request = new FormData();
request.append('itemSaleID', item.itemSaleID);
request.append('isActive', 'false');
request.append('Channel', authUser.Channel.toString());
request.append('LogInToken', authUser.LogInTokenID);
request.append('Token', authUser.TokenID);
request.append('EmployeeNumber', authUser.P_USER_NAME);
request.append('MobileNo', authUser.MobileNumber);
request.append('employeeNumber', authUser.P_USER_NAME);
this.itemService.updateItemForSale(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result: any) => {
if (this.cs.validResponse(result)) {
this.cs.greenToastPK('itemforsale', 'item-deleted');
this.getItemsByEmployee();
}
})
}
}

@ -498,6 +498,7 @@ export class WorkListMainItgComponent implements OnInit {
}
if (this.actionSelected === 'Delegate') {
this.common.sharedService.setSharedData(info, 'selectedEmpInfo'),
this.common.sharedService.setSharedData('Delegate','pressedBtn')
this.presentModal(4);
}
if (this.actionSelected === 'Doable') {
@ -516,6 +517,7 @@ export class WorkListMainItgComponent implements OnInit {
this.actionService(2, this.commentText);
}
if (this.actionSelected === 'RequestInformation') {
this.common.sharedService.setSharedData('RequestInformation','pressedBtn')
this.presentModal(3);
}
if (this.actionSelected === 'ReportGenerated') {

@ -1,13 +1,12 @@
<ion-header>
<ion-toolbar>
<!-- <nav-buttons></nav-buttons> -->
<!-- <ion-toolbar>
<ion-title>{{ 'worklistMain, delegate' | translate}}</ion-title>
<ion-buttons slot="primary">
<ion-button style="background: none !important;" (click)="closePage()">
<ion-icon slot="icon-only" name="close"></ion-icon>
</ion-button>
</ion-buttons>
</ion-toolbar>
</ion-toolbar> -->
</ion-header>
<ion-content padding>
@ -60,9 +59,15 @@
</ion-radio-group> -->
<ion-list-header>
<ion-label class="boldTxtNav">{{'replacementRoll, searchBy' | translate}}</ion-label>
<!-- <ion-label class="boldTxtNav">{{'replacementRoll, searchBy' | translate}}</ion-label> -->
<ion-title class="boldTxtNav" *ngIf="!isAnswer && getPassActionMode !='RequestInformation' && getPassActionMode !='Delegate'" color="dark">{{
'replacementRoll, title' | translate}}</ion-title>
<ion-title class="boldTxtNav" *ngIf="getPassActionMode =='RequestInformation'" color="dark">{{ 'worklistMain, request' | translate}}
</ion-title>
<ion-title class="boldTxtNav" *ngIf="getPassActionMode =='Delegate'" color="dark">{{ 'worklistMain, delegate' | translate}}</ion-title>
</ion-list-header>
<ion-radio-group [(ngModel)]="searchKeySelect" (ionChange)="onChangeSelect($event)">
<!-- <ion-radio-group [(ngModel)]="searchKeySelect" (ionChange)="onChangeSelect($event)">
<ion-row class="top-radio-row" style="display: flex;">
<ion-item lines='none'>
<ion-radio mode="md" value="1" checked></ion-radio>
@ -95,19 +100,49 @@
</ion-label>
</ion-item>
</ion-row>
</ion-radio-group>
<ion-item lines="none" class="search-box" *ngIf='!isFilter && !userSelected'>
</ion-radio-group> -->
<div style="border: 1px solid lightgray; border-radius: 100px; width: 100%;">
<ion-grid style="height: 50px; padding: 1px 1px 1px 1px;">
<ion-row>
<ion-col size="7">
<div *ngIf="isFilter" style="height: 0px;">
<ion-searchbar style="padding-top: 1px;" class="filterClass" mode='md' (ionInput)="filterList($event)" placeholder="Filter">
</ion-searchbar>
</div>
<ion-input *ngIf="!isFilter" class='replacmentSearchBar' clearInput="true"
[(ngModel)]="searchKey" [placeholder]='"replacementRoll, searchbyname" | translate'>
<ion-icon style="width: 50px; height: 21px;" name="search"></ion-icon>
</ion-input>
</ion-col>
<ion-col size="5" style="display: flex;">
<div class="vl"></div>
<ion-item lines="none" style="display: flex;">
<ion-select style="min-width: 100%; height: 40px; padding-top: 5px;" [(ngModel)]="searchKeySelect" (ionChange)="onChangeSelect($event)">
<ion-select-option value="1" checked><p style="min-width: 100%; font-size: 11px; font-weight: bold;">{{'replacementRoll, workflow' | translate}}</p></ion-select-option>
<ion-select-option value="4" ><p style="min-width: 100%; font-size: 11px; font-weight: bold;">{{'replacementRoll, favorite' | translate}}</p></ion-select-option>
<ion-select-option value="2" ><p style="min-width: 100%; font-size: 11px; font-weight: bold;">{{'replacementRoll, employee-id' | translate}}</p></ion-select-option>
<ion-select-option value="3" ><p style="min-width: 100%; font-size: 11px; font-weight: bold;">{{'replacementRoll, employee-email' | translate}}</p></ion-select-option>
<ion-select-option value="5" ><p style="min-width: 100%; font-size: 11px; font-weight: bold;">{{'replacementRoll, employee-name' | translate}}</p></ion-select-option>
</ion-select>
</ion-item>
</ion-col>
</ion-row>
</ion-grid>
</div>
<ion-grid>
<ion-row>
<ion-col>
<div style="text-align: end;" *ngIf='searchKey && !userSelected && !isFilter'>
<button ion-button clear class="searchText" (click)="onChangeInput()" type="button" item-right >
{{"general, search" | translate}}
</button>
</div>
</ion-col>
</ion-row>
</ion-grid>
<!-- <ion-input (ionInput)="onChangeInput()" [ngClass]="direction == 'ltr'? 'filterInput':'filterInput-ar'"
[(ngModel)]="searchKey" [placeholder]='getPlaceHolder()' clearInput="true"></ion-input> -->
<!-- <ion-input class='replacmentSearchBar'
style="height: 45px; border: 1px solid lightgray; border-radius: 50px; width: 350px;"
[(ngModel)]="searchKey"
[placeholder]='"replacementRoll, searchbyname" | translate' clearInput="true">
<ion-button (click)='onChangeInput()' style="--background: transparent; background: transparent; color: black"><ion-icon name="search"></ion-icon></ion-button>
</ion-input> -->
<!-- <ion-item lines="none" class="search-box" *ngIf='!isFilter && !userSelected'>
<ion-grid>
<ion-row style="height: 45px; border: 1px solid lightgray; border-radius: 50px;">
<ion-col size='9'>
@ -130,7 +165,7 @@
<div *ngIf="isFilter && !userSelected">
<ion-searchbar class="filterClass" mode='md' (ionInput)="filterList($event)" placeholder="Filter">
</ion-searchbar>
</div>
</div> -->
</ion-list>

@ -14,7 +14,9 @@ ion-radio {
text-align: center;
}
.boldTxtNav {
text-align: start;
font-weight: bold;
padding: 12px;
}
.employee-details {
display: inline-block;
@ -284,3 +286,13 @@ ion-radio {
border-radius: 60px;
color: white;
}
.vl {
border-left: 2px solid lightgray;
height: 36px;
}
.searchText{
background: transparent;
color: #D55D5C;
font-weight: bold;
text-decoration: underline;
}

@ -41,6 +41,7 @@ export class WorkListReplacementItgComponent implements OnInit {
arr = [];
delegtedEmp;
isFavoriteLetterActive = false;
getPassActionMode: any;
public slideOptsOne = {
slidesPerView: 6,
@ -63,7 +64,9 @@ export class WorkListReplacementItgComponent implements OnInit {
// }
ngOnInit() {
this.onChangeSelect1('1');
this.delegtedEmp = this.cs.sharedService.getSharedData('selectedEmpInfo', true);
this.getPassActionMode = this.cs.sharedService.getSharedData('pressedBtn', true);
if (this.delegtedEmp === undefined) {
if (!this.relatedList || this.relatedList.length === 0 || this.relatedList === undefined) {
this.arr = this.cs.sharedService.getSharedData('workflow-user', false);
@ -223,6 +226,31 @@ export class WorkListReplacementItgComponent implements OnInit {
}
}
onChangeSelect1(select) {
let selectValue = select;
this.searchKey = '';
if (selectValue == "1") {
this.listOfRealted = this.relatedList;
console.log(this.relatedList);
this.isSelect = true;
this.isFilter = true;
this.ReplacementList = [];
} else if (selectValue == "4") {
this.listOfFav = this.favoriteUserList;
this.isFilter = true;
this.ReplacementList = [];
// if(this.favoriteUserList.length === 0 || this.favoriteUserList === undefined){
this.getFavruite();
// }
} else if (selectValue === '2' || selectValue === '3' || selectValue === '5') {
this.isSelect = true;
this.isFilter = false;
}
else {
this.isSelect = false;
}
}
getPlaceHolder() {
return this.searchKeySelect == '1' ? this.ts.trPK('replacementRoll', 'searchbyname') : this.searchKeySelect == '2' ? this.ts.trPK('replacementRoll', 'searchbyusername') : this.ts.trPK('replacementRoll', 'searchbyemail');
}

@ -1,14 +1,12 @@
<ion-header *ngIf="!messageSuccess">
<ion-toolbar>
<!-- class="header-toolbar" <nav-buttons></nav-buttons> -->
<ion-title *ngIf="!isAnswer && getPassActionMode !='REQUEST_INFO' && getPassActionMode !='DELEGATE'" color="dark">{{
<ion-header *ngIf="!messageSuccess" no-border>
<ion-toolbar no-border>
<!-- <ion-title *ngIf="!isAnswer && getPassActionMode !='REQUEST_INFO' && getPassActionMode !='DELEGATE'" color="dark">{{
'replacementRoll, title' | translate}}</ion-title>
<ion-title *ngIf="getPassActionMode =='REQUEST_INFO'" color="dark">{{ 'worklistMain, request' | translate}}
</ion-title>
<ion-title *ngIf="getPassActionMode =='DELEGATE'" color="dark">{{ 'worklistMain, delegate' | translate}}</ion-title>
<ion-title *ngIf="getPassActionMode =='DELEGATE'" color="dark">{{ 'worklistMain, delegate' | translate}}</ion-title> -->
<!-- <ion-title *ngIf="isAnswer" color="dark">Answer</ion-title> -->
</ion-toolbar>
</ion-header>
@ -18,9 +16,15 @@
<ion-list [hidden]="isAnswer==true">
<ion-list-header>
<ion-label class="boldTxtNav">{{'replacementRoll, searchBy' | translate}}</ion-label>
<ion-title class="boldTxtNav" *ngIf="!isAnswer && getPassActionMode !='REQUEST_INFO' && getPassActionMode !='DELEGATE'" color="dark">{{
'replacementRoll, title' | translate}}</ion-title>
<ion-title class="boldTxtNav" *ngIf="getPassActionMode =='REQUEST_INFO'" color="dark">{{ 'worklistMain, request' | translate}}
</ion-title>
<ion-title class="boldTxtNav" *ngIf="getPassActionMode =='DELEGATE'" color="dark">{{ 'worklistMain, delegate' | translate}}</ion-title>
</ion-list-header>
<ion-radio-group [(ngModel)]="searchBy" (ionChange)="onChangeSelect($event)">
<!-- <ion-radio-group [(ngModel)]="searchBy" (ionChange)="onChangeSelect($event)">
<ion-row class="top-radio-row" style="display: flex;">
<ion-item lines='none'>
<ion-radio mode="md" value="1" checked></ion-radio>
@ -53,13 +57,12 @@
</ion-label>
</ion-item>
</ion-row>
</ion-radio-group>
</ion-radio-group> -->
<div style="padding: 5px;" *ngIf="!isFilter">
<!-- <div style="padding: 5px;" *ngIf="!isFilter">
<!-- <ion-input (ionInput)="onChangeInput()" [ngClass]="direction == 'en'? 'filterInput':'filterInput-ar'" [(ngModel)]="inputSearch" [placeholder]='getPlaceHolder()' clearInput="true"></ion-input> -->
<ion-grid>
<ion-row style="height: 45px; border: 1px solid lightgray; border-radius: 50px;">
<ion-col size='9'>
@ -80,12 +83,50 @@
<div *ngIf="isFilter">
<ion-searchbar class="filterClass" mode='md' (ionInput)="filterList($event)" placeholder="Filter">
</ion-searchbar>
</div> -->
<div style="border: 1px solid lightgray; border-radius: 100px; width: 100%;">
<ion-grid style="height: 50px; padding: 1px 1px 1px 1px;">
<ion-row>
<ion-col size="7">
<div *ngIf="isFilter" style="height: 0px;">
<ion-searchbar style="padding-top: 1px;" class="filterClass" mode='md' (ionInput)="filterList($event)" placeholder="Filter">
</ion-searchbar>
</div>
<ion-input *ngIf="!isFilter" class='replacmentSearchBar' clearInput="true"
[(ngModel)]="inputSearch" [placeholder]='"replacementRoll, searchbyname" | translate'>
<ion-icon style="width: 50px; height: 21px;" name="search"></ion-icon>
</ion-input>
</ion-col>
<ion-col size="5" style="display: flex;">
<div class="vl"></div>
<ion-item lines="none" style="display: flex;">
<ion-select style="min-width: 100%; height: 40px; padding-top: 5px;" [(ngModel)]="searchBy" (ionChange)="onChangeSelect($event)">
<ion-select-option value="1" ><p style="min-width: 100%; font-size: 11px; font-weight: bold;">{{'replacementRoll, workflow' | translate}}</p></ion-select-option>
<ion-select-option value="4" ><p style="min-width: 100%; font-size: 11px; font-weight: bold;">{{'replacementRoll, favorite' | translate}}</p></ion-select-option>
<ion-select-option value="2" ><p style="min-width: 100%; font-size: 11px; font-weight: bold;">{{'replacementRoll, employee-id' | translate}}</p></ion-select-option>
<ion-select-option value="3" ><p style="min-width: 100%; font-size: 11px; font-weight: bold;">{{'replacementRoll, employee-email' | translate}}</p></ion-select-option>
<ion-select-option value="5" ><p style="min-width: 100%; font-size: 11px; font-weight: bold;">{{'replacementRoll, employee-name' | translate}}</p></ion-select-option>
</ion-select>
</ion-item>
</ion-col>
</ion-row>
</ion-grid>
</div>
<ion-grid>
<ion-row>
<ion-col>
<div style="text-align: end;" *ngIf='inputSearch && !userSelected && !isFilter'>
<button ion-button clear class="searchText" (click)="onChangeInput()" type="button" item-right >
{{"general, search" | translate}}
</button>
</div>
</ion-col>
</ion-row>
</ion-grid>
</ion-list>
<div style="font-weight: bold;" *ngIf="searchBy === '4' && !isFavoriteLetterActive">
<div style="font-weight: bold;" *ngIf="searchBy === '4' && !isFavoriteLetterActive && !userSelected">
<ion-slides [options]="slideOptsOne">
<ion-slide *ngFor="let filter of favLetter; let i=index">
<div>
@ -95,7 +136,7 @@
</ion-slides>
</div>
<div style="font-weight: bold;" *ngIf="searchBy === '4' && isFavoriteLetterActive">
<div style="font-weight: bold;" *ngIf="searchBy === '4' && isFavoriteLetterActive && !userSelected">
<ion-slides [options]="slideOptsOne">
<ion-slide *ngFor="let filter of favLetter; let i=index">
<div [ngClass]="returnIsActiveFunction(i)? 'isFavLetterActive':''">

@ -158,8 +158,9 @@ ion-radio {
padding: 5px;
}
.boldTxtNav {
text-align: start;
font-weight: bold;
padding: 5px;
padding: 12px;
}
.employee-details {
display: inline-block;
@ -212,3 +213,23 @@ ion-radio {
border-radius: 60px;
color: white;
}
.vl {
border-left: 2px solid lightgray;
height: 36px;
}
.clearText{
background: transparent;
color: #D55D5C;
font-weight: bold;
text-decoration: underline;
}
.searchText{
background: transparent;
color: #D55D5C;
font-weight: bold;
text-decoration: underline;
}
.filterClass input{
box-shadow: none !important;
-webkit-box-shadow: none !important;
}

@ -673,4 +673,8 @@ selectedLetter(el) {
returnIsActiveFunction(i) {
return this.favIsActive[i];
}
clearSearchInput(){
this.inputSearch = '';
}
}

@ -1,4 +1,4 @@
<app-generic-header performanceEvaluation='true' showBack="true" [headerText]="'userProfile,title' | translate">
<app-generic-header showBack="true" [headerText]="'userProfile,title' | translate">
</app-generic-header>
<ion-content class="colorBG" *ngIf="personalInfo">

@ -28,9 +28,7 @@ export class HomeComponent implements OnInit {
public setImage: any;
public user_image: any = '../assets/imgs/profile.png';
public personalInfo: any;
public appraisalArr: any = [];
public performanceData: any = [];
public static PERFORMANCE_DATA = 'perAppData';
public personalInfoSegment = false;
public familyMemberSegment = false;
public basicDetailsSegment = false;
@ -257,35 +255,8 @@ export class HomeComponent implements OnInit {
this.cs.openProfile('sideMenu');
}
public openPerormance() {
this.showPerformanceAppraisal();
}
public showPerformanceAppraisal() {
this.DS.getPerformanceAppraisal(() => {
this.showPerformanceAppraisal();
}).subscribe((result: PerformanceAppraisalResponse) => {
this.handlePerformanceAppraisalResult(result);
});
}
private handlePerformanceAppraisalResult(result) {
if (this.cs.validResponse(result)) {
if (this.cs.hasData(result.GetPerformanceAppraisalList)) {
this.appraisalArr = result.GetPerformanceAppraisalList;
this.performanceData = [];
for (let i = 0; i < this.appraisalArr.length; i++) {
this.performanceData.push({ name: this.appraisalArr[i].APPRAISAL_YEAR, value: parseInt(this.appraisalArr[i].APPRAISAL_SCORE).toFixed() });
}
console.log('PerformanceAppraisalResponse');
this.sharedData.setSharedData(this.performanceData, PerformanceAppraisalResponse.PERFORMANCE_DATA);
this.cs.openPerformanceevaluation();
} else {
let msg: string = this.ts.trPK("userProfile", "no-appraisal");
this.cs.presentAlert(msg);
}
}
}
public selectedSegment(segmentData) {
switch (segmentData) {

@ -25,7 +25,9 @@ export class PerformanceEvaluationComponent implements OnInit {
public length;
public direction: string;
// public showText:boolean =false;
public appraisalArr: any = [];
public static PERFORMANCE_DATA = 'perAppData';
constructor(public ts: TranslatorService,
public cs: CommonService,
public DS: DashboredService,
@ -53,21 +55,21 @@ export class PerformanceEvaluationComponent implements OnInit {
this.getProfile();
this.performanceData = this.cs.sharedService.getSharedData(
PerformanceAppraisalResponse.PERFORMANCE_DATA,
true
);
console.log(this.performanceData.length);
//i % 2 == 0
this.length = this.performanceData.length;
for (let i = 0; i < this.performanceData.length; i++) {
this.performanceData[i].color = this.colorScheme.domain[i];
console.log(i + ' : ' + this.performanceData[i].name)
}
console.log(this.performanceData[0].color)
this.showPerformanceAppraisal()
// this.performanceData = this.cs.sharedService.getSharedData(
// PerformanceAppraisalResponse.PERFORMANCE_DATA,
// true
// );
// console.log(this.performanceData.length);
// //i % 2 == 0
// this.length = this.performanceData.length;
// for (let i = 0; i < this.performanceData.length; i++) {
// this.performanceData[i].color = this.colorScheme.domain[i];
// console.log(i + ' : ' + this.performanceData[i].name)
// }
// console.log(this.performanceData[0].color)
}
@ -90,5 +92,30 @@ export class PerformanceEvaluationComponent implements OnInit {
}
});
}
public showPerformanceAppraisal() {
this.DS.getPerformanceAppraisal(() => {
this.showPerformanceAppraisal();
}).subscribe((result: PerformanceAppraisalResponse) => {
this.handlePerformanceAppraisalResult(result);
});
}
private handlePerformanceAppraisalResult(result) {
if (this.cs.validResponse(result)) {
if (this.cs.hasData(result.GetPerformanceAppraisalList)) {
this.appraisalArr = result.GetPerformanceAppraisalList;
this.performanceData = [];
for (let i = 0; i < this.appraisalArr.length; i++) {
this.performanceData.push({ name: this.appraisalArr[i].APPRAISAL_YEAR, value: parseInt(this.appraisalArr[i].APPRAISAL_SCORE).toFixed() });
}
console.log('PerformanceAppraisalResponse');
this.cs.sharedService.setSharedData(this.performanceData, PerformanceAppraisalResponse.PERFORMANCE_DATA);
this.cs.openPerformanceevaluation();
} else {
let msg: string = this.ts.trPK("userProfile", "no-appraisal");
this.cs.presentAlert(msg);
}
}
}
}

@ -35,7 +35,7 @@
<div class="output-container" >
<p class="color-black display-inline">{{'transaction,output' | translate}}</p>
<p class="display-inline" (click)="getCppOutput(transaction)" [ngClass]="transaction.CCP_PHASE =='Running' || transaction.CCP_PHASE =='Pending'? 'disabled-icon' : '' " ><ion-icon name="download" class="download"></ion-icon></p>
<p class="display-inline" (click)="refresh(transaction)"><ion-icon name="refresh" class="refresh"></ion-icon></p>
<p class="display-inline" (click)="refresh(transaction)" *ngIf="transaction.CCP_PHASE =='Running' || transaction.CCP_PHASE =='Pending'"><ion-icon name="refresh" class="refresh" > </ion-icon></p>
</div>
</ion-label>

@ -1,10 +1,11 @@
import { copyStyles } from '@angular/animations/browser/src/util';
import { Component, ElementRef, OnInit } from '@angular/core';
import { File } from '@ionic-native/file/ngx';
import { Platform } from '@ionic/angular';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { ReportServiceService } from '../report-service.service';
import { FileOpener } from '@ionic-native/file-opener/ngx';
@Component({
selector: 'app-transaction-list',
templateUrl: './transaction-list.component.html',
@ -14,7 +15,8 @@ export class TransactionListComponent implements OnInit {
transactionList: any = [];
selectedMenu: any;
template: any;
constructor(public cs: CommonService, private elementRef: ElementRef, public reports: ReportServiceService, public ts: TranslatorService,) { }
constructor(public cs: CommonService, private elementRef: ElementRef, public reports: ReportServiceService, public ts: TranslatorService, private platform: Platform, private file: File, private opener: FileOpener,
) { }
ngOnInit() {
this.selectedMenu = this.cs.sharedService.getSharedData(MenuResponse.SELECTED_MENU, false);
@ -30,12 +32,56 @@ export class TransactionListComponent implements OnInit {
};
this.cs.startLoading();
this.reports.getCppOutput(request, {}, this.ts.trPK('general', 'retry')).subscribe((result: any) => {
this.saveAndOpenPdf(result.GetCcpOutputList['P_OUTPUT_FILE'], 'report.pdf');
console.log(result);
this.cs.stopLoading();
});
}
// saveAndOpenPdf(pdf: string, filename: string) {
// const linkSource = `data:application/pdf;base64,${pdf}`;
// const downloadLink = document.createElement("a");
// const fileName = "report.pdf";
// downloadLink.href = linkSource;
// downloadLink.download = fileName;
// downloadLink.click();
// }
saveAndOpenPdf(pdf: string, filename: string) {
const writeDirectory = this.platform.is('ios') ? this.file.dataDirectory : this.file.externalDataDirectory;
this.file.writeFile(writeDirectory, filename, this.convertBase64ToBlob(pdf, 'data:application/pdf;base64'), { replace: true })
.then(() => {
this.opener.open(writeDirectory + filename, 'application/pdf')
.catch(() => {
console.log('Error opening pdf file');
});
})
.catch(() => {
console.error('Error writing pdf file');
});
}
convertBase64ToBlob(b64Data, contentType): Blob {
contentType = contentType || '';
const sliceSize = 512;
b64Data = b64Data.replace(/^[^,]+,/, '');
b64Data = b64Data.replace(/\s/g, '');
const byteCharacters = window.atob(b64Data);
const byteArrays = [];
for (let offset = 0; offset < byteCharacters.length; offset += sliceSize) {
const slice = byteCharacters.slice(offset, offset + sliceSize);
const byteNumbers = new Array(slice.length);
for (let i = 0; i < slice.length; i++) {
byteNumbers[i] = slice.charCodeAt(i);
}
const byteArray = new Uint8Array(byteNumbers);
byteArrays.push(byteArray);
}
return new Blob(byteArrays, { type: contentType });
}
refresh(transaction) {
var request: any = {
P_REQUEST_ID: transaction['REQUEST_ID']

@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" width="246.681" height="274.06" viewBox="0 0 246.681 274.06">
<g id="alarm" transform="translate(-25.575)">
<path id="Path_90" data-name="Path 90" d="M130.375,122.483a17.332,17.332,0,1,0,17.332-17.332A17.352,17.352,0,0,0,130.375,122.483Z" transform="translate(-48.703 -48.867)" fill="#fff"/>
<path id="Path_91" data-name="Path 91" d="M99,147.208A73.429,73.429,0,1,0,25.575,73.779,73.512,73.512,0,0,0,99,147.208ZM50.375,65.75H66.6a33.392,33.392,0,0,1,9.3-16.037L67.641,35.37l13.918-8.009L89.8,41.689a33.222,33.222,0,0,1,18.4,0l8.244-14.327,13.918,8.009-8.253,14.343a33.392,33.392,0,0,1,9.3,16.037h16.22V81.808h-16.22a33.389,33.389,0,0,1-9.3,16.037l8.253,14.343L116.449,120.2l-8.244-14.327a33.222,33.222,0,0,1-18.4,0L81.559,120.2l-13.918-8.009,8.253-14.343a33.392,33.392,0,0,1-9.3-16.037H50.375Z" transform="translate(0 -0.163)" fill="#fff"/>
<path id="Path_92" data-name="Path 92" d="M250.211,475.758a31.558,31.558,0,0,0,58.244,0Z" transform="translate(-104.394 -221.098)" fill="#fff"/>
<path id="Path_93" data-name="Path 93" d="M171.916,412.266h96.42l-.014.143h49.122V395.977l-22.837-23.132H145.646l-22.837,23.132v16.431H171.93Z" transform="translate(-45.187 -173.271)" fill="#fff"/>
<path id="Path_94" data-name="Path 94" d="M313.567,264.493h-85.69a89.107,89.107,0,0,1-50.122,21.163v20.777H313.567Z" transform="translate(-70.722 -122.917)" fill="#fff"/>
<path id="Path_95" data-name="Path 95" d="M300.174,73.616a89,89,0,0,1-16.629,51.9h70.983V67.906A67.92,67.92,0,0,0,265.9,3.235a89.379,89.379,0,0,1,34.279,70.381Z" transform="translate(-111.683)" fill="#fff"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -3217,6 +3217,10 @@
"en": "This ad will be valid for 2 week after approval",
"ar": "هذا الإعلان ساري المفعول لمدة أسبوعين بعد الموافقة"
},
"item-deleted": {
"en": "Item deleted successfully",
"ar": "تم حذف العنصر بنجاح"
},
"locked": {
"en": "Locked",
"ar": "مقفل"

@ -1630,4 +1630,9 @@ ion-segment-button {
.disabledField{
opacity: .5;
pointer-events: none;
}
}
.filterClass input{
box-shadow: none !important;
-webkit-box-shadow: none !important;
}
Loading…
Cancel
Save