link new tab fixes : ps

This commit is contained in:
VE10-Sanjeev 2024-03-04 12:20:26 +05:30
parent 109f0c6c73
commit a4a474192d
2 changed files with 20 additions and 1 deletions

View File

@ -157,6 +157,7 @@ export class SalesPdComponent implements OnInit {
console.log('Listing Page '+inx+') Final Link = '+this.finallink);
val.link = this.finallink;
localStorage.setItem('redirect_salesapp_link', this.redirect_salesapp_link);
if (products.length > 0) {
if (products.filter(pro => pro == val.product_id).length == 0) {
@ -204,7 +205,8 @@ export class SalesPdComponent implements OnInit {
editForm (value_obj) {
let campletedCase = JSON.stringify(value_obj)
let campletedCase = JSON.stringify(value_obj);
console.log("completePD Setted Here when editform function called \n ",campletedCase);
localStorage.setItem('completedPD', campletedCase)
// let product= localStorage.getItem('product_id_salesPD')
// storing the sales_pd_id and product id in local storagey

View File

@ -613,8 +613,25 @@ getListofPD() {
this.salesPdData = res['records'];
console.log(this.salesPdData)
console.log(this.salesPdData[0].status)
if (this.salesPdData[0].link === undefined || this.salesPdData[0].link === null) {
// Link is not available (either this.salesPdData is null/undefined or link is null/undefined)
console.log("Link is not available. So I attached Here");
let applicant_id = this.salesPdData[0].applicant_id;
let PDSno = this.salesPdData[0].sales_pd_sno;
let status = 1;
if(this.salesPdData[0].status == 'COMPLETED'){ status = 2; }
let link = localStorage.getItem('redirect_salesapp_link');
let login_type_id : any = localStorage.getItem('login_type_id');
let user_details = localStorage.getItem('user_details');
let user_details_json = (JSON.parse(user_details));
let email = (login_type_id == 1) ? localStorage.getItem('officer_mail_id') : user_details_json.email;
this.salesPdData[0].link = link +"&applicantid=" + applicant_id + "&email="+email+"&status="+status+"&PDID="+PDSno
}
// console.log("completePD Setted Here when getListofPD function called \n ",this.salesPdData[0].link);
let campletedCase = JSON.stringify(this.salesPdData[0])
localStorage.setItem('completedPD',campletedCase)
console.log("completePD Setted Here. when getListofPD function called \n ",campletedCase);
// this.dataLengthTab4 = res['records'].length;
// this.dataSourceTab4.data = this.salesPdData;
// this.recordStatus=false