add PO & MO & PR

MOHEMM-Q3-DEV-LATEST
Mohamed Mekawy 6 years ago
parent 2d03ed75f3
commit 17246a58b8

@ -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="*" />

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

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

@ -11,7 +11,7 @@
<ion-grid>
<ion-row>
<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-row>
<ion-row>

@ -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,8 +115,8 @@ export class AuthenticationService {
}
public setPublicFields(request: Request): Request {
request.VersionID = 1.3;
request.Channel = 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
@ -193,7 +193,7 @@ export class AuthenticationService {
public login(request: LoginRequest, onError: any, errorLabel: string): Observable<Response> {
this.setPublicFields(request);
request.P_APP_VERSION="HMG";
request.P_APP_VERSION="CS";
return this.con.post(AuthenticationService.login, request, onError, errorLabel);
}
@ -448,7 +448,7 @@ export class AuthenticationService {
public checkUserAuthentication(request: CheckUserAuthenticationRequest, onError: any, errorLabel: string)
: Observable<CheckUserAuthenticationResponse> {
this.setPublicFields(request);
request.P_APP_VERSION="HMG";
request.P_APP_VERSION="CS";
return this.con.post(AuthenticationService.userChecking, request, onError, errorLabel);
}

@ -102,10 +102,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 {
@ -949,8 +950,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"]);
@ -1020,6 +1023,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,101 +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 = 'https://uat.hmgwebservices.com/';
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 = '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
) { }
public post(service: string, data: any, onError: any, errorLabel?: string): Observable<any> {
constructor(public httpClient: HttpClient, public cs: CommonService) {}
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 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 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)
)
);
}
// 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) {
@ -107,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)
)
);
}
}

@ -8,7 +8,7 @@
<ion-grid>
<ion-row>
<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-row>
<ion-row>

@ -63,15 +63,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