add PO & MO & PR

production
Mohamed Mekawy 6 years ago
parent 2d03ed75f3
commit 17246a58b8

@ -1,8 +1,8 @@
<?xml version='1.0' encoding='utf-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"> <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>Al Habib MOHEMM</name> <name>MOHEMM</name>
<description>an app created by cloud Solutions</description> <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" />
<content src="index.html" /> <content src="index.html" />
<access origin="*" /> <access origin="*" />

@ -24,7 +24,7 @@ export class AppComponent implements OnInit, AfterViewInit {
user_image: string = "../assets/imgs/profile.png"; user_image: string = "../assets/imgs/profile.png";
menuSide: string = "left"; menuSide: string = "left";
notBadge: number; notBadge: number;
companyUrl: string = "../assets/imgs/HMG.png"; companyUrl: string = "../assets/imgs/CS.png";
companyDesc: string = "Powered By Cloud Solutions"; companyDesc: string = "Powered By Cloud Solutions";
public direction = "ltr"; public direction = "ltr";
constructor( constructor(
@ -63,7 +63,7 @@ export class AppComponent implements OnInit, AfterViewInit {
if (user) { if (user) {
this.companyUrl = user.CompanyImageURL this.companyUrl = user.CompanyImageURL
? user.CompanyImageURL ? user.CompanyImageURL
: "../assets/imgs/HMG.png"; : "../assets/imgs/CS.png";
this.companyDesc = user.CompanyImageDescription this.companyDesc = user.CompanyImageDescription
? user.CompanyImageDescription ? user.CompanyImageDescription

@ -2,7 +2,7 @@
<ion-grid class="customGrid"> <ion-grid class="customGrid">
<ion-row> <ion-row>
<ion-col class="colPad"> <ion-col class="colPad">
<img class="centerDiv" src="../assets/imgs/HMG.png" /> <img class="centerDiv" src="../assets/imgs/CS.png" />
</ion-col> </ion-col>
</ion-row> </ion-row>
<ion-row> <ion-row>

@ -11,7 +11,7 @@
<ion-grid> <ion-grid>
<ion-row> <ion-row>
<ion-col class="colPad"> <ion-col class="colPad">
<ion-img class="centerDiv" src="../assets/imgs/HMG.png"></ion-img> <ion-img class="centerDiv" src="../assets/imgs/CS.png"></ion-img>
</ion-col> </ion-col>
</ion-row> </ion-row>
<ion-row> <ion-row>

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

@ -115,8 +115,8 @@ export class AuthenticationService {
} }
public setPublicFields(request: Request): Request { public setPublicFields(request: Request): Request {
request.VersionID = 1.3; request.VersionID = 1.4;
request.Channel = 33; request.Channel = 31;
request.LanguageID = TranslatorService.getCurrentLanguageCode(); request.LanguageID = TranslatorService.getCurrentLanguageCode();
//request.IPAdress = '10.10.10.10'; //request.IPAdress = '10.10.10.10';
//request.SessionID = "any thing"; // ??? required for not authorized login funny //request.SessionID = "any thing"; // ??? required for not authorized login funny
@ -193,7 +193,7 @@ export class AuthenticationService {
public login(request: LoginRequest, onError: any, errorLabel: string): Observable<Response> { public login(request: LoginRequest, onError: any, errorLabel: string): Observable<Response> {
this.setPublicFields(request); this.setPublicFields(request);
request.P_APP_VERSION="HMG"; request.P_APP_VERSION="CS";
return this.con.post(AuthenticationService.login, request, onError, errorLabel); return this.con.post(AuthenticationService.login, request, onError, errorLabel);
} }
@ -448,7 +448,7 @@ export class AuthenticationService {
public checkUserAuthentication(request: CheckUserAuthenticationRequest, onError: any, errorLabel: string) public checkUserAuthentication(request: CheckUserAuthenticationRequest, onError: any, errorLabel: string)
: Observable<CheckUserAuthenticationResponse> { : Observable<CheckUserAuthenticationResponse> {
this.setPublicFields(request); this.setPublicFields(request);
request.P_APP_VERSION="HMG"; request.P_APP_VERSION="CS";
return this.con.post(AuthenticationService.userChecking, request, onError, errorLabel); return this.con.post(AuthenticationService.userChecking, request, onError, errorLabel);
} }

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

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

@ -8,7 +8,7 @@
<ion-grid> <ion-grid>
<ion-row> <ion-row>
<ion-col class="colPad"> <ion-col class="colPad">
<ion-img class="centerDiv" src="../assets/imgs/HMG.png"></ion-img> <ion-img class="centerDiv" src="../assets/imgs/CS.png"></ion-img>
</ion-col> </ion-col>
</ion-row> </ion-row>
<ion-row> <ion-row>

@ -63,15 +63,21 @@ export class HomePage implements OnInit {
getDeviceLocation() { 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.permissions.requestLocationAutherization().then(granted => {
this.location = granted as boolean; this.location = granted as boolean;
if (this.location) { if (this.location) {
this.geolocation this.geolocation
.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true }) .getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true })
.then(resp => { .then(resp => {
console.log(resp.coords.latitude); // console.log(resp.coords.latitude);
console.log(resp.coords.longitude); // console.log(resp.coords.longitude);
this.lat = resp.coords.latitude; this.lat = resp.coords.latitude;
this.longt = resp.coords.longitude; this.longt = resp.coords.longitude;
this.attendance(); this.attendance();

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

@ -84,7 +84,7 @@ export class DetailsComponent implements OnInit {
goback() { goback() {
//this.location.back(); //this.location.back();
const user = this.authService.getAuthenticatedUser(); 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.opendEmployees=[];
this.common.openMyTeamPage(); this.common.openMyTeamPage();
}else{ }else{

@ -20,6 +20,10 @@ const routes: Routes = [
{ {
path: 'details', path: 'details',
component: DetailsComponent 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{ export class WorkListBodyRequest extends Request {
// public static SHARED_DATA = ''; // public static SHARED_DATA = '';
public P_NOTIFICATION_ID :any; public P_NOTIFICATION_ID: any;
public P_TRANSACTION_ID :number; 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 { WorklistsubmitterInfoResponse } from "../models/WorklistsubmitterInfoRes";
import { WorkListSubmitterInfoRequest } from "../models/WorklistsubmitterInfoReq"; import { WorkListSubmitterInfoRequest } from "../models/WorklistsubmitterInfoReq";
import { WorkListActionRequest } from "../models/NotificationActionReq"; 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() @Injectable()
export class WorklistMainService { export class WorklistMainService {
@ -17,6 +23,14 @@ export class WorklistMainService {
"Services/ERP.svc/REST/GET_EIT_NOTIFICATION_BODY"; "Services/ERP.svc/REST/GET_EIT_NOTIFICATION_BODY";
public static getAbsenceNotificationBody = public static getAbsenceNotificationBody =
"Services/ERP.svc/REST/GET_ABSENCE_NOTIFICATION_BODY"; "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 = public static getNotificationButtons =
"Services/ERP.svc/REST/GET_NOTIFICATION_BUTTONS"; "Services/ERP.svc/REST/GET_NOTIFICATION_BUTTONS";
public static getUserInfo = "Services/ERP.svc/REST/Get_UserInformation"; 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( public getNotificationButtons(
WorkListButtonRequest: any, WorkListButtonRequest: any,
onError?: 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 { TextAreaInput } from 'src/app/uI-elements/text-area.input';
import { MenuService } from 'src/app/hmg-common/services/menu/menuservice.service'; import { MenuService } from 'src/app/hmg-common/services/menu/menuservice.service';
import { Events } from '@ionic/angular'; import { Events } from '@ionic/angular';
import { PONotificatonBodyResponse } from '../models/PONotificationBodyRes';
import { MONotificatonBodyResponse } from '../models/MONotificationBodyRes';
import { PRNotificatonBodyResponse } from '../models/PRNotificationBodyRes';
@Component({ @Component({
selector: "app-worklist-main", selector: "app-worklist-main",
templateUrl: "./worklist-main.component.html", templateUrl: "./worklist-main.component.html",
@ -83,6 +86,8 @@ export class WorklistMainComponent implements OnInit {
this.WorkListBodyObj.P_TRANSACTION_ID = this.TransactionID; this.WorkListBodyObj.P_TRANSACTION_ID = this.TransactionID;
this.WorkListBodyObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; 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; this.WorkListButtonsObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
@ -98,9 +103,40 @@ export class WorklistMainComponent implements OnInit {
this.getEITNotificationDetails(this.WorkListBodyObj); this.getEITNotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") { } else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") {
this.getAbsenceNotificationDetails(this.WorkListBodyObj); 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) { getEITNotificationDetails(notificationBodyObj) {
this.worklistMainService this.worklistMainService
.getEITNotificationBody(notificationBodyObj) .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