ansariakhtar 7 years ago
commit 30f0b949c6

@ -835,21 +835,6 @@
}
}
},
"@ionic-native/barcode-scanner": {
"version": "5.8.0",
"resolved": "https://registry.npmjs.org/@ionic-native/barcode-scanner/-/barcode-scanner-5.8.0.tgz",
"integrity": "sha512-fypCb/8MikdTPaUl+oAtK+abrdgWnsYk3FtN3HPcNU4VB53QtBrx4LFC0l9xXD9rW8S7S0Xr2uHogtzhbh1bdg==",
"requires": {
"@types/cordova": "^0.0.34"
},
"dependencies": {
"@types/cordova": {
"version": "0.0.34",
"resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz",
"integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ="
}
}
},
"@ionic-native/ble": {
"version": "5.8.0",
"resolved": "https://registry.npmjs.org/@ionic-native/ble/-/ble-5.8.0.tgz",
@ -963,21 +948,6 @@
}
}
},
"@ionic-native/health": {
"version": "5.8.0",
"resolved": "https://registry.npmjs.org/@ionic-native/health/-/health-5.8.0.tgz",
"integrity": "sha512-zpBJJYuX3Oe39qhMSXeUb6Zreco5pu5fJBOuhPQy2pexgh6GwdEctNNC37SdHq2MK9afzraj+aiVJlNhDsLDsQ==",
"requires": {
"@types/cordova": "^0.0.34"
},
"dependencies": {
"@types/cordova": {
"version": "0.0.34",
"resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz",
"integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ="
}
}
},
"@ionic-native/in-app-browser": {
"version": "5.8.0",
"resolved": "https://registry.npmjs.org/@ionic-native/in-app-browser/-/in-app-browser-5.8.0.tgz",
@ -1053,21 +1023,6 @@
}
}
},
"@ionic-native/push": {
"version": "5.8.0",
"resolved": "https://registry.npmjs.org/@ionic-native/push/-/push-5.8.0.tgz",
"integrity": "sha512-JLfw8fMzZIskKU3fG7UO4POQTNoIY2IfGKYV8Q+cf45LFg+tLJSlN14y0ZPr3bm7y9DacQtiKQsErpIZLT64yw==",
"requires": {
"@types/cordova": "^0.0.34"
},
"dependencies": {
"@types/cordova": {
"version": "0.0.34",
"resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz",
"integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ="
}
}
},
"@ionic-native/sms": {
"version": "5.8.0",
"resolved": "https://registry.npmjs.org/@ionic-native/sms/-/sms-5.8.0.tgz",
@ -1596,7 +1551,9 @@
"abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
"dev": true,
"optional": true
},
"accepts": {
"version": "1.3.7",
@ -2075,11 +2032,6 @@
"babel-runtime": "^6.22.0"
}
},
"babel-plugin-add-header-comment": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/babel-plugin-add-header-comment/-/babel-plugin-add-header-comment-1.0.3.tgz",
"integrity": "sha1-URxJAQYmQNWkgLSsPt1pRBlYUOw="
},
"babel-runtime": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
@ -3357,23 +3309,6 @@
}
}
},
"cordova-android-support-gradle-release": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/cordova-android-support-gradle-release/-/cordova-android-support-gradle-release-2.1.0.tgz",
"integrity": "sha512-rKqNQ5PCHuZ/qUWYrLz5dKJpdJ/ArkhTCEv4CxbFuny0a0JNg5lwufmZ7qfVIqxoK0Nvs9XsIYKiFSGxaQ8lTg==",
"requires": {
"q": "^1.4.1",
"semver": "5.1.0",
"xml2js": "~0.4.19"
},
"dependencies": {
"semver": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.1.0.tgz",
"integrity": "sha1-hfLPhVBGXE3wAM99hvawVBBqueU="
}
}
},
"cordova-browser": {
"version": "5.0.4",
"resolved": "https://registry.npmjs.org/cordova-browser/-/cordova-browser-5.0.4.tgz",
@ -4408,11 +4343,6 @@
"resolved": "https://registry.npmjs.org/cordova-plugin-globalization/-/cordova-plugin-globalization-1.11.0.tgz",
"integrity": "sha1-6sMVgQAphJOvowvolA5pj2HvvP4="
},
"cordova-plugin-health": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/cordova-plugin-health/-/cordova-plugin-health-1.1.3.tgz",
"integrity": "sha512-hX2C95AetTbeQ5OXOu7xugDQhJVhSe7hnbmN3EJccbRvy5dN/vaWE/MaYhdzZxrOzYSd2V/z6lLJliWVX5bRjA=="
},
"cordova-plugin-inappbrowser": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/cordova-plugin-inappbrowser/-/cordova-plugin-inappbrowser-3.0.0.tgz",
@ -4433,11 +4363,6 @@
"resolved": "https://registry.npmjs.org/cordova-plugin-local-notification/-/cordova-plugin-local-notification-0.9.0-beta.2.tgz",
"integrity": "sha512-63n77K1pt8dnbWnNR8QWETi9Glezi1bvNHvHWmGNIOv0xCb0phZnm+Ku49BQ+omwe8Z5voMvrA4I03SYPpv38w=="
},
"cordova-plugin-mauron85-background-geolocation": {
"version": "3.0.0-alpha.50",
"resolved": "https://registry.npmjs.org/cordova-plugin-mauron85-background-geolocation/-/cordova-plugin-mauron85-background-geolocation-3.0.0-alpha.50.tgz",
"integrity": "sha512-TVdsJ4gPOuFANB3SX/bDLp4igK6o5nPXO95+tv9RpLr5Rwh2XhiozmEpaC0mnMFiuKi6j1xbaZLklhhVBwC14w=="
},
"cordova-plugin-nativestorage": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/cordova-plugin-nativestorage/-/cordova-plugin-nativestorage-2.3.2.tgz",
@ -4486,11 +4411,6 @@
"resolved": "https://registry.npmjs.org/cordova-sqlite-storage-dependencies/-/cordova-sqlite-storage-dependencies-2.0.0.tgz",
"integrity": "sha512-aYD5Cn1TJwgPmpZhQUYq4gOv5t+imzIxGo4SVa/fwEB/pLhiahi+2xK5gLd79YHrz6WdzFBr/126UPXhlSqRWA=="
},
"cordova-support-google-services": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/cordova-support-google-services/-/cordova-support-google-services-1.3.1.tgz",
"integrity": "sha512-YbFWYBSkbErZh/moothPZG/p1p79ytXTc0iR4YHypBXg9TSDp7M7wm5eKk0f6wV4Ugv6a7UgBvAEtq2nllI8UA=="
},
"cordova.plugins.diagnostic": {
"version": "4.0.12",
"resolved": "https://registry.npmjs.org/cordova.plugins.diagnostic/-/cordova.plugins.diagnostic-4.0.12.tgz",
@ -7431,11 +7351,6 @@
}
}
},
"install": {
"version": "0.8.9",
"resolved": "https://registry.npmjs.org/install/-/install-0.8.9.tgz",
"integrity": "sha1-n0tcDRhR74cunfheT3Fi1OXc2+0="
},
"internal-ip": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-3.0.1.tgz",
@ -7449,7 +7364,8 @@
"interpret": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz",
"integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw=="
"integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==",
"dev": true
},
"invariant": {
"version": "2.2.4",
@ -9432,7 +9348,8 @@
"os-homedir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
"dev": true
},
"os-locale": {
"version": "1.4.0",
@ -9447,12 +9364,14 @@
"os-tmpdir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
"dev": true
},
"osenv": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
"integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
"dev": true,
"requires": {
"os-homedir": "^1.0.0",
"os-tmpdir": "^1.0.0"
@ -9771,7 +9690,8 @@
"path-parse": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw=="
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
"dev": true
},
"path-to-regexp": {
"version": "0.1.7",
@ -9812,40 +9732,11 @@
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
"dev": true
},
"phonegap-plugin-barcodescanner": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/phonegap-plugin-barcodescanner/-/phonegap-plugin-barcodescanner-8.1.0.tgz",
"integrity": "sha512-WQCDCoH9EQ9WEn2bce+B95jbNJduilAn2Vtske8KfcYAeGu7bdFqRD7zGCLCQao62VwoEwlX0cUvbQ/am12Jwg==",
"requires": {
"nopt": "^4.0.1",
"shelljs": "^0.8.3"
},
"dependencies": {
"nopt": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
"integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
"requires": {
"abbrev": "1",
"osenv": "^0.1.4"
}
}
}
},
"phonegap-plugin-multidex": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/phonegap-plugin-multidex/-/phonegap-plugin-multidex-1.0.0.tgz",
"integrity": "sha512-1wvc3iQOQpEBaQbXgLxA2JUiLSQ2azdF/bF29ghXDiQJWSpQ1BF8gSuqttM8WZoj081Ps8OKL0gYxdDBkFNPqA=="
},
"phonegap-plugin-push": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/phonegap-plugin-push/-/phonegap-plugin-push-2.2.3.tgz",
"integrity": "sha512-5mjT0G1vfRhXVnZFLwjfzcFwYjVRMibgYDCfYvEujGsP8YwwrIIzcf+xBYAjQV/W2JCjzuNaYd7xJ0yVQaPeig==",
"requires": {
"babel-plugin-add-header-comment": "^1.0.3",
"install": "^0.8.2"
}
},
"pify": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
@ -10223,7 +10114,8 @@
"q": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz",
"integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4="
"integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=",
"dev": true
},
"qjobs": {
"version": "1.2.0",
@ -10418,6 +10310,7 @@
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
"integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
"dev": true,
"requires": {
"resolve": "^1.1.6"
}
@ -10572,6 +10465,7 @@
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz",
"integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==",
"dev": true,
"requires": {
"path-parse": "^1.0.6"
}
@ -11024,6 +10918,7 @@
"version": "0.8.3",
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz",
"integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==",
"dev": true,
"requires": {
"glob": "^7.0.0",
"interpret": "^1.0.0",
@ -13144,6 +13039,7 @@
"version": "0.4.19",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz",
"integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==",
"dev": true,
"requires": {
"sax": ">=0.6.0",
"xmlbuilder": "~9.0.1"
@ -13152,7 +13048,8 @@
"sax": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
"dev": true
}
}
},

@ -82,6 +82,7 @@
"cordova.plugins.diagnostic": "^4.0.12",
"core-js": "^2.5.4",
"date-fns": "^1.30.1",
"moment": "^2.24.0",
"mx.ferreyra.callnumber": "0.0.2",
"phonegap-plugin-multidex": "^1.0.0",
"primeicons": "^1.0.0",
@ -159,4 +160,4 @@
"android"
]
}
}
}

@ -8,7 +8,11 @@ const routes: Routes = [
data: { preload: true, delay: 1000 }
},
{ path: 'home', loadChildren: './home/home.module#HomePageModule' },
{ path: 'sms-page', loadChildren: './authentication/sms-page/sms-page.module#SmsPagePageModule' }
{ path: 'sms-page', loadChildren: './authentication/sms-page/sms-page.module#SmsPagePageModule' },
{ path: 'profile', loadChildren: './profile/profile.module#ProfilePageModule' },
{ path: 'vacation-rule', loadChildren: './vacation-rule/vacation-rule.module#VacationRulePageModule' }
];

@ -28,7 +28,7 @@
</button> -->
</ion-item>
<ion-item>
<ion-item (click)="profile()">
<ion-thumbnail slot="start" class="menu-thumb">
<img width="30" src="../assets/imgs/username.png" item-left >
</ion-thumbnail>
@ -36,7 +36,7 @@
{{ts.trPK('userProfile','title')}}
</ion-label>
</ion-item>
<ion-item>
<ion-item (click)="logout();">
<ion-thumbnail slot="start" class="menu-thumb">

@ -102,10 +102,13 @@ export class AppComponent implements OnInit, AfterViewInit {
});
}
logout() {
// let req:any={};
// this.menuService.disableSession(req).subscribe((result: any) => {
// });
this.cs.sharedService.clearAll();
this.menu.toggle();
this.cs.openLogin();
}
profile() {
this.cs.openProfile();
this.menu.toggle();
}
}

@ -3,4 +3,14 @@
// Put style rules here that you want to apply to the entire application. These
// styles are for the entire app and not just one component. Additionally, this
// file can hold Sass mixins, functions, and placeholder classes to be imported
// and used throughout the application.
// and used throughout the application.
.alert-radio-label.sc-ion-alert-md,
.alert-radio-label.sc-ion-alert-ios {
white-space: normal;
}
.alert-tappable.sc-ion-alert-md,
.alert-tappable.sc-ion-alert-ios {
height: 50px;
}

@ -1,7 +1,2 @@
.header-toolbar{
--background: linear-gradient(45deg, #3ac1f1 0%, #19a163 36%, #19a163 59%, #1a586d 100%);
}
.btnBack{
background: transparent;
}

@ -9,6 +9,9 @@ export class CheckActivationCodeResponse extends Response {
LogInTokenID:string;
EMPLOYEE_MOBILE_NUMBER:string;
TokenID:string;
CompanyImageDescription:string;
CompanyImageURL: string;
MemberInformationList:AuthenticatedUser[];
CompanyImageDescription: string;
CompanyImageURL : string;

@ -10,6 +10,8 @@ export class SMSCheckResponse extends Response {
public P_SESSION_ID: number;
public MobileNumber : string;
public LogInTokenID : string;
public CompanyImageDescription:string;
public CompanyImageURL:string;
public EMPLOYEE_MOBILE_NUMBER:string;
CompanyImageDescription : string;
CompanyImageURL : string;

@ -248,7 +248,7 @@ export class CommonService {
public userNeedToReLogin() {
this.presentConfirmDialog(this.ts.trPK("general", "relogin"), () => {
//this.openUserLogin();
this.openLogin();
});
}
@ -892,6 +892,9 @@ export class CommonService {
public openForgotPassword() {
this.nav.navigateForward(["/authentication/forgot"]);
}
public openProfile() {
this.nav.navigateForward(["/profile/home"]);
}
public reload(url: string, from: string) {
console.log("force reload called from:" + from);

@ -121,7 +121,7 @@ export class ConnectorService {
if (!this.cs.validResponse(result)) {
// not authorized
if (result.ErrorType === 2) {
// this.cs.userNeedToReLogin();
this.cs.userNeedToReLogin();
} else {
this.cs.showErrorMessageDialog(onError, errorLabel, result.ErrorEndUserMessage);
}

@ -14,7 +14,7 @@ export class TranslatorService {
public static EN = 'en';
public static EN_US = 'en-us';
public static AR = 'ar';
public static CURRENT_LANGUAGE = TranslatorService.AR;
public static CURRENT_LANGUAGE = TranslatorService.EN;
public static CHANGE_EVENT = 'language-changed-event';
private static translations: any;
constructor(

@ -11,7 +11,7 @@
-->
<ion-button *ngIf="enableBack" (click)="backButtonClicked($event)">
<ion-button style="background: transparent;" *ngIf="enableBack" (click)="backButtonClicked($event)">
<ng-container *ngIf="direction">
<ion-icon slot="icon-only" [name]=" direction == 'ltr' ? 'arrow-back': 'arrow-forward' "></ion-icon>
</ng-container>

@ -9,7 +9,7 @@ import { HomePage } from './home.page';
const routes: Routes = [
{
path: '',
component: HomePage
component: HomePage,
}
];
@ -19,13 +19,10 @@ const routes: Routes = [
FormsModule,
IonicModule,
HmgCommonModule,
RouterModule.forChild([
{
path: '',
component: HomePage
}
])
RouterModule.forChild(routes)
],
declarations: [HomePage]
declarations: [
HomePage
]
})
export class HomePageModule {}
export class HomePageModule { }

@ -19,7 +19,7 @@
<div>
<div>
<p class="dash-header text-caps">{{ts.trPK('home','dashboard')}}, {{userData.EMPLOYEE_DISPLAY_NAME}}</p>
<p class="dash-header text-caps">{{ts.trPK('home','dashboard')}}</p>
</div>
<div>
<ion-grid class="cus-grid">
@ -37,9 +37,9 @@
</button>
</ion-col>
<ion-col size="6" class="col-grid">
<button ion-button block class="serviceItem" (click)="Vaction_Rule()">
<button ion-button block class="serviceItem" (click)="Vacation_Rule()">
<ion-img class="serviceItemImg" src="../assets/imgs/vacationrule.png"></ion-img>
<p>{{ts.trPK('vacationRule','vacationRule')}}</p>
<p>{{ts.trPK('vacation-rule','vacationRule')}}</p>
</button>
</ion-col>
<ion-col size="6" class="col-grid">

@ -29,24 +29,26 @@ export class HomePage implements OnInit {
this.getUserDetails();
this.getMenu();
}
private openMenu() {
this.menu.toggle();
}
private getUserDetails() {
const user = this.authService
this.authService
.loadAuthenticatedUser()
.subscribe((user: AuthenticatedUser) => {
if (user) {
this.events.publish('setMenu');
this.userData = user;
this.user_image=user.EMPLOYEE_IMAGE?user.EMPLOYEE_IMAGE: this.user_image;
this.user_image = user.EMPLOYEE_IMAGE ? "data:image/png;base64,"+user.EMPLOYEE_IMAGE : this.user_image;
console.log(user);
} else {
console.log(user);
}
});
}
public Vacation_Rule() {
this.common.navigateForward('/vacation-rule/home');
}
private getMenu() {
this.menuService.getMenu().subscribe((result: MenuResponse) => {
this.handleMenuResult(result);

@ -0,0 +1,111 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" defaultHref="/home"></ion-back-button>
</ion-buttons>
<ion-title color="light" > {{ts.trPK('userProfile','title')}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-card *ngIf="personalInfo">
<ion-card-header class="boxHdr">
<div class="hrTitle">{{personalInfo.EMPLOYEE_NAME}}</div>
</ion-card-header>
<ion-card-content>
<div>
<div class="centerDiv profileDiv">
<!-- <p class="TxtPlace boldTxt">{{User_name_Emp}}</p> -->
<ion-img class="profileImg" [src]="imageSrc"></ion-img>
</div>
<ion-grid class="profile-grid">
<div>
<ion-row>
<ion-col class="colBold" size="5">
<label> {{ts.trPK('userProfile','empNo')}}</label>
</ion-col>
<ion-col size="7">
<label>{{personalInfo.EMPLOYEE_NUMBER}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" size="5">
<label>{{ts.trPK('userProfile','busG')}}</label>
</ion-col>
<ion-col size="7">
<label>{{personalInfo.BUSINESS_GROUP_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" size="5">
<label>{{ts.trPK('userProfile','job')}}</label>
</ion-col>
<ion-col size="7">
<label>{{personalInfo.JOB_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" size="5">
<label>{{ts.trPK('userProfile','locName')}}</label>
</ion-col>
<ion-col size="7">
<label>{{personalInfo.LOCATION_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" size="5">
<label>{{ts.trPK('userProfile','payrol')}}</label>
</ion-col>
<ion-col size="7">
<label>{{personalInfo.PAYROLL_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" size="5">
<label>{{ts.trPK('userProfile','orgEmail')}}</label>
</ion-col>
<ion-col size="7">
<label>{{personalInfo.EMPLOYEE_EMAIL_ADDRESS}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" size="5">
<label>{{ts.trPK('userProfile','orgName')}} </label>
</ion-col>
<ion-col size="7">
<label>{{personalInfo.ORGANIZATION_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" size="5">
<label>{{ts.trPK('userProfile','position')}}</label>
</ion-col>
<ion-col size="7">
<label>{{personalInfo.POSITION_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" size="5">
<label>{{ts.trPK('userProfile','grade')}} </label>
</ion-col>
<ion-col size="7">
<label>{{personalInfo.GRADE_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" size="5">
<label>{{ts.trPK('userProfile','category')}}</label>
</ion-col>
<ion-col size="7">
<label>{{personalInfo.EMPLOYMENT_CATEGORY_MEANING}}</label>
</ion-col>
</ion-row>
</div>
</ion-grid>
</div>
</ion-card-content>
</ion-card>
</ion-content>

@ -0,0 +1,3 @@
ion-col.colBold, ion-col.colBold > label{
font-weight:bold;
}

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

@ -0,0 +1,38 @@
import { Component, OnInit } 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 { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user";
@Component({
selector: "app-home",
templateUrl: "./home.component.html",
styleUrls: ["./home.component.scss"]
})
export class HomeComponent implements OnInit {
personalInfo: any;
imageSrc: string = "../assets/imgs/profile.png";
constructor(
public ts: TranslatorService,
public cs: CommonService,
public authService: AuthenticationService
) {}
ngOnInit() {
this.getProfile();
}
getProfile() {
this.authService
.loadAuthenticatedUser()
.subscribe((user: AuthenticatedUser) => {
if (user) {
this.personalInfo = user;
this.imageSrc = user.EMPLOYEE_IMAGE
? "data:image/png;base64," + user.EMPLOYEE_IMAGE
: this.imageSrc;
console.log(user);
} else {
console.log(user);
}
});
}
}

@ -0,0 +1,32 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';
import { IonicModule } from '@ionic/angular';
import { ProfilePage } from './profile.page';
import { HomeComponent } from './home/home.component';
const routes: Routes = [
{
path: '',
component: ProfilePage,
children: [
{
path: 'home',
component: HomeComponent
}
],
}
];
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
RouterModule.forChild(routes)
],
declarations: [ProfilePage , HomeComponent]
})
export class ProfilePageModule {}

@ -0,0 +1,6 @@
<ion-content>
<ion-router-outlet></ion-router-outlet>
</ion-content>

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

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-profile',
templateUrl: './profile.page.html',
styleUrls: ['./profile.page.scss'],
})
export class ProfilePage implements OnInit {
constructor() { }
ngOnInit() {
}
}

@ -0,0 +1,84 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<nav-buttons></nav-buttons>
<ion-title color="light">{{ 'vacation-rule, create-vacation-rule' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding no-bounce>
<ion-grid no-padding>
<ul class="cusprogressbar">
<ion-row nowrap>
<ion-col size="4">
<!-- <ul class="cusprogressbar"> -->
<li>{{'vacation-rule, itemType' | translate}}</li>
<!-- </ul> -->
</ion-col>
<ion-col size="4">
<!-- <ul class="cusprogressbar"> -->
<li>{{'vacation-rule, notification-type' | translate}}</li>
<!-- </ul> -->
</ion-col>
<ion-col size="4">
<!-- <ul class="cusprogressbar"> -->
<li class="active">{{'vacation-rule, create-vacation-rule' | translate}}</li>
<!-- </ul> -->
</ion-col>
</ion-row>
</ul>
<ion-row>
<ion-item>
<ion-label class="label">{{'vacation-rule, itemType' | translate}}</ion-label>
<ion-label class="label floatlabel">{{P_ITEM_TYPE_TITLE}} </ion-label>
</ion-item>
<ion-item>
<ion-label class="label">{{'vacation-rule, notification' | translate}} </ion-label>
<ion-label class="label floatlabel">{{Notification_Title}} </ion-label>
</ion-item>
<ion-item class="requiredItem">
<ion-label class="label">{{'vacation-rule, start-date' | translate}}</ion-label>
<ion-datetime [(ngModel)]="Sdate" min="1900" max="2100" displayFormat="MM/DD/YYYY hh:mm:ss A"
placeholder="MM/DD/YYYY hh:mm:ss A" required></ion-datetime>
</ion-item>
<ion-item class="requiredItem">
<ion-label class="label">{{'vacation-rule, end-date' | translate}}</ion-label>
<ion-datetime [(ngModel)]="Edate" min="1900" max="2100" displayFormat="MM/DD/YYYY hh:mm:ss A"
placeholder="MM/DD/YYYY hh:mm:ss A" required></ion-datetime>
</ion-item>
<ion-item lines="none" class="requiredItem">
<ion-label>{{'vacation-rule, message-label' | translate}}</ion-label>
<ion-textarea required [(ngModel)]="msgVal"></ion-textarea>
</ion-item>
<ion-list radio-group [(ngModel)]="notifTypeSel">
<ion-item *ngFor="let assignMode of REASSIGN_val;let i=index">
<ion-label>{{assignMode.RADIO_BUTTON_LABEL}}</ion-label>
<ion-radio value="{{assignMode.RADIO_BUTTON_ACTION}}" [checked]="i==0"></ion-radio>
</ion-item>
<ion-item *ngIf="isDeliver">
<ion-label>{{'createVacationRule.deliver' | translate}}</ion-label>
<ion-radio value="DELIVER"></ion-radio>
</ion-item>
<!-- <ion-item *ngIf="notifTypeSel!='RESPOND'">
<ion-label>{{selEmployeeName}}</ion-label>
<ion-label>{{selEmployeeID}}</ion-label>
</ion-item> -->
<ion-item *ngIf="showForType_Y">
<ion-label>{{'createVacationRule.close' | translate}}</ion-label>
<ion-radio value="CLOSE"></ion-radio>
</ion-item>
<!-- <button *ngIf="notifTypeSel!='RESPOND'" ion-button block (click)="SearchReplacment()">{{'createVacationRule.search' | translate}}</button> -->
<ion-item *ngIf="schemaNotific && showForType_Y == false">
<ion-label>{{'createVacationRule.respond' | translate}}</ion-label>
<ion-radio value="RESPOND"></ion-radio>
</ion-item>
</ion-list>
</ion-row>
</ion-grid>
</ion-content>

@ -0,0 +1,14 @@
li {
width: 100%;
}
.label {
white-space: normal;
font-size: smaller;
}
ion-list,
ion-item {
width: 100%;
margin-right: 7%;
}

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

@ -0,0 +1,107 @@
import { Component, OnInit } from '@angular/core';
import * as moment from 'moment';
import { VacationRuleServiceService } from '../service/vacation-rule-service.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { LoginRequest } from 'src/app/hmg-common/services/authentication/models/login.request';
@Component({
selector: 'app-create-vacation-rule',
templateUrl: './create-vacation-rule.component.html',
styleUrls: ['./create-vacation-rule.component.scss'],
})
export class CreateVacationRuleComponent implements OnInit {
P_RESPOND_ATTRIBUTES_TBL: any;
P_ITEM_TYPE_TITLE: any = "";
Notification_Title: any = "";
isDeliver: boolean = false;
showForType_Y: boolean = false;
Resp2_val: any;
Sdate: any;
// startTime: any;
//endTime: any;
Edate: any;
msgVal: any;
selEmployeeName: any;
selEmployeeID: any;
employeeSel: any;
replacmentEmployeeInfo: any;
itemType: any;
notificationType: any;
RespondAttributeList: any;
// vacationRuleRequest: createVacationRequest;
REASSIGN_val: any;
schemaNotific: any;
notifTypeSel: any;
// pAction: any;
isUpdate: boolean = false;
updateData: any;
forwordAtt: any = "";
SelAction: string = "";
hideForwordEmployee: any;
exampleJsonObject: any;
constructor(public vacationRuleService: VacationRuleServiceService, public ts: TranslatorService, public cs: CommonService) {
this.Sdate = moment().format('YYYY-MM-DDTHH:mm:ssZ');
}
ngOnInit() {
this.getNotificationReassign();
}
getNotificationReassign() {
let request: LoginRequest = new LoginRequest();
this.vacationRuleService.notificationReassign(request, () => {
this.getNotificationReassign();
}, this.ts.trPK('general', 'retry')).subscribe((result) => {
console.log(result);
if (this.cs.validResponse(result)) {
console.log(result.GetNotificationReassignModeList);
this.REASSIGN_val = result.GetNotificationReassignModeList;//[0].RADIO_BUTTON_ACTION;
this.notifTypeSel = this.REASSIGN_val[0].RADIO_BUTTON_ACTION;
this.reverseAction();
} else {
this.cs.presentAlert(result.ErrorEndUserMessage);
}
});
}
reverseAction() {
if (this.updateData) {
switch (this.SelAction) {
case 'FORWARD': {
this.notifTypeSel = "DELEGATE";
break;
}
case 'RESPOND': {
this.notifTypeSel = "RESPOND";
break;
}
case 'CLOSE': {
this.notifTypeSel = "CLOSE";
break;
}
case 'NOOP': {
this.notifTypeSel = "DELIVER";
break;
}
case 'TRANSFER': {
this.notifTypeSel = "TRANSFER";
break;
}
default: {
this.notifTypeSel = "";
break;
}
}
}
}
respondAttributes() {
}
}

@ -0,0 +1,78 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<nav-buttons></nav-buttons>
<ion-title color="light">{{ 'vacation-rule, vacationRule' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding>
<div style="padding: 0 10px;" [innerHTML]='"vacation-rule, tip" | translate'></div>
<ion-card *ngFor="let item of GetVacationRulesList; let i = index;">
<ion-card-header class="boxHdr">
<ion-grid no-padding>
<ion-row class="hrTitle" nowrap>
<ion-col size="8">
<ion-text style="font-size: larger;"><b>{{'vacation-rule, ruleInfo' | translate}}</b></ion-text>
</ion-col>
<ion-col size="2">
<button class="btnBack" ion-button (click)="deleteFunc(i)">
<img class="imgSize" src="../assets/imgs/delete.png"></button>
</ion-col>
<ion-col size="2">
<button class="btnBack" ion-button (click)="updateFunc(i)">
<img class="imgSize" src="../assets/imgs/edit.png"></button>
</ion-col>
</ion-row>
</ion-grid>
</ion-card-header>
<ion-card-content>
<ion-grid>
<div>
<ion-row>
<ion-col class="colBold">
<label for="">{{'vacation-rule, ruleName' | translate}}</label>
</ion-col>
<ion-col>
<label for=""> {{item.RULE_NAME}}</label>
</ion-col>
</ion-row>
</div>
<ion-row>
<ion-col class="colBold">
<label for="">{{'vacation-rule, itemType' | translate}}</label>
</ion-col>
<ion-col>
<label for=""> {{item.ITEM_TYPE_DISPLAY_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold">
<label for="">{{'vacation-rule, notification' | translate}}</label>
</ion-col>
<ion-col>
<label for=""> {{item.NOTIFICATION_SUBJECT}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold">
<label for="">{{'vacation-rule, status' | translate}}</label>
</ion-col>
<ion-col>
<label for=""> {{item.RULE_STATUS}}</label>
</ion-col>
</ion-row>
</ion-grid>
</ion-card-content>
</ion-card>
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button class="footer-button" color="customnavy" ion-button (click)="Vacation_Type()">{{'vacation-rule, createRule' | translate}}</ion-button>
</div>
</ion-footer>

@ -0,0 +1,71 @@
.item-md p,
.item-md ios {
white-space: normal;
}
.col {
white-space: normal;
font-size: 14px;
}
ion-col.colBold {
color: #1a586d;
}
.imgSize {
width: 22px;
height: 22px;
-webkit-box-shadow: none;
box-shadow: none;
}
ion-card-header {
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.header-toolbar {
--background: linear-gradient(45deg, #3ac1f1 0%, #19a163 36%, #19a163 59%, #1a586d 100%);
}
.btnBack {
background: transparent;
float: right;
}
.footer-button {
border-radius: 2px;
padding: 0 1.1em;
min-height: 45px;
min-width: 200px;
}
ion-card-header {
padding: 0px 10px !important;
color: #ffffff !important;
-webkit-border-top-left-radius: 10px;
-webkit-border-top-right-radius: 10px;
-moz-border-radius-topleft: 10px;
-moz-border-radius-topright: 10px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
background: #acacac;
.hrTitle {
white-space: normal;
padding: 5px;
padding-top: 12px;
width: 100%;
min-height: 45px;
line-height: 1.2;
}
.button,
.button-md,
button-ios {
background: transparent;
box-shadow: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
min-width: auto;
padding: 0px !important;
margin: 0px 5px !important;
}
}

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

@ -0,0 +1,156 @@
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { VacationRuleServiceService } from './../service/vacation-rule-service.service';
import { VacationRuleRequest } from './../model/VacationRuleRequest';
import { Component, OnInit } from '@angular/core';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss'],
})
export class HomeComponent implements OnInit {
userName: any;
P_PAGE_NUM: number;
P_PAGE_LIMIT: number;
GetVacationRulesList: any = [];
isUpdate: boolean = false;
IsReachEnd: boolean = false;
RespondAttributeList: any;
constructor(public vacationRuleService: VacationRuleServiceService, public ts: TranslatorService, public cs: CommonService) {
this.P_PAGE_NUM = 1;
this.P_PAGE_LIMIT = 50;
this.GetVacationRulesList = [
{
"ACTION": "FORWARD",
"ACTION_DISPLAY": "Forward",
"BEGIN_DATE": "6/26/2019 2:50:14 PM",
"END_DATE": "6/30/2019 2:50:22 PM",
"FROM_ROW_NUM": 1,
"FYI_FLAG": "Y",
"ITEM_TYPE": "HRSSA",
"ITEM_TYPE_DISPLAY_NAME": "HR",
"MESSAGE": "TEst Rule",
"NOTIFICATION_DISPLAY_NAME": "<All>",
"NOTIFICATION_NAME": "*",
"NOTIFICATION_SUBJECT": "<All>",
"NO_OF_ROWS": 1,
"REPLACEMENT_USER_NAME": "70915",
"ROW_NUM": 1,
"RULE_ID": 7770756,
"RULE_NAME": "Delegate: Al Oulah, Mohammed",
"RULE_STATUS": "Active",
"RULE_TIP_MESSAGE": "",
"TO_ROW_NUM": 1
},
{
"ACTION": "FORWARD",
"ACTION_DISPLAY": "Forward",
"BEGIN_DATE": "6/26/2019 2:50:14 PM",
"END_DATE": "6/30/2019 2:50:22 PM",
"FROM_ROW_NUM": 1,
"FYI_FLAG": "Y",
"ITEM_TYPE": "HRSSA",
"ITEM_TYPE_DISPLAY_NAME": "HR",
"MESSAGE": "TEst Rule",
"NOTIFICATION_DISPLAY_NAME": "<All>",
"NOTIFICATION_NAME": "*",
"NOTIFICATION_SUBJECT": "<All>",
"NO_OF_ROWS": 1,
"REPLACEMENT_USER_NAME": "70915",
"ROW_NUM": 1,
"RULE_ID": 7770756,
"RULE_NAME": "Delegate: Al Oulah, Mohammed",
"RULE_STATUS": "Active",
"RULE_TIP_MESSAGE": "",
"TO_ROW_NUM": 1
},
{
"ACTION": "FORWARD",
"ACTION_DISPLAY": "Forward",
"BEGIN_DATE": "6/26/2019 2:50:14 PM",
"END_DATE": "6/30/2019 2:50:22 PM",
"FROM_ROW_NUM": 1,
"FYI_FLAG": "Y",
"ITEM_TYPE": "HRSSA",
"ITEM_TYPE_DISPLAY_NAME": "HR",
"MESSAGE": "TEst Rule",
"NOTIFICATION_DISPLAY_NAME": "<All>",
"NOTIFICATION_NAME": "*",
"NOTIFICATION_SUBJECT": "<All>",
"NO_OF_ROWS": 1,
"REPLACEMENT_USER_NAME": "70915",
"ROW_NUM": 1,
"RULE_ID": 7770756,
"RULE_NAME": "Delegate: Al Oulah, Mohammed",
"RULE_STATUS": "Active",
"RULE_TIP_MESSAGE": "",
"TO_ROW_NUM": 1
},
{
"ACTION": "FORWARD",
"ACTION_DISPLAY": "Forward",
"BEGIN_DATE": "6/26/2019 2:50:14 PM",
"END_DATE": "6/30/2019 2:50:22 PM",
"FROM_ROW_NUM": 1,
"FYI_FLAG": "Y",
"ITEM_TYPE": "HRSSA",
"ITEM_TYPE_DISPLAY_NAME": "HR",
"MESSAGE": "TEst Rule",
"NOTIFICATION_DISPLAY_NAME": "<All>",
"NOTIFICATION_NAME": "*",
"NOTIFICATION_SUBJECT": "<All>",
"NO_OF_ROWS": 1,
"REPLACEMENT_USER_NAME": "70915",
"ROW_NUM": 1,
"RULE_ID": 7770756,
"RULE_NAME": "Delegate: Al Oulah, Mohammed",
"RULE_STATUS": "Active",
"RULE_TIP_MESSAGE": "",
"TO_ROW_NUM": 1
}
];
}
ngOnInit() {
console.log('OnInit');
this.getVacationRules();
console.log(this.GetVacationRulesList);
}
Vacation_Type() {
this.cs.navigateForward('/vacation-rule/vacation-type');
}
getVacationRules() {
this.P_PAGE_NUM = 1;
this.IsReachEnd = false;
let request: VacationRuleRequest = new VacationRuleRequest();
request.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
request.P_PAGE_NUM = this.P_PAGE_NUM;
this.vacationRuleService.getVacationRule(request, () => {
this.getVacationRules();
}, this.ts.trPK('general', 'retry')).subscribe((result) => {
if (this.cs.validResponse(result)) {
console.log(result);
console.log(JSON.stringify(result));
} else {
this.cs.presentAlert(result.ErrorEndUserMessage);
}
});
}
deleteFunc(i) {
}
updateFunc(i) {
}
}

@ -0,0 +1,7 @@
import { Request } from '../../hmg-common/services/models/request';
export class VacationRuleRequest extends Request {
public static SHARED_DATA = 'vacation-request';
public P_PAGE_NUM: number;
public P_PAGE_LIMIT: number;
}

@ -0,0 +1,8 @@
import { Request } from '../../hmg-common/services/models/request';
export class VacationTypeRequest extends Request{
public static SHARED_DATA = 'login-request';
public static NATIONALITY_CODE="Nationality_Code";
public P_USER_NAME:string;
public P_PASSWORD: string;
}

@ -0,0 +1,8 @@
import { LoginRequest } from '../../hmg-common/services/authentication/models/login.request';
export class notificationTypeRequest extends LoginRequest {
public static SHARED_DATA = 'vacation-request';
public P_ITEM_TYPE: string;
public P_NOTIFICATION_NAME: string;
}

@ -0,0 +1,10 @@
import { Response } from '../../hmg-common/services/models/response';
export class notificationTypeResponse extends Response {
public static SHARED_DATA = 'notificationTypeRespond-shared';
public FYI_FLAG:string;
public NOTIFICATION_DISPLAY_NAME:string;
public NOTIFICATION_NAME:string;
public NOTIFICATION_SUBJECT:string;
}

@ -0,0 +1,83 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<nav-buttons></nav-buttons>
<ion-title color="light">{{ 'vacation-rule, notification-type' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding no-bounce>
<ion-grid no-padding>
<ul class="cusprogressbar">
<ion-row nowrap>
<ion-col size="4">
<!-- <ul class="cusprogressbar"> -->
<li>{{'vacation-rule, itemType' | translate}}</li>
<!-- </ul> -->
</ion-col>
<ion-col size="4">
<!-- <ul class="cusprogressbar"> -->
<li class="active">{{'vacation-rule, notification-type' | translate}}</li>
<!-- </ul> -->
</ion-col>
<ion-col size="4">
<!-- <ul class="cusprogressbar"> -->
<li>{{'vacation-rule, create-vacation-rule' | translate}}</li>
<!-- </ul> -->
</ion-col>
</ion-row>
</ul>
<ion-row justify-content-center>
<div [innerHTML]='"vacation-rule, notification-tip" | translate'></div>
</ion-row>
<ion-row nowrap style="margin-top: 5%;">
<ion-col align-self-center size="3">
<ion-label class="label">{{'vacation-rule, itemType' | translate}}</ion-label>
</ion-col>
<ion-col size="5"></ion-col>
<ion-col size="4">
<ion-label class="label">{{itemType}}</ion-label>
</ion-col>
</ion-row>
<ion-row>
<ion-list>
<ion-radio-group [(ngModel)]="notifTypeSel" mode="md">
<ion-item>
<ion-label>{{'vacation-rule, all-label' | translate}}</ion-label>
<ion-radio checked value="*"></ion-radio>
</ion-item>
<ion-item>
<ion-label>{{'vacation-rule, select-label' | translate}}</ion-label>
<ion-radio value="sel_opt"></ion-radio>
</ion-item>
</ion-radio-group>
</ion-list>
</ion-row>
<ion-row>
<ion-item *ngIf="notifTypeSel=='sel_opt'">
<ion-label>{{'vacation-rule, notification' | translate}}</ion-label>
<ion-select okText='{{"general, ok" | translate }}' cancelText='{{"general, cancel" | translate }}'
[(ngModel)]="var_notification">
<ion-select-option value="{{i}}" *ngFor="let x of notification_list; let i=index">
{{x.NOTIFICATION_DISPLAY_NAME}}
</ion-select-option>
</ion-select>
</ion-item>
</ion-row>
</ion-grid>
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button class="footer-button" color="customnavy" ion-button (click)="NextPage()">
{{'vacation-rule, next-label' | translate}}</ion-button>
</div>
</ion-footer>

@ -0,0 +1,20 @@
li {
width: 100%;
}
.label {
white-space: normal;
}
ion-list,
ion-item {
width: 100%;
margin-right: 7%;
}
.footer-button {
border-radius: 3px;
padding: 0 1.1em;
min-height: 45px;
min-width: 200px;
}

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

@ -0,0 +1,49 @@
import { Component, OnInit } from '@angular/core';
import { VacationRuleServiceService } from '../service/vacation-rule-service.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { notificationTypeRequest } from '../model/notification.Request';
@Component({
selector: 'app-notification-type',
templateUrl: './notification-type.component.html',
styleUrls: ['./notification-type.component.scss'],
})
export class NotificationTypeComponent implements OnInit {
itemTypeObj: any;
itemType: string;
notifTypeSel: any;
notification_list: any;
var_notification: any;
constructor(public vacationRuleService: VacationRuleServiceService, public ts: TranslatorService, public cs: CommonService) {
this.itemTypeObj = this.cs.sharedService.getSharedData('selectedItemType');
this.itemType = this.itemTypeObj.ITEM_TYPE_DISPLAY_NAME;
}
ngOnInit() {
this.getNotificationType();
}
NextPage() {
this.cs.navigateForward('/vacation-rule/create-vacation-rule');
}
getNotificationType() {
let request: notificationTypeRequest = new notificationTypeRequest();
request.P_ITEM_TYPE = this.itemTypeObj.ITEM_TYPE;
this.vacationRuleService.getNotificationType(request, () => {
this.getNotificationType();
}, this.ts.trPK('general', 'retry')).subscribe((result) => {
console.log(result);
if (this.cs.validResponse(result)) {
console.log(result.GetItemTypeNotificationsList);
this.notification_list = result.GetItemTypeNotificationsList;
} else {
this.cs.presentAlert(result.ErrorEndUserMessage);
}
});
}
}

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

@ -0,0 +1,56 @@
import { notificationTypeRequest } from './../model/notification.Request';
import { Response } from 'src/app/hmg-common/services/models/response';
import { VacationRuleRequest } from './../model/VacationRuleRequest';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service';
import { VacationTypeRequest } from '../model/VacationTypeRequest';
import { LoginRequest } from 'src/app/hmg-common/services/authentication/models/login.request';
@Injectable({
providedIn: 'root'
})
export class VacationRuleServiceService {
/* Vacation Rule Methods */
public static getVacationRule = 'Services/ERP.svc/REST/GET_VACATION_RULES';
public static changePassword = 'Services/ERP.svc/REST/ChangePassword_FromActiveSession';
public static userChecking = 'Services/ERP.svc/REST/Get_BasicUserInformation';
public static getVacationType = 'Services/ERP.svc/REST/GET_VR_ITEM_TYPES';
public static getNotificationType = 'Services/ERP.svc/REST/GET_ITEM_TYPE_NOTIFICATIONS';
public static createVacationRule = 'Services/ERP.svc/REST/CREATE_VACATION_RULE';
public static deleteVacationRule = 'Services/ERP.svc/REST/DELETE_VACATION_RULE';
public static updateVacationRule = 'Services/ERP.svc/REST/UPDATE_VACATION_RULE';
public static respondAttributes = 'Services/ERP.svc/REST/GET_RESPOND_ATTRIBUTES';
public static notificationReassign = 'Services/ERP.svc/REST/GET_NOTIFICATION_REASSIGN_MODE';
constructor(public authService: AuthenticationService, public con: ConnectorService) { }
public getVacationRule(vacationRuleRequest: VacationRuleRequest, onError: any, errorLabel: string): Observable<Response> {
const request = vacationRuleRequest;
console.log(request);
this.authService.authenticateRequest(request);
return this.con.post(VacationRuleServiceService.getVacationRule, request, onError, errorLabel);
}
public getVacationType(vacationTypeRequest: VacationTypeRequest, onError: any, errorLabel: string): Observable<any> {
const request = vacationTypeRequest;
this.authService.authenticateRequest(request);
return this.con.post(VacationRuleServiceService.getVacationType, request, onError, errorLabel);
}
public getNotificationType(notificationTypeRequest: notificationTypeRequest, onError: any, errorLabel: string): Observable<any> {
const request = notificationTypeRequest;
this.authService.authenticateRequest(request);
return this.con.post(VacationRuleServiceService.getNotificationType, request, onError, errorLabel);
}
public notificationReassign(notificationRequest: LoginRequest, onError: any, errorLabel: string): Observable<any> {
const request = notificationRequest;
this.authService.authenticateRequest(request);
return this.con.post(VacationRuleServiceService.notificationReassign, request, onError, errorLabel);
}
}

@ -0,0 +1,56 @@
import { HmgCommonModule } from './../hmg-common/hmg-common.module';
import { HomeComponent } from './home/home.component';
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';
import { IonicModule } from '@ionic/angular';
import { VacationRulePage } from './vacation-rule.page';
import { VacationTypeComponent } from './vacation-type/vacation-type.component';
import { NotificationTypeComponent } from './notification-type/notification-type.component';
import { CreateVacationRuleComponent } from './create-vacation-rule/create-vacation-rule.component';
const routes: Routes = [
{
path: '',
component: VacationRulePage,
children: [
{
path: 'home',
component: HomeComponent
},
{
path: 'vacation-type',
component: VacationTypeComponent
},
{
path: 'notification-type',
component: NotificationTypeComponent
},
{
path: 'create-vacation-rule',
component: CreateVacationRuleComponent
}
]
}
];
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
HmgCommonModule,
RouterModule.forChild(routes)
],
declarations: [
VacationRulePage,
HomeComponent,
VacationTypeComponent,
NotificationTypeComponent,
CreateVacationRuleComponent
]
})
export class VacationRulePageModule { }

@ -0,0 +1,9 @@
<!-- <ion-header>
<ion-toolbar>
<ion-title>VacationRule</ion-title>
</ion-toolbar>
</ion-header> -->
<ion-content>
<ion-router-outlet></ion-router-outlet>
</ion-content>

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

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-vacation-rule',
templateUrl: './vacation-rule.page.html',
styleUrls: ['./vacation-rule.page.scss'],
})
export class VacationRulePage implements OnInit {
constructor() { }
ngOnInit() {
}
}

@ -0,0 +1,63 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<nav-buttons></nav-buttons>
<ion-title color="light">{{ 'vacation-rule, vacation-type' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding>
<ion-grid no-padding>
<ul class="cusprogressbar">
<ion-row nowrap>
<ion-col size="4">
<!-- <ul class="cusprogressbar"> -->
<li class="active">{{'vacation-rule, itemType' | translate}}</li>
<!-- </ul> -->
</ion-col>
<ion-col size="4">
<!-- <ul class="cusprogressbar"> -->
<li>{{'vacation-rule, notification-type' | translate}}</li>
<!-- </ul> -->
</ion-col>
<ion-col size="4">
<!-- <ul class="cusprogressbar"> -->
<li>{{'vacation-rule, create-vacation-rule' | translate}}</li>
<!-- </ul> -->
</ion-col>
</ion-row>
</ul>
<ion-row justify-content-center>
<div [innerHTML]='"vacation-rule, vacation-type-text" | translate'></div>
</ion-row>
<ion-row no-wrap>
<ion-item>
<ion-label>{{'vacation-rule, itemType' | translate}}</ion-label>
<ion-select okText='{{"general, ok" | translate }}' cancelText='{{"general, cancel" | translate }}'
[(ngModel)]="index" required>
<ion-select-option [selected]="x.ITEM_TYPE_DISPLAY_NAME" value="{{i}}"
*ngFor="let x of ruleTypeList; let i=index;">
{{x.ITEM_TYPE_DISPLAY_NAME}} </ion-select-option>
</ion-select>
</ion-item>
</ion-row>
<ion-row>
<p class="smallTip">
{{'vacation-rule, skip-step-3' | translate}}
</p>
</ion-row>
</ion-grid>
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button class="footer-button" color="customnavy" ion-button (click)="NextPage()">
{{'vacation-rule, next-label' | translate}}</ion-button>
</div>
</ion-footer>

@ -0,0 +1,102 @@
li {
width: 100%;
}
.cusprogressbar li:after {
width: 100%;
height: 2px;
content: "";
position: absolute;
background-color: #d9d9d9;
top: 20px;
}
ion-item {
width: 100%;
margin-left: 2%;
margin-right: 5%;
}
p.smallTip {
font-size: 12px;
color: #acacac;
padding: 1px 6px;
}
.footer-button {
border-radius: 3px;
padding: 0 1.1em;
min-height: 45px;
min-width: 200px;
}
// .progcontainer {
// margin: auto;
// text-align: center;
// width: 100%;
// min-height: 100px;
// }
// .cusprogressbar {
// counter-reset: step;
// padding: 0px;
// }
// .cusprogressbar li {
// list-style-type: none;
// width: 33.333%;
// // @include ltr{
// // float: left;
// // }
// // @include rtl{
// // float: right;
// // }
// font-size: 12px;
// position: relative;
// text-align: center;
// color: #7F8C8D;
// // @include ltr(){
// // font-family: $fontFamilySemiBoldEN;
// // }
// // @include rtl(){
// // font-family: $fontFamilyIOSAR;
// // font-weight: bold;
// // }
// }
// .cusprogressbar li:before {
// width: 40px;
// height: 40px;
// content: counter(step);
// color: #ffffff;
// counter-increment: step;
// line-height: 40px;
// border: 0px;
// background-color: #acacac;
// display: block;
// text-align: center;
// margin: 0 auto 10px auto;
// border-radius: 50%;
// }
// .cusprogressbar li:after {
// width: 100%;
// height: 2px;
// content: '';
// position: absolute;
// background-color: #d9d9d9;
// top: 20px;
// // @include ltr{
// // left: -50%;
// // }
// // @include rtl{
// // right: -50%;
// // }
// z-index: -1;
// }
// .cusprogressbar li:first-child:after {
// content: none;
// }
// .cusprogressbar li.active {
// color: #209a83;
// }
// .cusprogressbar li.active:before {
// background-color: #209a83;
// }

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

@ -0,0 +1,58 @@
import { notificationTypeResponse } from './../model/notification.Respond';
import { VacationTypeRequest } from './../model/VacationTypeRequest';
import { Component, OnInit } from '@angular/core';
import { VacationRuleServiceService } from '../service/vacation-rule-service.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
@Component({
selector: 'app-vacation-type',
templateUrl: './vacation-type.component.html',
styleUrls: ['./vacation-type.component.scss'],
})
export class VacationTypeComponent implements OnInit {
ruleTypeList: any;
index: any;
constructor(public vacationRuleService: VacationRuleServiceService, public ts: TranslatorService, public cs: CommonService) { }
ngOnInit() {
this.getVacationType();
}
getVacationType() {
let request: VacationTypeRequest = new VacationTypeRequest();
this.vacationRuleService.getVacationType(request, () => {
this.getVacationType();
}, this.ts.trPK('general', 'retry')).subscribe((result) => {
if (this.cs.validResponse(result)) {
this.ruleTypeList = result.VrItemTypesList;
console.log(this.ruleTypeList);
} else {
this.cs.presentAlert(result.ErrorEndUserMessage);
}
});
}
NextPage() {
this.cs.sharedService.setSharedData(this.ruleTypeList[this.index], 'selectedItemType');
this.cs.navigateForward('/vacation-rule/notification-type');
if (this.ruleTypeList[this.index].ITEM_TYPE == "*") {
let notificatioAtt: notificationTypeResponse = new notificationTypeResponse();
notificatioAtt.FYI_FLAG = "";
notificatioAtt.NOTIFICATION_DISPLAY_NAME = "All";
notificatioAtt.NOTIFICATION_NAME = "*";
notificatioAtt.NOTIFICATION_SUBJECT = "";
this.cs.sharedService.setSharedData(notificatioAtt, notificationTypeResponse.SHARED_DATA);
this.cs.navigateForward('/vacation-rule/create-vacation-rule');
} else {
this.cs.navigateForward('/vacation-rule/notification-type');
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

File diff suppressed because it is too large Load Diff

@ -28,6 +28,10 @@ body{
}
.header-toolbar {
--background: linear-gradient(45deg, #3ac1f1 0%, #19a163 36%, #19a163 59%, #1a586d 100%);
}
ion-label{
color:var(--labelColor) !important;
}
@ -57,24 +61,18 @@ ion-label{
}
.loaderGif{
.loading-gif{
background: transparent !important;
width:100px;
height: 100px;
}
.loading-md .loading-wrapper,
.loading-ios .loading-wrapper{
#custom-progress-loader .container{
background: transparent !important;
box-shadow: none;
-webkit-box-shadow:none;
-moz-box-shadow: none;
width: 150px;
}
.loading-md ,.loading-ios {
ion-backdrop{
background-color: #8c8c8c !important;
}
}
/***********change header color***************/
.headerBtn{
@ -83,7 +81,12 @@ ion-label{
.headerImg{
width: 36px;
}
.header-toolbar{
--background: linear-gradient(45deg, #3ac1f1 0%, #19a163 36%, #19a163 59%, #1a586d 100%);
}
.btnBack{
background: transparent !important;
}
/***************/
.attachImg{
max-width: 30px;

Loading…
Cancel
Save