PO Total amount with Tax, baisc info and addres request to show in work list and business card to use local storage

MOHEMM-Q3-DEV-LATEST
enadhilal 4 years ago
parent aa7bc510f0
commit 138f75a9af

@ -150,7 +150,9 @@ export class AppComponent implements OnInit {
const user = this.authService.loadAuthenticatedUser().subscribe((user: AuthenticatedUser) => {
if (user) {
console.log(user);
this.userInfo = JSON.parse(localStorage.getItem('bussiness-card-info'));
console.log('ENAD TEST')
console.log(this.userInfo)
localStorage.setItem("digitalIDUser", JSON.stringify(user));
this.digitalIDUser = user//JSON.stringify(user);
this.companyUrl = user.CompanyImageURL ? user.CompanyImageURL : '../assets/imgs/CSLogo.png';
@ -287,7 +289,7 @@ export class AppComponent implements OnInit {
return await modal.present();
}
async openBusinessCard() {
this.userInfo = JSON.parse(localStorage.getItem('bussiness-card-info'));
// this.userInfo = JSON.parse(localStorage.getItem('bussiness-card-info'));
console.log(this.userInfo);
//this.userInfo = this.cs.sharedService.getSharedData('bussiness-card-info', false);
const modal = await this.modalController.create({

@ -215,8 +215,6 @@ export class SmsPageComponent implements OnInit {
// Wifi Credientials
CommonService.MOHEMM_WIFI_SSID = result.Mohemm_Wifi_SSID;
CommonService.MOHEMM_WIFI_PASSWORD = result.Mohemm_Wifi_Password;
console.log('ENAD');
console.log(JSON.stringify(this.businessInfo));
localStorage.setItem('bussiness-card-info', JSON.stringify(this.businessInfo));
// this.common.sharedService.setSharedData(this.businessInfo,'bussiness-card-info');

@ -29,6 +29,8 @@ export class WorklistMainService {
public static getMONotificationBody = "Services/ERP.svc/REST/GET_MO_NOTIFICATION_BODY";
public static getPRNotificationBody = "Services/ERP.svc/REST/GET_PR_NOTIFICATION_BODY";
public static getICNotificationBody = "Services/ERP.svc/REST/GET_ITEM_CREATION_NTF_BODY";
public static getBasicDetailNotificationBody = "Services/ERP.svc/REST/GET_BASIC_DET_NTF_BODY";
public static getAddressNotificationBody = "Services/ERP.svc/REST/GET_ADDRESS_NOTIFICATION_BODY";
public static getPOItemHistory = "Services/ERP.svc/REST/GET_PO_ITEM_HISTORY";
public static getMOItemHistory = "Services/ERP.svc/REST/GET_MO_ITEM_HISTORY";
public static getNotificationButtons = "Services/ERP.svc/REST/GET_NOTIFICATION_BUTTONS";
@ -107,7 +109,7 @@ export class WorklistMainService {
);
}
public getICNotificationBody(
public getBasicDetailNotificationBody(
WorkListBodyRequest: any,
onError?: any,
errorLabel?: string
@ -115,7 +117,22 @@ export class WorklistMainService {
const request = WorkListBodyRequest;
this.authService.authenticateRequest(request);
return this.api.post(
WorklistMainService.getICNotificationBody,
WorklistMainService.getBasicDetailNotificationBody,
request,
onError,
errorLabel
);
}
public getAddressNotificationBody(
WorkListBodyRequest: any,
onError?: any,
errorLabel?: string
): Observable<PRNotificatonBodyResponse> {
const request = WorkListBodyRequest;
this.authService.authenticateRequest(request);
return this.api.post(
WorklistMainService.getAddressNotificationBody,
request,
onError,
errorLabel
@ -169,6 +186,21 @@ export class WorklistMainService {
);
}
public getICNotificationBody(
WorkListBodyRequest: any,
onError?: any,
errorLabel?: string
): Observable<PRNotificatonBodyResponse> {
const request = WorkListBodyRequest;
this.authService.authenticateRequest(request);
return this.api.post(
WorklistMainService.getICNotificationBody,
request,
onError,
errorLabel
);
}
public getQutationAnalysis(
qutationAnalysis: any,
onError?: any,

@ -542,7 +542,7 @@
for="">{{ts.trPK('worklistMain','TotalPOAmountWithVAT')}}
</label>
<br />
<label for="">{{header.TOT_PO_AMT}} </label>
<label for="">{{header.LOC_CUR_TOT_PO_AMT}} </label>
</ion-col>
</ion-row>
<ion-row>

@ -46,10 +46,10 @@
</ion-row>
<ion-row>
<ion-col>
<!-- NOT ADDRESS & BASIC_DETAILS -->
<ion-col *ngIf="getPassNotificationDetails?.REQUEST_TYPE != 'ADDRESS' && getPassNotificationDetails?.REQUEST_TYPE != 'BASIC_DETAILS' ">
<div *ngIf="notificationBodyRes?.length > 0 ">
<ion-card *ngFor="let item of notificationBodyRes;let i=index; "
style="width: 91%;">
<ion-card *ngFor="let item of notificationBodyRes;let i=index; " style="width: 91%;">
<ion-card-content *ngIf="item.Collection_Notification.length > 0">
<div>
<ion-row *ngIf=" item.Collection_Notification.DISPLAY_FLAG != 'N' ">
@ -117,6 +117,48 @@
</ion-grid>
</ion-item>
</ion-col>
<!-- IF BASIC_DETAILS -->
<ion-col *ngIf="getPassNotificationDetails?.REQUEST_TYPE != 'BASIC_DETAILS'">
<div *ngIf='notificationBodyRes.length > 0'>
<ion-card style="width: 91%;">
<ion-card-content >
<div>
<ion-row>
<ion-col class="rowBorder"
*ngFor="let item of notificationBodyRes;let i=index;"
size="6" [hidden]="item.UPDATED_FLAG == 'N'">
<label class="colItemReq">{{item.SEGMENT_PROMPT}}</label>
<br />
<label>{{item.SEGMENT_VALUE_DSP}}</label>
</ion-col>
</ion-row>
</div>
</ion-card-content>
</ion-card>
</div>
</ion-col>
<!-- IF ADDRESS -->
<ion-col *ngIf="getPassNotificationDetails?.REQUEST_TYPE != 'ADDRESS'">
<div *ngIf='notificationBodyRes.length > 0'>
<ion-card style="width: 91%;">
<ion-card-content >
<div>
<ion-row>
<ion-col class="rowBorder"
*ngFor="let item of notificationBodyRes;let i=index;"
size="6" [hidden]="item.UPDATED_FLAG == 'N'">
<label class="colItemReq">{{item.SEGMENT_PROMPT}}</label>
<br />
<label>{{item.SEGMENT_VALUE_DSP}}</label>
</ion-col>
</ion-row>
</div>
</ion-card-content>
</ion-card>
</div>
</ion-col>
</ion-row>
</ion-grid>

@ -273,9 +273,28 @@ export class WorklistMainComponent implements OnInit {
this.getMONotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "PR") {
this.getPRNotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE === 'ADDRESS') {
this.getBasicDetailsNotification(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE === 'BASIC_DETAILS') {
this.getAddressNotification(this.WorkListBodyObj);
}
}
getBasicDetailsNotification(notificationBodyObj) {
this.worklistMainService
.getBasicDetailNotificationBody(notificationBodyObj)
.subscribe((result: PRNotificatonBodyResponse) => {
this.handleWorkListBodyResult(result, "BASIC_DETAILS");
});
}
getAddressNotification(notificationBodyObj) {
this.worklistMainService
.getAddressNotificationBody(notificationBodyObj)
.subscribe((result: PRNotificatonBodyResponse) => {
this.handleWorkListBodyResult(result, "ADDRESS");
});
}
getPRNotificationDetails(notificationBodyObj) {
this.worklistMainService
.getPRNotificationBody(notificationBodyObj)
@ -343,11 +362,23 @@ export class WorklistMainComponent implements OnInit {
this.getSubordinatesleave(obj)
}
} else if (Type == "PR") {
} else if (Type === "PR") {
if (result.GetAbsenceCollectionNotificationBodyList) {
this.notificationBodyRes =
result.GetAbsenceCollectionNotificationBodyList;
}
} else if (Type === "ADDRESS"){
if (result.GetAddressNotificationBodyList) {
this.notificationBodyRes =
result.GetAddressNotificationBodyList;
console.log(result);
}
} else if (Type === "BASIC_DETAILS"){
if (result.GetBasicDetNtfBodyList) {
this.notificationBodyRes =
result.GetBasicDetNtfBodyList;
console.log(result);
}
}
}
} //End handleWorkListBodyResult

Loading…
Cancel
Save