ashwaq 6 years ago
commit 53fe3813b0

@ -1,8 +1,8 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.cloudsolutions.alhabibmohemm" version="1.3" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Al Habib MOHEMM</name>
<widget id="com.cloudsolutions.mohemm" version="1.4" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>MOHEMM</name>
<description>an app created by cloud Solutions</description>
<author email="eservices.hmg@drsulaimanalhabib.com-sa.com" href="http://hmg.com">HMG</author>
<author email="eservicescs@cloudsolution-sa.com" href="http://cloudsolution-sa.com">HMG</author>
<content src="index.html" />
<content src="index.html" />
<access origin="*" />

@ -797,6 +797,21 @@
"@types/cordova": "^0.0.34"
}
},
"@ionic-native/base64": {
"version": "5.15.1",
"resolved": "https://registry.npmjs.org/@ionic-native/base64/-/base64-5.15.1.tgz",
"integrity": "sha512-VZs/n/5qJ1VwDQRvsJ4jWlWL6f+K21vFjX6EJJM6k2lZp6IbV9+N9oU5B/yjHX/SaVqJzAVge0tm0EIhLiWSHg==",
"requires": {
"@types/cordova": "^0.0.34"
},
"dependencies": {
"@types/cordova": {
"version": "0.0.34",
"resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz",
"integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ="
}
}
},
"@ionic-native/ble": {
"version": "5.8.0",
"resolved": "https://registry.npmjs.org/@ionic-native/ble/-/ble-5.8.0.tgz",
@ -859,6 +874,36 @@
}
}
},
"@ionic-native/file": {
"version": "5.15.1",
"resolved": "https://registry.npmjs.org/@ionic-native/file/-/file-5.15.1.tgz",
"integrity": "sha512-/wGAefEQroNR+n9t01+tu47lHFrwSwlN5fs+YaFSW2yAFax7nuG9y2l047CAHZd9/4+SRKQjCgvrc4dtAaFYow==",
"requires": {
"@types/cordova": "^0.0.34"
},
"dependencies": {
"@types/cordova": {
"version": "0.0.34",
"resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz",
"integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ="
}
}
},
"@ionic-native/file-path": {
"version": "5.15.1",
"resolved": "https://registry.npmjs.org/@ionic-native/file-path/-/file-path-5.15.1.tgz",
"integrity": "sha512-pAVUPzRzvghV53CZBwWd5ZOSkcFPBJLywgrnx6xX50tIsfXUG1oSwYPDM3ZLHPUefl1mIcjziXLbmlDyOjCg0A==",
"requires": {
"@types/cordova": "^0.0.34"
},
"dependencies": {
"@types/cordova": {
"version": "0.0.34",
"resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz",
"integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ="
}
}
},
"@ionic-native/fingerprint-aio": {
"version": "5.8.0",
"resolved": "https://registry.npmjs.org/@ionic-native/fingerprint-aio/-/fingerprint-aio-5.8.0.tgz",
@ -2875,6 +2920,11 @@
"resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz",
"integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM="
},
"com-badrit-base64": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/com-badrit-base64/-/com-badrit-base64-0.2.0.tgz",
"integrity": "sha1-u9hgM6oeGs/37kRqbIDIvUL03Tc="
},
"combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
@ -4259,6 +4309,16 @@
"resolved": "https://registry.npmjs.org/cordova-plugin-device/-/cordova-plugin-device-2.0.3.tgz",
"integrity": "sha512-Jb3V72btxf3XHpkPQsGdyc8N6tVBYn1vsxSFj43fIz9vonJDUThYPCJJHqk6PX6N4dJw6I4FjxkpfCR4LDYMlw=="
},
"cordova-plugin-file": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/cordova-plugin-file/-/cordova-plugin-file-6.0.2.tgz",
"integrity": "sha512-m7cughw327CjONN/qjzsTpSesLaeybksQh420/gRuSXJX5Zt9NfgsSbqqKDon6jnQ9Mm7h7imgyO2uJ34XMBtA=="
},
"cordova-plugin-filepath": {
"version": "1.5.6",
"resolved": "https://registry.npmjs.org/cordova-plugin-filepath/-/cordova-plugin-filepath-1.5.6.tgz",
"integrity": "sha512-YvrnXfoq4hzruVXnKo2qAiWlJ6xqo9RWLycEOI13WAIb69pzVvvFHXLREv7otSXkTn2tugpHQWcopxnPPOvFtA=="
},
"cordova-plugin-geolocation": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/cordova-plugin-geolocation/-/cordova-plugin-geolocation-4.0.2.tgz",
@ -7114,12 +7174,12 @@
"dev": true
},
"https-proxy-agent": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz",
"integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==",
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.3.tgz",
"integrity": "sha512-Ytgnz23gm2DVftnzqRRz2dOXZbGd2uiajSw/95bPp6v53zPRspQjLm/AfBgqbJ2qfeRXWIOMVLpp86+/5yX39Q==",
"dev": true,
"requires": {
"agent-base": "^4.1.0",
"agent-base": "^4.3.0",
"debug": "^3.1.0"
},
"dependencies": {

@ -27,12 +27,15 @@
"@ionic-native/background-geolocation": "^5.4.0",
"@ionic-native/badge": "^5.8.0",
"@ionic-native/barcode-scanner": "^5.14.0",
"@ionic-native/base64": "^5.15.1",
"@ionic-native/ble": "^5.8.0",
"@ionic-native/camera": "^5.14.0",
"@ionic-native/core": "^5.8.0",
"@ionic-native/date-picker": "^5.10.0",
"@ionic-native/device": "^5.8.0",
"@ionic-native/diagnostic": "^5.14.0",
"@ionic-native/file": "^5.15.1",
"@ionic-native/file-path": "^5.15.1",
"@ionic-native/fingerprint-aio": "^5.8.0",
"@ionic-native/geolocation": "^5.10.0",
"@ionic-native/globalization": "^5.8.0",
@ -54,6 +57,7 @@
"angular-calendar": "^0.26.11",
"app": "0.1.0",
"chart.js": "^2.8.0",
"com-badrit-base64": "^0.2.0",
"cordova-android": "8.1.0",
"cordova-android-support-gradle-release": "^3.0.1",
"cordova-browser": "5.0.4",
@ -64,6 +68,8 @@
"cordova-plugin-camera": "^4.1.0",
"cordova-plugin-datepicker": "^0.9.3",
"cordova-plugin-device": "^2.0.3",
"cordova-plugin-file": "^6.0.2",
"cordova-plugin-filepath": "^1.5.6",
"cordova-plugin-geolocation": "^4.0.2",
"cordova-plugin-globalization": "^1.11.0",
"cordova-plugin-ionic-keyboard": "^2.1.3",
@ -143,7 +149,10 @@
"cordova-open-native-settings": {},
"cordova-plugin-camera": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
}
},
"cordova-plugin-file": {},
"cordova-plugin-filepath": {},
"com-badrit-base64": {}
},
"platforms": [
"browser",
@ -151,4 +160,4 @@
"android"
]
}
}
}

@ -520,7 +520,7 @@ export class AddEitComponent implements OnInit {
} else {
console.log('else - ' + elem.value);
elem.value = val;
elem.innerText = val;
elem.innerText = text;
elem.setAttribute('value', val);
console.log('else - ' + elem.value);
}

@ -115,9 +115,8 @@ export class AuthenticationService {
}
public setPublicFields(request: Request): Request {
console.log("setPublicFields :" + request);
request.VersionID = 1.4; //1.3 hmg
request.Channel = 31; //33
request.VersionID = 1.4;
request.Channel = 31;
request.LanguageID = TranslatorService.getCurrentLanguageCode();
//request.IPAdress = '10.10.10.10';
//request.SessionID = "any thing"; // ??? required for not authorized login funny

@ -104,10 +104,11 @@ export class CommonService {
public back() {
// this.nav.pop();
this.nav.back({
animated: true,
animationDirection: "back"
});
// this.nav.back({
// animated: true,
// animationDirection: "back"
// });
this.nav.pop();
}
public round(value: number, decimal: number): string {
@ -951,8 +952,10 @@ export class CommonService {
public openMyTeamPage() {
this.nav.navigateForward(["/my-team/home"]);
}
public static myTeamDetailUrl =["/my-team/details","/my-team/details-2"]
public openMyTeamDetails() {
this.nav.navigateForward(["/my-team/details"]);
this.alternateNavigate(CommonService.myTeamDetailUrl,"teamDetail-open",true);
// this.nav.navigateForward(["/my-team/details"]);
}
public openAbsencePage() {
this.nav.navigateForward(["/absence/home"]);
@ -1036,6 +1039,7 @@ export class CommonService {
this.nav.navigateBack([url]);
}
private alternateNavigate(paths: string[], key: string, root = false) {
let url: string;
if (localStorage.getItem(key) === "yes") {

@ -1,103 +1,126 @@
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders, HttpErrorResponse } from '@angular/common/http';
import { Observable, throwError, TimeoutError } from 'rxjs';
import { catchError, retry, tap, timeout } from 'rxjs/operators';
import { CommonService } from '../common/common.service';
import { Response } from '../models/response';
import { Injectable } from "@angular/core";
import {
HttpClient,
HttpHeaders,
HttpErrorResponse
} from "@angular/common/http";
import { Observable, throwError, TimeoutError } from "rxjs";
import { catchError, retry, tap, timeout } from "rxjs/operators";
import { CommonService } from "../common/common.service";
import { Response } from "../models/response";
@Injectable({
providedIn: 'root'
providedIn: "root"
})
export class ConnectorService {
/*
/*
connection configuration settings
*/
static httpOptions = {
headers: new HttpHeaders({ 'Content-Type': 'application/json' })
};
public static retryTimes = 0;
public static timeOut = 30 * 1000;
// public static host = 'http://10.50.100.113:6060/'; // development service
//public static host = 'http://10.50.100.198:4444/'; // production service
static httpOptions = {
headers: new HttpHeaders({ "Content-Type": "application/json" })
};
public static retryTimes = 0;
public static timeOut = 30 * 1000;
// public static host = 'http://10.50.100.113:6060/'; // development service
public static host = 'https://uat.hmgwebservices.com/';
//public static host = 'https://hmgwebservices.com/';
// public static host = 'http://10.50.100.198:6060/';
// public static host = 'http://10.50.100.113:6060/'; // development service
/* public static host = 'http://10.50.100.198:6060/';
//public static host = "https://uat.hmgwebservices.com/";
public static host = 'https://hmgwebservices.com/';
// public static host = 'http://10.50.100.198:6060/';
// public static host = 'http://10.50.100.113:6060/'; // development service
/* public static host = 'http://10.50.100.198:6060/';
public static host = 'http://10.50.100.198:6060/'; // development service
public static host = 'http://10.50.100.198:4040/'; // UAT service
public static host = 'http://10.50.100.198:4444/'; // production service
public static host = 'http://10.50.100.113:4040/'; // UAT service
public static host = 'http://10.50.100.113:4444/'; // production service
*/
/*
/*
end of connection configuration
*/
constructor(
public httpClient: HttpClient,
public cs: CommonService
constructor(public httpClient: HttpClient, public cs: CommonService) {}
) { }
public post(
service: string,
data: any,
onError: any,
errorLabel?: string
): Observable<any> {
this.cs.startLoading();
return this.httpClient
.post<any>(
ConnectorService.host + service,
data,
ConnectorService.httpOptions
)
.pipe(
timeout(ConnectorService.timeOut),
retry(ConnectorService.retryTimes),
tap(
res => this.handleResponse(res, onError, errorLabel),
error => this.handleError(error, onError, errorLabel)
)
);
}
public postNoLoad(service: string, data: any, onError: any): Observable<any> {
return this.httpClient
.post<any>(
ConnectorService.host + service,
data,
ConnectorService.httpOptions
)
.pipe(
retry(ConnectorService.retryTimes),
tap(() => {}, () => {})
);
}
public post(service: string, data: any, onError: any, errorLabel?: string): Observable<any> {
// absolute url connection
public postToken(
service: string,
data: any,
onError: any,
errorLabel?: string
): Observable<any> {
this.cs.startLoading();
return this.httpClient
.post<any>(service, data, ConnectorService.httpOptions)
.pipe(
timeout(ConnectorService.timeOut),
retry(ConnectorService.retryTimes),
tap(
res => this.handleResponse(res, onError, errorLabel),
error => this.handleError(error, onError, errorLabel)
)
);
}
this.cs.startLoading();
return this.httpClient.post<any>(ConnectorService.host + service, data, ConnectorService.httpOptions)
.pipe(
timeout(ConnectorService.timeOut),
retry(ConnectorService.retryTimes),
tap(
res => this.handleResponse(res, onError, errorLabel),
error => this.handleError(error, onError, errorLabel)
)
);
}
public postNoLoad(service: string, data: any, onError: any): Observable<any> {
return this.httpClient.post<any>(ConnectorService.host + service, data, ConnectorService.httpOptions)
.pipe(
retry(ConnectorService.retryTimes),
tap(() => { }, () => { })
);
}
// absolute url connection
public postToken(service: string, data: any, onError: any, errorLabel?: string): Observable<any> {
this.cs.startLoading();
return this.httpClient.post<any>(service, data, ConnectorService.httpOptions)
.pipe(
timeout(ConnectorService.timeOut),
retry(ConnectorService.retryTimes),
tap(res => this.handleResponse(res, onError, errorLabel),
error => this.handleError(error, onError, errorLabel)
)
);
}
public get(service: string, data: any, onError: any, errorLabel?: string): Observable<any> {
this.cs.startLoading();
return this.httpClient.get(service, ConnectorService.httpOptions)
.pipe(
timeout(ConnectorService.timeOut),
retry(ConnectorService.retryTimes),
tap(res => this.handleResponse(res, onError, errorLabel),
error => this.handleError(error, onError, errorLabel)
)
);
}
/*
public get(
service: string,
data: any,
onError: any,
errorLabel?: string
): Observable<any> {
this.cs.startLoading();
return this.httpClient.get(service, ConnectorService.httpOptions).pipe(
timeout(ConnectorService.timeOut),
retry(ConnectorService.retryTimes),
tap(
res => this.handleResponse(res, onError, errorLabel),
error => this.handleError(error, onError, errorLabel)
)
);
}
/*
load local json data and convert it to corresponding model
resourceURL such as 'assets/config.json'
*/
public getLocalResrouce(resourceURL: string): Observable<any> {
return this.httpClient.get(resourceURL);
}
public getLocalResrouce(resourceURL: string): Observable<any> {
return this.httpClient.get(resourceURL);
}
/*
/*
public validResponse(result: Response): boolean {
// error type == 2 means you have error
if (result.MessageStatus === 1) {
@ -109,51 +132,57 @@ export class ConnectorService {
}
*/
public handleError(error: any, onError: any, errorLabel: string) {
this.cs.stopLoading();
if (error instanceof TimeoutError) {
this.cs.showConnectionTimeout(onError, errorLabel);
} else {
this.cs.showConnectionErrorDialog(onError, errorLabel);
}
public handleError(error: any, onError: any, errorLabel: string) {
this.cs.stopLoading();
if (error instanceof TimeoutError) {
this.cs.showConnectionTimeout(onError, errorLabel);
} else {
this.cs.showConnectionErrorDialog(onError, errorLabel);
}
}
public handleResponse(result: Response, onError: any, errorLabel: string) {
this.cs.stopLoading();
if (!this.cs.validResponse(result)) {
// not authorized
console.log(result.MessageStatus);
console.log("erroe")
if(result.IsAuthenticated==false){
this.cs.presentAcceptDialog(result.ErrorEndUserMessage,()=>{
this.cs.sharedService.clearAll();
this.cs.openLogin();
});
return false;
}
else if (result.ErrorType === 2||result.ErrorType === 4) {
//console.log("error expired");
} else {
this.cs.showErrorMessageDialog(onError, errorLabel, result.ErrorEndUserMessage);
}
}
public handleResponse(result: Response, onError: any, errorLabel: string) {
this.cs.stopLoading();
if (!this.cs.validResponse(result)) {
// not authorized
console.log(result.MessageStatus);
console.log("erroe");
if (result.IsAuthenticated == false) {
this.cs.presentAcceptDialog(result.ErrorEndUserMessage, () => {
this.cs.sharedService.clearAll();
this.cs.openLogin();
});
return false;
} else if (result.ErrorType === 2 || result.ErrorType === 4) {
//console.log("error expired");
} else {
this.cs.showErrorMessageDialog(
onError,
errorLabel,
result.ErrorEndUserMessage
);
}
}
}
public getURLText(url: string, onError: any, errorLabel?: string): Observable<any> {
this.cs.startLoading();
return this.httpClient.get(url)
.pipe(
timeout(ConnectorService.timeOut),
retry(ConnectorService.retryTimes),
tap(res => {
this.cs.stopLoading();
if (!res) {
this.cs.showConnectionErrorDialog(onError, errorLabel);
}
},
error => this.handleError(error, onError, errorLabel)
)
);
}
public getURLText(
url: string,
onError: any,
errorLabel?: string
): Observable<any> {
this.cs.startLoading();
return this.httpClient.get(url).pipe(
timeout(ConnectorService.timeOut),
retry(ConnectorService.retryTimes),
tap(
res => {
this.cs.stopLoading();
if (!res) {
this.cs.showConnectionErrorDialog(onError, errorLabel);
}
},
error => this.handleError(error, onError, errorLabel)
)
);
}
}

@ -94,15 +94,21 @@ export class HomePage implements OnInit {
getDeviceLocation() {
//console.log("mekaaaaaaaaaaaaa?????????");
let isVirtual = this.device.isVirtual;
if(isVirtual==true){
alert("emulater>>>>>>>"+isVirtual);
alert("You are using virtual device");
return false;
}
this.permissions.requestLocationAutherization().then(granted => {
this.location = granted as boolean;
if (this.location) {
this.geolocation
.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true })
.then(resp => {
console.log(resp.coords.latitude);
console.log(resp.coords.longitude);
// console.log(resp.coords.latitude);
// console.log(resp.coords.longitude);
this.lat = resp.coords.latitude;
this.longt = resp.coords.longitude;
this.attendance();

@ -6,11 +6,11 @@
<ion-icon class="search-icons" color="light" name="arrow-back" *ngIf="modalFlag" (click)="dismiss()"></ion-icon>
</ion-buttons>
<ion-title color="light" >{{headerTitle}}</ion-title>
<ion-buttons slot="end">
<!-- <ion-buttons slot="end">
<button ion-button icon-only class="btnBack" *ngIf="isSpecialist == false" (click)="goToSubordinate();">
<ion-icon class="search-icons" color="light" name="search"></ion-icon>
</button>
</ion-buttons>
</ion-buttons> -->
</ion-toolbar>
</ion-header>
<ion-content padding>

@ -84,7 +84,7 @@ export class DetailsComponent implements OnInit {
goback() {
//this.location.back();
const user = this.authService.getAuthenticatedUser();
if(this.employee.SUPERVISOR_NUMBER==user.EMPLOYEE_NUMBER){
if(this.employee.SUPERVISOR_NUMBER==user.EMPLOYEE_NUMBER || this.opendEmployees.length == 1){
this.opendEmployees=[];
this.common.openMyTeamPage();
}else{

@ -20,6 +20,10 @@ const routes: Routes = [
{
path: 'details',
component: DetailsComponent
},
{
path: 'details-2',
component: DetailsComponent
}
]
}

@ -0,0 +1,26 @@
import { Response } from "./response";
export class GetMoItemHistoryList extends Response {
public REQUEST_NUMBER: string;
public ITEM_CODE: string;
public DESCRIPTION: string;
public UNIT_OF_MEASURE: string;
public QUANTITY: number;
public DATE_REQUIRED: Date;
public LINE_STATUS_DIS: string;
public STATUS_DATE: Date;
public TRANSACTION_TYPE_NAME: string;
public ORGANIZATION_ID: number;
public ORGANIZATION_CODE: string;
public ORGANIZATION_NAME: string;
public OPERATING_UNIT_NAM: string;
public FROM_SUBINVENTORY_CODE: string;
public FROM_LOCATOR: string;
public TO_SUBINVENTORY_CODE: string;
public TO_LOCATOR: string;
public SHIP_TO_LOCATION: string;
public ROW_NUM: number;
public NO_OF_ROWS: number;
public FROM_ROW_NUM: number;
public TO_ROW_NUM: number;
}

@ -0,0 +1,9 @@
import { Request } from "./request";
export class MOItemHistoryReq extends Request {
//public static SHARED_DATA = '';
public P_ORG_ID: number;
public P_ITEM_ID: number;
public P_PAGE_NUM: number;
public P_PAGE_LIMIT: number;
}

@ -0,0 +1,7 @@
import { Response } from "./response";
import { GetMoItemHistoryList } from './MOItemHistoryList';
export class MOItemHistoryRes extends Response {
public GetMoItemHistoryList: GetMoItemHistoryList;
}

@ -0,0 +1,25 @@
export class MONotificationBodyItems {
public LINE_NUMBER: number;
public ITEM_CODE: string;
public DESCRIPTION: string;
public UOM: string;
public QUANTITY: number;
public DATE_REQUIRED: Date;
public LINE_STATUS: string;
public TATUS_DATE: Date;
public TRANSACTION_TYPE_NAME: string;
public OPERATING_UNIT: string;
public ORGANIZATION_CODE: string;
public ORGANIZATION_NAME: string;
public FROM_SUBINVENTORY: string;
public TO_SUBINVENTORY: string;
public FROM_LOCATOR: string;
public TO_LOCATOR: string;
public SHIP_TO_LOCATION: string;
public NO_OF_ROWS: number;
public ROW_NUM: number;
public FROM_ROW_NUM: number;
public TO_ROW_NUM: number;
public ITEM_ID: number;
public ORG_ID: number;
}

@ -0,0 +1,8 @@
import { Response } from "./response";
import { MONotificationBodyItems } from './MONotificationBodyItems';
export class MONotificatonBodyResponse extends Response {
//public static SHARED_DATA = "Abs_Notif_BODY_List";
//public static NOT_WORKLIST = "Abs_Notif_WORK_LIST";
public GetMoNotificationBodyList: MONotificationBodyItems;
}

@ -1,8 +1,9 @@
import { Request } from './request';
import { Request } from "./request";
export class WorkListBodyRequest extends Request{
// public static SHARED_DATA = '';
public P_NOTIFICATION_ID :any;
public P_TRANSACTION_ID :number;
}
export class WorkListBodyRequest extends Request {
// public static SHARED_DATA = '';
public P_NOTIFICATION_ID: any;
public P_TRANSACTION_ID: number;
public P_PAGE_NUM: number;
public P_PAGE_LIMIT: number;
}

@ -0,0 +1,24 @@
import { Response } from "./response";
export class GetItemHistoryList extends Response {
public OU_NAME: string;
public REVISION_NUM: number;
public CREATION_DATE: string;
public BUYER: string;
public ITEM_ID: number;
public BONUS_QUANTITY: number;
public DISCOUNT_PERCENTAGE: number;
public CLOSED_CODE: string;
public ROW_NUM: number;
public FROM_ROW_NUM: number;
public PO_NUMBER: string;
public SUPPLIER: string;
public UOM: string;
public QUANTITY_ORDERED: number;
public QUANTITY_RECEIVED: number;
public PURCHASE_PRICE: number;
public NET_PRICE: number;
public BALANCE_QUANTITY: number;
public NO_OF_ROWS: number;
public TO_ROW_NUM: number;
}

@ -0,0 +1,8 @@
import { Request } from "./request";
export class POItemHistoryRequest extends Request {
//public static SHARED_DATA = '';
public P_ITEM_ID: number;
public P_PAGE_NUM: number;
public P_PAGE_LIMIT: number;
}

@ -0,0 +1,6 @@
import { Response } from "./response";
import { GetItemHistoryList } from "./POItemHistoryList";
export class POItemHistoryRes extends Response {
public GetItemHistoryList: GetItemHistoryList;
}

@ -0,0 +1,8 @@
import { Response } from "./response";
import { PoHeaderNotificationBodyItems } from "./PoHeaderNotificationBodyItems";
import { PoLinesNotificationBodyItems } from "./PoLinesNotificationBodyItems";
export class PONotificatonBodyList extends Response {
public POHeader: PoHeaderNotificationBodyItems[];
public POLines: PoLinesNotificationBodyItems[];
}

@ -0,0 +1,8 @@
import { Response } from "./response";
import { PONotificatonBodyList } from "./PONotificationBodyList";
export class PONotificatonBodyResponse extends Response {
//public static SHARED_DATA = "Abs_Notif_BODY_List";
//public static NOT_WORKLIST = "Abs_Notif_WORK_LIST";
public GetPoNotificationBodyList: PONotificatonBodyList;
}

@ -0,0 +1,4 @@
export class PRHeaderNotificationBodyItems {
public HDR_ATTRIBUTE_NAME: string;
public HDR_ATTRIBUTE_VALUE: string;
}

@ -0,0 +1,15 @@
export class PRLinesNotificationBodyItems {
public LINE_NUM: number;
public DESCRIPTION: string;
public UOM: string;
public UNIT_PRICE: number;
public ITEM_AMU: number;
public NO_OF_ROWS: number;
public FROM_ROW_NUM: number;
public ITEM_CODE: string;
public COST_CENTER: string;
public QUANTITY: number;
public LINE_AMOUNT: number;
public ROW_NUM: number;
public TO_ROW_NUM: number;
}

@ -0,0 +1,9 @@
import { Response } from "./response";
import { PRLinesNotificationBodyItems } from "./PRLinesNotificationBodyItems";
import { PRHeaderNotificationBodyItems } from "./PRHeaderNotificationBodyItems";
export class PRNotificatonBodyList extends Response {
public PRHeader: PRHeaderNotificationBodyItems[];
public PRLines: PRLinesNotificationBodyItems[];
public P_CURRENCY_CODE: string;
}

@ -0,0 +1,8 @@
import { Response } from "./response";
import { PRNotificatonBodyList } from './PRNotificationBodyList';
export class PRNotificatonBodyResponse extends Response {
//public static SHARED_DATA = "Abs_Notif_BODY_List";
//public static NOT_WORKLIST = "Abs_Notif_WORK_LIST";
public GetPrNotificationBodyList: PRNotificatonBodyList;
}

@ -0,0 +1,25 @@
export class PoHeaderNotificationBodyItems {
public PO_NUMBER: string;
public VENDOR_SITE_CODE: string;
public BUYER: string;
public SHIP_TO_LOCATION_NAME: string;
public QUOTATION_DATE: string;
public COMMENTS: string;
public GROSS_AMOUNT: number;
public TOTAL_PO_DISCOUNT: number;
public CUSTOM_DUTY: number;
public THER_CHARGES: number;
public LOC_CUR: string;
public TOT_PO_AMT_WORD: string;
public VENDOR_NAME: string;
public PREPARER: string;
public CREATION_DATE: string;
public QUOTATION_NUMBER: string;
public PAYMENT_TERMS: string;
public CURRENCY_NAME: string;
public DISCOUNT_AMOUNT: number;
public SALES_TAX: number;
public SHIP_HANDLE: number;
public TOT_PO_AMT: number;
public LOC_CUR_TOT_PO_AMT: number;
}

@ -0,0 +1,14 @@
export class PoLinesNotificationBodyItems {
public LINE_NUM: number;
public ITEM_ID: number;
public ITEM_CODE: string;
public MFG: string;
public UOM: string;
public QUANTITY: number;
public PO_HEADER_ID: number;
public ITEM_DESCRIPTION: string;
public LINE_TYP: string;
public UNIT_PRICE: number;
public LINE_DISC_PERCENTAGE: number;
public PROMISED_DATE: string;
}

@ -0,0 +1,22 @@
import { Response } from './response';
export class QuotationAnalysisList extends Response {
public QUOT_NUM: string;
public ITEM_CODE: string;
public QUOT_QTY: number;
public QUOT_UNIT_PRICE: number;
public QUOT_BONUS_QTY: string;
public QUOT_MFG_PART_NUM: string;
public RFQ_QTY: number;
public ROW_NUM: number;
public FROM_ROW_NUM: number;
public VENDOR_NAME: string;
public ITEM_DESC: string;
public QUOT_UOM: string;
public QUOT_LINE_TOTAL: number;
public QUOT_DELIVERY_DATE: string;
public RFQ_NUM: string;
public RFQ_UOM: string;
public NO_OF_ROWS: number;
public TO_ROW_NUM: number;
}

@ -0,0 +1,8 @@
import { Request } from "./request";
export class QuotationAnalysisRequest extends Request {
public P_PO_HEADER_ID: number;
public P_ITEM_ID: number;
public P_PAGE_NUM: number;
public P_PAGE_LIMIT: number;
}

@ -0,0 +1,6 @@
import { Response } from "./response";
import {QuotationAnalysisList } from "./quotationAnalysisList";
export class QuotationAnalysisResponse extends Response {
public GetQuotationAnalysisList: QuotationAnalysisList;
}

@ -10,6 +10,12 @@ import { NotificatonButtonResponse } from "../models/NotificationButtonRes";
import { WorklistsubmitterInfoResponse } from "../models/WorklistsubmitterInfoRes";
import { WorkListSubmitterInfoRequest } from "../models/WorklistsubmitterInfoReq";
import { WorkListActionRequest } from "../models/NotificationActionReq";
import { PONotificatonBodyResponse } from "../models/PONotificationBodyRes";
import { MONotificatonBodyResponse } from "../models/MONotificationBodyRes";
import { PRNotificatonBodyResponse } from "../models/PRNotificationBodyRes";
import { StaticInjector } from "@angular/core/src/di/injector";
import { POItemHistoryRes } from "../models/POItemHistoryRes";
import { MOItemHistoryRes } from "../models/MOItemHistoryRes";
@Injectable()
export class WorklistMainService {
@ -17,6 +23,14 @@ export class WorklistMainService {
"Services/ERP.svc/REST/GET_EIT_NOTIFICATION_BODY";
public static getAbsenceNotificationBody =
"Services/ERP.svc/REST/GET_ABSENCE_NOTIFICATION_BODY";
public static getPoNotificationBody =
"Services/ERP.svc/REST/GET_PO_NOTIFICATION_BODY";
public static getMONotificationBody =
"Services/ERP.svc/REST/GET_MO_NOTIFICATION_BODY";
public static getPRNotificationBody =
"Services/ERP.svc/REST/GET_PR_NOTIFICATION_BODY";
public static getPOItemHistory = "Services/ERP.svc/REST/GET_PO_ITEM_HISTORY";
public static getMOItemHistory = "GET_MO_ITEM_HISTORY";
public static getNotificationButtons =
"Services/ERP.svc/REST/GET_NOTIFICATION_BUTTONS";
public static getUserInfo = "Services/ERP.svc/REST/Get_UserInformation";
@ -59,6 +73,81 @@ export class WorklistMainService {
);
}
public getMONotificationBody(
WorkListBodyRequest: any,
onError?: any,
errorLabel?: string
): Observable<MONotificatonBodyResponse> {
const request = WorkListBodyRequest;
this.authService.authenticateRequest(request);
return this.api.post(
WorklistMainService.getMONotificationBody,
request,
onError,
errorLabel
);
}
public getPRNotificationBody(
WorkListBodyRequest: any,
onError?: any,
errorLabel?: string
): Observable<PRNotificatonBodyResponse> {
const request = WorkListBodyRequest;
this.authService.authenticateRequest(request);
return this.api.post(
WorklistMainService.getPRNotificationBody,
request,
onError,
errorLabel
);
}
public getPONotificationBody(
WorkListBodyRequest: any,
onError?: any,
errorLabel?: string
): Observable<PONotificatonBodyResponse> {
const request = WorkListBodyRequest;
this.authService.authenticateRequest(request);
return this.api.post(
WorklistMainService.getPoNotificationBody,
request,
onError,
errorLabel
);
}
public getPOItemHistory(
POItemHistoryReq: any,
onError?: any,
errorLabel?: string
): Observable<POItemHistoryRes> {
const request = POItemHistoryReq;
this.authService.authenticateRequest(request);
return this.api.post(
WorklistMainService.getPOItemHistory,
request,
onError,
errorLabel
);
}
public getMOItemHistory(
MOItemHistoryReq: any,
onError?: any,
errorLabel?: string
): Observable<MOItemHistoryRes> {
const request = MOItemHistoryReq;
this.authService.authenticateRequest(request);
return this.api.post(
WorklistMainService.getMOItemHistory,
request,
onError,
errorLabel
);
}
public getNotificationButtons(
WorkListButtonRequest: any,
onError?: any,

@ -16,6 +16,9 @@ import { TextInput } from 'src/app/uI-elements/text.input';
import { TextAreaInput } from 'src/app/uI-elements/text-area.input';
import { MenuService } from 'src/app/hmg-common/services/menu/menuservice.service';
import { Events } from '@ionic/angular';
import { PONotificatonBodyResponse } from '../models/PONotificationBodyRes';
import { MONotificatonBodyResponse } from '../models/MONotificationBodyRes';
import { PRNotificatonBodyResponse } from '../models/PRNotificationBodyRes';
@Component({
selector: "app-worklist-main",
templateUrl: "./worklist-main.component.html",
@ -83,6 +86,8 @@ export class WorklistMainComponent implements OnInit {
this.WorkListBodyObj.P_TRANSACTION_ID = this.TransactionID;
this.WorkListBodyObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
this.WorkListBodyObj.P_PAGE_NUM = 1;
this.WorkListBodyObj.P_PAGE_LIMIT = 50;
this.WorkListButtonsObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
@ -98,9 +103,40 @@ export class WorklistMainComponent implements OnInit {
this.getEITNotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") {
this.getAbsenceNotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "PO"){
this.getPONotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "MO"){
this.getMONotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "PR"){
this.getPRNotificationDetails(this.WorkListBodyObj);
}
}
getPRNotificationDetails(notificationBodyObj){
this.worklistMainService
.getPRNotificationBody(notificationBodyObj)
.subscribe((result: PRNotificatonBodyResponse) => {
//this.handleWorkListBodyResult(result, "MO");
});
}
getMONotificationDetails(notificationBodyObj){
this.worklistMainService
.getMONotificationBody(notificationBodyObj)
.subscribe((result: MONotificatonBodyResponse) => {
//this.handleWorkListBodyResult(result, "MO");
});
}
getPONotificationDetails(notificationBodyObj){
this.worklistMainService
.getPONotificationBody(notificationBodyObj)
.subscribe((result: PONotificatonBodyResponse) => {
// console.log(result.GetPoNotificationBodyList.POHeader[0].BUYER);
// this.handleWorkListBodyResult(result, "PO");
});
}
getEITNotificationDetails(notificationBodyObj) {
this.worklistMainService
.getEITNotificationBody(notificationBodyObj)

@ -1 +0,0 @@
,HMG/Mohamed.Mekawy,CS-1F-MOHAMED,01.10.2019 15:25,file:///C:/Users/mohamed.mekawy/AppData/Roaming/LibreOffice/4;
Loading…
Cancel
Save