add worklist+ fix conflict

MOE_DEV_NEW_TEMPORARY_DESIGN
ashwaq 6 years ago
commit 838e7cf99b

1693
Mohem/package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -52,7 +52,6 @@
"@ionic-native/sqlite": "^5.18.0",
"@ionic-native/status-bar": "^5.0.0",
"@ionic-native/themeable-browser": "^5.18.0",
"@ionic-native/vibration": "^5.19.1",
"@ionic-native/zbar": "^5.10.0",
"@ionic/angular": "^4.1.0",
"@ng-bootstrap/ng-bootstrap": "^4.2.2",
@ -96,7 +95,6 @@
"cordova-plugin-splashscreen": "^5.0.3",
"cordova-plugin-statusbar": "^2.4.3",
"cordova-plugin-themeablebrowser": "^0.2.18",
"cordova-plugin-vibration": "^3.1.1",
"cordova-plugin-whitelist": "^1.3.4",
"cordova-sqlite-storage": "^3.4.0",
"cordova-support-google-services": "^1.3.2",
@ -195,8 +193,7 @@
"cordova-plugin-fingerprint-aio": {
"FACEID_USAGE_DESCRIPTION": "User Authentication"
},
"cordova-plugin-firebasex": {},
"cordova-plugin-vibration": {}
"cordova-plugin-firebasex": {}
},
"platforms": [
"browser",

@ -1,16 +1,29 @@
<ion-header>
<!-- <ion-header>
<ion-toolbar class="header-toolbar">
<ion-title color="light">Attendance Tracking </ion-title>
<ion-buttons slot="start">
<nav-buttons></nav-buttons>
</ion-buttons>
</ion-toolbar>
</ion-header>
</ion-header> -->
<!-- <ion-header>
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<nav-buttons backLink="/home"></nav-buttons>
</ion-buttons>
<ion-title>Attendance Tracking</ion-title>
</ion-toolbar>
</ion-header> -->
<ion-content>
<div class="back-button-container">
<nav-buttons backLink="/home"></nav-buttons>
</div>
<div class="timer-chart">
<ion-label class="shift-title" style="font-weight: bold"> {{curentDate}}</ion-label><br/>
<ion-label class="shift-title" style="font-weight: bold; font-size: 20px;"> {{curentDate}}</ion-label><br/>
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','today-time-left')}}</ion-label>
<div class="fixed-shift-timer">
@ -46,32 +59,29 @@
</div>
<ion-grid>
<ion-row class="rowBorder">
<ion-label class="shift-title">{{ts.trPK('attendance-tracking','shift-time')}}</ion-label>
<br /><br />
<ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SHT_NAME}} </ion-label>
<ion-col [size]="12" class="colBorder" style="border-right: none;">
<ion-label class="shift-title">{{ts.trPK('attendance-tracking','shift-time')}}</ion-label>
<ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SHT_NAME}} </ion-label>
</ion-col>
</ion-row>
<ion-row class="rowBorder">
<ion-col class="colBorder">
<ion-col [size]="6" class="colBorder">
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','check-in')}}</ion-label>
<br /><br />
<ion-label class="shift-text shift-title">08:00</ion-label>
</ion-col>
<ion-col>
<ion-col [size]="6" class="colBorder">
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','check-out')}}</ion-label>
<br /><br />
<ion-label class="shift-text shift-title">08:00 </ion-label>
</ion-col>
</ion-row>
<ion-row style="text-align: center">
<ion-col class="colBorder">
<ion-col [size]="6" class="colBorder">
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','late-in')}}</ion-label>
<br /><br />
<ion-label class="shift-text shift-title">08:00 </ion-label>
</ion-col>
<ion-col>
<ion-col [size]="6" class="colBorder">
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','regular')}}</ion-label>
<br /><br />
<ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SCHEDULED_HOURS}} </ion-label>
<ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SCHEDULED_HOURS | slice:0:-3}} </ion-label>
</ion-col>
</ion-row>
</ion-grid>

@ -1,26 +1,29 @@
ion-content {
font-family: WorkSans-Regular;
}
ion-grid {
padding:30px 15px;
}
.timer-chart{
padding-top:18px;
background: #094773;
// height: 50%;
text-align: center;
background: #094773;
text-align: center;
line-height: .7cm;
}
.tracking-content{
background: #053c63;
height: 50%;
background: #053c63;
min-height: 50%;
}
.rowBorder{
text-align: center;
border-bottom: var(--lightblue) solid 1px;
}
.shift-text{
// text-align: center;
// width: 100%;
// color: white !important;
margin-bottom: 12px;
margin-top: -9px;
font-size: 30px;
font-size: 36px;
line-height: 36px;
display: block;
}
.shift-title{
width: 100%;
@ -34,24 +37,32 @@ height: 50%;
}
.divstopBtn{
text-align: center;
text-align: center;
}
.stopBtn{
height: 70px;
width: 70px;
height: 89px;
width: 89px;
background-color: var(--lightblue) !important;
border-radius: 50%;
display: inline-block;
margin-top: -24px;
border: solid 3px #053c63;
margin-top: -40px;
border: solid 5px #053c63;
}
.colBorder{
padding: 20px 0px;
text-align: center;
}
.colBorder:nth-child(1){
border-right: var(--lightblue) solid 1px;
}
.fixed-shift-timer{
margin-top: -50px;
margin-bottom: -30px;
margin-bottom: -10px;
}
.back-button-container{
background: #094773;
}

@ -22,7 +22,6 @@ export class HomeComponent implements OnInit {
public isCheckedIn = undefined;
public displayTime: any;
public percent: any;
constructor(
public cs: CommonService,
public db: DashboredService,
@ -90,14 +89,10 @@ export class HomeComponent implements OnInit {
}
convertAndAssignTime(data) {
console.log(data);
this.remainingTime = this.convertInSeconds(data.P_REMAINING_HOURS.split(':'));
this.scheduledTime = this.convertInSeconds(data.P_SCHEDULED_HOURS.split(':'));
this.isCheckedIn = this.remainingTime === this.scheduledTime ? false : true;
this.initTimer();
console.log('remainingTime: ' + this.remainingTime);
console.log('scheduledTime: ' + this.scheduledTime);
console.log('isCheckedIn: ' + this.isCheckedIn);
}
showAttendanceTracking() {

@ -1,8 +0,0 @@
import { FeedbackDirective } from './feedback.directive';
describe('FeedbackDirective', () => {
it('should create an instance', () => {
const directive = new FeedbackDirective();
expect(directive).toBeTruthy();
});
});

@ -1,24 +0,0 @@
import { Directive, ElementRef, HostListener } from '@angular/core';
import { TranslatorService } from '../../services/translator/translator.service';
import { CommonService } from '../../services/common/common.service';
import { FeedbackService } from './feedback.service';
@Directive({
selector: '[feedback]'
})
export class FeedbackDirective {
constructor(
private cs: CommonService,
private ts: TranslatorService,
private el: ElementRef,
private feedBackService: FeedbackService
) {
}
@HostListener('mousedown') onMouseEnter() {
this.feedBackService.vibrate();
}
}

@ -1,12 +0,0 @@
import { TestBed } from '@angular/core/testing';
import { FeedbackService } from './feedback.service';
describe('FeedbackService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: FeedbackService = TestBed.get(FeedbackService);
expect(service).toBeTruthy();
});
});

@ -1,20 +0,0 @@
import { Injectable } from '@angular/core';
import { Vibration } from '@ionic-native/vibration/ngx';
// import { SettingsService } from 'src/app/settings/service/settings.service';
@Injectable({
providedIn: 'root'
})
export class FeedbackService {
// constructor(private vibration: Vibration, private settings: SettingsService) {}
constructor(private vibration: Vibration) {}
public async vibrate() {
try {
const on = true;
if (on) {
this.vibration.vibrate(500);
}} catch (e) {
}
}
}

@ -43,6 +43,8 @@ import { NativeStorage } from '@ionic-native/native-storage/ngx';
import { ProgressLoadingService } from './ui/progressLoading/progress-loading.service';
import { BarChartComponent } from './ui/bar-chart/bar-chart.component';
import { DonutChartComponent } from './ui/donut-chart/donut-chart.component';
// import { UserLocalNotificationService } from './services/user-local-notification/user-local-notification.service';
// import { LocalNotifications } from '@ionic-native/local-notifications/ngx';
import { EmailComponent } from './ui/email/email.component';
import { Badge } from '@ionic-native/badge/ngx';
import { PushService } from './services/push/push.service';
@ -51,6 +53,8 @@ import { HmgBrowserService } from './services/hmg-browser/hmg-browser.service';
import { GuidService } from './services/guid/guid.service';
import { TabsBarComponent } from './ui/tabs-bar/tabs-bar.component';
import { PageTrailerComponent } from './ui/spacer/page-trailer/page-trailer.component';
// import { GeofencingService } from './services/geofencing/geofencing.service';
// import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
import { ButtonComponent } from './ui/button/button.component';
import { ToolbarButtonComponent } from './ui/toolbar-button/toolbar-button.component';
import { ListboxModule } from 'primeng/listbox';
@ -78,10 +82,13 @@ import { Diagnostic } from '@ionic-native/diagnostic/ngx';
import { DetailButtonComponent } from './ui/detail-button/detail-button.component';
import { RouterModule } from '@angular/router';
import { HeaderButtonComponent } from './ui/header-button/header-button.component';
// import { CallNumber } from '@ionic-native/call-number/ngx';
import { AppRate } from '@ionic-native/app-rate/ngx';
import { RatingService } from './services/rating/rating.service';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { RateService } from './services/rate/rate.service';
// import { PaymentComponent } from './ui/payment/payment.component';
// import { PaymentService } from './ui/payment/service/payment.service';
import { MenuService } from './services/menu/menuservice.service';
import { ReplacementListComponent } from '../vacation-rule/replacement-list/replacement-list.component';
import { FileSelectDirective } from 'ng2-file-upload';
@ -89,7 +96,7 @@ import { PdfViewerModule } from 'ng2-pdf-viewer';
import { WorkListAttachViewComponent } from '../notification/work-list-attach-view/work-list-attach-view.component';
import {Camera, CameraOptions, PictureSourceType} from '@ionic-native/Camera/ngx';
import {File} from '@ionic-native/file/ngx';
import {FileUploderProfileComponent} from './ui/file-uploder-profile/file-uploder-profile.component'
import {FileUploderProfileComponent} from './ui/file-uploder-profile/file-uploder-profile.component';
import { OpenNativeSettings } from '@ionic-native/open-native-settings/ngx';
import { AccordinCustomComponent } from './ui/accordin-custom/accordin-custom.component';
import { AccordinTabCustomComponent} from './ui/accordin-custom/accordin-tab-custom/accordin-tab-custom.component'
@ -103,7 +110,9 @@ import {FabButtonComponent} from './ui/fab-button/fab-button.component'
import { AttendScanService } from './services/attend-services/attend-scan.service';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { NgCircleProgressModule } from 'ng-circle-progress';
import { ChartModule } from 'primeng/chart';
import {ChartModule} from 'primeng/chart';
import { CardFilterComponent} from './ui/card-filter/card-filter.component';
@NgModule({
imports: [
CommonModule,
@ -169,7 +178,6 @@ import { ChartModule } from 'primeng/chart';
EmptyDataComponent,
DetailButtonComponent,
HeaderButtonComponent,
//PaymentComponent,
ReplacementListComponent,
FileSelectDirective,
WorkListAttachViewComponent,
@ -178,7 +186,8 @@ import { ChartModule } from 'primeng/chart';
AccordinCustomComponent,
StatsButtonComponent,
ServicesButtonComponent,
ConfirmLoginComponent
ConfirmLoginComponent,
CardFilterComponent
],
exports: [
FabButtonComponent,
@ -239,7 +248,8 @@ import { ChartModule } from 'primeng/chart';
ServicesButtonComponent,
ConfirmLoginComponent,
NgCircleProgressModule,
ChartModule
ChartModule,
CardFilterComponent
],
providers: [
AttendScanService,
@ -257,10 +267,14 @@ import { ChartModule } from 'primeng/chart';
NativeStorage,
ProgressLoadingService,
PushService,
// UserLocalNotificationService,
// LocalNotifications,
Badge,
LifeCycleService,
HmgBrowserService,
GuidService,
// BackgroundGeolocation,
// GeofencingService,
Keyboard,
KeyboardService,
Diagnostic,
@ -275,10 +289,10 @@ import { ChartModule } from 'primeng/chart';
RateService,
Camera,
File,
// PaymentService,
MenuService,
OpenNativeSettings,
BarcodeScanner,
BarcodeScanner
]
})
export class HmgCommonModule { }

@ -1,4 +1,4 @@
import { Injectable } from "@angular/core";
import { Injectable } from '@angular/core';
import {
NavController,
ToastController,
@ -6,74 +6,74 @@ import {
AlertController,
Platform,
MenuController
} from "@ionic/angular";
import { Router } from "@angular/router";
import { TranslatorService } from "../translator/translator.service";
import { AlertControllerService } from "../../ui/alert/alert-controller.service";
} from '@ionic/angular';
import { Router } from '@angular/router';
import { TranslatorService } from '../translator/translator.service';
import { AlertControllerService } from '../../ui/alert/alert-controller.service';
//import { Response } from "../models/response";
import { Response } from 'src/app/hmg-common/services/models/response';
import { Location, DatePipe } from "@angular/common";
import { ThemeableBrowser } from "@ionic-native/themeable-browser/ngx";
import { BrowserConfig } from "./models/browser-config";
import { Location, DatePipe } from '@angular/common';
import { ThemeableBrowser } from '@ionic-native/themeable-browser/ngx';
import { BrowserConfig } from './models/browser-config';
import {
LaunchNavigator,
LaunchNavigatorOptions
} from "@ionic-native/launch-navigator/ngx";
import { Device } from "@ionic-native/device/ngx";
import { ProgressLoadingService } from "../../ui/progressLoading/progress-loading.service";
import { Observable, throwError } from "rxjs";
import { SharedDataService } from "../shared-data-service/shared-data.service";
import { Badge } from "@ionic-native/badge/ngx";
import { LifeCycleService } from "../life-cycle/life-cycle.service";
import { Diagnostic } from "@ionic-native/diagnostic/ngx";
} from '@ionic-native/launch-navigator/ngx';
import { Device } from '@ionic-native/device/ngx';
import { ProgressLoadingService } from '../../ui/progressLoading/progress-loading.service';
import { Observable, throwError } from 'rxjs';
import { SharedDataService } from '../shared-data-service/shared-data.service';
import { Badge } from '@ionic-native/badge/ngx';
import { LifeCycleService } from '../life-cycle/life-cycle.service';
import { Diagnostic } from '@ionic-native/diagnostic/ngx';
//import { CallNumber } from "@ionic-native/call-number/ngx";
import { InAppBrowser } from "@ionic-native/in-app-browser/ngx";
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
@Injectable({
providedIn: "root"
providedIn: 'root'
})
export class CommonService {
public static months_en_long = [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
'January',
'February',
'March',
'April',
'May',
'June',
'July',
'August',
'September',
'October',
'November',
'December'
];
public static months_en = [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
'Aug',
'Sep',
'Oct',
'Nov',
'Dec'
];
public static months_ar = [
"يناير",
"فبراير",
"مارس",
"أبريل",
"مايو",
"يونيو",
"يوليو",
"أغسطس",
"سبتمبر",
"أكتوبر",
"نوفمبر",
"ديسمبر"
'يناير',
'فبراير',
'مارس',
'أبريل',
'مايو',
'يونيو',
'يوليو',
'أغسطس',
'سبتمبر',
'أكتوبر',
'نوفمبر',
'ديسمبر'
];
private progressLoaders: any[] = [];
@ -172,7 +172,7 @@ public getMonthNameAr(value: number): string {
public round(value: number, decimal: number): string {
const valueStr = value.toString();
const dotIndex = valueStr.indexOf(".");
const dotIndex = valueStr.indexOf('.');
if (dotIndex >= 0) {
return valueStr.toString().substr(0, dotIndex + decimal);
@ -186,13 +186,13 @@ public getMonthNameAr(value: number): string {
var hours = Math.floor(sec_num / 3600);
var minutes = Math.floor((sec_num - hours * 3600) / 60);
var seconds = sec_num - hours * 3600 - minutes * 60;
var hoursString = "";
var minutesString = "";
var secondsString = "";
hoursString = hours < 10 ? "0" + hours : hours.toString();
minutesString = minutes < 10 ? "0" + minutes : minutes.toString();
secondsString = seconds < 10 ? "0" + seconds : seconds.toString();
return minutesString + ":" + secondsString;
var hoursString = '';
var minutesString = '';
var secondsString = '';
hoursString = hours < 10 ? '0' + hours : hours.toString();
minutesString = minutes < 10 ? '0' + minutes : minutes.toString();
secondsString = seconds < 10 ? '0' + seconds : seconds.toString();
return minutesString + ':' + secondsString;
}
public toastPK(page: string, key: string) {
@ -202,9 +202,9 @@ public getMonthNameAr(value: number): string {
const toast = await this.toastController.create({
message: message,
showCloseButton: true,
position: "middle",
position: 'middle',
duration: 2000,
closeButtonText: this.ts.trPK("general", "close")
closeButtonText: this.ts.trPK('general', 'close')
});
toast.present();
}
@ -213,9 +213,9 @@ public getMonthNameAr(value: number): string {
async startLoadingOld() {
this.stopLoading();
const loader = await this.loadingController.create({
spinner: "bubbles",
spinner: 'bubbles',
duration: 30000,
message: this.ts.trPK("error", "wait"),
message: this.ts.trPK('error', 'wait'),
translucent: true
});
this.progressLoaders.push(loader);
@ -228,7 +228,7 @@ public getMonthNameAr(value: number): string {
*/
this.stopLoading();
this.progressLoadingService.presentLoading(
this.ts.trPK("general", "loading")
this.ts.trPK('general', 'loading')
);
}
@ -248,8 +248,8 @@ public getMonthNameAr(value: number): string {
onAccept();
}
},
this.ts.trPK("general", "ok"),
this.ts.trPK("general", "alert"),
this.ts.trPK('general', 'ok'),
this.ts.trPK('general', 'alert'),
message
);
}
@ -257,10 +257,10 @@ public getMonthNameAr(value: number): string {
public presentConfirmDialog(message: string, onAccept: any, onCancel?: any) {
this.confirmAlertDialog(
onAccept,
this.ts.trPK("general", "ok"),
this.ts.trPK('general', 'ok'),
onCancel,
this.ts.trPK("general", "cancel"),
this.ts.trPK("general", "confirm"),
this.ts.trPK('general', 'cancel'),
this.ts.trPK('general', 'confirm'),
message
);
}
@ -268,8 +268,8 @@ public getMonthNameAr(value: number): string {
public presentAcceptDialog(message: string, onAccept: any) {
this.alertDialog(
onAccept,
this.ts.trPK("general", "ok"),
this.ts.trPK("general", "confirm"),
this.ts.trPK('general', 'ok'),
this.ts.trPK('general', 'confirm'),
message
);
}
@ -279,8 +279,8 @@ public getMonthNameAr(value: number): string {
() => {
this.back();
},
this.ts.trPK("general", "ok"),
this.ts.trPK("general", "info"),
this.ts.trPK('general', 'ok'),
this.ts.trPK('general', 'info'),
message
);
}
@ -288,9 +288,9 @@ public getMonthNameAr(value: number): string {
this.openHome();
this.alertDialog(
() => {},
this.ts.trPK("general", "ok"),
this.ts.trPK("general", "info"),
this.ts.trPK("general", "not-allowed")
this.ts.trPK('general', 'ok'),
this.ts.trPK('general', 'info'),
this.ts.trPK('general', 'not-allowed')
);
}
@ -301,14 +301,14 @@ public getMonthNameAr(value: number): string {
) {
this.alertDialog(
onClick,
this.ts.trPK("general", "ok"),
this.ts.trPK("general", "alert"),
this.ts.trPK('general', 'ok'),
this.ts.trPK('general', 'alert'),
message
);
}
public userNeedToReLogin() {
this.presentAcceptDialog(this.ts.trPK("general", "relogin"), () => {
this.presentAcceptDialog(this.ts.trPK('general', 'relogin'), () => {
this.sharedService.clearAll();
this.openLogin();
});
@ -317,9 +317,9 @@ public getMonthNameAr(value: number): string {
public showConnectionErrorDialog(onClick: any, okLabel: string) {
this.alertDialog(
onClick,
this.ts.trPK("general", "ok"),
this.ts.trPK("general", "alert"),
this.ts.trPK("general", "connError")
this.ts.trPK('general', 'ok'),
this.ts.trPK('general', 'alert'),
this.ts.trPK('general', 'connError')
);
}
@ -327,15 +327,15 @@ public getMonthNameAr(value: number): string {
this.alertDialog(
onClick,
okLabel,
this.ts.trPK("general", "alert"),
this.ts.trPK("general", "timeout")
this.ts.trPK('general', 'alert'),
this.ts.trPK('general', 'timeout')
);
}
async JustAlertDialog(acceptLabel: string, message: string) {
this.clearAllAlerts();
const alert = await this.alertControllerIonic.create({
header: this.ts.trPK("general", "info"),
header: this.ts.trPK('general', 'info'),
message: message,
buttons: [
{
@ -360,13 +360,13 @@ public getMonthNameAr(value: number): string {
) {
this.clearAllAlerts();
const alert = await this.alertControllerIonic.create({
header: this.ts.trPK("general", "confirm"),
header: this.ts.trPK('general', 'confirm'),
message: message,
buttons: [
{
text: cancelLabel,
role: "cancel",
cssClass: "cancel-button",
role: 'cancel',
cssClass: 'cancel-button',
handler: () => {
if (onCancel) {
onCancel();
@ -399,7 +399,7 @@ public getMonthNameAr(value: number): string {
) {
this.clearAllAlerts();
const alert = await this.alertControllerIonic.create({
header: this.ts.trPK("general", "confirm"),
header: this.ts.trPK('general', 'confirm'),
message: message,
buttons: [
{
@ -433,7 +433,7 @@ public getMonthNameAr(value: number): string {
message: message,
buttons: [
{
text:this.ts.trPK("general", "ok"),
text:this.ts.trPK('general', 'ok'),
handler: () => {
if (onAccept) {
onAccept();
@ -476,7 +476,7 @@ public getMonthNameAr(value: number): string {
) {
this.clearAllAlerts();
const alert = await this.alertControllerIonic.create({
header: this.ts.trPK("general", "confirm"),
header: this.ts.trPK('general', 'confirm'),
message: message,
buttons: [
{
@ -492,9 +492,13 @@ public getMonthNameAr(value: number): string {
},
{
text: acceptLabel,
role: "Confirm",
role: 'Confirm',
<<<<<<< HEAD
cssClass: "checkOutOkBtn",
=======
cssClass: 'confirmBtn',
>>>>>>> 52085849999743b338c6bc8f5e40247bfa477057
handler: () => {
@ -558,7 +562,7 @@ public getMonthNameAr(value: number): string {
public clearAllAlerts() {
// custom solutions because of async issue
const alerts = document.getElementsByTagName("ion-alert");
const alerts = document.getElementsByTagName('ion-alert');
for (let i = 0; i < alerts.length; i++) {
const alert = alerts[i];
alert.parentNode.removeChild(alert);
@ -566,15 +570,15 @@ public getMonthNameAr(value: number): string {
}
public getDeviceInfo(): string {
if (this.platform.is("mobile")) {
const os = this.platform.is("ios") ? "Iphone" : "android";
if (this.platform.is('mobile')) {
const os = this.platform.is('ios') ? 'Iphone' : 'android';
return (
os +
" - " +
' - ' +
this.device.platform +
" - " +
' - ' +
this.device.version +
" , " +
' , ' +
this.device.manufacturer
);
} else {
@ -583,19 +587,19 @@ public getMonthNameAr(value: number): string {
}
public getDeviceType(): string {
if (this.platform.is("mobile")) {
if (this.platform.is('mobile')) {
// return "Mobile " + (this.platform.is("ios") ? "Iphone" : "android");
return (this.platform.is("ios") ? "Iphone" : "android");
return (this.platform.is('ios') ? 'Iphone' : 'android');
} else {
return "Desktop";
return 'Desktop';
}
}
public validResponse(result: Response): boolean {
if (result.MessageStatus === 1) {
return true;
} else if (result.MessageStatus === 2) {
return this.hasData(result["SameClinicApptList"]);
return this.hasData(result['SameClinicApptList']);
}
return false;
}
@ -616,15 +620,15 @@ public getMonthNameAr(value: number): string {
}
private openBrowserHtml(url, onExit?, onFaild?, onSuccess?) {
const browser = window.open(url, "_blank", "location=no");
browser.addEventListener("loadstart", () => {});
const browser = window.open(url, '_blank', 'location=no');
browser.addEventListener('loadstart', () => {});
browser.addEventListener("loaderror", () => {
browser.addEventListener('loaderror', () => {
if (onFaild) {
onFaild();
}
});
browser.addEventListener("loadstop", () => {
browser.addEventListener('loadstop', () => {
if (onSuccess) {
onSuccess();
}
@ -641,14 +645,14 @@ public getMonthNameAr(value: number): string {
this.platform.ready().then(() => {
const browser = this.iab.create(
url,
"_blank",
"closebuttoncolor=#60686b,hidenavigationbuttons=yes,hideurlbar=yes,zoom=no"
'_blank',
'closebuttoncolor=#60686b,hidenavigationbuttons=yes,hideurlbar=yes,zoom=no'
);
// browser.executeScript(...);
// browser.insertCSS(...);
browser.on("loaderror").subscribe(event => {
browser.on('loaderror').subscribe(event => {
if (onFaild) {
onFaild();
}
@ -664,13 +668,13 @@ public getMonthNameAr(value: number): string {
});
*/
browser.on("exit").subscribe(event => {
browser.on('exit').subscribe(event => {
if (onExit) {
onExit();
}
});
browser.on("loadstart").subscribe(event => {
browser.on('loadstart').subscribe(event => {
if (successURLS) {
successURLS.forEach((successURL, index) => {
if (event.url && event.url.indexOf(successURL) >= 0) {
@ -687,7 +691,7 @@ public getMonthNameAr(value: number): string {
}
public imageFromBase64(base64: string) {
return "data:image/jpeg;base64," + base64;
return 'data:image/jpeg;base64,' + base64;
}
public openLocation(lat: number, lng: number) {
@ -696,24 +700,24 @@ public getMonthNameAr(value: number): string {
() => {},
err => {
// this.failedToOpenMap();
window.open("https://maps.google.com/?q=" + lat + "," + lng);
window.open('https://maps.google.com/?q=' + lat + ',' + lng);
}
);
});
}
private failedToOpenMap() {
this.presentAlert(this.ts.trPK("error", "map"));
this.presentAlert(this.ts.trPK('error', 'map'));
}
public localizeTime(date: Date) {
if (!(date.getHours() == 0 && date.getMinutes() == 0)) {
let h = date.getHours() % 12 || 12;
let hStr = h < 10 ? "0" + h : h; // leading 0 at the left for 1 digit hours
let hStr = h < 10 ? '0' + h : h; // leading 0 at the left for 1 digit hours
const m = date.getMinutes();
let mStr = m < 10 ? "0" + m : m;
return hStr + ":" + mStr + (date.getHours() < 12 ? " AM" : " PM");
let mStr = m < 10 ? '0' + m : m;
return hStr + ':' + mStr + (date.getHours() < 12 ? ' AM' : ' PM');
}
return "";
return '';
}
public localizeDate(date: Date, time = false) {
@ -722,20 +726,20 @@ public getMonthNameAr(value: number): string {
if (lng === TranslatorService.AR) {
dateStr =
CommonService.months_ar[date.getMonth()] +
" " +
' ' +
date.getDate() +
" " +
' ' +
date.getFullYear();
} else {
dateStr =
CommonService.months_en[date.getMonth()] +
" " +
' ' +
date.getDate() +
"," +
',' +
date.getFullYear();
}
return time ? dateStr + " " + this.localizeTime(date) : dateStr;
return time ? dateStr + ' ' + this.localizeTime(date) : dateStr;
}
public localizeMonth(monthIndex) {
@ -767,21 +771,21 @@ public getMonthNameAr(value: number): string {
return (
date.getMonth() +
1 +
"/" +
'/' +
date
.getFullYear()
.toString()
.substr(2)
);
} else {
return "--";
return '--';
}
}
public convertISODateToJsonDate(isoDate: string): string {
return "/Date(" + Date.parse(isoDate) + ")/";
return '/Date(' + Date.parse(isoDate) + ')/';
}
public convertDateToJsonDate(date: Date): string {
return "/Date(" + date.getTime() + ")/";
return '/Date(' + date.getTime() + ')/';
}
/*
@ -790,13 +794,13 @@ public getMonthNameAr(value: number): string {
*/
public convertIsoDateToObject(isoDate: string, isoTime: string): Date {
const date = new Date(isoDate);
const parts = isoTime.split(":");
const parts = isoTime.split(':');
if (this.hasData(parts)) {
// remove if numbers start with 0
let hrsStr = parts[0];
let msStr = parts[1];
hrsStr = hrsStr[0] == "0" ? hrsStr.substr(1) : hrsStr;
msStr = msStr[0] == "0" ? msStr.substr(1) : msStr;
hrsStr = hrsStr[0] == '0' ? hrsStr.substr(1) : hrsStr;
msStr = msStr[0] == '0' ? msStr.substr(1) : msStr;
date.setHours(Number(hrsStr));
date.setMinutes(Number(msStr));
}
@ -824,9 +828,9 @@ public getMonthNameAr(value: number): string {
public getDateISO(date: Date): string {
return (
date.getFullYear().toString() +
"-" +
'-' +
this.trailerZero(date.getMonth() + 1) +
"-" +
'-' +
this.trailerZero(date.getDate())
);
}
@ -838,19 +842,19 @@ public getMonthNameAr(value: number): string {
public getTimeISO(date: Date): string {
return (
this.trailerZero(date.getHours()) +
":" +
':' +
this.trailerZero(date.getMinutes()) +
":00"
':00'
);
}
public getDateTimeISO(date: Date): string {
return this.getDateISO(date) + " " + this.getTimeISO(date);
return this.getDateISO(date) + ' ' + this.getTimeISO(date);
}
public getDateTimeISOFromString(dateStr: string): string {
const date = this.evaluteDateAsObject(dateStr);
return this.getDateTimeISO(date) + " " + this.getTimeISO(date);
return this.getDateTimeISO(date) + ' ' + this.getTimeISO(date);
}
public getCurrentTimeISO(): string {
@ -859,7 +863,7 @@ public getMonthNameAr(value: number): string {
private trailerZero(value: number): string {
const str = value.toString();
return str.length > 1 ? str : "0" + str;
return str.length > 1 ? str : '0' + str;
}
public hasData(array: any[]): boolean {
@ -883,13 +887,13 @@ public getMonthNameAr(value: number): string {
}
}
}
return startIndex ? message.substring(startIndex, endIndex) : "";
return startIndex ? message.substring(startIndex, endIndex) : '';
}
return null;
}
public inNumberRange(targetCode: number): boolean {
const minDigit = "0".charCodeAt(0);
const maxDigit = "9".charCodeAt(0);
const minDigit = '0'.charCodeAt(0);
const maxDigit = '9'.charCodeAt(0);
return targetCode >= minDigit && targetCode <= maxDigit;
}
@ -911,24 +915,24 @@ public getMonthNameAr(value: number): string {
title?: string
) {
this.smsAlertDialog = await this.alertControllerIonic.create({
header: title || this.ts.trPK("general", "enter-sms-code"),
header: title || this.ts.trPK('general', 'enter-sms-code'),
inputs: [
{
name: "sms",
type: "number",
name: 'sms',
type: 'number',
value: smsCode,
placeholder: this.ts.trPK("general", "enter-sms")
placeholder: this.ts.trPK('general', 'enter-sms')
}
],
buttons: [
{
text: this.ts.trPK("general", "cancel"),
role: "cancel",
cssClass: "cancel-button",
text: this.ts.trPK('general', 'cancel'),
role: 'cancel',
cssClass: 'cancel-button',
handler: () => {}
},
{
text: this.ts.trPK("general", "ok"),
text: this.ts.trPK('general', 'ok'),
handler: data => {
onAccept(data.sms);
}
@ -1031,8 +1035,8 @@ public getMonthNameAr(value: number): string {
}
const dataSets = [
this.getGraphDataSet(this.ts.trInline(title1), series1, "#d12026"),
this.getGraphDataSet(this.ts.trInline(title2), series2, "#60686b")
this.getGraphDataSet(this.ts.trInline(title1), series1, '#d12026'),
this.getGraphDataSet(this.ts.trInline(title2), series2, '#60686b')
];
return this.getGraphMultiSeries(labels, dataSets);
}
@ -1048,7 +1052,7 @@ public getMonthNameAr(value: number): string {
}
public isHtml5VideoSupported(): boolean {
const v = document.createElement("video");
const v = document.createElement('video');
if (v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"')) {
return true;
}
@ -1062,7 +1066,7 @@ public getMonthNameAr(value: number): string {
}
public isCordova(): boolean {
return this.platform.is("cordova");
return this.platform.is('cordova');
}
public pageRevisited(pageName: string): Observable<boolean> {
@ -1077,118 +1081,122 @@ public getMonthNameAr(value: number): string {
}
public openEitListPage() {
this.nav.navigateForward(["/eit/eit-list"]);
this.nav.navigateForward(['/eit/eit-list']);
}
public openAddEitPage() {
this.nav.navigateForward(["/eit/add-eit"]);
this.nav.navigateForward(['/eit/add-eit']);
}
public openConfirmEitPage() {
this.nav.navigateForward(["/eit/confirm-add-eit"]);
this.nav.navigateForward(['/eit/confirm-add-eit']);
}
public openHome() {
this.nav.navigateRoot(["/home"]);
this.nav.navigateRoot(['/home']);
}
public openForgotPassword() {
this.nav.navigateForward(["/authentication/forgot"]);
this.nav.navigateForward(['/authentication/forgot']);
}
public openChangePassword() {
this.nav.navigateForward(["/authentication/changepassowrd"]);
this.nav.navigateForward(['/authentication/changepassowrd']);
}
public openProfile() {
this.nav.navigateForward(["/profile/home"]);
this.nav.navigateForward(['/profile/home']);
}
public openEditProfile() {
this.nav.navigateForward(["/profile/editprofile"]);
}
public openAccuralPage() {
this.nav.navigateForward(["/accrual-balances/home"]);
this.nav.navigateForward(['/accrual-balances/home']);
}
public openEITPage() {
this.nav.navigateForward(["/eit/homepage"]);
this.nav.navigateForward(['/eit/homepage']);
}
public openMyTeamPage() {
this.nav.navigateForward(["/my-team/home"]);
this.nav.navigateForward(['/my-team/home']);
}
public openPage(link: string) {
this.nav.navigateForward([link]);
}
public static myTeamDetailUrl =["/my-team/details","/my-team/details-2"]
public static myTeamDetailUrl =['/my-team/details','/my-team/details-2']
public openMyTeamDetails() {
this.alternateNavigate(CommonService.myTeamDetailUrl,"teamDetail-open",true);
this.alternateNavigate(CommonService.myTeamDetailUrl,'teamDetail-open',true);
// this.nav.navigateForward(["/my-team/details"]);
}
public openAbsencePage() {
this.nav.navigateForward(["/absence/home"]);
this.nav.navigateForward(['/absence/home']);
}
public openSubmitAbsencePage() {
this.nav.navigateForward(["/absence/submit-absence"]);
this.nav.navigateForward(['/absence/submit-absence']);
}
public openConfirmAbsece() {
this.nav.navigateForward(["/absence/confirm-absence"]);
this.nav.navigateForward(['/absence/confirm-absence']);
}
public openWorkListAttachViewPage() {
this.nav.navigateForward(["/notification/work-list-attach-view"]);
this.nav.navigateForward(['/notification/work-list-attach-view']);
}
public openviewAbsenceAttachment() {
this.nav.navigateForward(["/absence/view-attachements"]);
this.nav.navigateForward(['/absence/view-attachements']);
}
public openNotificationPage() {
this.nav.navigateForward(["/notification/homepage"]);
this.nav.navigateForward(['/notification/homepage']);
}
public openWorklistMainPage() {
this.nav.navigateForward(["/notification/worklist-main"]);
this.nav.navigateForward(['/notification/worklist-main']);
}
public openWorklistMainPRPage() {
this.nav.navigateForward(["/notification/worklist-main-PR"]);
this.nav.navigateForward(['/notification/worklist-main-PR']);
}
public openWorklistMainPOPage() {
this.nav.navigateForward(["/notification/worklist-main-PO"]);
this.nav.navigateForward(['/notification/worklist-main-PO']);
}
public openWorklistReplacementRollPage() {
this.nav.navigateForward(["/notification/work-list-replacement-roll"]);
this.nav.navigateForward(['/notification/work-list-replacement-roll']);
}
public openNotificationDetailsPage() {
this.nav.navigateForward(["/notification/work-list-details"]);
this.nav.navigateForward(['/notification/work-list-details']);
}
public openWorklistHistoryPage() {
this.nav.navigateForward(["/notification/work-list-action-history"]);
this.nav.navigateForward(['/notification/work-list-action-history']);
}
public openWorklistAttachPage() {
this.nav.navigateForward(["/notification/work-list-attach"]);
this.nav.navigateForward(['/notification/work-list-attach']);
}
public openWorklistRFCPage() {
this.nav.navigateForward(["/notification/work-list-rfc"]);
this.nav.navigateForward(['/notification/work-list-rfc']);
}
public openWorklistRollReplacement() {
this.nav.navigateForward(["/notification/work-list-replacement-roll"]);
this.nav.navigateForward(['/notification/work-list-replacement-roll']);
}
public openItemHistoryPage() {
this.nav.navigateForward(["/notification/item-history-PO"]);
this.nav.navigateForward(['/notification/item-history-PO']);
}
public openQutationAnalysisPage() {
this.nav.navigateForward(["/notification/qutation-analysis-PO"]);
this.nav.navigateForward(['/notification/qutation-analysis-PO']);
}
public openWorklistMainMRPage() {
this.nav.navigateForward(["/notification/worklist-main-MR"]);
this.nav.navigateForward(['/notification/worklist-main-MR']);
}
public openMySpecialistPage() {
this.nav.navigateForward(["/my-specialist/home"]);
this.nav.navigateForward(['/my-specialist/home']);
}
public openMySubordinatePage() {
this.nav.navigateForward(["/my-subordinate/home"]);
this.nav.navigateForward(['/my-subordinate/home']);
}
public openChangeImagePage() {
this.nav.navigateForward(["/profile/profileImg"]);
this.nav.navigateForward(['/profile/profileImg']);
}
public openPayslipPage() {
this.nav.navigateForward(["/payslip/home"]);
this.nav.navigateForward(['/payslip/home']);
}
public openEarningsPage() {
this.nav.navigateForward(["/payslip/Earnings"]);
this.nav.navigateForward(['/payslip/Earnings']);
}
public openDeductionsPage() {
this.nav.navigateForward(["/payslip/Deductions"]);
this.nav.navigateForward(['/payslip/Deductions']);
}
public openConfirmLoginPage() {
this.nav.navigateForward(["/authentication/confirmLogin"]);
this.nav.navigateForward(['/authentication/confirmLogin']);
}
public openEditprofile() {
this.nav.navigateForward(["/profile/editProfile"]);
@ -1199,7 +1207,7 @@ public getMonthNameAr(value: number): string {
public reload(url: string, from: string) {
console.log("force reload called from:" + from);
console.log('force reload called from:' + from);
// window.location.reload();
location.href = url;
}
@ -1223,11 +1231,11 @@ public getMonthNameAr(value: number): string {
private alternateNavigate(paths: string[], key: string, root = false) {
let url: string;
if (localStorage.getItem(key) === "yes") {
localStorage.setItem(key, "no");
if (localStorage.getItem(key) === 'yes') {
localStorage.setItem(key, 'no');
url = paths[0];
} else {
localStorage.setItem(key, "yes");
localStorage.setItem(key, 'yes');
url = paths[1];
}
if (root) {
@ -1238,14 +1246,14 @@ public getMonthNameAr(value: number): string {
}
public openLogin() {
this.nav.navigateRoot(["/authentication/login"]);
this.nav.navigateRoot(['/authentication/login']);
}
public openUserForgot() {
this.nav.navigateForward(["/authentication/checkuser"]);
this.nav.navigateForward(['/authentication/checkuser']);
}
public openSMSPage() {
this.nav.navigateForward(["/authentication/smspage"]);
this.nav.navigateForward(['/authentication/smspage']);
}
public navigateTo(url: string) {
@ -1281,11 +1289,11 @@ public getMonthNameAr(value: number): string {
if (state == this.diagnostic.bluetoothState.POWERED_ON) {
feedback();
} else {
this.presentAlert(this.ts.trPK("bluetooth", "start"));
this.presentAlert(this.ts.trPK('bluetooth', 'start'));
}
})
.catch(e => {
this.presentAlert(this.ts.trPK("bluetooth", "start"));
this.presentAlert(this.ts.trPK('bluetooth', 'start'));
});
});
}
@ -1315,7 +1323,7 @@ public getMonthNameAr(value: number): string {
}
for (i = 0; i < list.length; i += 1) {
node = list[i];
if (node.PARENT_MENU_NAME !== "") {
if (node.PARENT_MENU_NAME !== '') {
// if you have dangling branches check that map[node.parentId] exists
list[map[node.PARENT_MENU_NAME]].children.push(node);
} else {
@ -1327,8 +1335,8 @@ public getMonthNameAr(value: number): string {
public reverseFormatDate(date) {
let FormatedDate;
if (date) {
FormatedDate = date.replace(/\//g, "-");
FormatedDate = FormatedDate.replace(/ 00:00:00/g, "");
FormatedDate = date.replace(/\//g, '-');
FormatedDate = FormatedDate.replace(/ 00:00:00/g, '');
} else {
FormatedDate = date;
}
@ -1337,7 +1345,7 @@ public getMonthNameAr(value: number): string {
public formatStandardDate(date) {
let FormatedDate;
if (date) {
FormatedDate = date.replace(/-/g, "/");
FormatedDate = date.replace(/-/g, '/');
} else {
FormatedDate = date;
}
@ -1346,7 +1354,7 @@ public getMonthNameAr(value: number): string {
public reverseFormatStandardDate(date) {
let FormatedDate;
if (date) {
FormatedDate = date.replace(/\//g, "-");
FormatedDate = date.replace(/\//g, '-');
} else {
FormatedDate = date;
}
@ -1358,8 +1366,8 @@ public getMonthNameAr(value: number): string {
if (date) {
date = date.slice(0, 10);
FormatedDate = date.replace(/-/g, "/");
FormatedDate = FormatedDate + " 00:00:00";
FormatedDate = date.replace(/-/g, '/');
FormatedDate = FormatedDate + ' 00:00:00';
} else {
FormatedDate = date;
}
@ -1371,8 +1379,8 @@ public getMonthNameAr(value: number): string {
console.log(date);
if (date) {
// FormatedDate = date.replace(/-/g, "/");
FormatedDate = date.split("T")[0];
FormatedDate = FormatedDate + " 00:00:00";
FormatedDate = date.split('T')[0];
FormatedDate = FormatedDate + ' 00:00:00';
console.log(FormatedDate);
} else {
FormatedDate = date;
@ -1381,12 +1389,12 @@ public getMonthNameAr(value: number): string {
}
public setUpdateImage (image){
console.log("setUpdateImage");
console.log('setUpdateImage');
this.setUpdateImg=image;
this.updateImage=true;
}
public getUpdateImage(){
console.log("getUpdateImage");
console.log('getUpdateImage');
const objImg={
img: this.setUpdateImg,
status: this.updateImage

@ -0,0 +1,5 @@
<div class="main-container" [ngStyle]="active === true ? {'background': color} : {}">
<div class="main-container-radius" [ngStyle]="active === true ? {'background-color': '#ffffff'} : {'background-color': color}"></div>
<span class="number-span" [ngStyle]="active === true ? {'color': '#ffffff'} : {}">{{value}}</span>
<span class="text-span" [ngStyle]="active === true ? {'color': '#ffffff'} : {}">{{text}}</span>
</div>

@ -0,0 +1,32 @@
.main-container{
width: 72px;
background-color: white;
padding: 10px;
border-radius: 20px;
height: 70px;
text-align: right;
font-family: WorkSans-Regular;
padding-top: 25px;
box-shadow: 0 0 6px rgba(0,0,0,0.16);
position: relative;
}
.main-container-radius{
// content: "";
position: absolute;
width: 30px;
height: 6px;
border-radius: 10px;
background-color: red;
left: 10px;
top: 10px;
}
.number-span{
font-size: 19px;
display: block;
line-height: 18px;
}
.text-span{
font-size: 14px;
color: #888;
}

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CardFilterComponent } from './card-filter.component';
describe('CardFilterComponent', () => {
let component: CardFilterComponent;
let fixture: ComponentFixture<CardFilterComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CardFilterComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CardFilterComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,18 @@
import { Component, OnInit, Input } from '@angular/core';
@Component({
selector: 'app-card-filter',
templateUrl: './card-filter.component.html',
styleUrls: ['./card-filter.component.scss'],
})
export class CardFilterComponent implements OnInit {
@Input() value: number;
@Input() text: string;
@Input() active: boolean;
@Input() color: string;
constructor() { }
ngOnInit() {}
}

@ -16,7 +16,8 @@
<app-stats-button
[title]="button.title"
[statsValue]="button.statsValue"
[icon]="button.icon">
[icon]="button.icon"
(click)="openStatsButton(button.link)">
</app-stats-button>
</ion-slide>
</ion-slides>

@ -39,10 +39,6 @@ ion-label{
position: relative;
width: 100%;
}
.header-md:after {
height: 0px !important;
display: none !important;
}
.contentBg:before {
position: absolute;
content: "";

@ -57,27 +57,32 @@ export class HomePage implements OnInit {
{
title: 'Work List',
statsValue: 0,
icon: 'assets/icon/new-design/work_list.png'
icon: 'assets/icon/new-design/work_list.png',
link: '/notification/homepage'
},
{
title: 'Pending Request',
statsValue: 13,
icon: 'assets/icon/new-design/pending_request.png'
icon: 'assets/icon/new-design/pending_request.png',
link: ''
},
{
title: 'Missing Swipes',
statsValue: 0,
icon: 'assets/icon/new-design/missing_swipe.png'
icon: 'assets/icon/new-design/missing_swipe.png',
link: ''
},
{
title: 'Leave Balance',
statsValue: 0,
icon: 'assets/icon/new-design/leave_balance.png'
icon: 'assets/icon/new-design/leave_balance.png',
link: ''
},
{
title: 'Ticket Balance',
statsValue: 0,
icon: 'assets/icon/new-design/ticket_balance.png'
icon: 'assets/icon/new-design/ticket_balance.png',
link: ''
}
];
@ -147,7 +152,7 @@ export class HomePage implements OnInit {
}
ngOnInit() {
this.getUserDetails();
// this.getUserDetails();
// this.getCount();
// this.events.subscribe('getNotCount', badge => {
@ -155,6 +160,13 @@ export class HomePage implements OnInit {
// });
}
ionViewWillEnter() {
this.remainingTime = 0;
this.displayTime = '00:00:00';
this.runTimer = false;
this.getUserDetails();
}
initTimer() {
this.runTimer = false;
this.hasStarted = false;
@ -250,7 +262,7 @@ export class HomePage implements OnInit {
// });
// }
ionViewDidLoad() {
ionViewDidEnter() {
this.geolocation
.getCurrentPosition()
.then(resp => {
@ -443,9 +455,10 @@ export class HomePage implements OnInit {
if (this.common.validResponse(result)) {
this.common.presentAlert(this.ts.trPK('home', 'swipeAlertSuccess'));
this.showAttendanceTracking();
} else {
this.common.presentAlert(this.ts.trPK('home', 'swipeAlertFailed'));
}
// else {
// this.common.presentAlert(this.ts.trPK('home', 'swipeAlertFailed'));
// }
});
}
@ -489,9 +502,6 @@ export class HomePage implements OnInit {
this.scheduledTime = this.convertInSeconds(data.P_SCHEDULED_HOURS.split(':'));
this.isCheckedIn = this.remainingTime === this.scheduledTime ? false : true;
this.initTimer();
console.log('remainingTime: ' + this.remainingTime);
console.log('scheduledTime: ' + this.scheduledTime);
console.log('isCheckedIn: ' + this.isCheckedIn);
}
showAttendanceTracking() {
@ -516,6 +526,7 @@ export class HomePage implements OnInit {
if (this.common.validResponse(result)) {
const key = 'P_OPEN_NTF_NUMBER';
this.statsButtons[0].statsValue = result[key];
this.common.sharedService.setSharedData(result, 'worklistNotifications');
}
});
}
@ -596,6 +607,11 @@ export class HomePage implements OnInit {
this.common.openEditProfile();
}
openStatsButton(link: string) {
console.log(link);
this.common.openPage(link);
}
}

@ -1,227 +1,71 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-title color="light"> {{ts.trPK('home','worklist')}}</ion-title>
<ion-buttons slot="start">
<nav-buttons backLink="/home"></nav-buttons>
</ion-buttons>
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<nav-buttons backLink="/home"></nav-buttons>
</ion-buttons>
<ion-title>WORK LIST</ion-title>
<!-- <div class="profile-image-container" (click)="openProfilePage()">
<img [src]="userImage"/>
</div> -->
</ion-toolbar>
</ion-header>
<ion-content [ngClass]=" direction == 'ltr' ? 'left' : 'right'">
<!-- first select type view -->
<!-- <ion-item>
<ion-label>{{ts.trPK('worklist','view')}}</ion-label>
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}" [(ngModel)]="notificationType"
(ionChange)=onChangeView($event)>
<ion-select-option value="1" selected="true">{{ts.trPK('worklist','openNot')}}</ion-select-option>
<ion-select-option value="2">{{ts.trPK('worklist','fyi')}}</ion-select-option>
<ion-select-option value="3">{{ts.trPK('worklist','toDo')}}</ion-select-option>
<ion-select-option value="4">{{ts.trPK('worklist','all')}}</ion-select-option>
<ion-select-option value="5">{{ts.trPK('worklist','meNot')}} </ion-select-option>
</ion-select>
</ion-item>
<ion-item>
<ion-label>{{ts.trPK('worklist','searchby')}}</ion-label>
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}" [(ngModel)]="searchBy"
(ionChange)="getValueSelected($event)">
<ion-select-option value="1">{{ts.trPK('worklist','from')}}</ion-select-option>
<ion-select-option value="2">{{ts.trPK('worklist','subject')}}</ion-select-option>
<ion-select-option value="3">{{ts.trPK('worklist','sent')}}</ion-select-option>
<ion-select-option value="4">{{ts.trPK('worklist','itemType')}}</ion-select-option>
<ion-select-option value="5">{{ts.trPK('worklist','none')}}</ion-select-option>
</ion-select>
</ion-item> -->
<ion-grid>
<ion-row>
<ion-col size='3' class="ion-no-padding , menuListCol">
<ion-list class="menuList">
<ion-item class="menuListItem" lines="none">
<ion-button class="menuListBtn" (click)="AllNotification()">
<img *ngIf="!isAll" src="../assets/imgs/menuTabs/All1.png" />
<img *ngIf="isAll" src="../assets/imgs/menuTabs/All2.png" />
</ion-button>
</ion-item>
<ion-item class="menuListItem" lines="none">
<!-- <ion-item lines="none" class="activeTabMenu"*ngIf="isPR"></ion-item> -->
<!-- <ion-button class="menuListBtn" (click)="PRNotification()"><p style="color: black;">PR</p></ion-button> -->
<ion-button ion-button class="menuListBtn" (click)="PRNotification()">
<img *ngIf="!isPR" src="../assets/imgs/menuTabs/PR1.png" />
<img *ngIf="isPR" src="../assets/imgs/menuTabs/PR2.png" />
</ion-button>
</ion-item>
<ion-item class="menuListItem" lines="none">
<ion-button class="menuListBtn" (click)="PONotification()">
<img *ngIf="!isPO" src="../assets/imgs/menuTabs/PO1.png" />
<img *ngIf="isPO" src="../assets/imgs/menuTabs/PO2.png" />
</ion-button>
</ion-item>
<ion-item class="menuListItem" lines="none">
<ion-button class="menuListBtn" (click)="MRNotification()">
<img *ngIf="!isMR" src="../assets/imgs/menuTabs/MR1.png" />
<img *ngIf="isMR" src="../assets/imgs/menuTabs/MR2.png" />
</ion-button>
</ion-item>
<ion-item class="menuListItem" lines="none">
<ion-button class="menuListBtn" (click)="HRNotification()">
<img *ngIf="!isHR" src="../assets/imgs/menuTabs/HR1.png" />
<img *ngIf="isHR" src="../assets/imgs/menuTabs/HR2.png" />
</ion-button>
</ion-item>
<ion-item class="menuListItem" lines="none">
<ion-button class="menuListBtn" (click)="ITGNotification()">
<img *ngIf="!isITG" src="../assets/imgs/menuTabs/ITG1.png" />
<img *ngIf="isITG" src="../assets/imgs/menuTabs/ITG2.png" />
</ion-button>
</ion-item>
</ion-list>
</ion-col>
<ion-col size='9' class="notifincationList">
<ion-list class="notification-list" *ngIf="!noData">
<div class="timelineMain">
<ion-item class="itemListNotification" *ngFor="let notificationList of filteredNotificationList"
lines='none'>
<div class="item-date"> {{notificationList.BEGIN_DATE | dateString }} </div>
<div class="timelineMain-item" slot="start">
<!-- <div class="item-date"> {{notificationList.BEGIN_DATE }} </div> -->
<div class="timelineMain-thumb bg-color-dot timelineMain-icon">
</div>
</div>
<ion-label (click)="openNotificationDetail(notificationList)"> {{notificationList.SUBJECT}}
</ion-label>
</ion-item>
</div>
</ion-list>
<ion-list class="emptyItem" *ngIf="noData">
<ion-item class="itemListNotification" lines='none'>
<ion-label> There is no Notification
</ion-label>
</ion-item>
</ion-list>
<!-- <ion-list class="notification-list " *ngIf="isPR">
<div class="timeline">
<p>PR</p>
</div>
</ion-list>
<ion-list class="notification-list " *ngIf="isPO">
<div class="timeline">
<p>PO</p>
</div>
</ion-list>
<ion-list class="notification-list " *ngIf="isMR">
<div class="timeline">
<p>MR</p>
</div>
</ion-list>
<ion-list class="notification-list " *ngIf="isHR">
<div class="timeline">
<p>HR</p>
</div>
</ion-list>
<ion-list class="notification-list " *ngIf="isITG">
<div class="timeline">
<p>ITG</p>
</div>
</ion-list> -->
</ion-col>
<ion-content>
<div class="contentBg">
<div class="result-graph">
<div class="request-heading">
<span>Open Request Analysis</span>
</div>
<div class="result-text-container">
<h2>{{totalRequestCount}}</h2>
<span>TOTAL <br> OPEN REQUEST</span>
</div>
<p-chart class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart>
</div>
<ion-row class="filters-row">
<ion-slides [options]="slideOptsOne">
<ion-slide *ngFor="let filter of filters; let i=index" [ngClass]="filter.disable === true ? 'disable-filter' : ''">
<app-card-filter
[value]="filter.value"
[text]="filter.name"
[color]="filter.color"
[active]="filter.active"
(click)="activeFilter(i)"
></app-card-filter>
</ion-slide>
</ion-slides>
</ion-row>
<ion-row class="search-container">
<ion-col style="float: left;" size=[6] *ngIf="showSearchButton" (click)="clearSearch()">
<span style="margin-left: 5px;">Clear Search</span>
<ion-icon name="close" ></ion-icon>
</ion-col>
<ion-col style="float: right;" size=[6] (click)="openSearchModal()" *ngIf="selectedFilter === 'ALL'">
<ion-icon name="search" ></ion-icon>
<span>Advanced Search</span>
</ion-col>
</ion-row>
</ion-grid>
<!-- *ngIf="rowsNo <= noOfrows" -->
<div [ngClass]="isEmptyObject() ? 'work-list-container' : ''">
<div *ngFor="let data of showFormattedData | keyvalue; let i = index">
<span class="date-span">{{data.key}}</span>
<div class="date-data" *ngFor="let workList of data.value; let j = index">
<p>{{workList.SUBJECT}}</p>
</div>
</div>
</div>
<div class="no-data-available" *ngIf="!isEmptyObject()">
<span>No Data Available</span>
</div>
</div>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll *ngIf="selectedFilter === 'ALL'" (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
</ion-content>
<ion-footer class="footerSearchBtn" *ngIf="!isSearch">
<ion-button color="customnavy" expand="full" fill="outline" (click)="searchBtn()">{{ts.trPK('worklist','search')}}
</ion-button>
</ion-footer>
<ion-footer class="footerSearchBtn" *ngIf="isSearch">
<ion-grid>
<ion-row>
<!-- <ion-col size='3'> </ion-col> -->
<ion-col>
<div class="viewAndSearch">
<ion-item lines="none">
<ion-label>{{ts.trPK('worklist','view')}}</ion-label>
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}"
[(ngModel)]="notificationType" (ionChange)=onChangeView($event)>
<ion-select-option value="1" selected="true">{{ts.trPK('worklist','openNot')}}</ion-select-option>
<ion-select-option value="2">{{ts.trPK('worklist','fyi')}}</ion-select-option>
<ion-select-option value="3">{{ts.trPK('worklist','toDo')}}</ion-select-option>
<ion-select-option value="4">{{ts.trPK('worklist','all')}}</ion-select-option>
<ion-select-option value="5">{{ts.trPK('worklist','meNot')}} </ion-select-option>
</ion-select>
</ion-item>
</div>
<div class="viewAndSearch">
<ion-item>
<ion-label>{{ts.trPK('worklist','searchby')}}</ion-label>
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}"
[(ngModel)]="searchBy" (ionChange)="getValueSelected($event)">
<ion-select-option value="1">{{ts.trPK('worklist','from')}}</ion-select-option>
<ion-select-option value="2">{{ts.trPK('worklist','subject')}}</ion-select-option>
<ion-select-option value="3">{{ts.trPK('worklist','sent')}}</ion-select-option>
<ion-select-option value="4">{{ts.trPK('worklist','itemType')}}</ion-select-option>
<ion-select-option value="5">{{ts.trPK('worklist','none')}}</ion-select-option>
</ion-select>
</ion-item>
<div>
<div *ngIf="HideDateInput==true">
<ion-item lines='none'>
<ion-label>{{ts.trPK('worklist','sent')}} </ion-label>
<ion-datetime placeholder="{{ts.trPK('worklist','enter')}}" displayFormat="DD-MMM-YYYY"
pickerFormat="DD-MMM-YYYY" [(ngModel)]="InputDate"></ion-datetime>
</ion-item>
</div>
<div *ngIf="HideTextInput==true">
<ion-item>
<ion-input placeholder="{{ts.trPK('worklist','enter')}}" [(ngModel)]="inputSearch">
</ion-input>
</ion-item>
</div>
</div>
<div>
<ion-button class="toSearchBtn" color="customnavy" expand="full" fill="outline"
(click)="getAllPushNotificationFun()">
{{ts.trPK('worklist','search')}}</ion-button>
<ion-button class="toSearchBtn" color="customnavy" expand="full" fill="outline" (click)="searchBtn()">
{{ts.trPK('general','close')}}</ion-button>
</div>
<ion-button color="customnavy" (click)="Details()">Call details ITG</ion-button>
<ion-button color="customnavy" (click)="Count()">Call count ITG</ion-button>
<!--
<ion-button color="customnavy" (click)="getAllPushNotificationFun()">{{ts.trPK('worklist','search')}}</ion-button> -->
</div>
</ion-col>
</ion-row>
</ion-grid>
</ion-footer>

@ -216,4 +216,177 @@ ion-input ,ion-datetime{
.emptyItem{
white-space: normal;
padding-left: 10%;
}
}
///////////////////////////////////////////NEW DESIGN/////////////////////////////////////
.profile-image-container{
position: relative;
z-index: 999;
img {
width: 32px;
float: right;
border-radius: 20px;
height: 32px;
margin-right: 10px;
}
}
ion-title{
color: white;
position: absolute;
top: 0;
text-align: center;
left: 15%;
right: 15%;
font-size: 0.42cm;
font-weight: bold;
height: 100%;
}
.contentBg:before {
position: absolute;
content: "";
background: #22c6b3;
height: 140px;
width: 100%;
left: 0;
top: 0px;
z-index: 1;
}
ion-content {
--ion-background-color: whitesmoke;
}
.request-heading {
span {
text-align: center;
display: block;
padding-top: 8px;
font-family: workSans-Regular;
}
}
.result-graph {
position: relative;
background: white;
margin-right: 20px;
margin-left: 20px;
margin-top: 20px;
padding-bottom: 20px;
border-radius: 20px;
z-index: 1;
}
.result-text-container {
padding: 0;
margin: 0;
position: absolute;
left: 50%;
top: 50%;
display: block;
text-align: center;
transform: translate(-50%, -50%);
h2 {
font-size: 38px;
font-family: WorkSans-Bold;
margin: 0 auto;
line-height: 36px;
}
span {
width: 125px;
display: block;
margin: 0 auto;
font-size: 12px;
font-family: workSans-Regular;
}
}
.today-graph {
width: 100%;
max-height: 4cm;
}
.swiper-container {
margin: 0 !important;
width: 100% !important;
}
.filters-row {
margin-top: 10px;
margin-left: 20px;
}
.work-list-container {
position: relative;
padding-left: 60px;
clear: both;
min-height: 200px;
margin-bottom: 80px;
padding-top: 15px;
}
.work-list-container:before{
content: "";
position: absolute;
height: 100%;
width: 4px;
left: 30px;
top: 15px;
background-color: #dddddd;
}
.search-container{
margin-top: 15px;
display: block;
padding: 0 20px;
ion-col{
background: white;
border-radius: 12px;
padding-right: 10px;
flex: none;
ion-icon{
margin-right: 3px;
font-size: 14px;
margin-left: 3px;
vertical-align: middle;
}
span{
font-size: 12px;
vertical-align: middle;
}
}
}
.date-span {
position: relative;
display: block;
margin-bottom: 10px;
}
.date-span:before{
content: "";
position: absolute;
left: -35px;
border-radius: 50%;
width: 15px;
height: 15px;
background-color: #38c9b3;
top: 1px;
}
.date-data{
background-color: white;
padding: 1px;
border-radius: 20px;
font-family: WorkSans-Regular;
padding-left: 15px;
margin-right: 20px;
margin-bottom: 15px;
p{
font-size: 14px;
}
}
.no-data-available {
background: white;
font-family: WorkSans-Regular;
padding: 30px;
position: absolute;
left: 50%;
margin-left: -100px;
margin-top: 100px;
}
.disable-filter {
pointer-events: none;
opacity: .3;
}

@ -1,336 +1,458 @@
import { Component, OnInit, ViewChild } from "@angular/core";
import { CommonService } from "src/app/hmg-common/services/common/common.service";
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { WorkListRequest } from "../models/workListRequest";
import * as moment from "moment";
import { WorKListResponse } from "../models/workListResponse";
import { WorklistService } from "../service/worklist.service";
import { Component, OnInit, ViewChild } from '@angular/core';
import { ModalController } from '@ionic/angular';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { WorkListRequest } from '../models/workListRequest';
import * as moment from 'moment';
import { WorKListResponse } from '../models/workListResponse';
import { WorklistService } from '../service/worklist.service';
import { IonInfiniteScroll } from '@ionic/angular';
import { WorklistMainService } from '../service/work-list.main.service';
import { WorklistAdvancedSearchComponent } from '../worklist-advanced-search/worklist-advanced-search.component';
import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user';
import { DatePipe } from '@angular/common';
@Component({
selector: "app-home",
templateUrl: "./home.component.html",
styleUrls: ["./home.component.scss"]
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss']
})
export class HomeComponent implements OnInit {
// @ViewChild(Navbar) navBar: Navbar;
public static NOTIFICATION_DATA = 'notification_data';
public static NOTIFICATION_ARR = 'notification_arr';
@ViewChild(IonInfiniteScroll) infiniteScroll: IonInfiniteScroll;
private WorkListObj: WorkListRequest;
WorkListResObj: any; //WorKListResponse;
notificationType: string = "1";
pageNum: number = 1;
WorkListResObj: any;
notificationType = '1';
pageNum = 1;
rowsNo: number;
noOfrows: number;
selectedValue: string = "";
FromUserName: string = "";
ItemKeyDisplayName: string = "";
SentDate: string = "";
Subject: string = "";
inputSearch: string = "";
HideDateInput: boolean = false;
HideTextInput: boolean = false;
InputDate: string;
selectedValue = '';
FromUserName = '';
ItemKeyDisplayName = '';
SentDate = '';
Subject = '';
inputSearch = '';
inputDate: string;
filteredNotificationList: any;
IsReachEnd: boolean = false;
public noData: boolean = false;
public isAll: boolean = true;
public isPR: boolean = false;
public isPO: boolean = false;
public isMR: boolean = false;
public isHR: boolean = false;
public isITG: boolean = false;
public isSearch: boolean = false;
IsReachEnd = false;
public noData = false;
public isAll = true;
public isPR = false;
public isPO = false;
public isMR = false;
public isHR = false;
public isITG = false;
public isSearch = false;
public direction = 'ltr';
public currentActiveIndex = 0;
public previousActiveIndex = 0;
public worklistNotifications: any;
public totalRequestCount = 0;
public newWorkListResponse = [];
public allFormattedData = {};
public showFormattedData = {};
public selectedFilter = 'ALL';
public showSearchButton = false;
public itemType = '';
public options = {
cutoutPercentage: 80,
tooltips: { enabled: false },
legend: { display: false }
};
public data = {
datasets: [
{
data: [0, 0, 0, 0, 0],
backgroundColor: [
'#18a169',
'#38c9b3',
'#114475',
'#3cb9d5',
'#cc3232'
],
borderWidth: 5
}]
};
public filters = [
{
value: 0,
name: 'All',
active: true,
color: '#124375',
key: 'ALL',
disable: false
},
{
value: 0,
name: 'HR',
active: false,
color: '#18a169',
key: 'HRSSA',
disable: false
},
{
value: 0,
name: 'PO',
active: false,
color: '#38c9b3',
key: 'POAPPRV',
disable: false
},
{
value: 0,
name: 'PR',
active: false,
color: '#114475',
key: 'REQAPPRV',
disable: false
},
{
value: 0,
name: 'MR',
active: false,
color: '#3cb9d5',
key: 'INVMOA',
disable: false
},
{
value: 0,
name: 'ITG',
active: false,
color: '#cc3232',
key: 'ITG',
disable: false
}
];
public slideOptsOne = {
slidesPerView: 4.3,
spaceBetween: 10
};
constructor(
public common: CommonService,
public ts: TranslatorService,
public WorklistService: WorklistService,
public workListService: WorklistMainService,
) {
this.WorkListObj = new WorkListRequest();
this.WorkListObj.P_NOTIFICATION_TYPE = "1";
this.WorkListObj.P_SEARCH_FROM_USER = "";
this.WorkListObj.P_SEARCH_SUBJECT = "";
this.WorkListObj.P_SEARCH_SENT_DATE = "";
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = "";
this.WorkListObj.P_PAGE_NUM = 0;
this.WorkListObj.P_PAGE_LIMIT = 50; //number
public common: CommonService,
public ts: TranslatorService,
public WorklistService: WorklistService,
public workListService: WorklistMainService,
public modalController: ModalController
) {
this.WorkListObj = new WorkListRequest();
this.WorkListObj.P_NOTIFICATION_TYPE = '1';
this.WorkListObj.P_SEARCH_FROM_USER = '';
this.WorkListObj.P_SEARCH_SUBJECT = '';
this.WorkListObj.P_SEARCH_SENT_DATE = '';
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = '';
this.WorkListObj.P_PAGE_NUM = 0;
this.WorkListObj.P_PAGE_LIMIT = 50;
}
ngOnInit() {
this.direction = TranslatorService.getCurrentDirection();
}
ionViewDidLoad() {
// this.navBar.backButtonClick = () => {
// // you can set a full custom history here if you want
// let pages = [
// {
// page: "HomePage"
// }
// ];
// this.navCtrl.setPages(pages);
// };
}
ionViewWillEnter() {
// this.direction = TranslatorService.getCurrentDirection();
this.worklistNotifications = this.common.sharedService.getSharedData('worklistNotifications', false);
this.totalRequestCount = this.worklistNotifications.P_OPEN_NTF_NUMBER;
this.assignDataToFilters();
this.getAllPushNotificationFun();
}
getValueSelected(Value) {
this.selectedValue = Value.detail.value;
if (this.selectedValue == "1") {
this.HideDateInput = false;
this.HideTextInput = true;
} else if (this.selectedValue == "2") {
this.HideDateInput = false;
this.HideTextInput = true;
} else if (this.selectedValue == "3") {
this.HideDateInput = true;
this.HideTextInput = false;
} else if (this.selectedValue == "4") {
this.HideDateInput = false;
this.HideTextInput = true;
} else if (this.selectedValue == "5") {
this.HideDateInput = false;
this.HideTextInput = false;
assignDataToFilters() {
this.filters[0].value = this.worklistNotifications.P_OPEN_NTF_NUMBER;
const openNotificationsArray = this.worklistNotifications.GetOpenNotificationsList;
for (const notification of openNotificationsArray) {
if (notification.ITEM_TYPE === 'HRSSA') {
this.filters[1].value = notification.OPEN_NTF_NUMBER;
this.data.datasets[0].data[0] = notification.OPEN_NTF_NUMBER;
} else if (notification.ITEM_TYPE === 'POAPPRV') {
this.filters[2].value = notification.OPEN_NTF_NUMBER;
this.data.datasets[0].data[1] = notification.OPEN_NTF_NUMBER;
} else if (notification.ITEM_TYPE === 'REQAPPRV') {
this.filters[3].value = notification.OPEN_NTF_NUMBER;
this.data.datasets[0].data[2] = notification.OPEN_NTF_NUMBER;
} else if (notification.ITEM_TYPE === 'INVMOA') {
this.filters[4].value = notification.OPEN_NTF_NUMBER;
this.data.datasets[0].data[3] = notification.OPEN_NTF_NUMBER;
}
}
}
getAllPushNotificationFun() {
this.WorkListObj.P_PAGE_NUM = 1;
this.IsReachEnd = false;
getFilteredData(filter: string) {
if (filter === 'ALL') {
this.showFormattedData = this.allFormattedData;
} else {
let arrayToFilter;
arrayToFilter = this.newWorkListResponse.filter((workList) => {
return workList.ITEM_TYPE === filter;
});
this.showFormattedData = this.categorizeData(arrayToFilter);
}
}
if (this.selectedValue == "1") {
this.WorkListObj.P_SEARCH_FROM_USER = this.inputSearch;
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = "";
this.WorkListObj.P_SEARCH_SENT_DATE = "";
this.WorkListObj.P_SEARCH_SUBJECT = "";
} else if (this.selectedValue == "2") {
this.WorkListObj.P_SEARCH_FROM_USER = "";
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = "";
this.WorkListObj.P_SEARCH_SENT_DATE = "";
this.WorkListObj.P_SEARCH_SUBJECT = this.inputSearch;
} else if (this.selectedValue == "3") {
this.WorkListObj.P_SEARCH_FROM_USER = "";
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = "";
if (this.InputDate)
this.WorkListObj.P_SEARCH_SENT_DATE = moment(this.InputDate).format(
"DD-MMM-YYYY"
);
else this.WorkListObj.P_SEARCH_SENT_DATE = "";
this.WorkListObj.P_SEARCH_SUBJECT = "";
} else if (this.selectedValue == "4") {
this.WorkListObj.P_SEARCH_FROM_USER = "";
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = this.inputSearch;
this.WorkListObj.P_SEARCH_SENT_DATE = "";
this.WorkListObj.P_SEARCH_SUBJECT = "";
} else if (this.selectedValue == "5") {
this.WorkListObj.P_SEARCH_FROM_USER = "";
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = "";
this.WorkListObj.P_SEARCH_SENT_DATE = "";
this.WorkListObj.P_SEARCH_SUBJECT = "";
}
activeFilter(index: number) {
this.showFormattedData = {};
this.previousActiveIndex = this.currentActiveIndex;
this.currentActiveIndex = index;
this.filters[this.previousActiveIndex].active = false;
this.filters[this.currentActiveIndex].active = true;
this.WorklistService.getWorkList(this.WorkListObj).subscribe(
(result: WorKListResponse) => {
this.handleWorkListResult(result);
}
);
} //End getNotifications
this.selectedFilter = this.filters[this.currentActiveIndex].key;
this.getFilteredData(this.selectedFilter);
}
private handleWorkListResult(result) {
if (this.common.validResponse(result)) {
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
if (this.common.hasData(result.GetWorkList)) {
this.WorkListObj.P_PAGE_NUM++;
this.WorkListResObj = result.GetWorkList;
this.filteredNotificationList = this.WorkListResObj;
this.common.sharedService.setSharedData(this.WorkListResObj, HomeComponent.NOTIFICATION_ARR);
let lastItemIndex = this.WorkListResObj.length - 1;
if (result.GetWorkList[lastItemIndex]) {
let lastitem = result.GetWorkList[lastItemIndex];
if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) {
this.IsReachEnd = true;
} else {
this.IsReachEnd = false;
}
// this.navCtrl.push('SmsAuthenticatePage');
}
openProfilePage() {
this.common.openProfile();
}
disableFilters() {
for (const filter of this.filters) {
if (filter.key === this.itemType) {
filter.disable = false;
filter.active = true;
this.selectedFilter = filter.name;
} else if (this.itemType === 'none') {
filter.disable = false;
filter.active = false;
} else {
this.WorkListResObj = [];
filter.disable = true;
filter.active = false;
}
}
if (this.itemType === 'none') {
this.filters[0].active = true;
}
}
openNotificationDetail(obj) {
console.log(obj);
this.common.sharedService.setSharedData(obj, HomeComponent.NOTIFICATION_DATA);
//this.common.openWorklistMainPage();
if(obj.REQUEST_TYPE == "PR"){
this.common.openWorklistMainPRPage();
}
else if(obj.REQUEST_TYPE == "PO"){
this.common.openWorklistMainPOPage();
}
else if(obj.REQUEST_TYPE == "MO"){
this.common.openWorklistMainMRPage();
async openSearchModal() {
const modal = await this.modalController.create({
component: WorklistAdvancedSearchComponent,
cssClass: 'advanced-search-modal',
backdropDismiss: false,
componentProps: {}
});
modal.onDidDismiss().then(result => {
console.log(result.data);
if (result.data) {
if (result.data.notificationType !== '' || result.data.selectedValue !== '' || result.data.itemType !== '') {
this.showSearchButton = true;
this.itemType = result.data.itemType;
this.notificationType = result.data.notificationType;
this.selectedValue = result.data.selectedValue;
this.inputDate = result.data.inputDate;
this.inputSearch = result.data.inputSearch;
this.WorkListObj.P_PAGE_NUM = 1;
this.newWorkListResponse = [];
this.allFormattedData = {};
this.showFormattedData = {};
this.selectedFilter = 'ALL';
this.filters[this.currentActiveIndex].active = false;
this.currentActiveIndex = 0;
this.previousActiveIndex = 0;
this.filters[this.currentActiveIndex].active = true;
this.getAllPushNotificationFun();
if (this.itemType !== '') {
this.disableFilters();
}
}
}
else{
this.common.openWorklistMainPage();
}
//this.navCtrl.push("WorkListMainPage", { passNotificationList: obj });
}
onChangeView(selectedValue: any) {
this.WorkListObj.P_NOTIFICATION_TYPE = selectedValue.detail.value;
});
return await modal.present();
}
doInfinite(infiniteScroll) {
//this.pageNum= this.pageNum + 1;
getAllPushNotificationFun() {
this.WorkListObj.P_PAGE_NUM = 1;
this.IsReachEnd = false;
this.WorkListObj.P_SEARCH_FROM_USER = this.selectedValue === '1' ? this.inputSearch : '';
this.WorkListObj.P_SEARCH_SUBJECT = this.selectedValue === '2' ? this.inputSearch : '';
this.WorkListObj.P_SEARCH_SENT_DATE = (this.inputDate && this.selectedValue === '3')
? moment(this.inputDate).format('DD-MMM-YYYY') : '';
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = this.selectedValue === '4' ? this.inputSearch : '';;
if (this.selectedValue === '5') {
this.WorkListObj.P_SEARCH_FROM_USER = '';
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = '';
this.WorkListObj.P_SEARCH_SENT_DATE = '';
this.WorkListObj.P_SEARCH_SUBJECT = '';
}
if (!this.IsReachEnd) {
this.WorklistService.getWorkList(this.WorkListObj).subscribe(
(result: any) => {
if (this.common.validResponse(result)) {
this.WorkListObj.P_PAGE_NUM++;
if (this.common.hasData(result.GetWorkList)) {
result.GetWorkList.forEach(element => {
if (element.ROW_NUM == element.NO_OF_ROWS) {
this.IsReachEnd = true;
} else {
this.IsReachEnd = false;
}
this.WorkListResObj.push(element);
});
} // if list length >0
else {
this.IsReachEnd = true;
}
} // if response == 1
//this.pageNum++;
this.infiniteScroll.complete();
this.WorklistService.getWorkList(this.WorkListObj).subscribe((result) => {
if (this.common.validResponse(result)) {
this.handleWorkListResult(result.GetWorkList);
}
}
);
} else {
if (this.infiniteScroll) this.infiniteScroll.complete();
}
} //end infiniteScroll
}
Count() {
this.workListService.getITGCount()
.subscribe((result: any) => {
console.log("ENAD ITG COUNT:")
console.log(result);
});
categorizeData(arrayToCategorize: any) {
const datePipe = new DatePipe('en-US');
const formattedData = {};
for (const workList of arrayToCategorize) {
workList.FORMATTED_DATE = datePipe.transform(new Date(workList.BEGIN_DATE), 'MMMM dd, y');
if (!(workList.FORMATTED_DATE in formattedData)) {
formattedData[workList.FORMATTED_DATE] = new Array();
formattedData[workList.FORMATTED_DATE].push(workList);
} else {
formattedData[workList.FORMATTED_DATE].push(workList);
}
}
return formattedData;
}
filterNotificationByRequestType(reqType) {
let filterdType = [];
if (reqType == "All") {
this.filteredNotificationList = this.WorkListResObj;
if (this.filteredNotificationList == [] || this.filteredNotificationList == null || this.filteredNotificationList == "") {
this.noData = true;
return false;
sortArray(arrayToSort: any) {
return arrayToSort.sort((a: any, b: any) =>
new Date(b.BEGIN_DATE).getTime() - new Date(a.BEGIN_DATE).getTime()
);
}
private handleWorkListResult(result: any) {
const lastItemIndex = result.length - 1;
const lastitem = result[lastItemIndex];
if (lastitem) {
if (lastitem.NO_OF_ROWS === lastitem.ROW_NUM) {
this.IsReachEnd = true;
this.infiniteScroll.complete();
} else {
this.noData = false;
return false;
this.IsReachEnd = false;
this.infiniteScroll.complete();
}
}
for (let i = 0; i < this.WorkListResObj.length; i++) {
if(reqType=="HR"){
if ("EIT" == this.WorkListResObj[i].REQUEST_TYPE || "ABSENCE" == this.WorkListResObj[i].REQUEST_TYPE) {
filterdType.push(this.WorkListResObj[i]);
}
}else{
if (reqType == this.WorkListResObj[i].REQUEST_TYPE) {
filterdType.push(this.WorkListResObj[i]);
}
if (this.common.hasData(result)) {
this.WorkListObj.P_PAGE_NUM++;
if (this.newWorkListResponse.length === 0) {
this.newWorkListResponse = result;
} else {
this.newWorkListResponse = this.newWorkListResponse.concat(result);
}
}
this.filteredNotificationList = filterdType;
if (this.filteredNotificationList == [] || this.filteredNotificationList == null || this.filteredNotificationList == "") {
this.noData = true;
return false;
this.newWorkListResponse = this.sortArray(this.newWorkListResponse);
console.log(this.newWorkListResponse);
this.allFormattedData = this.categorizeData(this.newWorkListResponse);
this.showFormattedData = this.allFormattedData;
this.common.sharedService.setSharedData(this.newWorkListResponse, HomeComponent.NOTIFICATION_ARR);
} else {
this.noData = false;
return false;
this.newWorkListResponse = [];
}
}
Details() {
this.workListService.getITGDetails()
.subscribe((result: any) => {
console.log("ENAD ITG Details:")
console.log(result);
});
openNotificationDetail(obj) {
console.log(obj);
this.common.sharedService.setSharedData(obj, HomeComponent.NOTIFICATION_DATA);
// this.common.openWorklistMainPage();
if (obj.REQUEST_TYPE === 'PR') {
this.common.openWorklistMainPRPage();
} else if (obj.REQUEST_TYPE === 'PO') {
this.common.openWorklistMainPOPage();
} else if (obj.REQUEST_TYPE === 'MO') {
this.common.openWorklistMainMRPage();
} else {
this.common.openWorklistMainPage();
}
}
isEmptyObject() {
return (this.showFormattedData && (Object.keys(this.showFormattedData).length > 0));
}
AllNotification() {
this.filterNotificationByRequestType("All");
this.isAll = true;
this.isPR = false;
this.isPO = false;
this.isMR = false;
this.isHR = false;
this.isITG = false;
clearSearch() {
this.itemType = 'none';
this.disableFilters();
this.showSearchButton = false;
this.notificationType = '';
this.selectedValue = '';
this.inputDate = '';
this.inputSearch = '';
this.WorkListObj.P_PAGE_NUM = 1;
this.newWorkListResponse = [];
this.allFormattedData = {};
this.showFormattedData = {};
this.selectedFilter = 'ALL';
this.filters[this.currentActiveIndex].active = false;
this.currentActiveIndex = 0;
this.previousActiveIndex = 0;
this.filters[this.currentActiveIndex].active = true;
this.WorkListObj.P_SEARCH_FROM_USER = '';
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = '';
this.WorkListObj.P_SEARCH_SENT_DATE = '';
this.WorkListObj.P_SEARCH_SUBJECT = '';
this.getAllPushNotificationFun();
}
PRNotification() {
this.filterNotificationByRequestType("PR");
this.isAll = false;
this.isPR = true;
this.isPO = false;
this.isMR = false;
this.isHR = false;
this.isITG = false;
onChangeView(selectedValue: any) {
this.WorkListObj.P_NOTIFICATION_TYPE = selectedValue.detail.value;
}
PONotification() {
this.filterNotificationByRequestType("PO");
this.isAll = false;
this.isPR = false;
this.isPO = true;
this.isMR = false;
this.isHR = false;
this.isITG = false;
doInfinite(infiniteScroll) {
if (!this.IsReachEnd && this.selectedFilter === 'ALL') {
this.WorklistService.getWorkList(this.WorkListObj).subscribe((result) => {
if (this.common.validResponse(result)) {
this.handleWorkListResult(result.GetWorkList);
}
});
} else {
if (this.infiniteScroll && this.selectedFilter === 'ALL') {
this.infiniteScroll.complete();
}
}
}
MRNotification() {
this.filterNotificationByRequestType("MO");
this.isAll = false;
this.isPR = false;
this.isPO = false;
this.isMR = true;
this.isHR = false;
this.isITG = false;
Count() {
this.workListService.getITGCount()
.subscribe((result: any) => {
console.log('ENAD ITG COUNT:');
console.log(result);
});
}
HRNotification() {
this.filterNotificationByRequestType("HR");
this.isAll = false;
this.isPR = false;
this.isPO = false;
this.isMR = false;
this.isHR = true;
this.isITG = false;
// filterNotificationByRequestType(reqType) {
// const filterdType = [];
// if (reqType === 'All') {
// this.filteredNotificationList = this.WorkListResObj;
// if (this.filteredNotificationList === [] || this.filteredNotificationList == null || this.filteredNotificationList === '') {
// this.noData = true;
// return false;
// } else {
// this.noData = false;
// return false;
// }
// }
// for (let i = 0; i < this.WorkListResObj.length; i++) {
// if (reqType === 'HR') {
// if ('EIT' === this.WorkListResObj[i].REQUEST_TYPE || 'ABSENCE' === this.WorkListResObj[i].REQUEST_TYPE) {
// filterdType.push(this.WorkListResObj[i]);
// }
// } else {
// if (reqType === this.WorkListResObj[i].REQUEST_TYPE) {
// filterdType.push(this.WorkListResObj[i]);
// }
// }
// }
// this.filteredNotificationList = filterdType;
// if (this.filteredNotificationList === [] || this.filteredNotificationList == null || this.filteredNotificationList === '') {
// this.noData = true;
// return false;
// } else {
// this.noData = false;
// return false;
// }
// }
Details() {
this.workListService.getITGDetails()
.subscribe((result: any) => {
console.log('ENAD ITG Details:');
console.log(result);
});
}
ITGNotification() {
// this.Details();
this.isAll = false;
this.isPR = false;
this.isPO = false;
this.isMR = false;
this.isHR = false;
this.isITG = true;
// this.Details();
this.isAll = false;
this.isPR = false;
this.isPO = false;
this.isMR = false;
this.isHR = false;
this.isITG = true;
}
searchBtn() {
this.isSearch = !this.isSearch;
this.isSearch = !this.isSearch;
}
}

@ -1,18 +1,12 @@
// import { Request } from './request';
import { Request } from 'src/app/hmg-common/services/models/request';
export class WorkListRequest extends Request{
public static SHARED_DATA = 'login-request';
// Channel: Channel, //channel
// LanguageID: LanguageID,//langlist
// P_USER_NAME:userName,//string
// P_SESSION_ID:sessionID,//number
public P_NOTIFICATION_TYPE: string;//string
public P_SEARCH_FROM_USER:string;//string
public P_SEARCH_SUBJECT:string;//string
public P_SEARCH_SENT_DATE:string;//string
public P_SEARCH_ITEM_TYPE_DSP_NAME:string;//string
public P_PAGE_NUM:number;//number
public P_PAGE_LIMIT:number;//number
public P_NOTIFICATION_TYPE: string;
public P_SEARCH_FROM_USER: string;
public P_SEARCH_SUBJECT: string;
public P_SEARCH_SENT_DATE: string;
public P_SEARCH_ITEM_TYPE_DSP_NAME: string;
public P_PAGE_NUM: number;
public P_PAGE_LIMIT: number;
}

@ -25,6 +25,8 @@ import { WorklistMainPoComponent } from './worklist-main-po/worklist-main-po.com
import { ItemHistoryComponent } from './item-history/item-history.component';
import { QutationAnalysisComponent } from './qutation-analysis/qutation-analysis.component';
import { WorklistMainMRComponent } from './worklist-main-mr/worklist-main-mr.component';
import { WorklistAdvancedSearchComponent } from './worklist-advanced-search/worklist-advanced-search.component';
// import { WorklistMainComponent } from './worklist-main/worklist-main.component';
import {MoreActionModalComponent} from './more-action-modal/more-action-modal.component'
@ -43,8 +45,8 @@ const routes: Routes = [
component: WorkListAttachViewComponent
},
{
path:'worklist-main',
component:WorklistMainComponent
path: 'worklist-main',
component: WorklistMainComponent
},
{
path: 'work-list-replacement-roll',
@ -76,24 +78,24 @@ const routes: Routes = [
},
{
path:'worklist-main-PR',
component:WorklistMainPRComponent
path: 'worklist-main-PR',
component: WorklistMainPRComponent
},
{
path:'apply-action-modal',
component:ApplyActionModalComponent
path: 'apply-action-modal',
component: ApplyActionModalComponent
},
{
path:'worklist-main-PO',
component:WorklistMainPoComponent
path: 'worklist-main-PO',
component: WorklistMainPoComponent
},
{
path:'item-history-PO',
component:ItemHistoryComponent
path: 'item-history-PO',
component: ItemHistoryComponent
},
{
path:'qutation-analysis-PO',
component:QutationAnalysisComponent
path: 'qutation-analysis-PO',
component: QutationAnalysisComponent
},
{
path:'worklist-main-MR',
@ -133,9 +135,13 @@ const routes: Routes = [
WorklistMainPoComponent,
ItemHistoryComponent,
QutationAnalysisComponent,
WorklistMainMRComponent
WorklistMainMRComponent,
WorklistAdvancedSearchComponent
// WorklistMainComponent
],
providers:[WorklistService,WorklistMainService, WorklistAttachService]
entryComponents: [
WorklistAdvancedSearchComponent
],
providers: [WorklistService, WorklistMainService, WorklistAttachService]
})
export class NotificationPageModule {}

@ -0,0 +1,66 @@
<ion-content>
<div class="search-header" (click)="dismissModal()">
<h2>Advanced Search</h2>
<ion-icon slot="icon-only" name="md-close"></ion-icon>
</div>
<div class="search-container">
<ion-item lines="none">
<ion-label>{{ts.trPK('worklist','view')}}</ion-label>
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}"
(ionChange)=onChangeView($event)>
<ion-select-option value="1">{{ts.trPK('worklist','openNot')}}</ion-select-option>
<ion-select-option value="2">{{ts.trPK('worklist','fyi')}}</ion-select-option>
<ion-select-option value="3">{{ts.trPK('worklist','toDo')}}</ion-select-option>
<ion-select-option value="4">{{ts.trPK('worklist','all')}}</ion-select-option>
<ion-select-option value="5">{{ts.trPK('worklist','meNot')}} </ion-select-option>
</ion-select>
</ion-item>
<ion-item lines="none" [ngStyle]="(hideDateInput === true || hideTextInput === true) ? {'margin-bottom': '0px'} : {}">
<ion-label>{{ts.trPK('worklist','searchby')}}</ion-label>
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}"
(ionChange)="getValueSelected($event)">
<ion-select-option value="1">{{ts.trPK('worklist','from')}}</ion-select-option>
<ion-select-option value="2">{{ts.trPK('worklist','subject')}}</ion-select-option>
<ion-select-option value="3">{{ts.trPK('worklist','sent')}}</ion-select-option>
<ion-select-option value="4">{{ts.trPK('worklist','itemType')}}</ion-select-option>
<ion-select-option value="5">{{ts.trPK('worklist','none')}}</ion-select-option>
</ion-select>
</ion-item>
<div>
<div *ngIf="hideDateInput">
<ion-item lines='none' style="border-radius: 10px;margin-right: 10px;margin-left: 10px;margin-top: 5px;">
<ion-label>{{ts.trPK('worklist','sent')}} </ion-label>
<ion-datetime placeholder="{{ts.trPK('worklist','enter')}}" displayFormat="DD-MMM-YYYY"
pickerFormat="DD-MMM-YYYY" [(ngModel)]="inputDate"></ion-datetime>
</ion-item>
</div>
<div *ngIf="hideTextInput">
<ion-item lines='none' style="border-radius: 10px;margin-right: 10px;margin-left: 10px;margin-top: 5px;">
<ion-input placeholder="{{ts.trPK('worklist','enter')}}" [(ngModel)]="inputSearch">
</ion-input>
</ion-item>
</div>
</div>
<ion-item lines="none">
<ion-label>Item Type</ion-label>
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}"
[(ngModel)]="itemType">
<ion-select-option value="HRSSA">HR</ion-select-option>
<ion-select-option value="POAPPRV">PO</ion-select-option>
<ion-select-option value="REQAPPRV">PR</ion-select-option>
<ion-select-option value="INVMOA">MR</ion-select-option>
</ion-select>
</ion-item>
<div class="search-button" (click)="search()">
<span>SEARCH</span>
</div>
</div>
</ion-content>

@ -0,0 +1,40 @@
.search-header{
display: inline-block;
h2 {
display: inline-block;
margin-left: 20px;
font-family: WorkSans-Regular;
font-size: 18px;
margin-top: 12px;
}
ion-icon {
display: inline-block;
font-size: 23px;
position: absolute;
right: 15px;
top: 8px;
}
}
.search-container {
margin-right: 15px;
margin-left: 15px;
padding-bottom: 100px;
margin-top: 5px;
ion-item{
border: 2px solid #eaeaea;
border-radius: 25px;
margin-bottom: 20px;
}
}
.search-button{
background: #3dcab3;
height: 50px;
text-align: center;
font-family: WorkSans-Regular;
border-radius: 22px;
margin-top: 20px;
line-height: 50px;
span{
color: white;
}
}

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { WorklistAdvancedSearchComponent } from './worklist-advanced-search.component';
describe('WorklistAdvancedSearchComponent', () => {
let component: WorklistAdvancedSearchComponent;
let fixture: ComponentFixture<WorklistAdvancedSearchComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ WorklistAdvancedSearchComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(WorklistAdvancedSearchComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,65 @@
import { Component, OnInit } from '@angular/core';
import { ModalController } from '@ionic/angular';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
@Component({
selector: 'app-worklist-advanced-search',
templateUrl: './worklist-advanced-search.component.html',
styleUrls: ['./worklist-advanced-search.component.scss'],
})
export class WorklistAdvancedSearchComponent implements OnInit {
public hideDateInput = false;
public hideTextInput = false;
public inputDate = '';
public inputSearch = '';
public selectedValue = '';
public notificationType = '';
public itemType = '';
constructor(
public modalController: ModalController,
public ts: TranslatorService
) { }
ngOnInit() {}
public dismissModal() {
this.modalController.dismiss();
}
public search() {
console.log(this.itemType);
this.modalController.dismiss({
notificationType: this.notificationType,
selectedValue: this.selectedValue,
inputDate: this.inputDate,
inputSearch: this.inputSearch,
itemType: this.itemType
});
}
onChangeView(selectedValue: any) {
this.notificationType = selectedValue.detail.value;
}
getValueSelected(value) {
this.selectedValue = value.detail.value;
if (this.selectedValue === '1') {
this.hideDateInput = false;
this.hideTextInput = true;
} else if (this.selectedValue === '2') {
this.hideDateInput = false;
this.hideTextInput = true;
} else if (this.selectedValue === '3') {
this.hideDateInput = true;
this.hideTextInput = false;
} else if (this.selectedValue === '4') {
this.hideDateInput = false;
this.hideTextInput = true;
} else if (this.selectedValue === '5') {
this.hideDateInput = false;
this.hideTextInput = false;
}
}
}

@ -2177,24 +2177,24 @@
"ar":"Mark Attendance "
},
"check-in":{
"en": "Check In",
"ar":"Check In"
"en": "CHECK IN",
"ar":"CHECK IN"
},
"check-out":{
"en": "Check Out",
"ar":"Check Out"
"en": "CHECK OUT",
"ar":"CHECK OUT"
},
"regular":{
"en": "Regular",
"ar":"Regular"
"en": "REGULAR",
"ar":"REGULAR"
},
"late-in":{
"en": "Late In",
"ar":"Late In"
"en": "LATE IN",
"ar":"LATE IN"
},
"today-time-left":{
"en": "TODAY TIME LEFT",
"ar":"TODAY TIME LEFT"
"en": "TODAY'S TIME LEFT",
"ar":"TODAY'S TIME LEFT"
},

@ -1057,6 +1057,11 @@ border:0px
// max-width: 40% !important;
// }
.advanced-search-modal {
--height: 9cm !important;
--width: 88% !important;
--border-radius: 0.6cm;
}
.slideFullWidth {
margin-left:-15px;
margin-right:-15px;
@ -1081,6 +1086,13 @@ border:0px
}
.alert-button-inner.sc-ion-alert-md {
justify-content: center !important;
}
.header-md:after {
height: 0px !important;
display: none !important;
}
.header-toolbar-new{
--background: #22c6b3;
}

Loading…
Cancel
Save