Merge branch 'master' of https://hmg.git.cloudforge.com/mohemmionic5
commit
30f0b949c6
@ -1,7 +1,2 @@
|
||||
.header-toolbar{
|
||||
--background: linear-gradient(45deg, #3ac1f1 0%, #19a163 36%, #19a163 59%, #1a586d 100%);
|
||||
}
|
||||
|
||||
.btnBack{
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
|
||||
@ -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
Loading…
Reference in New Issue