add get login last info

arabic-version
ashwaq 6 years ago
parent 2c5c0599d8
commit 527ee02627

@ -29,6 +29,10 @@ export class AppComponent implements OnInit, AfterViewInit {
companyDesc: string = "Powered By Cloud Solutions";
public direction = "ltr";
User_Job_name: string;
requestGetLoginInfo: {
DeviceType: string; DeviceToken: string; //this.deviceToken
};
user: boolean;
constructor(
public ts: TranslatorService,
private cs: CommonService,
@ -71,6 +75,7 @@ export class AppComponent implements OnInit, AfterViewInit {
}
private startReceivingPushService() {
console.log("platform.ready")
this.pushService.startReceiving();
}
subscribeEvents() {
@ -159,6 +164,7 @@ export class AppComponent implements OnInit, AfterViewInit {
closeMenu(){
this.menu.toggle();
}
}

@ -1,5 +1,5 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" defaultHref="/home"></ion-back-button>
</ion-buttons>

@ -78,6 +78,7 @@ export class CheckUserComponent implements OnInit {
console.log(result);
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.P_USER_NAME = this.P_USER_NAME;
// this.loginData.EMPLOYEE_NAME=result.MemberLoginList[0].EMPLOYEE_NAME;
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
this.sharedData.setSharedData(true,Password.IS_FORGET_PSW);
this.cs.stopLoading();

@ -1,5 +1,5 @@
<ion-header *ngIf="!accessFromOutSide">
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" ></ion-back-button>
</ion-buttons>
@ -28,7 +28,10 @@
<!-- <img [src]="logo" class="loginLogo" />
<h1 class="heading1">{{welcome}} </h1> -->
<!-- <p class="text1" style="margin-bottom: -8px;font-weight: bold;font-size: 22px;">{{ts.trPK('login','Verify-text')}} </p> -->
<p class="text1" style="font-size: 28px;margin-bottom: 0px" >{{empname}}</p>
<!--
<p class="text1" style="font-size: 28px;margin-bottom: 0px" >{{empname}}</p>
-->
</ion-col>
</ion-row> <div *ngIf="onlySMSBox"><p>{{ts.trPK('login','verify-login-with')}}</p></div>
<!-- <type-writer *ngIf="!onlySMSBox" [text]="'login, verify-fingerprint' | translate" class="description"

@ -29,6 +29,7 @@ import { PushService } from 'src/app/hmg-common/services/push/push.service';
import { Platform } from '@ionic/angular';
import { CheckUserAuthenticationResponse } from 'src/app/hmg-common/services/authentication/models/check-user-auth.response';
import { LoginModel } from '../models/LoginModel';
import * as moment from "moment";
@ -70,6 +71,8 @@ export class ConfirmLoginComponent implements OnInit {
password:any;
loginType: any;
empname: string;
lastLoginDate: string;
user_name: string;
constructor(
@ -120,6 +123,7 @@ export class ConfirmLoginComponent implements OnInit {
this.password = localStorage.getItem("password");
this.empname = localStorage.getItem("emp-name");
}
@ -674,9 +678,9 @@ export class ConfirmLoginComponent implements OnInit {
console.log("authService.getLoginInfo");
if(result.Mohemm_GetPatientID_List.length > 0){
if(result.Mohemm_GetMobileLoginInfoList.length > 0){
if ( result.Mohemm_GetPatientID_List[0].LoginType == 2 || result.Mohemm_GetPatientID_List[0].LoginType == 3) {
if ( result.Mohemm_GetMobileLoginInfoList[0].LoginType == 2 || result.Mohemm_GetMobileLoginInfoList[0].LoginType == 3) {
this.loginTokenID = result.LogInTokenID;
//send silent sms
@ -742,6 +746,11 @@ export class ConfirmLoginComponent implements OnInit {
console.log("insert");
localStorage.setItem("emp-name",result.MemberInformationList[0].EMPLOYEE_NAME);
console.log("empnmae: "+ localStorage.getItem("emp-name"));
this.user_name=result.MemberInformationList[0].EMPLOYEE_NAME;
//get date and time of last login
let currDateTime = moment().format('MMM DD , YYYY HH:mm')
localStorage.setItem("login-at",currDateTime);
if (this.platform.is("cordova")) {
this.insertMobileLogin();
@ -781,12 +790,13 @@ export class ConfirmLoginComponent implements OnInit {
request.DeviceType= this.cs.getDeviceType();
request.DeviceToken=this.deviceToken;
request.DeviceToken="5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36";//this.deviceToken;
//request.TokenID=
request.LoginType=this.selectedOption;
request.EmployeeName=this.user_name;
this.authService
@ -840,10 +850,13 @@ private checkUserAuthentication() {
console.log("this.loginData before "+ this.loginData);
this.loginData = new LoginModel();
console.log("this.loginData after "+ this.loginData);
// console.log("result.MemberLoginList.EMPLOYEE_NAME "+ result.MemberInformationList[0].EMPLOYEE_NAME);
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.MobileNumber = result.MemberLoginList.P_MOBILE_NUMBER;
this.loginData.P_USER_NAME = this.username;
this.loginData.EmployeeName = this.user_name;
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA);
//this.remeberMyInfo();

@ -1,5 +1,5 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" ></ion-back-button>
</ion-buttons>

@ -5,7 +5,7 @@
<img class="centerDiv" src="../assets/imgs/header.png" />
</ion-col>
</ion-row> -->
<ion-row *ngIf="loginDiv">
<ion-row *ngIf="!user">
<div class="content">
@ -19,7 +19,7 @@
</div>
</ion-row>
<ion-row *ngIf="welcomeBack ">
<ion-row *ngIf="user ">
<ion-col [size]="4">
<img [src]="logo" class="logo" />
@ -30,12 +30,12 @@
<ion-row>
<ion-col *ngIf="loginDiv">
<ion-col *ngIf="!user">
<P class="pageTitle text-caps">{{ts.trPK('login','login')}}</P>
</ion-col>
</ion-row>
</ion-grid>
<div *ngIf="loginDiv">
<div *ngIf="!user">
<ion-item class="item-input-login">
<img class="item-icon" src="assets/imgs/username.png" item-start />
<ion-input class="login-input" required type="text" [(ngModel)]="username" placeholder="{{ts.trPK('login','username')}}">
@ -73,7 +73,7 @@
<!-- div login-->
<!-- <div *ngIf="welcomeBack"> -->
<welcome-login (onLogin)="login()" (loginWithUser)="loginWithUser()" *ngIf="welcomeBack ">
<welcome-login (onLogin)="login()" (loginWithUser)="loginWithUser()" *ngIf="user ">
</welcome-login>
<!-- </div> -->
@ -83,7 +83,7 @@
</ion-content>
<ion-footer *ngIf="loginDiv">
<ion-footer *ngIf="!user">
<div class="centerDiv">
<ion-button class="button-login" (click)="onLogin()">{{ts.trPK('login','login')}}</ion-button>
</div>

@ -45,7 +45,10 @@ export class LoginComponent implements OnInit, OnDestroy {
public loginDiv:boolean =true;
public welcomeBack:boolean =false;
public logo = "assets/icon/login/password.png";
deviceToken: any;
user: boolean =false;
DeviceType: string;
requestGetLoginInfo:any;
constructor(
public cs: CommonService,
@ -64,25 +67,36 @@ export class LoginComponent implements OnInit, OnDestroy {
) { }
ngOnInit() {
this.deviceToken= this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false);
console.log("get deviceToken login"+ this.deviceToken)
this.getLastLoginInfo();
//here will delete below part and depdding on user (response from getMobileInfo)
this.username = localStorage.getItem("user");
this.password = localStorage.getItem("password");
let remember = localStorage.getItem("remember");
this.password = localStorage.getItem("password"); //****//
let remember = localStorage.getItem("remember");//****//
this.empname= localStorage.getItem("emp-name");
this.logintype= localStorage.getItem("login-type");
if (remember == "true") { this.remeberMe = true } else { this.remeberMe = false }
if(this.username || this.empname){
this.loginDiv=false;
this.welcomeBack=true;
//here will be check on user if exite then s part and depdding on user (response from getMobileInfo)
if(this.user){
// this.loginDiv=false;
// this.welcomeBack=true;
}else{
this.loginDiv=true;
this.welcomeBack=false;
// this.user=true;
// this.welcomeBack=false;
}
// alert("user>>" + this.username);
// alert("pass>>>" + this.password);
// alert("remember>>>" + this.remeberMe);
/// call getLoginInfo
}
ngOnDestroy(): void {
@ -125,15 +139,19 @@ export class LoginComponent implements OnInit, OnDestroy {
}
public onLogin() {
// console.log("onLogin");
console.log("onLogin");
// this.checkAppUpdated();
// this.checkUserAuthentication();
let deviceToken = localStorage.getItem('deviceToken');
console.log("let deviceToken" + deviceToken);
if (deviceToken) {
console.log('login enabled first time: ' + deviceToken);
this.checkAppUpdated();
} else {
console.log("no deviceToken" );
this.pushService.startReceiving();
setTimeout(() => {
deviceToken = localStorage.getItem('deviceToken');
@ -194,9 +212,12 @@ export class LoginComponent implements OnInit, OnDestroy {
console.log("success");
this.cs.stopLoading();
if (this.cs.validResponse(result)) {
// alert("result.MemberLoginList.EMPLOYEE_NAME :" + result.MemberLoginList.EMPLOYEE_NAME);
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.MobileNumber = result.MemberLoginList.P_MOBILE_NUMBER;
this.loginData.P_USER_NAME = this.username;
// this.loginData.EMPLOYEE_NAME =result.MemberLoginList[0].EMPLOYEE_NAME;
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA);
this.remeberMyInfo();
@ -279,6 +300,8 @@ export class LoginComponent implements OnInit, OnDestroy {
console.log(result);
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.P_USER_NAME = this.username;
this.loginData.EmployeeName =result.MemberLoginList[0].EMPLOYEE_NAME;
this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA);
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
this.sharedData.setSharedData(true, Password.IS_FORGET_PSW);
@ -292,8 +315,8 @@ export class LoginComponent implements OnInit, OnDestroy {
console.log("login emit");
console.log("login");
// this.checkUserAuthentication();
this.loginDiv=true;
this.welcomeBack=false;
//this.loginDiv=true;
this.user=false;
}
@ -302,4 +325,34 @@ export class LoginComponent implements OnInit, OnDestroy {
this.cs.openConfirmLoginPage();
}
///
getLastLoginInfo(){
this.deviceToken
this.requestGetLoginInfo= {
DeviceType:this.cs.getDeviceType(),
DeviceToken:"5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36"//this.deviceToken
}
this.authService.getLoginInfo(this.requestGetLoginInfo,() => {}, this.ts.trPK('general', 'ok')).subscribe(res => {
if (this.cs.validResponse(res)) {
if(res.Mohemm_GetMobileLoginInfoList.length > 0){
this.cs.sharedService.setSharedData(
// res.Patient_SELECTDeviceIMEIbyIMEIList[0],
res.Mohemm_GetMobileLoginInfoList[0],
AuthenticationService.IMEI_USER_DATA
);
this.user = true;
}
else{
this.user=false
}
}
});
}
}

@ -3,4 +3,7 @@ export class LoginModel {
activationCode: string;
P_USER_NAME: string;
MobileNumber: string;
EMPLOYEE_DISPLAY_NAME: string;
EMPLOYEE_NAME:string;
EmployeeName:string;
}

@ -1,5 +1,5 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" ></ion-back-button>
</ion-buttons>

@ -22,6 +22,7 @@ import { SMSCheckResponse } from "src/app/hmg-common/services/authentication/mod
import { Password } from "../models/password";
import { GetLoginInfoRequest } from 'src/app/hmg-common/services/authentication/models/get-login-info.request';
import * as moment from "moment";
@ -79,6 +80,7 @@ export class SmsPageComponent implements OnInit {
public smc_code: any = [];
code: any;
user_name: string;
constructor(
@ -346,6 +348,12 @@ export class SmsPageComponent implements OnInit {
console.log("insert");
localStorage.setItem("emp-name",result.MemberInformationList[0].EMPLOYEE_NAME);
console.log("empnmae: "+ localStorage.getItem("emp-name"));
// localStorage.setItem("login-at", new Date().toISOString());
this.user_name=result.MemberInformationList[0].EMPLOYEE_NAME;
//get date and time of last login
let currDateTime = moment().format('MMM DD , YYYY HH:mm')
localStorage.setItem("login-at",currDateTime);
if (this.platform.is("cordova")) {
// localStorage.setItem("full-name", result.P_USER_NAME);
@ -370,7 +378,7 @@ export class SmsPageComponent implements OnInit {
public insertMobileLogin(){
// alert("insertMobileLogin");
console.log("loginData" + this.loginData);
let request = new GetLoginInfoRequest();
@ -388,10 +396,12 @@ export class SmsPageComponent implements OnInit {
request.DeviceType= this.common.getDeviceType();
request.DeviceToken=this.deviceToken;
request.DeviceToken="5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36";//this.deviceToken;
request.LoginType=this.loginTypeData.loginType;
request.EmployeeName=this.user_name;
this.authService
.insertMobileLoginInfo(

@ -55,7 +55,7 @@ export class AuthenticationService {
public static smsSendCode='Services/ERP.svc/REST/SendPublicActivationCode';
public static sendActivationCodeByType = 'Services/ERP.svc/REST/Mohemm_SendActivationCodebyOTPNotificationType';
public static getMobileLoginInfo ='Services/ERP.svc/REST/Mohemm_GetMobileLoginInfo';
public static getMobileLoginInfo ='Services/ERP.svc/REST/Mohemm_GetMobileLoginInfo_NEW';//Mohemm_GetMobileLoginInfo
public static insertMobileLoginInfo ='Services/ERP.svc/REST/Mohemm_InsertMobileLoginInfo';
/* register methods */
@ -82,6 +82,7 @@ export class AuthenticationService {
public static LOGIN_DATA="logindata";
public static DEVICE_TOKEN = "device_token";
public static LAST_LOGIN = 'last-login';
public static IMEI_USER_DATA = "imei-user-data";
// private static user: AuthenticatedUser;
@ -304,11 +305,11 @@ export class AuthenticationService {
}
public getLoginInfo(
request: GetLoginInfoRequest,
request: any,
onError: any,
errorLabel: string
): Observable<GetLoginInfoResponse> {
this.setPublicFields(request);
//this.setPublicFields(request);
return this.con.post(
AuthenticationService.getMobileLoginInfo,
request,

@ -20,5 +20,7 @@ export class CheckUserAuthenticationResponse extends Response {
public IsPasswordExpired: boolean;
//public P_SESSION_ID:string;
public MemberLoginList: MemberList ;
public BasicMemberInformation: BasicInfo;
public BasicMemberInformation: BasicInfo;
public EMPLOYEE_DISPLAY_NAME: string;
public EMPLOYEE_NAME:string;
}

@ -14,6 +14,8 @@ export class GetLoginInfoRequest extends Request {
CompanyID:number;
DeviceType:string;
LoginType:number;
EMPLOYEE_NAME:string;
EmployeeName:string;
// constructor(user: AuthenticatedUser) {
// super();
// this.NationalID = user.IdentificationNo;

@ -5,7 +5,8 @@ export class GetLoginInfoResponse extends Response {
SMSLoginRequired: boolean;
isSMSSent: boolean;
LogInTokenID: string;
Mohemm_GetPatientID_List:any
Mohemm_GetPatientID_List:any //old one
Mohemm_GetMobileLoginInfoList:any
isActiveCode: boolean;
// PatientOutSA: boolean;
}

@ -6,4 +6,6 @@ export class MemberList {
public P_RETURN_MSG: string;
public P_RETURN_STATUS: string;
public P_SESSION_ID: number;
public EMPLOYEE_DISPLAY_NAME: string;
public EMPLOYEE_NAME:string;
}

@ -43,6 +43,7 @@ export class PushService {
) { }
public startReceiving() {
console.log("startReceiving");
// this.processStartReceiving();
this.processStartReceivingWithFirebase();
}
@ -161,7 +162,7 @@ export class PushService {
}
private registerInBackend(data: any) {
console.log('firebasex Token ID: ' + data);
console.log('firebasex Token ID: ' + data);
if (data) {
this.cs.sharedService.setSharedData(data, AuthenticationService.DEVICE_TOKEN);
localStorage.setItem('deviceToken', data);
@ -216,14 +217,22 @@ export class PushService {
private processStartReceivingWithFirebase() {
console.log("processStartReceivingWithFirebase");
this.firebasex.getToken().then(token => {
console.log(token);
this.registerInBackend(token);
});
this.firebasex.onTokenRefresh().subscribe(token => {
console.log(token);
alert("token: "+ token);
this.registerInBackend(token);
});
}).catch(error => console.error('Error getting token', error));
// this.firebase.getToken()
// .then(token => console.log(`The token is ${token}`))
// .catch(error => console.error('Error getting token', error));
// this.firebasex.onTokenRefresh().subscribe(token => {
// alert("token: "+ token);
// this.registerInBackend(token);
// });
}
public onPushReceived(payload: any) {

@ -1,33 +1,46 @@
<ion-content has-bouncing="false" forceOverscroll="false" class="ion-no-padding">
<ion-grid padding>
<ion-row>
<!-- <ion-row>
<ion-col [size]="12">
<!-- <img [src]="logo" class="loginLogo" />
<h1 class="heading1">{{welcome}} </h1> -->
<img [src]="logo" class="loginLogo" />
<h1 class="heading1">{{welcome}} </h1>
<p class="text1" style="margin-bottom: -8px;font-weight: bold;font-size: 28px;">{{'home,welcome-back' | translate}} </p>
<p class="text1" style="font-size: 28px;margin-top: 0px;" >{{empname}}</p>
<p *ngIf="!empname" class="text1">{{welcome_txt}} </p>
<p class="text1">{{txt_account}} </p>
</ion-col>
</ion-row>
</ion-row> -->
<ion-row class="row-border" *ngIf="empname && isLastLogin">
<ion-row>
<ion-col [size]="12">
<h1 class="heading1">{{welcome}} </h1>
<p *ngIf="!user" class="text1">{{welcome_txt}} </p>
<p class="text1">{{txt_account}} </p>
</ion-col>
</ion-row>
<ion-row class="row-border" *ngIf="user && isLastLogin">
<ion-col size="6" style="padding: 5px 10px; border-right:1px solid #bbbbbb">
<p class="last-login" style="font-weight: bold">{{'login,last-login' | translate}} </p>
<!-- <p class="last-login small-font-size">{{user.EditedOn | date}}
{{lastLoginTime}}</p>-->
<p class="last-login small-font-size">{{user.EditedOn | date}}
{{lastLoginTime }}</p>
<!-- <p class="last-login "> {{lastLoginDate}}</p> -->
</ion-col>
<ion-col size="6" style="padding: 5px 10px;">
<p class="last-login" style="font-weight: bold" [ngClass]="{'fadein':empname && isLastLogin }">
<p class="last-login" style="font-weight: bold" [ngClass]="{'fadein':user && isLastLogin }">
{{'login,last-login-with' | translate}}
</p>
<p class="last-login">{{getLoginType(logintype)}}</p>
</ion-col>
</ion-row>
<ion-row class="ion-no-padding description" *ngIf="empname && isLastLogin">
<ion-row class="ion-no-padding description" *ngIf="user && isLastLogin">
<ion-col style="margin-top:-5px" class="ion-no-padding " [size]=6>
<app-confirm-login [accessFromOutSide]="true" *ngIf="empname"></app-confirm-login>
<app-confirm-login [accessFromOutSide]="true" *ngIf="user"></app-confirm-login>
</ion-col>
<ion-col [size]=6>
<app-button (click)="loginwithuser()" [title]="button.title | translate " [icon]="button.icon"
@ -44,7 +57,7 @@
</ion-content>
<ion-footer class="welcome-footer">
<ion-row class="ion-justify-content-center " *ngIf="empname">
<ion-row class="ion-justify-content-center " *ngIf="user">
<ion-col [size]="12">
<ion-button class="centerDiv button-login" expand="block" (click)="login()">

@ -69,6 +69,8 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy {
password: string;
empname: string;
logintype: any;
lastLoginDate: string;
user_name: string;
constructor(
public ts: TranslatorService,
@ -80,12 +82,32 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy {
ngOnInit() {
// retrive user info **
this.user = this.cs.sharedService.getSharedData(
AuthenticationService.IMEI_USER_DATA,
false
);
this.userName = localStorage.getItem("user");
this.password = localStorage.getItem("password");
let remember = localStorage.getItem("remember");
this.empname= localStorage.getItem("emp-name");
this.logintype= localStorage.getItem("login-type");
this.lastLoginDate= localStorage.getItem("login-at");
// this.lastLoginDate= new Date(this.lastLoginDate).toISOString()
// let day = this.lastLoginDate.getDate();
// let month = this.lastLoginDate.getMonth() + 1;
// let year = this.lastLoginDate.getFullYear();
// let todayDate = month + '/' + day + '/' + year;
// this.lastLoginTime = moment(this.cs.evaluteDateAsObject(this.lastLoginDate)).format("HH:mm");
this.logintype = parseInt(this.logintype)
console.log(" this.lastLoginTime" + this.lastLoginTime);
console.log(" this.lastLoginDate" + this.lastLoginDate);
this.welcome_txt = this.ts.trPK("home", "welcome-txt");
@ -99,7 +121,7 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy {
this.setDescription();
//later to fix below code
if (this.user) {
// this.lastLoginTime = moment(this.cs.evaluteDateAsObject(this.user.EditedOn)).format("HH:mm");
this.lastLoginTime = moment(this.cs.evaluteDateAsObject(this.user.EditedOn)).format("HH:mm");
}
}
@ -107,7 +129,7 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy {
}
private setWelcomeMessage() {
private setWelcomeMessage1() {
console.log(this.userName + "this.userName");
if (this.userName) {
@ -117,12 +139,38 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy {
this.welcome += " " + this.empname || '';
this.isLastLogin = true;
console.log(this.isLastLogin + "this.isLastLogin");
} else {
this.welcome = this.ts.trPK("home", "welcome-head");
}
}
private setWelcomeMessage() {
console.log(" setWelcomeMessage ");
if (this.user) {
console.log(" this.user.EmployeeName: "+ this.user.EmployeeName);
if(this.user.EmployeeName != null && this.user.EmployeeName !=''){
this.user_name=this.user.EmployeeName;
}
else{
this.user_name="";
}
this.welcome = this.ts.trPK("home", "welcome-back");
this.welcome += " " + this.user_name || '';
this.isLastLogin = true;
} else {
this.welcome = this.ts.trPK("home", "welcome-head");
}
}
private setDescription() {
this.txt_account = this.userName ?
this.ts.trPK("home", "account-info") :"";

@ -29,7 +29,7 @@
<ion-col [size]="8">
<h3>Monthly Attendance</h3>
<span>View your Monthly Time Sheet</span>
<ion-button>
<ion-button (click)="Vacation_Rule()">
View Detail
</ion-button>
</ion-col>

@ -1,18 +1,36 @@
<ion-content>
<div>
<div id="notificationDynamicFields">
<ion-header>
<ion-toolbar>
<!-- class="header-toolbar" <nav-buttons></nav-buttons> -->
<ion-title style="text-align: center;font-weight: bold;" color="dark">Confirmation</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<div class="dynamicFields" id="notificationDynamicFieldsModal">
</div>
</div>
<!-- <div class="msgConfirm">
{{confirmMsg}}
</div> -->
<div class="msgConfirm">
<div *ngIf="getPassActionMode === 'APPROVED'" [innerHTML]='"worklistMain, approveMsg" | translate'></div>
<div *ngIf="getPassActionMode === 'REJECTED'" [innerHTML]='"worklistMain, rejectMsg" | translate'></div>
<div *ngIf="getPassActionMode === 'DEL'" [innerHTML]='"worklistMain, delMsg" | translate'></div>
<div *ngIf="getPassActionMode === 'CLOSE'" [innerHTML]='"worklistMain, closeMsg" | translate'></div>
</div>
<ion-footer>
<ion-row style="text-align: center;">
<ion-col>
<ion-button color="customnavy" class="confirmBtn" (click)="applyAction()"> {{ts.trPK('general','confirm')}}
<ion-col size="12">
<ion-button class="checkOutOkBtn" (click)="actionButton()"> {{ts.trPK('general','confirm')}}
</ion-button>
</ion-col>
<ion-col>
<ion-button color="customnavy" class="cancelBtn" (click)="closeModel()"> {{ts.trPK('general','cancel')}}
<ion-col size="12">
<ion-button class="checkOutCancelBtn" (click)="closeModel()"> {{ts.trPK('general','cancel')}}
</ion-button>
</ion-col>

@ -1 +1,14 @@
.dynamicFields{
width: 93%;
border: #dbdbdb solid 1px;
border-radius: 16px;
margin: 10px;
padding: 10px;
}
.msgConfirm{
text-align: center;
font-size: 20px !important;
// font-weight: bold;
}

@ -4,6 +4,7 @@ import { CommonService } from 'src/app/hmg-common/services/common/common.service
import { WorklistMainService } from '../service/work-list.main.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { TextAreaInput } from 'src/app/uI-elements/text-area.input';
import { WorkListActionRequest } from '../models/NotificationActionReq';
@Component({
selector: 'app-apply-action-modal',
@ -15,51 +16,57 @@ export class ApplyActionModalComponent implements OnInit {
getpassResAttr: any;
getPassNotificationDetails: any;
getPassNotification: any;
confirmMsg: string;
getPassActionMode: any;
P_RESPOND_ATTRIBUTES_TBL: any;
selEmployeeID: any;
hideForwordEmployee: any;
private WorkListActionObj: WorkListActionRequest;
messageSuccess: boolean;
constructor( private ts: TranslatorService,private modalCtrl: ModalController, private cs: CommonService,public worklistMainService: WorklistMainService,
) {
this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo',false);
this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr' ,false);
this.getpassResAttr = this.cs.sharedService.getSharedData('notificationDynamicAttributeArr' ,false);
this.getPassNotification = this.cs.sharedService.getSharedData('ApplyActionModalPage',false);
this.getPassActionMode = this.cs.sharedService.getSharedData('passActionMode',false);
this.WorkListActionObj = new WorkListActionRequest();
}
ngOnInit() {
document.getElementById("notificationDynamicFields").innerHTML="";
document.getElementById("notificationDynamicFieldsModal").innerHTML="";
console.log(this.getPassNotificationDetails);
//this.applyAction(this.getPassNotificationDetails);
this.notificationDynamicFields(this.getpassResAttr);
}
console.log("confirmMsg" + this.confirmMsg)
if (this.getPassActionMode === "APPROVED") {
this.confirmMsg = this.ts.trPK('worklistMain', 'approveMsg')
}
else if (this.getPassActionMode === "REJECTED") {
this.confirmMsg = this.ts.trPK('worklistMain', 'rejectMsg')
applyAction() {
this.worklistMainService
.actionButton(this.getPassNotification)
.subscribe((result: any) => {
this.handleApplayActionResult(result);
});
}
}
else if (this.getPassActionMode === "DEL") {
this.confirmMsg = this.ts.trPK('worklistMain', 'delMsg')
}
else if (this.getPassActionMode === "CLOSE") {
this.confirmMsg = this.ts.trPK('worklistMain', 'closeMsg')
}
handleApplayActionResult(result) {
if (this.cs.validResponse(result)) {
if (result.MessageStatus == 1) {
// this.navCtrl.push("HomePage");
//this.common.openHome();
//this.common.openNotificationPage();
// for( var i = 0; i < this.notificationArray.length; i++){
// if ( this.notificationArray[i].ROW_NUM === this.getPassNotificationDetails.ROW_NUM) {
// this.notificationArray.splice(i, 1);
// }
// }
////////////// this.getNotificationCountAfterSubmit();
///////////// this.nextNotfification();
}
} // valid it
}
notificationDynamicFields(notificationAttr){
const containerId = 'notificationDynamicFields';
const containerId = 'notificationDynamicFieldsModal';
for(let i=0;i<notificationAttr.length;i++){
if(notificationAttr[i].ATTRIBUTE_TYPE=="VARCHAR2"){
this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, "", containerId,"","","");
@ -78,4 +85,80 @@ export class ApplyActionModalComponent implements OnInit {
}
actionButton() {
let ButtonAction: string = this.getPassActionMode;
this.P_RESPOND_ATTRIBUTES_TBL = [];
for (let i = 0; i < this.getpassResAttr.length; i++) {
let obj: any = {};
obj.ATTRIBUTE_NAME = this.getpassResAttr[i].ATTRIBUTE_NAME;
if (this.getpassResAttr[i].ATTRIBUTE_TYPE === "number") {
obj.ATTRIBUTE_NUMBER_VALUE = (document.getElementById(this.getpassResAttr[i].ATTRIBUTE_NAME) as HTMLInputElement).value;
}
else if (this.getpassResAttr[i].ATTRIBUTE_TYPE == "VARCHAR2") {
obj.ATTRIBUTE_TEXT_VALUE = (document.getElementById(this.getpassResAttr[i].ATTRIBUTE_NAME) as HTMLInputElement).value;
}
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
}
let repUserName = this.selEmployeeID;
if (this.hideForwordEmployee && this.hideForwordEmployee.ATTRIBUTE_NAME) {
let obj: any = {};
repUserName = "";
obj.ATTRIBUTE_NAME = this.hideForwordEmployee.ATTRIBUTE_NAME;
obj.ATTRIBUTE_TEXT_VALUE = this.selEmployeeID;
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
}
this.WorkListActionObj.P_FORWARD_TO_USER_NAME = "";
this.WorkListActionObj.P_ACTION_MODE = ButtonAction;
this.WorkListActionObj.P_COMMENTS = "";
this.WorkListActionObj.RespondAttributeList = this.P_RESPOND_ATTRIBUTES_TBL;
this.applyAction(this.WorkListActionObj);
}
applyAction(WorkListActionObj) {
this.worklistMainService
.actionButton(WorkListActionObj)
.subscribe((result: any) => {
this.handleApplayActionResult(result);
});
}
handleApplayActionResult(result) {
if (this.cs.validResponse(result)) {
if (result.MessageStatus == 1) {
// this.navCtrl.push("HomePage");
//this.common.openHome();
//this.common.openNotificationPage();
// for( var i = 0; i < this.notificationArray.length; i++){
// if ( this.notificationArray[i].ROW_NUM === this.getPassNotificationDetails.ROW_NUM) {
// this.notificationArray.splice(i, 1);
// }
// }
this.messageSuccess = true;
setTimeout(() => {
this.messageSuccess = false;
}, 5000);
this.cs.openNotificationPage();
// this.getNotificationCountAfterSubmit();
//this.nextNotfification();
}
} // valid it
}
}

@ -6,17 +6,22 @@
}
.Header{
// color: black !important;
// font-size: 16px !important;
// font-weight: bold !important;;
// margin: 0;
// position: absolute;
// left: 50%;
// top: 50%;
// transform: translate(-58px, 2px);
color: black !important;
font-size: 16px !important;
font-weight: bold !important;;
margin: 0;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-58px, 2px);
font-weight: bold !important;
margin: auto;
}
.labelRadio{
color: black !important;
font-weight: bold !important;
}
}

@ -7,7 +7,7 @@
<ion-content >
<ion-list syle="margin-bottom:2px !important" [hidden]="isAnswer==true">
<ion-list style="margin-bottom:2px !important" [hidden]="isAnswer==true">
<ion-item>
<ion-label class="boldTxtNav">{{'replacementRoll, searchBy' | translate}}</ion-label>
<ion-select okText='{{"general, ok" | translate }}' cancelText='{{"general, cancel" | translate }}'
@ -42,17 +42,7 @@
</div> -->
</ion-list>
<div class="noteInput">
<ion-label [hidden]="isAnswer==false" class="boldTxtNav" padding>{{"replacementRoll, question" | translate}} :
{{pQuestion}} ?</ion-label>
<ion-label [hidden]="isAnswer==false" class="boldTxtNav" padding>{{"replacementRoll, answer" | translate}}
</ion-label>
<ion-label [hidden]="isAnswer==true" class="boldTxtNav" padding>{{"replacementRoll, enterNote" | translate}}
</ion-label>
<ion-item>
<ion-textarea [(ngModel)]="userNote"></ion-textarea>
</ion-item>
</div>
<ion-item [hidden]="isAnswer==true">
<!-- <ion-list *ngIf="ReplacementList"> -->
@ -122,6 +112,19 @@
</ion-content>
<ion-footer>
<div class="noteInput">
<ion-label [hidden]="isAnswer==false" class="boldTxtNav" padding>{{"replacementRoll, question" | translate}} :
{{pQuestion}} ?</ion-label>
<ion-label [hidden]="isAnswer==false" class="boldTxtNav" padding>{{"replacementRoll, answer" | translate}}
</ion-label>
<ion-label [hidden]="isAnswer==true" class="boldTxtNav" padding>{{"replacementRoll, enterNote" | translate}}
</ion-label>
<ion-item>
<ion-textarea [(ngModel)]="userNote"></ion-textarea>
</ion-item>
</div>
<br/>
<div class="centerDiv">
<ion-button class="footer-button" style="background: var(--newgreen)!important;border-radius: 10px; --background: transparent; " ion-button (click)="submitAction()">
{{'general, submit' | translate}}</ion-button>

@ -116,6 +116,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
color: white;
border-radius: 9px;
text-align: center;
min-height: 92px;
// background-color: #0095ff;
// box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26);
}

@ -63,34 +63,6 @@ export class WorkListReplacementRollComponent implements OnInit {
ngOnInit() {
this.demoeAttach = [{
USER_NAME: '18888',
EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ",
EMAIL_ADDRESS: "test@yuyuu.hjj",
},
{
USER_NAME: '18888',
EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ",
EMAIL_ADDRESS: "test@yuyuu.hjj"
},
{
USER_NAME: '18888',
EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ",
EMAIL_ADDRESS: "test@yuyuu.hjj"
},
{
USER_NAME: '18888',
EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ",
EMAIL_ADDRESS: "test@yuyuu.hjj"
}
];
}
getreplacmentemployee() {

@ -1,13 +1,14 @@
<ion-header>
<ion-toolbar >
<ion-title color="dark">{{ 'workListMain, rfc' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding>
<div class="tipsPadding boldTxtNav">
{{"replacementRoll.msgRFC" | translate}}
{{'replacementRoll , msgRFC' | translate}}
</div>
<!-- <ion-list (ionChange)="radioChecked($event)" radio-group>
<ion-item *ngFor="let rfcEmployeeList of RFCEmployeeListListRes; let i = index;">
@ -18,13 +19,7 @@
</ion-list> -->
<div class="noteInput">
<label class="boldTxtNav" padding>{{"replacementRoll.enterNote" | translate}}</label>
<ion-item>
<ion-textarea [(ngModel)]="userNote"></ion-textarea>
</ion-item>
</div>
<ion-item>
@ -59,7 +54,14 @@
</ion-content>
<ion-footer>
<div class="noteInput">
<label class="boldTxtNav" padding>{{'replacementRoll , enterNote' | translate}}</label>
<ion-item>
<ion-textarea [(ngModel)]="userNote"></ion-textarea>
</ion-item>
</div>
<br/>
<div class="centerDiv">
<ion-button class="footer-button" style="background: var(--newgreen)!important;border-radius: 10px; --background: transparent; " ion-button (click)="submitAction()">
{{'general, submit' | translate}}</ion-button>

@ -1,5 +1,5 @@
<ion-header *ngIf="!messageSuccess">
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-title color="light"> {{ts.trPK('worklistMain','title')}}</ion-title>
<ion-buttons slot="start">
<nav-buttons backLink="/notification/homepage"></nav-buttons>
@ -19,21 +19,22 @@
<ion-segment-button value="item-req" [ngClass]="activeSegment == 'item-req' ? 'active-Segment' : 'normal-Segment'">
{{ts.trPK('worklistMain','itemReq')}}
<ion-label>{{ts.trPK('worklistMain','itemReq')}}</ion-label>
</ion-segment-button>
<ion-segment-button value="action-history"
[ngClass]="activeSegment == 'action-history' ? 'active-Segment' : 'normal-Segment'">
{{'worklistMain, action' | translate}}
<ion-label> {{'worklistMain, action' | translate}}</ion-label>
</ion-segment-button>
<ion-segment-button value="attach" [ngClass]="activeSegment == 'attach' ? 'active-Segment' : 'normal-Segment'">
{{'general, file' | translate}}
<ion-label> {{'general, file' | translate}}</ion-label>
</ion-segment-button>
<ion-segment-button value="info" [ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'">
{{ts.trPK('worklistMain','info')}}
<ion-label> {{ts.trPK('worklistMain','info')}}</ion-label>
</ion-segment-button>
</ion-segment>
@ -179,7 +180,7 @@
</ion-grid>
<button ion-button [hidden]="IsReachEnd" class="itemHISBtn" (click)="loadMoreNotificationBody()">Load
<button ion-button *ngIf="!IsReachEnd" class="itemHISBtn" (click)="loadMoreNotificationBody()">Load
More</button>
</ion-card-content>
@ -502,7 +503,7 @@
</ion-list>
</div>
<button ion-button [hidden]="IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()">Load More</button>
<button ion-button *ngIf="!IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()">Load More</button>
</ion-card-content>
</ion-card>

@ -104,4 +104,5 @@
// padding-top: 10px;
// font-weight: bold;
// }

@ -88,7 +88,7 @@ export class WorklistMainMRComponent implements OnInit {
delMsg: string;
closeMsg: string;
activeSegment: any = "info";
lines_note_limit: any = 15;
lines_note_limit: any = 24;
orgNote: string;
truncating: boolean;
selectedIndex: any;
@ -386,14 +386,15 @@ export class WorklistMainMRComponent implements OnInit {
this.confirmMsg = this.ts.trPK('worklistMain', 'closeMsg')
}
this.common.confirmAlertDialogAction(
() => {
this.applyAction(this.WorkListActionObj);
}, this.ts.trPK('general', 'ok'),
() => { }, this.ts.trPK('general', 'cancel'),
this.ts.trPK('vacation-rule', 'confirmation'),
this.confirmMsg);
this.openApplyModal(this.WorkListActionObj);
// this.common.confirmAlertDialogAction(
// () => {
// this.applyAction(this.WorkListActionObj);
// }, this.ts.trPK('general', 'ok'),
// () => { }, this.ts.trPK('general', 'cancel'),
// this.ts.trPK('vacation-rule', 'confirmation'),
// this.confirmMsg);
//////////////////////////////////////////////////////////

@ -1,5 +1,5 @@
<ion-header *ngIf="!messageSuccess">
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-title color="light"> {{ts.trPK('worklistMain','title')}}</ion-title>
<ion-buttons slot="start">
<nav-buttons backLink="/notification/homepage"></nav-buttons>
@ -24,21 +24,21 @@
<ion-segment-button value="line_details"
[ngClass]="activeSegment == 'line_details' ? 'active-Segment' : 'normal-Segment'">
{{ts.trPK('worklistMain','line_details')}}
<ion-label> {{ts.trPK('worklistMain','line_details')}} </ion-label>
</ion-segment-button>
<ion-segment-button value="action-history"
[ngClass]="activeSegment == 'action-history' ? 'active-Segment' : 'normal-Segment'">
{{'worklistMain, action' | translate}}
<ion-label> {{'worklistMain, action' | translate}} </ion-label>
</ion-segment-button>
<ion-segment-button value="attach"
[ngClass]="activeSegment == 'attach' ? 'active-Segment' : 'normal-Segment'">
{{'general, file' | translate}}
<ion-label> {{'general, file' | translate}} </ion-label>
</ion-segment-button>
<ion-segment-button checked value="info" [ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'" >
{{ts.trPK('worklistMain','info')}}
<ion-label> {{ts.trPK('worklistMain','info')}} </ion-label>
</ion-segment-button>
</ion-segment>
@ -342,7 +342,7 @@
</ion-grid>
<!-- -->
<button ion-button [hidden]="IsReachEnd" class="itemHISBtn" (click)="loadMoreNotificationBody()">Load More</button>
<button ion-button *ngIf="!IsReachEnd" class="itemHISBtn" (click)="loadMoreNotificationBody()">Load More</button>
</ion-card-content>
@ -618,7 +618,7 @@
<div *ngIf="checkLines(actionHistory.NOTE)">
<div class="containerNote" [ngClass]="actionHistory.visible ? 'show' : '' " >
Note: {{actionHistory.NOTE}} {{actionHistory.NOTE}}
Note: {{actionHistory.NOTE}}
</div>
@ -642,7 +642,7 @@
</div>
</ion-list>
</div>
<button ion-button [hidden]="IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()">Load More</button>
<button ion-button *ngIf="!IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()">Load More</button>
</ion-card-content>

@ -101,7 +101,7 @@ export class WorklistMainPoComponent implements OnInit {
itemHistoryRes: any;
QutationAnalysisRes: any;
activeSegment: any = "info";
lines_note_limit: number = 15;
lines_note_limit: number = 24;
notiActionBtnMore: any = [];
demoeAttach: any = [];
orgNote: any;

@ -1,5 +1,5 @@
<ion-header *ngIf="!messageSuccess">
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-title color="light"> {{ts.trPK('worklistMain','title')}}</ion-title>
<ion-buttons slot="start">
<nav-buttons backLink="/notification/homepage"></nav-buttons>
@ -17,21 +17,21 @@
<ion-segment-button value="item-req"
[ngClass]="activeSegment == 'item-req' ? 'active-Segment' : 'normal-Segment'">
{{ts.trPK('worklistMain','itemReq')}}
<ion-label> {{ts.trPK('worklistMain','itemReq')}} </ion-label>
</ion-segment-button>
<ion-segment-button value="action-history"
[ngClass]="activeSegment == 'action-history' ? 'active-Segment' : 'normal-Segment'">
{{'worklistMain, action' | translate}}
<ion-label> {{'worklistMain, action' | translate}} </ion-label>
</ion-segment-button>
<ion-segment-button value="attach" [ngClass]="activeSegment == 'attach' ? 'active-Segment' : 'normal-Segment'">
{{'general, file' | translate}}
<ion-label> {{'general, file' | translate}} </ion-label>
</ion-segment-button>
<ion-segment-button checked value="info"
[ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'">
{{ts.trPK('worklistMain','info')}}
<ion-label> {{ts.trPK('worklistMain','info')}} </ion-label>
</ion-segment-button>
</ion-segment>
@ -165,7 +165,7 @@
</ion-grid>
<button [hidden]="IsReachEnd" ion-button class="itemHISBtn" (click)="loadMoreNotificationBody()">Load
<button *ngIf="!IsReachEnd" ion-button class="itemHISBtn" (click)="loadMoreNotificationBody()">Load
More</button>
</ion-card-content>
@ -361,7 +361,7 @@
</div>
</ion-list>
</div>
<button ion-button [hidden]="IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()">Load
<button ion-button *ngIf="!IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()">Load
More</button>
</ion-card-content>

@ -89,7 +89,7 @@ export class WorklistMainPRComponent implements OnInit {
closeMsg: string;
truncating: boolean;
orgNote: any;
lines_note_limit: any = 15;
lines_note_limit: any = 24;
selectedIndex: any;
showLessBtn: boolean;
showMoreBtn: boolean;

@ -1,5 +1,5 @@
<ion-header *ngIf="!messageSuccess">
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-title color="light"> {{ts.trPK('worklistMain','title')}}</ion-title>
<ion-buttons slot="start">
<nav-buttons backLink="/notification/homepage"></nav-buttons>
@ -75,8 +75,13 @@
<ion-grid class="gridSubordinates">
<div class="subOrdinateDiv">
<img class="subOrdinateImg" src="../assets/imgs/profile.png"></div>
<!-- <img class="subOrdinateImg" src="../assets/imgs/profile.png"> -->
<img *ngIf="List.EMPLOYEE_IMAGE" class="empImgeSub"
[src]="'data:image/png;base64,'+List.EMPLOYEE_IMAGE">
<img *ngIf="List.EMPLOYEE_IMAGE == null"
class="empImgeSub" src="../assets/imgs/profile.png">
</div>
<ion-row class="rowHeader subOrdinateRow">
<ion-col size="9">
@ -377,7 +382,7 @@
</ion-list>
</div>
<button ion-button [hidden]="IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()">Load
<button ion-button *ngIf="!IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()">Load
More</button>
</ion-card-content>

@ -92,12 +92,12 @@
.rowBorder{
border-bottom: solid 0.03cm var(--grayBG);
border-bottom: solid 0.02cm var(--grayBG);
}
.colBorder{
border-right: solid 0.03cm var(--grayBG);
border-right: solid 0.02cm var(--grayBG);
}
@ -183,7 +183,7 @@
// border: var(--cusgray) 1px solid !important;
--background: transparent;
margin-left: -15px;
margin-right: 7px;
margin-right: 6px;
}
.status{
text-align: center;
@ -231,7 +231,7 @@ color: white;
.subOrdinateDiv{
z-index: 4;
margin-left: -44px;
margin-left: -32px;
position: absolute;
top: -2px;
}
@ -244,7 +244,7 @@ color: white;
}
.subOrdinateRow{
margin-left: 40px;
margin-left: 55px;
}
.label{

@ -78,7 +78,7 @@ export class WorklistMainComponent implements OnInit {
P_PAGE_LIMIT: number = 100;
notificationCount: any;
activeSegment: any = "info";
lines_note_limit: any = 15;
lines_note_limit: any = 24;
attachmentRes: any;
private WorkListActionHistoryObj: WorkListActionHistoryRequest;
IsReachEnd: boolean = false;
@ -401,6 +401,7 @@ export class WorklistMainComponent implements OnInit {
obj.ATTRIBUTE_TEXT_VALUE = this.selEmployeeID;
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
}
if (
ButtonAction == "APPROVED" ||
ButtonAction == "REJECTED" ||
@ -410,7 +411,7 @@ export class WorklistMainComponent implements OnInit {
this.WorkListActionObj.P_FORWARD_TO_USER_NAME = "";
this.WorkListActionObj.P_ACTION_MODE = ButtonAction;
this.WorkListActionObj.P_COMMENTS = "";
this.WorkListActionObj.RespondAttributeList = this.P_RESPOND_ATTRIBUTES_TBL;
// this.WorkListActionObj.RespondAttributeList = this.P_RESPOND_ATTRIBUTES_TBL;
this.common.sharedService.setSharedData(
this.getPassNotificationDetails,
@ -420,6 +421,7 @@ export class WorklistMainComponent implements OnInit {
ButtonAction,
WorklistMainComponent.PASS_ACTION_MODE
);
this.common.sharedService.setSharedData(
this.P_RESPOND_ATTRIBUTES_TBL,
WorklistMainComponent.PASS_RES_ATTR
@ -450,11 +452,14 @@ export class WorklistMainComponent implements OnInit {
this.ts.trPK('vacation-rule', 'confirmation'),
this.confirmMsg)
// this.openApplyModal(this.WorkListActionObj);
// this.openApplyModal(this.WorkListActionObj);
}
if (ButtonAction == "RFC") {
// alert("Return For Correction");
this.WorkListActionObj.P_ACTION_MODE = ButtonAction;
@ -614,6 +619,10 @@ export class WorklistMainComponent implements OnInit {
}
this.notificationDynamicFields(result.NotificationGetRespondAttributesList);
this.notificationDynamicAttributeArr = result.NotificationGetRespondAttributesList;
this.common.sharedService.setSharedData(
this.notificationDynamicAttributeArr,
"notificationDynamicAttributeArr"
);
if (result.P_Schema) this.schemaNotific = JSON.parse(result.P_Schema);
} // valid it
} // End handleWorkListButtonsResult
@ -701,6 +710,7 @@ export class WorklistMainComponent implements OnInit {
}
handleWorkListActionHistoryResult(result) {
console.log( "1"+ this.IsReachEnd);
if (this.common.validResponse(result)) {
if (this.common.hasData(result.GetActionHistoryList)) {
this.actionHistoryRes = result.GetActionHistoryList;
@ -711,8 +721,12 @@ export class WorklistMainComponent implements OnInit {
let lastitem = result.GetActionHistoryList[lastItemIndex];
if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) {
this.IsReachEnd = true;
console.log( "2"+ this.IsReachEnd);
} else {
this.IsReachEnd = false;
console.log( "3"+ this.IsReachEnd);
}
}
this.turnCateFun(this.actionHistoryRes);
@ -944,6 +958,40 @@ export class WorklistMainComponent implements OnInit {
loadMoreActionHistory() {
console.log("doInfinite action history MR");
if (!this.IsReachEnd) {
this.worklistService.getActionHistory(this.WorkListActionHistoryObj).
subscribe((result: any) => {
if (this.common.validResponse(result)) {
if (result.GetActionHistoryList != undefined) {
this.P_PAGE_NUM++;
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
(result.GetActionHistoryList).forEach(element => {
if (element.ROW_NUM == element.NO_OF_ROWS) {
this.IsReachEnd = true;
} else {
this.IsReachEnd = false;
}
this.actionHistoryRes.push(element);
}, (Error) => console.log(Error), () =>
//infiniteScroll.target.complete()
console.log("TEST"));
}// if list length >0
else {
this.IsReachEnd = true;
}
}// if response == 1
//this.pageNum++;
// infiniteScroll.target.complete();
});
} else {
//if (infiniteScroll)
//infiniteScroll.target.complete();
}
}//end infiniteScroll
}

@ -1782,19 +1782,20 @@
"ar":"العناصر المطلوبة"
},
"approveMsg":{
"en": "Are you sure to approve this request ?",
"en": "<p class=\"boldP\"> Are you sure to <span class=\"boldText\"> Approve </span>this request ?</p>",
"ar":"العناصر المطلوبة"
},
"rejectMsg":{
"en": "Are you sure to reject this request?",
"en": "<p class=\"boldP\">Are you sure to <span class=\"boldText\"> Reject </span> this request ?</p>",
"ar":"العناصر المطلوبة"
},
"delMsg":{
"en": "Are you sure to delete this request?",
"en": "<p class=\"boldP\">Are you sure to <span class=\"boldText\"> Delete </span> this request ?</p>",
"ar":"العناصر المطلوبة"
},
"closeMsg":{
"en": "Are you sure to close this request?",
"en": "<p class=\"boldP\">Are you sure to <span class=\"boldText\"> Close </span>this request ?</p>",
"ar":"العناصر المطلوبة"
},
"Supplier":{

@ -862,13 +862,13 @@ color: var(--dark);
}
.checkOutOkBtn{
margin-left: 55px !important;
margin-right: 55px !important;
/* margin-left: 50px !important; */
/* margin-right: 55px !important; */
margin-top: 10px !important;
margin-bottom: 10px !important;
/* margin-bottom: 10px !important; */
border-radius: 5px !important;
height: 32px !important;
min-height: 30px !important;
height: 40px !important;
min-height: 40px !important;
background: var(--lightblue) !important;
-webkit-box-flex: 1;
flex: 1 1 auto;
@ -876,17 +876,19 @@ color: var(--dark);
border-right: 0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);
color: white !important;
border: none !important;
width: 80%;
--background: var(--lightblue) !important;
}
.checkOutCancelBtn{
margin-left: 55px !important;
margin-right: 55px !important;
margin-top: 10px !important;
margin-bottom: 10px !important;
/* margin-left: 55px !important; */
/* margin-right: 55px !important; */
/* margin-top: 10px !important; */
/* margin-bottom: 10px !important; */
border-radius: 5px !important;
height: 32px !important;
min-height: 30px !important;
height: 40px !important;
min-height: 40px !important;
background: var(--darkblue) !important;
-webkit-box-flex: 1;
flex: 1 1 auto;
@ -894,6 +896,8 @@ color: var(--dark);
border-right: 0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);
color: white !important;
border: none !important;
width: 80%;
--background: var(--darkblue) !important;
}
.buttonClassWhite {
@ -1002,40 +1006,9 @@ border:0px
margin-top: 10px;
}
.checkOutOkBtn{
margin-left: 55px !important;
margin-right: 55px !important;
margin-top: 10px !important;
margin-bottom: 10px !important;
border-radius: 5px !important;
height: 32px !important;
min-height: 30px !important;
background: var(--lightblue) !important;
-webkit-box-flex: 1;
flex: 1 1 auto;
border-top: 0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);
border-right: 0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);
color: white !important;
border: none !important;
}
.checkOutCancelBtn{
margin-left: 55px !important;
margin-right: 55px !important;
margin-top: 10px !important;
margin-bottom: 10px !important;
border-radius: 5px !important;
height: 32px !important;
min-height: 30px !important;
background: var(--darkblue) !important;
-webkit-box-flex: 1;
flex: 1 1 auto;
border-top: 0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);
border-right: 0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);
color: white !important;
border: none !important;
}
.more-modal {
background: rgba(0, 0, 0, 0.5) !important;
@ -1093,6 +1066,17 @@ border:0px
height: 0px !important;
display: none !important;
}
.header-toolbar-new{
.header-toolbar-new {
--background: #22c6b3;
background: #22c6b3;
}
.boldText{
color: var(--dark) !important;
font-weight: bold;
font-size: 20px;
}
.boldP{
font-size: 20px;
}

@ -206,7 +206,7 @@ ion-label.labelValue.sc-ion-label-md-h.sc-ion-label-md-s.md.hydrated
}
.timeline .timeline-thumb.timeline-icon {
height: 70px;
height: 67px;
// text-align: center;
// color: white;
// border: 5px solid #CBD0D3;
@ -442,11 +442,11 @@ left: 66px;
.rowBorder{
border-bottom: solid 0.03cm var(--grayBG);
border-bottom: solid 0.02cm var(--grayBG);
}
.colBorder{
border-right: solid 0.03cm var(--grayBG);
border-right: solid 0.02cm var(--grayBG);
}
@ -543,6 +543,13 @@ left: 66px;
height: 80px;
border: #dedede solid 1px;
}
.empImgeSub{
border-radius: 50%;
width: 85px;
height: 85px;
border: #dedede solid 1px;
}
ion-card{
color:black !important;
@ -550,4 +557,17 @@ left: 66px;
.line{
padding-bottom:87px;
}
ion-segment-button ion-label {
max-width: 100px;
overflow: hidden;
padding: 10px;
font-size: 14px;
color: black !important;
}
.colItems ion-label {
color: black !important;
}
Loading…
Cancel
Save