-
{{curentDate}}
+
{{curentDate}}
{{ts.trPK('attendance-tracking','today-time-left')}}
@@ -46,32 +59,29 @@
- {{ts.trPK('attendance-tracking','shift-time')}}
-
- {{attendanceTrackingList.P_SHT_NAME}}
+
+ {{ts.trPK('attendance-tracking','shift-time')}}
+ {{attendanceTrackingList.P_SHT_NAME}}
+
-
+
{{ts.trPK('attendance-tracking','check-in')}}
-
08:00
-
+
{{ts.trPK('attendance-tracking','check-out')}}
-
08:00
-
+
{{ts.trPK('attendance-tracking','late-in')}}
-
08:00
-
+
{{ts.trPK('attendance-tracking','regular')}}
-
- {{attendanceTrackingList.P_SCHEDULED_HOURS}}
+ {{attendanceTrackingList.P_SCHEDULED_HOURS | slice:0:-3}}
diff --git a/Mohem/src/app/attendance-tracking/home/home.component.scss b/Mohem/src/app/attendance-tracking/home/home.component.scss
index f09a8a87..f92e8d05 100644
--- a/Mohem/src/app/attendance-tracking/home/home.component.scss
+++ b/Mohem/src/app/attendance-tracking/home/home.component.scss
@@ -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;
}
diff --git a/Mohem/src/app/attendance-tracking/home/home.component.ts b/Mohem/src/app/attendance-tracking/home/home.component.ts
index a872b22a..d2070095 100644
--- a/Mohem/src/app/attendance-tracking/home/home.component.ts
+++ b/Mohem/src/app/attendance-tracking/home/home.component.ts
@@ -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() {
diff --git a/Mohem/src/app/hmg-common/directive/feedback/feedback.directive.spec.ts b/Mohem/src/app/hmg-common/directive/feedback/feedback.directive.spec.ts
deleted file mode 100644
index 7acbd168..00000000
--- a/Mohem/src/app/hmg-common/directive/feedback/feedback.directive.spec.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { FeedbackDirective } from './feedback.directive';
-
-describe('FeedbackDirective', () => {
- it('should create an instance', () => {
- const directive = new FeedbackDirective();
- expect(directive).toBeTruthy();
- });
-});
diff --git a/Mohem/src/app/hmg-common/directive/feedback/feedback.directive.ts b/Mohem/src/app/hmg-common/directive/feedback/feedback.directive.ts
deleted file mode 100644
index 14637341..00000000
--- a/Mohem/src/app/hmg-common/directive/feedback/feedback.directive.ts
+++ /dev/null
@@ -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();
- }
-}
diff --git a/Mohem/src/app/hmg-common/directive/feedback/feedback.service.spec.ts b/Mohem/src/app/hmg-common/directive/feedback/feedback.service.spec.ts
deleted file mode 100644
index dabb73db..00000000
--- a/Mohem/src/app/hmg-common/directive/feedback/feedback.service.spec.ts
+++ /dev/null
@@ -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();
- });
-});
diff --git a/Mohem/src/app/hmg-common/directive/feedback/feedback.service.ts b/Mohem/src/app/hmg-common/directive/feedback/feedback.service.ts
deleted file mode 100644
index a2b446da..00000000
--- a/Mohem/src/app/hmg-common/directive/feedback/feedback.service.ts
+++ /dev/null
@@ -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) {
-}
-}
-}
diff --git a/Mohem/src/app/hmg-common/hmg-common.module.ts b/Mohem/src/app/hmg-common/hmg-common.module.ts
index 85bb9ce8..7c7b1abe 100644
--- a/Mohem/src/app/hmg-common/hmg-common.module.ts
+++ b/Mohem/src/app/hmg-common/hmg-common.module.ts
@@ -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,12 +96,12 @@ 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'
import {DashboredService} from './services/dashbored/dashbored.service';
-import {NgxGaugeModule} from 'ngx-gauge';
+// import {NgxGaugeModule} from 'ngx-gauge';
import { StatsButtonComponent } from './ui/stats-button/stats-button.component';
import { ServicesButtonComponent } from './ui/services-button/services-button.component';
import {ConfirmLoginComponent} from '../authentication/confirm-login/confirm-login.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,
@@ -116,7 +125,7 @@ import { ChartModule } from 'primeng/chart';
PdfViewerModule,
NgCircleProgressModule.forRoot(),
ChartModule,
- NgxGaugeModule
+ // NgxGaugeModule
],
declarations: [
FabButtonComponent,
@@ -135,6 +144,7 @@ import { ChartModule } from 'primeng/chart';
DatePipeTransform,
DateTimePipe,
SafeHtmlPipe,
+ // TurncatePipe,
BackButtonComponent,
IfDatePipe,
DynamicTableComponent,
@@ -168,7 +178,6 @@ import { ChartModule } from 'primeng/chart';
EmptyDataComponent,
DetailButtonComponent,
HeaderButtonComponent,
- //PaymentComponent,
ReplacementListComponent,
FileSelectDirective,
WorkListAttachViewComponent,
@@ -177,7 +186,8 @@ import { ChartModule } from 'primeng/chart';
AccordinCustomComponent,
StatsButtonComponent,
ServicesButtonComponent,
- ConfirmLoginComponent
+ ConfirmLoginComponent,
+ CardFilterComponent
],
exports: [
FabButtonComponent,
@@ -193,6 +203,7 @@ import { ChartModule } from 'primeng/chart';
DividerComponent,
NavButtonsComponent,
DatePipeTransform,
+ // TurncatePipe,
TranslatePipe,
DateTimePipe,
SafeHtmlPipe,
@@ -232,12 +243,13 @@ import { ChartModule } from 'primeng/chart';
FileUploderProfileComponent,
AccordinTabCustomComponent,
AccordinCustomComponent,
- NgxGaugeModule,
+ // NgxGaugeModule,
StatsButtonComponent,
ServicesButtonComponent,
ConfirmLoginComponent,
NgCircleProgressModule,
- ChartModule
+ ChartModule,
+ CardFilterComponent
],
providers: [
AttendScanService,
@@ -255,10 +267,14 @@ import { ChartModule } from 'primeng/chart';
NativeStorage,
ProgressLoadingService,
PushService,
+ // UserLocalNotificationService,
+ // LocalNotifications,
Badge,
LifeCycleService,
HmgBrowserService,
GuidService,
+ // BackgroundGeolocation,
+ // GeofencingService,
Keyboard,
KeyboardService,
Diagnostic,
@@ -273,10 +289,10 @@ import { ChartModule } from 'primeng/chart';
RateService,
Camera,
File,
+ // PaymentService,
MenuService,
OpenNativeSettings,
- BarcodeScanner,
-
+ BarcodeScanner
]
})
export class HmgCommonModule { }
diff --git a/Mohem/src/app/hmg-common/services/common/common.service.ts b/Mohem/src/app/hmg-common/services/common/common.service.ts
index 88fdba44..a2d96030 100644
--- a/Mohem/src/app/hmg-common/services/common/common.service.ts
+++ b/Mohem/src/app/hmg-common/services/common/common.service.ts
@@ -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,13 +476,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: "cancelBtn",
+ cssClass: "checkOutCancelBtn",
handler: () => {
if (onCancel) {
onCancel();
@@ -492,9 +492,9 @@ public getMonthNameAr(value: number): string {
},
{
text: acceptLabel,
- role: "Confirm",
+ role: 'Confirm',
- cssClass: "confirmBtn",
+ cssClass: "checkOutOkBtn",
handler: () => {
@@ -558,7 +558,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 +566,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 +583,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 +616,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 +641,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 +664,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 +687,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 +696,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 +722,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 +767,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 +790,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 +824,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 +838,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 +859,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 +883,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 +911,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 +1031,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 +1048,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 +1062,7 @@ public getMonthNameAr(value: number): string {
}
public isCordova(): boolean {
- return this.platform.is("cordova");
+ return this.platform.is('cordova');
}
public pageRevisited(pageName: string): Observable
{
@@ -1077,118 +1077,125 @@ 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 static myTeamDetailUrl =["/my-team/details","/my-team/details-2"]
+
+ public openPage(link: string) {
+ this.nav.navigateForward([link]);
+ }
+ 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 openWorklistITGPage() {
+ this.nav.navigateForward(['/notification/worklist-main-ITG']);
}
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 +1206,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 +1230,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 +1245,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 +1288,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 +1322,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 +1334,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 +1344,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 +1353,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 +1365,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 +1378,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 +1388,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
diff --git a/Mohem/src/app/hmg-common/services/dashbored/models/GetSubordinatesLeavesRequest.ts b/Mohem/src/app/hmg-common/services/dashbored/models/GetSubordinatesLeavesRequest.ts
index 30a4befd..378cc5e6 100644
--- a/Mohem/src/app/hmg-common/services/dashbored/models/GetSubordinatesLeavesRequest.ts
+++ b/Mohem/src/app/hmg-common/services/dashbored/models/GetSubordinatesLeavesRequest.ts
@@ -4,5 +4,5 @@ export class GetSubordinatesLeavesRequest extends Request{
//public static SHARED_DATA = '';
public P_DATE_FROM :any;
public P_DATE_TO :any;
-
+ public P_SELECTED_EMPLOYEE_NUMBER:any;
}
\ No newline at end of file
diff --git a/Mohem/src/app/hmg-common/ui/accordin-custom/accordin-tab-custom/accordin-tab-custom.component.scss b/Mohem/src/app/hmg-common/ui/accordin-custom/accordin-tab-custom/accordin-tab-custom.component.scss
index 14151600..18ee0a3a 100644
--- a/Mohem/src/app/hmg-common/ui/accordin-custom/accordin-tab-custom/accordin-tab-custom.component.scss
+++ b/Mohem/src/app/hmg-common/ui/accordin-custom/accordin-tab-custom/accordin-tab-custom.component.scss
@@ -49,9 +49,9 @@
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden !important;
- font-size: 0.46cm;
+ font-size: 16px;
width: 78%;
- font-weight: bold;
+ font-weight: bold !important;
}
diff --git a/Mohem/src/app/hmg-common/ui/card-filter/card-filter.component.html b/Mohem/src/app/hmg-common/ui/card-filter/card-filter.component.html
new file mode 100644
index 00000000..fb3f1a49
--- /dev/null
+++ b/Mohem/src/app/hmg-common/ui/card-filter/card-filter.component.html
@@ -0,0 +1,5 @@
+
+
+
{{value}}
+
{{text}}
+
diff --git a/Mohem/src/app/hmg-common/ui/card-filter/card-filter.component.scss b/Mohem/src/app/hmg-common/ui/card-filter/card-filter.component.scss
new file mode 100644
index 00000000..0078e779
--- /dev/null
+++ b/Mohem/src/app/hmg-common/ui/card-filter/card-filter.component.scss
@@ -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;
+}
diff --git a/Mohem/src/app/hmg-common/ui/card-filter/card-filter.component.spec.ts b/Mohem/src/app/hmg-common/ui/card-filter/card-filter.component.spec.ts
new file mode 100644
index 00000000..37e7805b
--- /dev/null
+++ b/Mohem/src/app/hmg-common/ui/card-filter/card-filter.component.spec.ts
@@ -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;
+
+ 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();
+ });
+});
diff --git a/Mohem/src/app/hmg-common/ui/card-filter/card-filter.component.ts b/Mohem/src/app/hmg-common/ui/card-filter/card-filter.component.ts
new file mode 100644
index 00000000..c414bc98
--- /dev/null
+++ b/Mohem/src/app/hmg-common/ui/card-filter/card-filter.component.ts
@@ -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() {}
+
+}
diff --git a/Mohem/src/app/home/home.module.ts b/Mohem/src/app/home/home.module.ts
index 3df41b48..8aea1549 100644
--- a/Mohem/src/app/home/home.module.ts
+++ b/Mohem/src/app/home/home.module.ts
@@ -6,6 +6,7 @@ import { HmgCommonModule } from '../hmg-common/hmg-common.module';
import { IonicModule } from '@ionic/angular';
import { HomePage } from './home.page';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
+import { WorklistMainService } from '../notification/service/work-list.main.service';
const routes: Routes = [
{
@@ -26,7 +27,8 @@ const routes: Routes = [
HomePage
],
providers: [
- BarcodeScanner
+ BarcodeScanner,
+ WorklistMainService
]
})
export class HomePageModule { }
diff --git a/Mohem/src/app/home/home.page.html b/Mohem/src/app/home/home.page.html
index ab687c35..17f22142 100644
--- a/Mohem/src/app/home/home.page.html
+++ b/Mohem/src/app/home/home.page.html
@@ -16,7 +16,8 @@
+ [icon]="button.icon"
+ (click)="openStatsButton(button.link)">
diff --git a/Mohem/src/app/home/home.page.scss b/Mohem/src/app/home/home.page.scss
index 8143cf6e..c803673d 100644
--- a/Mohem/src/app/home/home.page.scss
+++ b/Mohem/src/app/home/home.page.scss
@@ -39,10 +39,6 @@ ion-label{
position: relative;
width: 100%;
}
-.header-md:after {
- height: 0px !important;
- display: none !important;
-}
.contentBg:before {
position: absolute;
content: "";
diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts
index 2056334b..f43eb27d 100644
--- a/Mohem/src/app/home/home.page.ts
+++ b/Mohem/src/app/home/home.page.ts
@@ -33,6 +33,7 @@ import {GetOpenNotificationsResponse} from '../hmg-common/services/dashbored/mod
import {GetSubordinatesAttdStatusResponse} from '../hmg-common/services/dashbored/models/GetSubordinatesAttdStatusResponse'
import {GetSubordinatesLeavesResponse} from '../hmg-common/services/dashbored/models/GetSubordinatesLeavesResponse'
import { AccrualService } from '../accrual-balances/services/accrual.service';
+import { WorklistMainService } from '../notification/service/work-list.main.service';
@Component({
selector: 'app-home',
@@ -57,27 +58,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: ''
}
];
@@ -118,6 +124,7 @@ export class HomePage implements OnInit {
public menuEntries: any;
public percent: any;
accrualBalancesList: any;
+ public countAllNotification: number =0;
constructor(
public ts: TranslatorService,
@@ -139,7 +146,8 @@ export class HomePage implements OnInit {
private file: File,
private permissions: DevicePermissionsService,
public DS: DashboredService,
- public accrualService: AccrualService
+ public accrualService: AccrualService,
+ public workListService: WorklistMainService,
) {
this.events.subscribe('img-change', displayImg => {
this.userImage = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,' + displayImg);
@@ -148,7 +156,7 @@ export class HomePage implements OnInit {
}
ngOnInit() {
- this.getUserDetails();
+ // this.getUserDetails();
// this.getCount();
// this.events.subscribe('getNotCount', badge => {
@@ -156,6 +164,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;
@@ -251,7 +266,7 @@ export class HomePage implements OnInit {
// });
// }
- ionViewDidLoad() {
+ ionViewDidEnter() {
this.geolocation
.getCurrentPosition()
.then(resp => {
@@ -444,9 +459,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'));
+ // }
});
}
@@ -490,9 +506,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,11 +529,20 @@ export class HomePage implements OnInit {
this.DS.getOpenNotifications( () => { console.log('Error '); }).subscribe((result: GetOpenNotificationsResponse) => {
if (this.common.validResponse(result)) {
const key = 'P_OPEN_NTF_NUMBER';
- this.statsButtons[0].statsValue = result[key];
+ this.countAllNotification = result[key];
+ this.ITGCountAllNotification();
+ this.common.sharedService.setSharedData(result, 'worklistNotifications');
}
});
}
+ ITGCountAllNotification(){
+ this.workListService.getITGDetails()
+ .subscribe((result: any) => {
+ this.statsButtons[0].statsValue = this.countAllNotification + result.TotalCount;
+ });
+ }
+
getSubordinatesLeaves() {
const request: GetSubordinatesLeavesRequest = new GetSubordinatesLeavesRequest();
request.P_DATE_FROM = '/Date(1578603600000+0300)/'; // test
@@ -603,6 +625,11 @@ export class HomePage implements OnInit {
this.common.openEditProfile();
}
+ openStatsButton(link: string) {
+ console.log(link);
+ this.common.openPage(link);
+ }
+
}
diff --git a/Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.ts b/Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.ts
index 666e31b9..cc5f068a 100644
--- a/Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.ts
+++ b/Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.ts
@@ -19,9 +19,9 @@ export class ApplyActionModalComponent implements OnInit {
constructor( private ts: TranslatorService,private modalCtrl: ModalController, private cs: CommonService,public worklistMainService: WorklistMainService,
) {
- this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo');
- this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr');
- this.getPassNotification = this.cs.sharedService.getSharedData('ApplyActionModalPage');
+ this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo',false);
+ this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr' ,false);
+ this.getPassNotification = this.cs.sharedService.getSharedData('ApplyActionModalPage',false);
}
diff --git a/Mohem/src/app/notification/home/home.component.html b/Mohem/src/app/notification/home/home.component.html
index 06bc2bfd..3a4e61fb 100644
--- a/Mohem/src/app/notification/home/home.component.html
+++ b/Mohem/src/app/notification/home/home.component.html
@@ -1,227 +1,94 @@
-
-
-
-
-
-
-
+
+
+