Q3 CHANGES
parent
dba1286f42
commit
1201adb5ed
@ -1,42 +1,46 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
|
||||
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: '', redirectTo: 'authentication/login', pathMatch: 'full' },
|
||||
{
|
||||
path: 'authentication', loadChildren: './authentication/authentication.module#AuthenticationPageModule'
|
||||
},
|
||||
{ path: 'home', loadChildren: './home/home.module#HomePageModule' },
|
||||
{ path: 'profile', loadChildren: './profile/profile.module#ProfilePageModule' },
|
||||
{ path: 'vacation-rule', loadChildren: './vacation-rule/vacation-rule.module#VacationRulePageModule' },
|
||||
{ path: 'accrual-balances', loadChildren: './accrual-balances/accrual-balances.module#AccrualBalancesPageModule' },
|
||||
{ path: 'my-team', loadChildren: './my-team/my-team.module#MyTeamPageModule' },
|
||||
{ path: 'attendance', loadChildren: './attendance/attendance.module#AttendancePageModule' },
|
||||
{ path: 'eit', loadChildren: './eit/eit.module#EITPageModule' },
|
||||
{ path: 'absence', loadChildren: './absence/absence.module#AbsencePageModule' },
|
||||
{ path: 'notification', loadChildren: './notification/notification.module#NotificationPageModule' },
|
||||
{ path: 'my-specialist', loadChildren: './my-specialist/my-specialist.module#MySpecialistPageModule' },
|
||||
{ path: 'my-subordinate', loadChildren: './my-subordinate/my-subordinate.module#MySubordinatePageModule' },
|
||||
{ path: 'time-card', loadChildren: './time-card/time-card.module#TimeCardPageModule' },
|
||||
{ path: 'payslip', loadChildren: './payslip/payslip.module#PayslipPageModule' },
|
||||
{ path: 'attendance-tracking', loadChildren: './attendance-tracking/attendance-tracking.module#AttendanceTrackingPageModule' },
|
||||
{ path: 'itemforsale', loadChildren: './itemforsale/itemforsale.module#ItemforsalePageModule' },
|
||||
{ path: 'offersdiscount', loadChildren: './offersdiscount/offersdiscount.module#OffersdiscountPageModule' },
|
||||
{ path: 'mowadhafi', loadChildren: './mowadhafi/mowadhafi.module#MowadhafiPageModule' },
|
||||
{ path: 'erm-channel', loadChildren: './erm-channel/erm-channel.module#ErmChannelPageModule' },
|
||||
{ path: 'backend-integrations', loadChildren: './backend-integrations/backend-integrations.module#BackendIntegrationsPageModule' },
{ path: 'reports', loadChildren: './reports/reports.module#ReportsPageModule' },
|
||||
{ path: 'concurrent-report', loadChildren: './reports/concurrent-report/concurrent-report.module#ConcurrentReportPageModule' },
|
||||
{ path: 'termination', loadChildren: './termination/termination.module#TerminationPageModule' },
|
||||
{ path: 'pending-transaction', loadChildren: './pending-transaction/pending-transaction.module#PendingTransactionPageModule' }
|
||||
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: '', redirectTo: 'authentication/login', pathMatch: 'full' },
|
||||
{
|
||||
path: 'authentication', loadChildren: './authentication/authentication.module#AuthenticationPageModule'
|
||||
},
|
||||
{ path: 'home', loadChildren: './home/home.module#HomePageModule' },
|
||||
{ path: 'profile', loadChildren: './profile/profile.module#ProfilePageModule' },
|
||||
{ path: 'vacation-rule', loadChildren: './vacation-rule/vacation-rule.module#VacationRulePageModule' },
|
||||
{ path: 'accrual-balances', loadChildren: './accrual-balances/accrual-balances.module#AccrualBalancesPageModule' },
|
||||
{ path: 'my-team', loadChildren: './my-team/my-team.module#MyTeamPageModule' },
|
||||
{ path: 'attendance', loadChildren: './attendance/attendance.module#AttendancePageModule' },
|
||||
{ path: 'eit', loadChildren: './eit/eit.module#EITPageModule' },
|
||||
{ path: 'absence', loadChildren: './absence/absence.module#AbsencePageModule' },
|
||||
{ path: 'notification', loadChildren: './notification/notification.module#NotificationPageModule' },
|
||||
{ path: 'my-specialist', loadChildren: './my-specialist/my-specialist.module#MySpecialistPageModule' },
|
||||
{ path: 'my-subordinate', loadChildren: './my-subordinate/my-subordinate.module#MySubordinatePageModule' },
|
||||
{ path: 'time-card', loadChildren: './time-card/time-card.module#TimeCardPageModule' },
|
||||
{ path: 'payslip', loadChildren: './payslip/payslip.module#PayslipPageModule' },
|
||||
{ path: 'attendance-tracking', loadChildren: './attendance-tracking/attendance-tracking.module#AttendanceTrackingPageModule' },
|
||||
{ path: 'itemforsale', loadChildren: './itemforsale/itemforsale.module#ItemforsalePageModule' },
|
||||
{ path: 'offersdiscount', loadChildren: './offersdiscount/offersdiscount.module#OffersdiscountPageModule' },
|
||||
{ path: 'mowadhafi', loadChildren: './mowadhafi/mowadhafi.module#MowadhafiPageModule' },
|
||||
{ path: 'erm-channel', loadChildren: './erm-channel/erm-channel.module#ErmChannelPageModule' },
|
||||
{ path: 'backend-integrations', loadChildren: './backend-integrations/backend-integrations.module#BackendIntegrationsPageModule' }
|
||||
|
||||
|
||||
|
||||
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
/*RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules}),*/
|
||||
RouterModule.forRoot(routes),
|
||||
],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class AppRoutingModule { }
|
||||
|
||||
|
||||
|
||||
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
/*RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules}),*/
|
||||
RouterModule.forRoot(routes),
|
||||
],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class AppRoutingModule { }
|
||||
|
||||
@ -1,15 +1,26 @@
|
||||
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 { ItemForSaleService } from '../services/service.service';
|
||||
import * as moment from 'moment';
|
||||
@Component({
|
||||
selector: 'app-item-details',
|
||||
templateUrl: './item-details.component.html',
|
||||
styleUrls: ['./item-details.component.scss'],
|
||||
})
|
||||
export class ItemDetailsComponent implements OnInit {
|
||||
itemDetails: any = {};
|
||||
direction: any;
|
||||
|
||||
constructor(public ts: TranslatorService, public cs: CommonService,) { }
|
||||
|
||||
ngOnInit() { }
|
||||
ngOnInit() {
|
||||
this.direction = TranslatorService.getCurrentDirection();
|
||||
this.itemDetails = this.cs.sharedService.getSharedData(ItemForSaleService.ITEMS_SELECTED, false);
|
||||
console.log(this.itemDetails);
|
||||
}
|
||||
getDate(date) {
|
||||
return moment(date, "YYYY-MM-DD HH:mm:ss").format("DD-MMM-YYYY");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,15 @@
|
||||
import { Pipe, PipeTransform } from "@angular/core";
|
||||
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
||||
|
||||
@Pipe({
|
||||
name: 'sanitizeHTMLPipe'
|
||||
})
|
||||
export class SanitizeHtmlPipe implements PipeTransform {
|
||||
|
||||
constructor(private _sanitizer: DomSanitizer) {
|
||||
}
|
||||
|
||||
transform(v: string): SafeHtml {
|
||||
return this._sanitizer.bypassSecurityTrustHtml(v);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ItemForSaleService } from './service.service';
|
||||
|
||||
describe('ServiceService', () => {
|
||||
beforeEach(() => TestBed.configureTestingModule({}));
|
||||
|
||||
it('should be created', () => {
|
||||
const service: ItemForSaleService = TestBed.get(ItemForSaleService);
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,51 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
|
||||
import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ItemForSaleService {
|
||||
public static getItemForSale = 'Services/COCWS.svc/REST/Mohemm_ITG_GetItemForSale';
|
||||
public static getItemForSaleByEmployee = 'Services/COCWS.svc/REST/Mohemm_ITG_GetItemForSaleByEmployee';
|
||||
public static getCategories = 'Services/COCWS.svc/REST/Mohemm_ITG_GetItemSaleCategory';
|
||||
public static ITEMS_SELECTED = 'item-selected';
|
||||
|
||||
constructor(
|
||||
public con: ConnectorService,
|
||||
private authService: AuthenticationService
|
||||
) { }
|
||||
public getItems(request: any, onError?: any, errorLabel?: string) {
|
||||
this.authService.authenticateRequest(request);
|
||||
request.EmployeeNumber = request.UserName;
|
||||
request.ItgPageNo = request.pageNo;
|
||||
request.ItgPageSize = 10;
|
||||
request.ItgStatus = "Approved";
|
||||
return this.con.post(ItemForSaleService.getItemForSale, request, onError, errorLabel);
|
||||
}
|
||||
|
||||
public getCategories(request: any, onError?: any, errorLabel?: string) {
|
||||
this.authService.authenticateRequest(request);
|
||||
request.EmployeeNumber = request.UserName;
|
||||
|
||||
return this.con.post(ItemForSaleService.getCategories, request, onError, errorLabel);
|
||||
}
|
||||
parser(response: any) {
|
||||
try {
|
||||
var result = JSON.parse(response.Mohemm_ITG_ResponseItem);
|
||||
if (result.result)
|
||||
return result.result.data
|
||||
else
|
||||
return {}
|
||||
} catch (res) {
|
||||
console.log(res);
|
||||
}
|
||||
}
|
||||
|
||||
getItemsByEmployee(request: any, onError?: any, errorLabel?: string) {
|
||||
this.authService.authenticateRequest(request);
|
||||
request.EmployeeNumber = request.UserName;
|
||||
request.ItgEmployeeNumber = 111209;
|
||||
return this.con.post(ItemForSaleService.getItemForSaleByEmployee, request, onError, errorLabel);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,94 @@
|
||||
|
||||
<ion-content>
|
||||
<div class="head-title">
|
||||
|
||||
<app-generic-header showImage="false" showBack="true" [headerText]="'general,pending-transaction' | translate">
|
||||
</app-generic-header>
|
||||
</div>
|
||||
<div class="header"></div>
|
||||
<div class="bottom"></div>
|
||||
<div #containerDiv id="containerDiv">
|
||||
<ion-row class="ion-justify-content-center">
|
||||
<ion-col [size]="11">
|
||||
<ion-item>
|
||||
<ion-label>{{ 'general,select' | translate}}</ion-label>
|
||||
<ion-select [(ngModel)]="selectedTransaction" (ionChange)="selectFunctions()" [placeholder]="'general,select' | translate"
|
||||
[okText]="'general,ok' | translate" [cancelText]="'general,cancel' | translate" class="large-ion-select">
|
||||
<ion-select-option *ngFor="let transaction of transactions" [value]="transaction">
|
||||
{{ transaction.FUNCTION_PROMPT}}</ion-select-option></ion-select>
|
||||
|
||||
</ion-item>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<div class="date-container">
|
||||
<ion-row class="ion-justify-content-center">
|
||||
<ion-col [size]="11">
|
||||
<ion-item>
|
||||
<div class="date-time-icon date-primary"></div>
|
||||
<ion-label>{{ 'general,from-date' | translate}}</ion-label>
|
||||
<ion-datetime
|
||||
[placeholder]="Select"
|
||||
display-format="DD/MM/YYYY"
|
||||
[min]="1900"
|
||||
[max]="2100"
|
||||
[(ngModel)]="dateFrom"
|
||||
doneText="Done"
|
||||
cancelText="Cancel"
|
||||
></ion-datetime>
|
||||
</ion-item>
|
||||
</ion-col>
|
||||
<ion-col [size]="11">
|
||||
<ion-item>
|
||||
<div class="date-time-icon date-primary"></div>
|
||||
<ion-label>{{ 'general,to-date' | translate}}</ion-label>
|
||||
<ion-datetime
|
||||
[placeholder]="Select"
|
||||
display-format="DD/MM/YYYY"
|
||||
[min]="1900"
|
||||
[max]="2100"
|
||||
[(ngModel)]="dateTo"
|
||||
doneText="Done"
|
||||
cancelText="Cancel"
|
||||
></ion-datetime>
|
||||
</ion-item>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="data-content">
|
||||
<div class="no-dataDiv"
|
||||
*ngIf="transactionDetails && transactionDetails.length==0">
|
||||
<!-- <div class="no-dataDiv"> -->
|
||||
<ion-row>
|
||||
<img class="empty-data" src="../assets/imgs/box.png" />
|
||||
</ion-row>
|
||||
<h4> {{'general, noData' | translate}}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="transactionDetails && transactionDetails.length>0" class="transaction-list">
|
||||
<ion-item *ngFor="let transaction of transactionDetails">
|
||||
<div class="date">{{transaction.CREATION_DATE}}</div>
|
||||
<ion-label class="ion-text-wrap">
|
||||
<ion-text color="primary">
|
||||
<p class="display-created " >{{'transaction, created-for' | translate}}</p>
|
||||
<p class="display-created bold padding">{{transaction.TRANSACTION_CREATED_FOR}}</p>
|
||||
</ion-text>
|
||||
|
||||
<ion-text color="secondary">
|
||||
<p class="color-black">{{'transaction, request-type' | translate}}</p>
|
||||
<p>{{transaction.REQUEST_TYPE}}</p>
|
||||
</ion-text>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
<ion-footer>
|
||||
<div class="centerDiv">
|
||||
<ion-button class="addEitOkButton" [disabled]="!isValid()" color="customnavy" ion-button (click)="getPendingRequestDetails()">
|
||||
{{'general, submit' | translate}}</ion-button>
|
||||
</div>
|
||||
</ion-footer>
|
||||
@ -0,0 +1,25 @@
|
||||
.display-created{
|
||||
display: inline-block;
|
||||
|
||||
color:#000;
|
||||
}
|
||||
.padding{
|
||||
padding-left:5px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
.bold{
|
||||
font-weight: bold;
|
||||
}
|
||||
.color-black{
|
||||
color:#000;
|
||||
}
|
||||
.date{
|
||||
position: absolute;
|
||||
font-size: 12px;
|
||||
padding: 10px;
|
||||
right:0;
|
||||
|
||||
}
|
||||
.transaction-list{
|
||||
margin-top:20px;
|
||||
}
|
||||
@ -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,56 @@
|
||||
import { Component, ElementRef, OnInit } from '@angular/core';
|
||||
import { EitService } from 'src/app/eit/services/eit.service';
|
||||
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
|
||||
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
|
||||
import { ServiceService } from '../service/service.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-home',
|
||||
templateUrl: './home.component.html',
|
||||
styleUrls: ['./home.component.scss'],
|
||||
})
|
||||
export class HomeComponent implements OnInit {
|
||||
public direction: any;
|
||||
public transactions: any = [];
|
||||
public selectedTransaction: any;
|
||||
public dateTo: any;
|
||||
public dateFrom: any;
|
||||
public transactionDetails;
|
||||
constructor(public cs: CommonService, private elementRef: ElementRef, public trServcice: ServiceService, public ts: TranslatorService, public eitService: EitService) { }
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
|
||||
this.getPendingTransaction();
|
||||
this.direction = TranslatorService.getCurrentLanguageName();
|
||||
|
||||
}
|
||||
getPendingTransaction() {
|
||||
this.cs.startLoading();
|
||||
this.trServcice.getPendingRequests({
|
||||
}, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => {
|
||||
this.cs.stopLoading();
|
||||
this.transactions = response['GetPendingReqFunctionsList'];
|
||||
})
|
||||
}
|
||||
getPendingRequestDetails() {
|
||||
this.cs.startLoading();
|
||||
this.trServcice.getPendingRequestDetails({
|
||||
'P_FUNCTION_ID': this.selectedTransaction.FUNCTION_ID,
|
||||
'P_CREATION_DATE_FROM': "/Date(" + Date.parse(this.dateFrom) + '+0300' + ")/",
|
||||
'P_CREATION_DATE_TO': "/Date(" + Date.parse(this.dateTo) + '+0300' + ")/",
|
||||
'P_PAGE_NUM': 1,
|
||||
'P_PAGE_LIMIT': 20,
|
||||
|
||||
}, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => {
|
||||
this.cs.stopLoading();
|
||||
this.transactionDetails = response['GetPendingReqDetailsList'];
|
||||
})
|
||||
}
|
||||
isValid() {
|
||||
if (this.selectedTransaction && this.dateFrom && this.dateTo)
|
||||
return true;
|
||||
else return false
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
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 { PendingTransactionPage } from './pending-transaction.page';
|
||||
import { HomeComponent } from './home/home.component';
|
||||
import { ServiceService } from './service/service.service';
|
||||
import { HmgCommonModule } from '../hmg-common/hmg-common.module';
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: PendingTransactionPage,
|
||||
children: [
|
||||
{
|
||||
path: 'home',
|
||||
component: HomeComponent
|
||||
},
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
RouterModule.forChild(routes),
|
||||
HmgCommonModule
|
||||
],
|
||||
declarations: [PendingTransactionPage, HomeComponent],
|
||||
providers: [ServiceService]
|
||||
})
|
||||
export class PendingTransactionPageModule { }
|
||||
@ -0,0 +1,4 @@
|
||||
|
||||
<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 { PendingTransactionPage } from './pending-transaction.page';
|
||||
|
||||
describe('PendingTransactionPage', () => {
|
||||
let component: PendingTransactionPage;
|
||||
let fixture: ComponentFixture<PendingTransactionPage>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ PendingTransactionPage ],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PendingTransactionPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-pending-transaction',
|
||||
templateUrl: './pending-transaction.page.html',
|
||||
styleUrls: ['./pending-transaction.page.scss'],
|
||||
})
|
||||
export class PendingTransactionPage implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ServiceService } from './service.service';
|
||||
|
||||
describe('ServiceService', () => {
|
||||
beforeEach(() => TestBed.configureTestingModule({}));
|
||||
|
||||
it('should be created', () => {
|
||||
const service: ServiceService = TestBed.get(ServiceService);
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,44 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
|
||||
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
|
||||
import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ServiceService {
|
||||
|
||||
|
||||
public static GET_PENDING_REQ_FUNCTIONS = 'Services/ERP.svc/REST/GET_PENDING_REQ_FUNCTIONS';
|
||||
public static GET_PENDING_REQ_DETAILS = 'Services/ERP.svc/REST/GET_PENDING_REQ_DETAILS';
|
||||
constructor(
|
||||
public con: ConnectorService,
|
||||
private authService: AuthenticationService,
|
||||
public cs: CommonService
|
||||
) { }
|
||||
|
||||
getPendingRequests(request, onError, errorLabel) {
|
||||
this.authService.authenticateRequest(request);
|
||||
request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
|
||||
return this.con.postNoLoad(
|
||||
ServiceService.GET_PENDING_REQ_FUNCTIONS,
|
||||
request,
|
||||
onError,
|
||||
errorLabel
|
||||
);
|
||||
}
|
||||
getPendingRequestDetails(request, onError, errorLabel) {
|
||||
this.authService.authenticateRequest(request);
|
||||
request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
|
||||
return this.con.postNoLoad(
|
||||
ServiceService.GET_PENDING_REQ_DETAILS,
|
||||
request,
|
||||
onError,
|
||||
errorLabel
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
<ion-content>
|
||||
<div class="head-title">
|
||||
|
||||
<app-generic-header showImage="false" showBack="true" [headerText]="'general,concurrent-report' | translate">
|
||||
</app-generic-header>
|
||||
</div>
|
||||
<div class="header"></div>
|
||||
<div class="bottom"></div>
|
||||
|
||||
<div class="main-container">
|
||||
<ion-item>
|
||||
<ion-label>{{ 'worklist,template-name' | translate}}</ion-label>
|
||||
<ion-select [(ngModel)]="template" (ionChange)="selectTemplates()" [placeholder]="'general,select' | translate"
|
||||
[okText]="'general,ok' | translate" [cancelText]="'general,cancel' | translate" class="large-ion-select">
|
||||
<ion-select-option *ngFor="let program of programList" [value]="program">
|
||||
{{ program.CONCURRENT_PROGRAM_NAME}}</ion-select-option></ion-select>
|
||||
|
||||
</ion-item>
|
||||
<div class="divider"></div>
|
||||
<div #containerDiv id="containerDiv">
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
<ion-footer>
|
||||
<div class="centerDiv">
|
||||
<ion-button class="addEitOkButton" color="customnavy" ion-button (click)="submitTransaction()">
|
||||
{{'vacation-rule, next-label' | translate}}</ion-button>
|
||||
</div>
|
||||
</ion-footer>
|
||||
@ -0,0 +1,6 @@
|
||||
.main-container{
|
||||
padding: 10px;
|
||||
}
|
||||
.divider{
|
||||
height:20px
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ConcurrentReportComponent } from './concurrent-report.component';
|
||||
|
||||
describe('ConcurrentReportComponent', () => {
|
||||
let component: ConcurrentReportComponent;
|
||||
let fixture: ComponentFixture<ConcurrentReportComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ConcurrentReportComponent ],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ConcurrentReportComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,12 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ReportServiceService } from './report-service.service';
|
||||
|
||||
describe('ReportServiceService', () => {
|
||||
beforeEach(() => TestBed.configureTestingModule({}));
|
||||
|
||||
it('should be created', () => {
|
||||
const service: ReportServiceService = TestBed.get(ReportServiceService);
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,49 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { AuthenticationService } from '../hmg-common/services/authentication/authentication.service';
|
||||
import { CommonService } from '../hmg-common/services/common/common.service';
|
||||
import { ConnectorService } from '../hmg-common/services/connector/connector.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ReportServiceService {
|
||||
public static GET_CONCURRENT_PROGRAM = 'Services/ERP.svc/REST/GET_CONCURRENT_PROGRAMS';
|
||||
public static GET_CPP_DIFF_STRUCTURE = 'Services/ERP.svc/REST/GET_CCP_DFF_STRUCTURE';
|
||||
public static SUBMIT_CPP_REQUEST = 'Services/ERP.svc/REST/SUBMIT_CCP_TRANSACTION'
|
||||
constructor(
|
||||
public con: ConnectorService,
|
||||
private authService: AuthenticationService,
|
||||
public cs: CommonService
|
||||
) { }
|
||||
|
||||
getConcurrentProgram(request, onError, errorLabel) {
|
||||
this.authService.authenticateRequest(request);
|
||||
request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
|
||||
return this.con.postNoLoad(
|
||||
ReportServiceService.GET_CONCURRENT_PROGRAM,
|
||||
request,
|
||||
onError,
|
||||
errorLabel
|
||||
);
|
||||
}
|
||||
getCPPDiffStructure(request, onError, errorLabel) {
|
||||
this.authService.authenticateRequest(request);
|
||||
request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
|
||||
return this.con.postNoLoad(
|
||||
ReportServiceService.GET_CPP_DIFF_STRUCTURE,
|
||||
request,
|
||||
onError,
|
||||
errorLabel
|
||||
);
|
||||
}
|
||||
submitTransaction(request, onError, errorLabel) {
|
||||
this.authService.authenticateRequest(request);
|
||||
request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
|
||||
return this.con.postNoLoad(
|
||||
ReportServiceService.SUBMIT_CPP_REQUEST,
|
||||
request,
|
||||
onError,
|
||||
errorLabel
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
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 { ReportsPage } from './reports.page';
|
||||
import { ConcurrentReportComponent } from './concurrent-report/concurrent-report.component';
|
||||
import { ReportServiceService } from './report-service.service';
|
||||
import { HmgCommonModule } from '../hmg-common/hmg-common.module';
|
||||
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: ReportsPage,
|
||||
children: [
|
||||
{
|
||||
path: 'concurrent-report',
|
||||
component: ConcurrentReportComponent
|
||||
},
|
||||
|
||||
],
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
RouterModule.forChild(routes),
|
||||
HmgCommonModule
|
||||
],
|
||||
declarations: [ReportsPage, ConcurrentReportComponent],
|
||||
providers: [ReportServiceService]
|
||||
})
|
||||
export class ReportsPageModule { }
|
||||
@ -0,0 +1,3 @@
|
||||
<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 { ReportsPage } from './reports.page';
|
||||
|
||||
describe('ReportsPage', () => {
|
||||
let component: ReportsPage;
|
||||
let fixture: ComponentFixture<ReportsPage>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ReportsPage ],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ReportsPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-reports',
|
||||
templateUrl: './reports.page.html',
|
||||
styleUrls: ['./reports.page.scss'],
|
||||
})
|
||||
export class ReportsPage implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { TerminationServiceService } from './termination-service.service';
|
||||
|
||||
describe('TerminationServiceService', () => {
|
||||
beforeEach(() => TestBed.configureTestingModule({}));
|
||||
|
||||
it('should be created', () => {
|
||||
const service: TerminationServiceService = TestBed.get(TerminationServiceService);
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,40 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
|
||||
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
|
||||
import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class TerminationServiceService {
|
||||
|
||||
public static GET_TERM_COLS_STRUCTURE = 'Services/ERP.svc/REST/GET_TERM_COLS_STRUCTURE';
|
||||
public static GET_TERM_DIFF_STRUCTURE = 'Services/ERP.svc/REST/GET_TERM_DFF_STRUCTURE';
|
||||
public static TERMINATION_PAGE = 'termination-page';
|
||||
|
||||
constructor(
|
||||
public con: ConnectorService,
|
||||
private authService: AuthenticationService,
|
||||
public cs: CommonService
|
||||
) { }
|
||||
getTerminationColStructure(request, onError, errorLabel) {
|
||||
this.authService.authenticateRequest(request);
|
||||
request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
|
||||
return this.con.postNoLoad(
|
||||
TerminationServiceService.GET_TERM_COLS_STRUCTURE,
|
||||
request,
|
||||
onError,
|
||||
errorLabel
|
||||
);
|
||||
}
|
||||
getTermDiffStructure(request, onError, errorLabel) {
|
||||
this.authService.authenticateRequest(request);
|
||||
request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
|
||||
return this.con.postNoLoad(
|
||||
TerminationServiceService.GET_TERM_DIFF_STRUCTURE,
|
||||
request,
|
||||
onError,
|
||||
errorLabel
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
<ion-content>
|
||||
<div class="head-title">
|
||||
|
||||
<app-generic-header showImage="false" showBack="true" [headerText]="'general,termination' | translate">
|
||||
</app-generic-header>
|
||||
</div>
|
||||
<div class="header"></div>
|
||||
<div class="bottom"></div>
|
||||
<div #containerDiv id="containerDiv">
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
<ion-footer>
|
||||
<div class="centerDiv">
|
||||
<ion-button class="addEitOkButton" color="customnavy" ion-button (click)="validateTransaction()">
|
||||
{{'vacation-rule, next-label' | translate}}</ion-button>
|
||||
</div>
|
||||
</ion-footer>
|
||||
@ -0,0 +1,27 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { TerminationFormComponent } from './termination-form.component';
|
||||
|
||||
describe('TerminationFormComponent', () => {
|
||||
let component: TerminationFormComponent;
|
||||
let fixture: ComponentFixture<TerminationFormComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ TerminationFormComponent ],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(TerminationFormComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,39 @@
|
||||
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 { TerminationPage } from './termination.page';
|
||||
import { TerminationFormComponent } from './termination-form/termination-form.component';
|
||||
import { TerminationServiceService } from './service/termination-service.service';
|
||||
import { HmgCommonModule } from '../hmg-common/hmg-common.module';
|
||||
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: TerminationPage,
|
||||
children: [
|
||||
{
|
||||
path: 'termination-form',
|
||||
component: TerminationFormComponent
|
||||
},
|
||||
|
||||
],
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
RouterModule.forChild(routes),
|
||||
HmgCommonModule
|
||||
],
|
||||
declarations: [TerminationPage, TerminationFormComponent],
|
||||
providers: [TerminationServiceService]
|
||||
})
|
||||
export class TerminationPageModule { }
|
||||
@ -0,0 +1,3 @@
|
||||
<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 { TerminationPage } from './termination.page';
|
||||
|
||||
describe('TerminationPage', () => {
|
||||
let component: TerminationPage;
|
||||
let fixture: ComponentFixture<TerminationPage>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ TerminationPage ],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(TerminationPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-termination',
|
||||
templateUrl: './termination.page.html',
|
||||
styleUrls: ['./termination.page.scss'],
|
||||
})
|
||||
export class TerminationPage implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
Loading…
Reference in New Issue