Vacation Rule Implementation Completed

production
haroon amjad 7 years ago
parent 3b5da38b09
commit f66759ad16

@ -87,6 +87,7 @@ export class LoginComponent implements OnInit, OnDestroy {
this.authService
.login(request, () => { }, this.ts.trPK("general", "ok"))
.subscribe((result: CheckUserAuthenticationResponse) => {
console.log(result);
if (this.cs.validResponse(result)) {
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.MobileNumber = result.MemberLoginList.P_MOBILE_NUMBER;

@ -11,19 +11,13 @@
<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>
@ -52,33 +46,58 @@
<ion-textarea required [(ngModel)]="msgVal"></ion-textarea>
</ion-item>
<ion-list radio-group [(ngModel)]="notifTypeSel">
<ion-list>
<ion-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-label>{{'vacation-rule, 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-label>{{'vacation-rule, 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-label>{{'vacation-rule, respond' | translate}}</ion-label>
<ion-radio value="RESPOND"></ion-radio>
</ion-item>
</ion-list>
</ion-radio-group>
</ion-list>
</ion-row>
<!-- <json-schema-form *ngIf="schemaNotific && notifTypeSel =='RESPOND'" [form]="schemaNotific"
[(ngModel)]="exampleJsonObject">
</json-schema-form> -->
<ion-item style="margin-right: 0px;" lines="none" (click)="SearchReplacment()"
*ngIf="(hideForwordEmployee && notifTypeSel =='RESPOND') || (notifTypeSel == 'DELEGATE') || (notifTypeSel == 'TRANSFER') ">
<ion-input [(ngModel)]="employeeSel" placeholder="{{'vacation-rule, search-employee' | translate}}"></ion-input>
<ion-button style="width: 19%;" button-type="clear">
<ion-icon slot="icon-only" name="search"></ion-icon>
</ion-button>
</ion-item>
</ion-row>
</ion-grid>
</ion-content>
<ion-footer>
<div class="centerDiv">
<div *ngIf="isUpdate==false" class="centerDiv">
<ion-button class="footer-button" color="customnavy" ion-button (click)="ApplyFunc()">
{{'vacation-rule, apply' | translate}}</ion-button>
</div>
</ion-content>
<div *ngIf="isUpdate" class="centerDiv">
<ion-button class="footer-button" color="customnavy" ion-button (click)="updateVacationRule()">
{{'vacation-rule, update' | translate}}</ion-button>
</div>
</div>
</ion-footer>

@ -12,3 +12,8 @@ ion-item {
width: 100%;
margin-right: 7%;
}
.select-text {
font-size: small;
white-space: normal;
}

@ -1,9 +1,18 @@
import { Component, OnInit } from '@angular/core';
import { createVacationRequest } from './../model/createVacation.Request';
import { ReplacementServiceRequest } from './../model/replacement-Service.request';
import { notificationTypeRequest } from './../model/notification.Request';
import { vacationTypeResponse } from './../model/vacationType.Respond';
import { vacationRuleResponse } from './../model/vacationRule.Respond';
import { Component, OnInit, ElementRef } 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';
import { NavController, ModalController } from '@ionic/angular';
import { notificationTypeResponse } from '../model/notification.Respond';
import { Router, ActivatedRoute } from '@angular/router';
import { ReplacementListComponent } from '../replacement-list/replacement-list.component';
@Component({
selector: 'app-create-vacation-rule',
@ -30,7 +39,7 @@ export class CreateVacationRuleComponent implements OnInit {
itemType: any;
notificationType: any;
RespondAttributeList: any;
// vacationRuleRequest: createVacationRequest;
vacationRuleRequest: createVacationRequest;
REASSIGN_val: any;
schemaNotific: any;
notifTypeSel: any;
@ -42,14 +51,346 @@ export class CreateVacationRuleComponent implements OnInit {
hideForwordEmployee: any;
exampleJsonObject: any;
constructor(public vacationRuleService: VacationRuleServiceService, public ts: TranslatorService, public cs: CommonService) {
constructor(public vacationRuleService: VacationRuleServiceService, public ts: TranslatorService, public cs: CommonService,
private elementRef: ElementRef, public navCtrl: NavController, public router: Router, public modalController: ModalController,
private route: ActivatedRoute) {
this.Sdate = moment().format('YYYY-MM-DDTHH:mm:ssZ');
this.isUpdate = this.cs.sharedService.getSharedData('isUpdate');
if (this.isUpdate) {
this.updateData = this.cs.sharedService.getSharedData(vacationRuleResponse.SHARED_DATA, true);
this.SelAction = this.updateData.ACTION;
if (this.updateData.ACTION == "RESPOND" && this.updateData.FYI_FLAG == "Y") {
this.SelAction = "Close"
}
this.notificationType = {
NOTIFICATION_NAME: this.updateData.NOTIFICATION_NAME,
NOTIFICATION_DISPLAY_NAME: this.updateData.NOTIFICATION_SUBJECT,
NOTIFICATION_SUBJECT: this.updateData.NOTIFICATION_SUBJECT,
FYI_FLAG: this.updateData.FYI_FLAG
}
/*************** */
this.P_ITEM_TYPE_TITLE = this.updateData.ITEM_TYPE_DISPLAY_NAME;
this.selEmployeeID = this.updateData.REPLACEMENT_USER_NAME;
if (this.selEmployeeID) {
this.selEmployeeName = this.updateData.RULE_NAME;
this.employeeSel = this.updateData.RULE_NAME;
}
/************ */
this.msgVal = this.updateData.MESSAGE;
this.notifTypeSel = this.updateData.ACTION;
this.itemType = this.updateData;
this.notificationType = this.updateData;
//this.Sdate = this.updateData.BEGIN_DATE;
//this.Edate = this.updateData.END_DATE;
let _Sdate = this.updateData.BEGIN_DATE ? this.updateData.BEGIN_DATE : "";
let _Edate = this.updateData.END_DATE ? this.updateData.END_DATE : "";
//let tzoffset = moment().utcOffset(); //offset in milliseconds
if (_Sdate) {
this.Sdate = moment(_Sdate).format('YYYY-MM-DDTHH:mm:ssZ');
//this.Sdate = (new Date(myStartTime - tzoffset)).toISOString().slice(0, -1);
//this.startTime = this.Sdate;
}
if (_Edate) {
this.Edate = moment(_Edate).format('YYYY-MM-DDTHH:mm:ssZ');
//this.Edate = (new Date(myEndTime - tzoffset)).toISOString().slice(0, -1);
// this.endTime = this.Edate;
}
//this.schemaNotific =this.updateData.RespondAttributeList;
//this.notifTypeSel=this.REASSIGN_val[0].RADIO_BUTTON_LABEL;
//console.log(this.notifTypeSel);
// this.getNotificationReassign();
} else {
this.isUpdate = false;
this.SelAction = "";
this.itemType = this.cs.sharedService.getSharedData(vacationTypeResponse.SHARED_DATA, true);
this.notificationType = this.cs.sharedService.getSharedData(notificationTypeResponse.SHARED_DATA, true);
}
this.Notification_Title = this.notificationType.NOTIFICATION_DISPLAY_NAME;
this.P_ITEM_TYPE_TITLE = this.itemType.ITEM_TYPE_DISPLAY_NAME;
if (this.notificationType.FYI_FLAG == 'Y') {
this.showForType_Y = true;
} else {
this.showForType_Y = false;
}
if (this.itemType.ITEM_TYPE == "*") {
this.isDeliver = false;
} else {
this.isDeliver = true;
}
}
ngOnInit() {
ngOnInit() {
this.getNotificationReassign();
this.respondAttributes();
}
async SearchReplacment() {
const modal = await this.modalController.create({
component: ReplacementListComponent
});
modal.onDidDismiss()
.then((data) => {
const user = data.data.empData;
console.log(data)
console.log(user);
if (data) {
this.selEmployeeName = user.EMPLOYEE_DISPLAY_NAME;
this.selEmployeeID = user.USER_NAME;
this.employeeSel = this.selEmployeeName + "," + this.selEmployeeID
}
});
return await modal.present();
}
clearEmployee() {
this.selEmployeeName = "";
this.selEmployeeID = "";
}
ApplyFunc() {
(this.elementRef.nativeElement.querySelectorAll('ion-item') as HTMLElement[]).forEach((x) => {
if (x.classList.contains('requiredItem')) {
x.classList.add('ng-touched');
x.classList.remove('ng-untouched');
}
});
// console.log(this.msgVal)
let msg: string = "";
if (this.notifTypeSel == undefined) {
msg = this.ts.trPK('vacation-rule', 'fillAction');
// this.common.showAlert(msg);
this.cs.presentAlert(msg);
} else if (this.msgVal == undefined) {
msg = this.ts.trPK('vacation-rule', 'fillMsg');
// this.common.showAlert(msg);
this.cs.presentAlert(msg);
} else if (this.Sdate == undefined) {
msg = this.ts.trPK('vacation-rule', 'fillSDate');
// this.common.showAlert(msg);
this.cs.presentAlert(msg);
} else {
var responseAttrDic = this.exampleJsonObject;
this.P_RESPOND_ATTRIBUTES_TBL = [];
for (let key in responseAttrDic) {
let obj: any = {};
obj.ATTRIBUTE_NAME = key;
if (typeof responseAttrDic[key] === "number") {
obj.ATTRIBUTE_NUMBER_VALUE = responseAttrDic[key];
}
// else if (isDate(responseAttrDic[key])) {
// obj.ATTRIBUTE_DATE_VALUE = responseAttrDic[key];
// }
else {
obj.ATTRIBUTE_TEXT_VALUE = responseAttrDic[key];
}
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
}
let repUserName = this.selEmployeeID;
if (this.hideForwordEmployee && this.hideForwordEmployee.ATTRIBUTE_NAME) {
let obj: any = {};
repUserName = "";
obj.ATTRIBUTE_NAME = this.hideForwordEmployee.ATTRIBUTE_NAME;
obj.ATTRIBUTE_TEXT_VALUE = this.selEmployeeID;
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
}
let pAction = "";
pAction = this.getActionValue();
let jsonSDate = "";
let jsonEDate = "";
if (this.Sdate) {
// let x: any; let y: any;
// x = moment(this.Sdate).format('YYYY/MM/DD');
// if (this.startTime)
// y = moment(this.startTime).format('hh:mm:ss');
// else
// y='00:00:00'
// jsonSDate = this.common.convertISODateToJsonDate(x + " " + y);
let startDate = moment(this.Sdate).format('YYYY-MM-DDTHH:mm:ssZ');
jsonSDate = this.cs.convertISODateToJsonDate(startDate);
} else {
jsonSDate = null;
}
if (this.Edate) {
// let x: any; let y: any;
// x = moment(this.Edate).format('YYYY/MM/DD');
// if (this.endTime)
// y = this.endTime;
// else
// y='00:00:00'
let endDate = moment(this.Edate).format('YYYY-MM-DDTHH:mm:ssZ');
jsonEDate = this.cs.convertISODateToJsonDate(endDate);
//jsonEDate = this.common.convertISODateToJsonDate(x + " " + y);
} else {
jsonEDate = null;
}
let request: createVacationRequest = new createVacationRequest();
request.P_BEGIN_DATE = jsonSDate;
request.P_END_DATE = jsonEDate;
request.P_MESSAGE = this.msgVal;
request.P_REPLACEMENT_USER_NAME = repUserName;
request.P_ITEM_TYPE = this.itemType.ITEM_TYPE;
request.P_NOTIFICATION_NAME = this.notificationType.NOTIFICATION_NAME;
request.P_ACTION = pAction;
request.RespondAttributeList = this.P_RESPOND_ATTRIBUTES_TBL;
this.vacationRuleRequest = request;
this.vacationRuleService.createVacationRule(request, () => {
this.ApplyFunc();
}, this.ts.trPK('general', 'retry')).subscribe((result) => {
if (this.cs.validResponse(result)) {
console.log(result);
this.handlecreateVacationResult(result);
} else {
this.cs.presentAlert(result.ErrorEndUserMessage);
}
});
}
}
handlecreateVacationResult(result) {
if (this.cs.validResponse(result)) {
//this.navCtrl.pop();
this.cs.JustAlertDialog(this.ts.trPK('general', 'ok'), this.ts.trPK('vacation-rule', 'rule-success'))
this.goToStart();
// this.navCtrl.push("VacationRulePage");
// let index= this.navCtrl.indexOf('VacationRulePage');
// this.navCtrl.popTo('VacationRulePage');
}
}
goToStart() {
// let index: number;
// let views: any[] = this.navCtrl()
// let found: boolean = views.some((view, i) => {
// index = i
// return (view.id == 'VacationRulePage')
// })
// found ? this.navCtrl.popTo(views[index]) : this.navCtrl.push("HomePage")
this.cs.navigateRoot('/home')
}
updateVacationRule() {
(this.elementRef.nativeElement.querySelectorAll('ion-item') as HTMLElement[]).forEach((x) => {
if (x.classList.contains('requiredItem')) {
x.classList.add('ng-touched');
x.classList.remove('ng-untouched');
}
});
let msg: string = "";
if (this.notifTypeSel == undefined) {
msg = this.ts.trPK('vacation-rule', 'fillAction');
// this.common.showAlert(msg);
} else if (this.msgVal == undefined) {
msg = this.ts.trPK('vacation-rule', 'fillMsg');
// this.common.showAlert(msg);
} else if (this.Sdate == undefined) {
msg = this.ts.trPK('vacation-rule', 'fillSDate');
// this.common.showAlert(msg);
} else {
var responseAttrDic = this.exampleJsonObject;
this.P_RESPOND_ATTRIBUTES_TBL = [];
for (let key in responseAttrDic) {
let obj: any = {};
obj.ATTRIBUTE_NAME = key;
if (typeof responseAttrDic[key] === "number") {
obj.ATTRIBUTE_NUMBER_VALUE = responseAttrDic[key];
}
// else if (isDate(responseAttrDic[key])) {
// obj.ATTRIBUTE_DATE_VALUE = responseAttrDic[key];
// }
else {
obj.ATTRIBUTE_TEXT_VALUE = responseAttrDic[key];
}
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
}
let repUserName = this.selEmployeeID;
if (this.hideForwordEmployee && this.hideForwordEmployee.ATTRIBUTE_NAME) {
let obj: any = {};
repUserName = "";
obj.ATTRIBUTE_NAME = this.hideForwordEmployee.ATTRIBUTE_NAME;
obj.ATTRIBUTE_TEXT_VALUE = this.selEmployeeID;
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
}
let pAction = "";
pAction = this.getActionValue();
let jsonSDate = "";
let jsonEDate = "";
// if (this.Sdate) {
// let x: any; let y: any;
// x = moment(this.Sdate).format('YYYY/MM/DD');
// if (this.startTime)
// y = moment(this.startTime).format('hh:mm:ss');
// jsonSDate = this.common.convertISODateToJsonDate(x + " " + y);
// } else {
// jsonSDate = null;
// }
if (this.Sdate) {
// let x: any; let y: any;
// x = moment(this.Sdate).format('YYYY/MM/DD');
// if (this.startTime)
// y = moment(this.startTime).format('hh:mm:ss');
// else
// y='00:00:00'
// jsonSDate = this.common.convertISODateToJsonDate(x + " " + y);
let startDate = moment(this.Sdate).format('YYYY-MM-DDTHH:mm:ssZ');
jsonSDate = this.cs.convertISODateToJsonDate(startDate);
} else {
jsonSDate = null;
}
// if (this.Edate)
// jsonEDate = this.common.convertISODateToJsonDate(this.Edate + " " + this.endTime);
// else
// jsonEDate = null;
if (this.Edate) {
// let x: any; let y: any;
// x = moment(this.Edate).format('YYYY/MM/DD');
// if (this.endTime)
// y = moment(this.endTime).format('hh:mm:ss');
// else
// y='00:00:00'
// jsonEDate = this.common.convertISODateToJsonDate(x + " " + y);
let endDate = moment(this.Edate).format('YYYY-MM-DDTHH:mm:ssZ');
jsonEDate = this.cs.convertISODateToJsonDate(endDate);
} else {
jsonEDate = null;
}
let body: any = {
P_RULE_ID: this.updateData.RULE_ID,
P_BEGIN_DATE: jsonSDate,
P_END_DATE: jsonEDate,
P_MESSAGE: this.msgVal,
P_REPLACEMENT_USER_NAME: repUserName,
P_ACTION: pAction,
RespondAttributeList: this.P_RESPOND_ATTRIBUTES_TBL
}
//let request = this.sharedData.getSharedData(vacationRuleResponse.SHARED_DATA);
this.vacationRuleService.updateVacationRule(
body).
subscribe((result: Response) => {
this.handleupdateVacationResult(result);
});
}
}
handleupdateVacationResult(result) {
if (this.cs.validResponse(result)) {
this.cs.JustAlertDialog(this.ts.trPK('general', 'ok'), this.ts.trPK('vacation-rule', 'rule-update-success'))
this.goToStart();
//this.navCtrl.popTo('VacationRulePage');
}
}
getNotificationReassign() {
let request: LoginRequest = new LoginRequest();
@ -68,6 +409,92 @@ export class CreateVacationRuleComponent implements OnInit {
});
}
respondAttributes() {
let request: notificationTypeRequest = new notificationTypeRequest();
request.P_NOTIFICATION_NAME = this.notificationType.NOTIFICATION_NAME;
request.P_ITEM_TYPE = this.itemType.ITEM_TYPE;
// this.vacationRuleService.respondAttributes(
// request).
// subscribe((result: Response) => {
// this.handlerespondAttributesResult(result);
// });
this.vacationRuleService.respondAttributes(request, () => {
this.respondAttributes();
}, this.ts.trPK('general', 'retry')).subscribe((result) => {
this.handlerespondAttributesResult(result);
});
}
handlerespondAttributesResult(result) {
if (this.cs.validResponse(result)) {
this.RespondAttributeList = result.RespondAttributesList;
if (result.RespondRolesList != "" && result.RespondRolesList[0].ATTRIBUTE_NAME != null && result.RespondRolesList[0].ATTRIBUTE_NAME != undefined) {
this.Resp2_val = result.RespondRolesList[0].ATTRIBUTE_NAME;
this.hideForwordEmployee = result.RespondRolesList[0];
}
if (result.P_Schema)
this.schemaNotific = JSON.parse(result.P_Schema);
this.reverseAction();
if (this.isUpdate) {
this.fillResposeAtrributes(result.RespondAttributesList);
}
// ATTRIBUTE_DISPLAY_NAME: "Note"
// ATTRIBUTE_FORMAT: "4000"
// ATTRIBUTE_NAME: "WF_NOTE"
// ATTRIBUTE_TYPE: "VARCHAR2"
}
}
fillResposeAtrributes(respList) {
let body = {
P_RULE_ID: this.updateData.RULE_ID,
GetRespondAttributeValueTBL: respList
}
this.vacationRuleService.getRespondAttributeValues(
body).
subscribe((result: Response) => {
this.handleFillResponseAttr(result);
});
}
handleFillResponseAttr(result) {
if (this.cs.validResponse(result)) {
if (result.GetRespondAttributeValueList && result.GetRespondAttributeValueList.length > 0) {
let resp_val: any = result.GetRespondAttributeValueList[0].P_ATTRIBUTE_NAME;
let Emp_ID: any = result.GetRespondAttributeValueList[0].P_ATTRIBUTE_TEXT_VALUE;
let valueList = result.GetRespondAttributeValueList;
var obj = {};
if (resp_val == this.Resp2_val) {
let request: ReplacementServiceRequest = new ReplacementServiceRequest();
request.P_SEARCH_USER_NAME = Emp_ID;
request.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
request.P_SEARCH_EMAIL_ADDRESS = "";
request.P_PAGE_NUM = 1;
request.P_PAGE_LIMIT = 1000
this.vacationRuleService.getReplacementList(request).
subscribe((result: Response) => {
this.handleFillRole(result);
});
}
for (let i = 0; i < valueList.length; i++) {
obj[valueList[i].P_ATTRIBUTE_NAME] = valueList[i].P_ATTRIBUTE_TEXT_VALUE;
}
this.exampleJsonObject = obj;
// this.exampleJsonObject = new Map(valueList.map(obj => [ obj., obj.P_ATTRIBUTE_TEXT_VALUE ]));
}
}
}
handleFillRole(result) {
if (this.cs.validResponse(result)) {
this.selEmployeeName = result.ReplacementList[0].EMPLOYEE_DISPLAY_NAME;
this.selEmployeeID = result.ReplacementList[0].USER_NAME;
}
}
reverseAction() {
if (this.updateData) {
switch (this.SelAction) {
@ -99,9 +526,40 @@ export class CreateVacationRuleComponent implements OnInit {
}
}
respondAttributes() {
getActionValue(): string {
let pAction = "";
//this.pAction = this.notifTypeSel;
//console.log(this.pAction);
if (this.notifTypeSel) {
switch (this.notifTypeSel) {
case 'DELEGATE': {
pAction = "FORWARD";
break;
}
case 'RESPOND': {
pAction = "RESPOND";
break;
}
case 'CLOSE': {
pAction = "RESPOND";
break;
}
case 'DELIVER': {
pAction = "NOOP";
break;
}
case 'TRANSFER': {
pAction = "TRANSFER";
break;
}
default: {
pAction = "";
break;
}
}
return pAction;
}
}
}

@ -1,8 +1,12 @@
import { vacationRuleResponse } from './../model/vacationRule.Respond';
import { notificationTypeRequest } from './../model/notification.Request';
import { DeleteVacationRuleRequest } from './../model/deleteVacationRule.Request';
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';
import { NavigationExtras, Router } from '@angular/router';
@Component({
selector: 'app-home',
@ -20,102 +24,9 @@ export class HomeComponent implements OnInit {
RespondAttributeList: any;
constructor(public vacationRuleService: VacationRuleServiceService, public ts: TranslatorService, public cs: CommonService) {
constructor(public vacationRuleService: VacationRuleServiceService, public ts: TranslatorService, public cs: CommonService, private router: Router) {
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() {
@ -129,6 +40,7 @@ export class HomeComponent implements OnInit {
}
getVacationRules() {
this.GetVacationRulesList = [];
this.P_PAGE_NUM = 1;
this.IsReachEnd = false;
let request: VacationRuleRequest = new VacationRuleRequest();
@ -139,8 +51,9 @@ export class HomeComponent implements OnInit {
this.getVacationRules();
}, this.ts.trPK('general', 'retry')).subscribe((result) => {
if (this.cs.validResponse(result)) {
console.log(result);
console.log(JSON.stringify(result));
// console.log(result);
// console.log(JSON.stringify(result));
this.GetVacationRulesList = result.GetVacationRulesList;
} else {
this.cs.presentAlert(result.ErrorEndUserMessage);
}
@ -148,9 +61,64 @@ export class HomeComponent implements OnInit {
}
deleteFunc(i) {
let alert = this.cs.confirmAlertDialog(() => {
this.deleteVacationRule(i);
}, this.ts.trPK('general', 'ok'), () => {
}, this.ts.trPK('general', 'cancel'), this.ts.trPK('vacation-rule', 'confirmation'), this.ts.trPK('vacation-rule', 'deleteVR'));
}
deleteVacationRule(i) {
let request: DeleteVacationRuleRequest = new DeleteVacationRuleRequest();
request.P_RULE_ID = this.GetVacationRulesList[i].RULE_ID;
this.vacationRuleService.deleteVacationRule(request, () => {
this.deleteVacationRule(i);
}, this.ts.trPK('general', 'retry')).subscribe((result) => {
if (this.cs.validResponse(result)) {
this.handleDeleteVacationRuleResult(result)
} else {
this.cs.presentAlert(result.ErrorEndUserMessage);
}
});
}
handleDeleteVacationRuleResult(result) {
if (this.cs.validResponse(result)) {
//this.navCtrl.push('HomePage');
this.cs.JustAlertDialog(this.ts.trPK('general', 'ok'), this.ts.trPK('vacation-rule', 'rule-delete-success'));
this.getVacationRules();
}
}
updateFunc(i) {
this.respondAttributes(i);
this.cs.sharedService.setSharedData(this.GetVacationRulesList[i], vacationRuleResponse.SHARED_DATA);
this.isUpdate = true;
this.cs.sharedService.setSharedData(this.isUpdate, 'isUpdate');
this.router.navigate(['/vacation-rule/create-vacation-rule']);
}
respondAttributes(i) {
let request: notificationTypeRequest = new notificationTypeRequest();
request.P_NOTIFICATION_NAME = this.GetVacationRulesList[i].NOTIFICATION_NAME;
request.P_ITEM_TYPE = this.GetVacationRulesList[i].ITEM_TYPE;
this.vacationRuleService.respondAttributes(request, () => {
this.respondAttributes(i);
}, this.ts.trPK('general', 'retry')).subscribe((result) => {
this.handlerespondAttributesResult(result, i);
});
}
handlerespondAttributesResult(result, i) {
// console.log("Respond att: ")
if (this.cs.validResponse(result)) {
// console.log(result.RespondAttributesList);
this.RespondAttributeList = result.RespondAttributesList;
this.GetVacationRulesList[i].RespondAttributeList = this.RespondAttributeList;
}
}
}

@ -0,0 +1,13 @@
import { LoginRequest } from '../../hmg-common/services/authentication/models/login.request';
export class createVacationRequest extends LoginRequest{
public static SHARED_DATA = 'vacation-request';
public P_ITEM_TYPE: string;
public P_BEGIN_DATE: string;
public P_END_DATE: string;
public P_MESSAGE: string;
public P_REPLACEMENT_USER_NAME: string;
public P_NOTIFICATION_NAME: string;
public P_ACTION:string;
public RespondAttributeList: string;
}

@ -0,0 +1,6 @@
import { LoginRequest } from '../../hmg-common/services/authentication/models/login.request';
export class DeleteVacationRuleRequest extends LoginRequest{
public static SHARED_DATA = 'deleteVacation-request';
public P_RULE_ID : number;
}

@ -0,0 +1,10 @@
import { Request } from '../../hmg-common/services/models/request';
export class ReplacementServiceRequest extends Request{
P_SEARCH_USER_NAME:string;
P_SEARCH_EMPLOYEE_DISPLAY_NAME:string;
P_SEARCH_EMAIL_ADDRESS:string;
P_PAGE_NUM:number;
P_PAGE_LIMIT:number;
P_SELECTED_EMPLOYEE_NUMBER:string
}

@ -0,0 +1,27 @@
import { Response } from '../../hmg-common/services/models/response';
export class vacationRuleResponse extends Response {
public static SHARED_DATA = 'vacationRuleRespond-shared';
public ACTION:string;
public ACTION_DISPLAY: string;
public BEGIN_DATE :string;
public END_DATE : string;
public FROM_ROW_NUM :number;
public FYI_FLAG :string;
public ITEM_TYPE : string;
public ITEM_TYPE_DISPLAY_NAME: string;
public MESSAGE: string;
public NOTIFICATION_DISPLAY_NAME: string;
public NOTIFICATION_NAME: string;
public NOTIFICATION_SUBJECT: string;
public NO_OF_ROWS : number;
public REPLACEMENT_USER_NAME: string;
public ROW_NUM : number;
public RULE_ID :number;
public RULE_NAME: string;
public RULE_STATUS: string;
public RULE_TIP_MESSAGE: string;
public TO_ROW_NUM : number;
public RespondAttributeList: any[];
}

@ -0,0 +1,8 @@
import { Response } from '../../hmg-common/services/models/response';
import {VRuleItemType} from './vr.itemType.List'
export class vacationTypeResponse extends Response {
public static SHARED_DATA = 'vacationTypeRespond-shared';
public VrItemTypesList : VRuleItemType[];
}

@ -0,0 +1,5 @@
export class VRuleItemType {
public ITEM_TYPE:string;
public ITEM_TYPE_DISPLAY_NAME: string;
}

@ -1,3 +1,6 @@
import { vacationTypeResponse } from './../model/vacationType.Respond';
import { VRuleItemType } from './../model/vr.itemType.List';
import { notificationTypeResponse } from './../model/notification.Respond';
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';
@ -11,7 +14,7 @@ import { notificationTypeRequest } from '../model/notification.Request';
})
export class NotificationTypeComponent implements OnInit {
itemTypeObj: any;
itemTypeObj: VRuleItemType;
itemType: string;
notifTypeSel: any;
notification_list: any;
@ -19,15 +22,26 @@ export class NotificationTypeComponent implements OnInit {
constructor(public vacationRuleService: VacationRuleServiceService, public ts: TranslatorService, public cs: CommonService) {
this.itemTypeObj = this.cs.sharedService.getSharedData('selectedItemType');
this.itemTypeObj= this.cs.sharedService.getSharedData(vacationTypeResponse.SHARED_DATA, false);
this.itemType = this.itemTypeObj.ITEM_TYPE_DISPLAY_NAME;
}
ngOnInit() {
ngOnInit() {
console.log(this.cs.sharedService.getSharedData(vacationTypeResponse.SHARED_DATA, false));
this.getNotificationType();
}
NextPage() {
if (this.notifTypeSel == "*") {
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);
} else {
this.cs.sharedService.setSharedData(this.notification_list[this.var_notification], notificationTypeResponse.SHARED_DATA);
}
this.cs.navigateForward('/vacation-rule/create-vacation-rule');
}

@ -0,0 +1,55 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<!-- <nav-buttons></nav-buttons> -->
<ion-title color="light">{{ 'vacation-rule, search-employee' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding>
<div style="padding: 0 10px;" [innerHTML]='"vacation-rule, replacement-employee-tip" | translate'></div>
<ion-item>
<ion-label class="boldTxtNav">{{'vacation-rule, search-by' | translate}}</ion-label>
<ion-select okText='{{"general, ok" | translate }}' cancelText='{{"general, cancel" | translate }}'
[(ngModel)]="searchKeySelect">
<ion-select-option value="1" selected="true">{{'vacation-rule, search-by-name' | translate}}</ion-select-option>
<ion-select-option value="2">{{'vacation-rule, search-by-username' | translate}}</ion-select-option>
<ion-select-option value="3">{{'vacation-rule, search-by-email' | translate}}</ion-select-option>
</ion-select>
</ion-item>
<ion-item>
<ion-input [(ngModel)]="searchKey" placeholder="{{'vacation-rule, search-employee' | translate}}"></ion-input>
<ion-button style="width: 19%;" button-type="clear" (click)="SearchReplacementList()">
<ion-icon slot="icon-only" name="search"></ion-icon>
</ion-button>
</ion-item>
<!-- <ion-item>
<ion-list [(ngModel)]="selEmp" *ngIf="ReplacementList">
<ion-item *ngFor="let employee of ReplacementList;let i=index;">
<ion-label><span class="boldTxt">{{employee.EMPLOYEE_DISPLAY_NAME}}</span> <br>{{employee.USER_NAME}}<br>
{{employee.EMAIL_ADDRESS}}</ion-label>
<ion-radio value="{{i}}"></ion-radio>
</ion-item>
</ion-list>
</ion-item> -->
<ion-list>
<ion-radio-group mode="md" [(ngModel)]="selEmp" *ngIf="ReplacementList">
<ion-item *ngFor="let employee of ReplacementList;let i=index;">
<ion-label><span class="boldTxt">{{employee.EMPLOYEE_DISPLAY_NAME}}</span> <br>{{employee.USER_NAME}}<br>
{{employee.EMAIL_ADDRESS}}</ion-label>
<ion-radio value="{{i}}"></ion-radio>
</ion-item>
</ion-radio-group>
</ion-list>
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button (click)="closePage()" class="footer-button" color="customnavy">{{'general, save' | translate}}
</ion-button>
</div>
</ion-footer>

@ -0,0 +1,11 @@
ion-item {
margin-top: 5%;
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 { ReplacementListComponent } from './replacement-list.component';
describe('ReplacementListComponent', () => {
let component: ReplacementListComponent;
let fixture: ComponentFixture<ReplacementListComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ReplacementListComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ReplacementListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,130 @@
import { ReplacementServiceRequest } from './../model/replacement-Service.request';
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 { ModalController } from '@ionic/angular';
@Component({
selector: 'app-replacement-list',
templateUrl: './replacement-list.component.html',
styleUrls: ['./replacement-list.component.scss'],
})
export class ReplacementListComponent implements OnInit {
P_SEARCH_USER_NAME: string = "";
P_SEARCH_EMPLOYEE_DISPLAY_NAME: string = "";
P_SEARCH_EMAIL_ADDRESS: string = "";
P_PAGE_NUM: number = 1;
P_PAGE_LIMIT: number = 50;
ReplacementList: any = [];
IsReachEnd: boolean = false;
selEmp: string = null;
callback: any;
searchKey: any = "";
searchKeySelect: string = "";
replacmentRequest: any = "";
isAbs: boolean = false;
isSave: boolean = false;
constructor(public vacationRuleService: VacationRuleServiceService, public ts: TranslatorService, public cs: CommonService, public modalController: ModalController) { }
ngOnInit() { }
SearchReplacementList() {
this.ReplacementList = [];
this.IsReachEnd = false;
this.P_PAGE_NUM = 1;
if (this.searchKey) {
switch (this.searchKeySelect) {
case '1': {
this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = this.searchKey;
this.P_SEARCH_USER_NAME = "";
this.P_SEARCH_EMAIL_ADDRESS = "";
break;
}
case '2': {
this.P_SEARCH_USER_NAME = this.searchKey;
this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
this.P_SEARCH_EMAIL_ADDRESS = "";
break;
}
case '3': {
this.P_SEARCH_EMAIL_ADDRESS = this.searchKey;
this.P_SEARCH_USER_NAME = "";
this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
break;
}
default: {
this.P_SEARCH_USER_NAME = "";
this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
this.P_SEARCH_EMAIL_ADDRESS = "";
break;
}
}
} else {
this.P_SEARCH_USER_NAME = "";
this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
this.P_SEARCH_EMAIL_ADDRESS = "";
}
const request = new ReplacementServiceRequest();
request.P_SEARCH_USER_NAME = this.P_SEARCH_USER_NAME;
request.P_SEARCH_EMPLOYEE_DISPLAY_NAME = this.P_SEARCH_EMPLOYEE_DISPLAY_NAME;
request.P_SEARCH_EMAIL_ADDRESS = this.P_SEARCH_EMAIL_ADDRESS;
request.P_PAGE_NUM = this.P_PAGE_NUM;
request.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
request.P_SELECTED_EMPLOYEE_NUMBER = this.selEmp;
this.vacationRuleService.getReplacementList(request).
subscribe((result: any) => {
this.handleReplacment(result);
});
}
handleReplacment(result) {
if (this.cs.validResponse(result)) {
if (this.cs.hasData(result.ReplacementList)) {
this.ReplacementList = result.ReplacementList;
this.P_PAGE_NUM++;
let lastItemIndex = this.ReplacementList.length - 1;
if (result.ReplacementList[lastItemIndex]) {
let lastitem = result.ReplacementList[lastItemIndex];
if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) {
this.IsReachEnd = true;
} else {
this.IsReachEnd = false;
}
}
}
}
}
doInfinite(infiniteScroll) {
}
closePage() {
this.isSave = true;
let data: any = null;
if (this.isSave == true) {
if (this.selEmp) {
data = this.ReplacementList[this.selEmp];
} else {
data = null;
}
if (typeof this.callback == 'function') {
this.callback(data);
}
this.modalController.dismiss({
'dismissed': true,
empData: data
});
}
}
}

@ -1,3 +1,4 @@
import { ReplacementServiceRequest } from './../model/replacement-Service.request';
import { notificationTypeRequest } from './../model/notification.Request';
import { Response } from 'src/app/hmg-common/services/models/response';
import { VacationRuleRequest } from './../model/VacationRuleRequest';
@ -7,6 +8,7 @@ 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';
import { DeleteVacationRuleRequest } from '../model/deleteVacationRule.Request';
@Injectable({
providedIn: 'root'
@ -24,11 +26,13 @@ export class VacationRuleServiceService {
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';
public static getRespondAttributeValues = 'Services/ERP.svc/REST/GET_RESPOND_ATTRIBUTE_VALUE';
public static getReplacmentEmployeeList = 'Services/ERP.svc/REST/GET_REPLACEMENT_LIST';
constructor(public authService: AuthenticationService, public con: ConnectorService) { }
public getVacationRule(vacationRuleRequest: VacationRuleRequest, onError: any, errorLabel: string): Observable<Response> {
public getVacationRule(vacationRuleRequest: VacationRuleRequest, onError: any, errorLabel: string): Observable<any> {
const request = vacationRuleRequest;
console.log(request);
this.authService.authenticateRequest(request);
@ -53,4 +57,39 @@ export class VacationRuleServiceService {
return this.con.post(VacationRuleServiceService.notificationReassign, request, onError, errorLabel);
}
public respondAttributes(notificationTypeRequest: notificationTypeRequest, onError: any, errorLabel: string): Observable<any> {
const request = notificationTypeRequest;
this.authService.authenticateRequest(request);
return this.con.post(VacationRuleServiceService.respondAttributes, request, onError, errorLabel);
}
public getRespondAttributeValues(repsondAttrValues: any, onError?: any, errorLabel?: string): Observable<any> {
const request = repsondAttrValues;
this.authService.authenticateRequest(request);
return this.con.post(VacationRuleServiceService.getRespondAttributeValues, request, onError, errorLabel);
}
public getReplacementList(req: ReplacementServiceRequest, onError?: any, errorLabel?: string): Observable<any> {
const request = req;
this.authService.authenticateRequest(request);
return this.con.post(VacationRuleServiceService.getReplacmentEmployeeList, request, onError, errorLabel);
}
public createVacationRule(ActionHistoryRequest: LoginRequest, onError?: any, errorLabel?: string): Observable<any> {
const request = ActionHistoryRequest;
this.authService.authenticateRequest(request);
return this.con.post(VacationRuleServiceService.createVacationRule, request, onError, errorLabel);
}
public updateVacationRule(ActionHistoryRequest: LoginRequest, onError?: any, errorLabel?: string): Observable<any> {
const request = ActionHistoryRequest;
this.authService.authenticateRequest(request);
return this.con.post(VacationRuleServiceService.updateVacationRule, request, onError, errorLabel);
}
public deleteVacationRule(ActionHistoryRequest: DeleteVacationRuleRequest, onError?: any, errorLabel?: string): Observable<any> {
const request = ActionHistoryRequest;
this.authService.authenticateRequest(request);
return this.con.post(VacationRuleServiceService.deleteVacationRule, request, onError, errorLabel);
}
}

@ -4,13 +4,15 @@ 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';
// import { JsonSchemaFormModule, Framework, WidgetLibraryService, FrameworkLibraryService, JsonSchemaFormService } from 'angular6-json-schema-form';
import { ReplacementListComponent } from './replacement-list/replacement-list.component';
// import { MaterialDesignFrameworkModule } from 'angular6-json-schema-form';
const routes: Routes = [
{
@ -32,6 +34,10 @@ const routes: Routes = [
{
path: 'create-vacation-rule',
component: CreateVacationRuleComponent
},
{
path: 'replacement-list',
component: ReplacementListComponent
}
]
}
@ -43,6 +49,17 @@ const routes: Routes = [
FormsModule,
IonicModule,
HmgCommonModule,
// {
// ngModule: JsonSchemaFormModule,
// providers: [
// JsonSchemaFormService,
// FrameworkLibraryService,
// WidgetLibraryService,
// // { provide: Framework, useClass: IonicFramework, multi: true }
// ]
// },
// IonicFrameworkModule,
// MaterialDesignFrameworkModule,
RouterModule.forChild(routes)
],
declarations: [
@ -50,7 +67,8 @@ const routes: Routes = [
HomeComponent,
VacationTypeComponent,
NotificationTypeComponent,
CreateVacationRuleComponent
CreateVacationRuleComponent,
ReplacementListComponent
]
})
export class VacationRulePageModule { }

@ -1,3 +1,4 @@
import { vacationTypeResponse } from './../model/vacationType.Respond';
import { notificationTypeResponse } from './../model/notification.Respond';
import { VacationTypeRequest } from './../model/VacationTypeRequest';
import { Component, OnInit } from '@angular/core';
@ -37,8 +38,7 @@ export class VacationTypeComponent implements OnInit {
}
NextPage() {
this.cs.sharedService.setSharedData(this.ruleTypeList[this.index], 'selectedItemType');
this.cs.navigateForward('/vacation-rule/notification-type');
this.cs.sharedService.setSharedData(this.ruleTypeList[this.index], vacationTypeResponse.SHARED_DATA);
if (this.ruleTypeList[this.index].ITEM_TYPE == "*") {
let notificatioAtt: notificationTypeResponse = new notificationTypeResponse();

@ -878,6 +878,78 @@
"message-label": {
"en": "Message",
"ar": "رسالة"
},
"fillMsg": {
"en": "Please fill message field",
"ar": "يرجى ملء حقل الرسالة"
},
"fillSDate": {
"en": "Please fill start date",
"ar": "يرجى ملء تاريخ البدء"
},
"fillAction": {
"en": "Please fill action field",
"ar": "يرجى ملء حقل العمل"
},
"deliver": {
"en": "Deliver notifications to me regardless of any general rules",
"ar": "تسليم الإخطارات لي بغض النظر عن أي قواعد عامة"
},
"close": {
"en": "Close",
"ar": "أغلق"
},
"respond": {
"en": "Respond",
"ar": "رد"
},
"apply": {
"en": "Apply",
"ar": "تطبيق"
},
"update": {
"en": "Update",
"ar": "تحديث"
},
"search-employee": {
"en": "Search for an Employee",
"ar": "البحث عن موظف"
},
"replacement-employee-tip": {
"en": "You can search for an employee by <span class=\"boldTxtNav\">Name </span>, <span class=\"boldTxtNav\">User Name </span> and <span class=\"boldTxtNav\">Email </span>",
"ar": "يمكنك البحث عن موظف ب <span class=\"boldTxtNav\">الاسم </span>, <span class=\"boldTxtNav\">اسم المستخدم </span> ,أو <span class=\"boldTxtNav\">البريد الإلكتروني </span>"
},
"search-by": {
"en": "Search by",
"ar": "البحث بواسطة"
},
"search-by-name": {
"en": "Name",
"ar": "اسم"
},
"search-by-username": {
"en": "Username",
"ar": "اسم المستخدم"
},
"search-by-email": {
"en": "Email",
"ar": "البريد الإلكتروني"
},
"confirmation": {
"en": "Confirmation",
"ar": "البريد الإلكتروني"
},
"rule-success": {
"en": "Rule created successfully",
"ar": "تم إنشاء القاعدة بنجاح"
},
"rule-delete-success": {
"en": "Rule deleted successfully",
"ar": "تم حذف القاعدة بنجاح"
},
"rule-update-success": {
"en": "Rule updated successfully",
"ar": "تم تحديث القاعدة بنجاح"
}
},
"absenceList": {

Loading…
Cancel
Save