Vacation Rule Going on

production
haroon amjad 7 years ago
parent 7609feb6ae
commit c255bebef9

@ -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",
@ -7417,11 +7337,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",
@ -7435,7 +7350,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",
@ -9418,7 +9334,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",
@ -9433,12 +9350,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"
@ -9757,7 +9676,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",
@ -9798,40 +9718,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",
@ -10209,7 +10100,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",
@ -10404,6 +10296,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"
}
@ -10558,6 +10451,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"
}
@ -11010,6 +10904,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",
@ -13130,6 +13025,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"
@ -13138,7 +13034,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"
]
}
}
}

@ -5,3 +5,12 @@
// file can hold Sass mixins, functions, and placeholder classes to be imported
// 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;
}

@ -39,7 +39,7 @@
<ion-col size="6" class="col-grid">
<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">

@ -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() {
}
}

@ -1,18 +1,18 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<nav-buttons></nav-buttons>
<ion-title color="light">{{ 'vacation-rule, vacation-rule-label' | translate}}</ion-title>
<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, main-heading" | translate'></div>
<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, rule-Info' | translate}}</b></ion-text>
<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)">
@ -32,7 +32,7 @@
<div>
<ion-row>
<ion-col class="colBold">
<label for="">{{'vacation-rule, rule-name' | translate}}</label>
<label for="">{{'vacation-rule, ruleName' | translate}}</label>
</ion-col>
<ion-col>
<label for=""> {{item.RULE_NAME}}</label>
@ -41,7 +41,7 @@
</div>
<ion-row>
<ion-col class="colBold">
<label for="">{{'vacation-rule, rule-type' | translate}}</label>
<label for="">{{'vacation-rule, itemType' | translate}}</label>
</ion-col>
<ion-col>
<label for=""> {{item.ITEM_TYPE_DISPLAY_NAME}}</label>
@ -49,7 +49,7 @@
</ion-row>
<ion-row>
<ion-col class="colBold">
<label for="">{{'vacation-rule, notification-label' | translate}}</label>
<label for="">{{'vacation-rule, notification' | translate}}</label>
</ion-col>
<ion-col>
<label for=""> {{item.NOTIFICATION_SUBJECT}}</label>
@ -57,7 +57,7 @@
</ion-row>
<ion-row>
<ion-col class="colBold">
<label for="">{{'vacation-rule, rule-status' | translate}}</label>
<label for="">{{'vacation-rule, status' | translate}}</label>
</ion-col>
<ion-col>
<label for=""> {{item.RULE_STATUS}}</label>
@ -73,6 +73,6 @@
<ion-footer>
<div class="centerDiv">
<ion-button class="footer-button" color="customnavy" ion-button (click)="Vacation_Type()">{{'vacation-rule, create-rule' | translate}}</ion-button>
<ion-button class="footer-button" color="customnavy" ion-button (click)="Vacation_Type()">{{'vacation-rule, createRule' | translate}}</ion-button>
</div>
</ion-footer>

@ -36,6 +36,7 @@ ion-card-header {
border-radius: 2px;
padding: 0 1.1em;
min-height: 45px;
min-width: 200px;
}
ion-card-header {

@ -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);
}
});
}
}

@ -1,9 +1,12 @@
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'
@ -22,14 +25,32 @@ export class VacationRuleServiceService {
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) { }
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)
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);
}
}

@ -9,6 +9,8 @@ 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 = [
{
@ -22,6 +24,14 @@ const routes: Routes = [
{
path: 'vacation-type',
component: VacationTypeComponent
},
{
path: 'notification-type',
component: NotificationTypeComponent
},
{
path: 'create-vacation-rule',
component: CreateVacationRuleComponent
}
]
}
@ -38,7 +48,9 @@ const routes: Routes = [
declarations: [
VacationRulePage,
HomeComponent,
VacationTypeComponent
VacationTypeComponent,
NotificationTypeComponent,
CreateVacationRuleComponent
]
})
export class VacationRulePageModule { }

@ -7,25 +7,17 @@
<ion-content padding>
<!-- <div class="progcontainer">
<ul class="cusprogressbar">
<li class="active">{{'vacation-rule, rule-type' | translate}}</li>
<li>{{'vacation-rule, notification-label' | translate}}</li>
<li>{{'vacation-rule, create-vacation-rule' | translate}}</li>
</ul>
</div> -->
<ion-grid no-padding>
<ul class="cusprogressbar">
<ion-row nowrap>
<ion-col size="4">
<!-- <ul class="cusprogressbar"> -->
<li class="active">{{'vacation-rule, rule-type' | translate}}</li>
<li class="active">{{'vacation-rule, itemType' | translate}}</li>
<!-- </ul> -->
</ion-col>
<ion-col size="4">
<!-- <ul class="cusprogressbar"> -->
<li>{{'vacation-rule, notification-label' | translate}}</li>
<li>{{'vacation-rule, notification-type' | translate}}</li>
<!-- </ul> -->
</ion-col>
<ion-col size="4">
@ -35,6 +27,37 @@
</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-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>

@ -11,6 +11,25 @@ li {
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;

@ -1,4 +1,9 @@
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',
@ -7,8 +12,47 @@ import { Component, OnInit } from '@angular/core';
})
export class VacationTypeComponent implements OnInit {
constructor() { }
ruleTypeList: any;
index: any;
ngOnInit() {}
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');
}
}
}

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save