Compare commits
6 Commits
f957547924
...
c0f7160cc1
| Author | SHA1 | Date | |
|---|---|---|---|
| c0f7160cc1 | |||
| a4a474192d | |||
| 109f0c6c73 | |||
| 2903e9bca7 | |||
| 48907ffd22 | |||
| 6b44447829 |
@ -1953,13 +1953,14 @@ this.proceedonChangeProperty(modified)
|
||||
section_data.is_completed=true
|
||||
|
||||
let login_type_id = parseInt(localStorage.getItem('login_type_id')); // 1 na auto-login , 0 na manual-login
|
||||
if(params.status=="COMPLETED" && login_type_id == 1){
|
||||
// if(params.status=="COMPLETED" && login_type_id == 1)
|
||||
if(params.status=="COMPLETED"){
|
||||
let completedPD = localStorage.getItem('completedPD');
|
||||
completedPD = JSON.parse(completedPD)
|
||||
let applicant_id = completedPD['applicant_id']
|
||||
console.log(completedPD['applicant_id']);
|
||||
console.log('completedPD[sales_pd_sno]',completedPD['sales_pd_sno']);
|
||||
this.redirectSMC(applicant_id);
|
||||
this.redirectSMC(completedPD);
|
||||
// return true;
|
||||
}
|
||||
|
||||
@ -2290,24 +2291,35 @@ this.proceedonChangeProperty(modified)
|
||||
}
|
||||
}
|
||||
|
||||
redirectSMC(applicant_id){
|
||||
// redirectSMC(applicant_id){
|
||||
|
||||
console.log("calling SMC redirect",environment.authorization);
|
||||
// window.location.href=data.records;
|
||||
let email = localStorage.getItem('officer_mail_id');
|
||||
console.log("calling SMC redirect email = ",email);
|
||||
// http://salesapp.devopsmcfinance.com/secure?saltkey=$2y$10$H4vSrWl15syQHO.tsT0DdOF7pYSTKZBT85sOFCJerttTdObBRsB36&applicantid=4231&email=aniltiwari@smcfinance.com
|
||||
if(environment.authorization == 'TnAwuc64pVpcB9xf'){
|
||||
// console.log("calling SMC redirect",environment.authorization);
|
||||
// // window.location.href=data.records;
|
||||
// let email = localStorage.getItem('officer_mail_id');
|
||||
// console.log("calling SMC redirect email = ",email);
|
||||
// // http://salesapp.devopsmcfinance.com/secure?saltkey=$2y$10$H4vSrWl15syQHO.tsT0DdOF7pYSTKZBT85sOFCJerttTdObBRsB36&applicantid=4231&email=aniltiwari@smcfinance.com
|
||||
// if(environment.authorization == 'TnAwuc64pVpcB9xf'){
|
||||
|
||||
let salesapp_link ="http://salesapp.smcfinance.com/app/secure?saltkey=$2y$10$H4vSrWl15syQHO.tsT0DdOF7pYSTKZBT85sOFCJerttTdObBRsB36&applicantid="+applicant_id+"&email="+email;
|
||||
console.log('2p salesapp_link = ',salesapp_link);
|
||||
window.open(salesapp_link, '_blank');
|
||||
}else if(environment.authorization == 'sparqvenba2018'){
|
||||
let salesapp_link ="http://salesapp.devopsmcfinance.com/secure?saltkey=$2y$10$H4vSrWl15syQHO.tsT0DdOF7pYSTKZBT85sOFCJerttTdObBRsB36&applicantid="+applicant_id+"&email="+email;
|
||||
// window.open('https://www.w3schools.com/html/tryit.asp?filename=tryhtml_basic', '_blank');
|
||||
console.log('2t salesapp_link = ',salesapp_link);
|
||||
window.open(salesapp_link, '_blank');
|
||||
// this.router.navigate([salesapp_link]);
|
||||
// let salesapp_link ="http://salesapp.smcfinance.com/app/secure?saltkey=$2y$10$H4vSrWl15syQHO.tsT0DdOF7pYSTKZBT85sOFCJerttTdObBRsB36&applicantid="+applicant_id+"&email="+email;
|
||||
// console.log('2p salesapp_link = ',salesapp_link);
|
||||
// window.open(salesapp_link, '_blank');
|
||||
// }else if(environment.authorization == 'sparqvenba2018'){
|
||||
// let salesapp_link ="http://salesapp.devopsmcfinance.com/secure?saltkey=$2y$10$H4vSrWl15syQHO.tsT0DdOF7pYSTKZBT85sOFCJerttTdObBRsB36&applicantid="+applicant_id+"&email="+email;
|
||||
// // window.open('https://www.w3schools.com/html/tryit.asp?filename=tryhtml_basic', '_blank');
|
||||
// console.log('2t salesapp_link = ',salesapp_link);
|
||||
// window.open(salesapp_link, '_blank');
|
||||
// // this.router.navigate([salesapp_link]);
|
||||
// }
|
||||
// }
|
||||
|
||||
redirectSMC(completedPD) {
|
||||
console.log("Completed, Values = " + completedPD + " \n final link= " + completedPD['link']);
|
||||
if (completedPD['link'] != '') {
|
||||
console.log("Completed, final link= " + completedPD['link']);
|
||||
window.open(completedPD['link'], '_blank');
|
||||
}
|
||||
else {
|
||||
console.log("Completed, But Not final link Founded");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<mat-card class="p-2" style="box-shadow: 0 0 1px rgba(0,0,0,.18), 0 0 1px rgba(0,0,0,.15) !important">
|
||||
<span *ngIf="loginTypeId == 0">
|
||||
<span *ngIf="login_type_id == 0">
|
||||
<div fxLayout="row">
|
||||
<div fxFlex="50" class="pb-0 text-sm-left">
|
||||
<mat-form-field dividerColor="primary" style="width: 50%;">
|
||||
@ -20,7 +20,7 @@
|
||||
<mat-tab>
|
||||
<ng-template mat-tab-label>Sales PD</ng-template>
|
||||
<mat-card-content style="padding: 0px !important;">
|
||||
<span *ngIf="loginTypeId == 0">
|
||||
<span *ngIf="login_type_id == 0">
|
||||
<app-advance-filter [drop_down_datas]="filter_drop_down_data" (filteredlistData)="filteredDataSource($event)"
|
||||
></app-advance-filter>
|
||||
<p class="note" *ngIf="!recordStatus && limitMsg">Showing data for last {{common}}. To see older records, please use advanced filter</p>
|
||||
@ -56,7 +56,7 @@
|
||||
<div fxFlex.xs="10" fxFlex.sm="10" class="webhide" style="text-align: right;">
|
||||
<button style="width: 43px !important;height: 23px !important;line-height: 0px !important;" mat-button mat-icon-button type="button" [disabled]="details.status != 'COMPLETED'"
|
||||
color="primary" (click)="salesPDpdf(details.sales_pd_id)"><mat-icon>file_download</mat-icon></button><br>
|
||||
<button mat-button mat-icon-button (click)="newPortal()" type="button" matTooltip="link" matTooltipPosition="above" color="primary"><mat-icon>link</mat-icon></button>
|
||||
<button mat-button mat-icon-button (click)="newPortal(details.link)" type="button" matTooltip="link" matTooltipPosition="above" color="primary"><mat-icon>link</mat-icon></button>
|
||||
</div>
|
||||
<mat-divider></mat-divider>
|
||||
</div>
|
||||
@ -238,18 +238,18 @@
|
||||
<div fxFlex="row">
|
||||
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20.66" fxFlex.lg="20.66" fxFlex.xl="20.66" class="cell center">
|
||||
<button style="float: right" mat-button mat-icon-button class="hover-icon" type="button" matTooltip="PDF Download" [disabled]="details.status != 'COMPLETED'"
|
||||
matTooltipPosition="top" color="primary" (click)="salesPDpdf(details.sales_pd_id)"><mat-icon>file_download</mat-icon></button>
|
||||
matTooltipPosition="above" color="primary" (click)="salesPDpdf(details.sales_pd_id)"><mat-icon>file_download</mat-icon></button>
|
||||
</div>
|
||||
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20.66" fxFlex.lg="20.66" fxFlex.xl="20.66" class="cell center">
|
||||
<div *ngIf="roleID == 30">
|
||||
<button *ngIf="details.status == 'COMPLETED'" mat-button mat-icon-button class="hover-icon" type="button" color="primary" (click)="editForm(details)"
|
||||
matTooltip="View" matTooltipPosition="top" style="color:rgba(0, 0, 0, 0.26) !important"><mat-icon>visibility</mat-icon></button>
|
||||
matTooltip="View" matTooltipPosition="above" style="color:rgba(0, 0, 0, 0.26) !important"><mat-icon>visibility</mat-icon></button>
|
||||
<button *ngIf="details.status == 'STARTED'" mat-button mat-icon-button class=" hover-icon" type="button" color="primary" (click)="editForm(details)"
|
||||
matTooltip="View" matTooltipPosition="top" ><mat-icon>visibility</mat-icon></button>
|
||||
matTooltip="View" matTooltipPosition="above" ><mat-icon>visibility</mat-icon></button>
|
||||
</div>
|
||||
<div *ngIf="roleID != 30">
|
||||
<button [disabled]="details.status === 'COMPLETED'" mat-button mat-icon-button class="hover-icon" type="button" color="primary" (click)="editForm(details)"
|
||||
matTooltip="View" matTooltipPosition="top"><mat-icon>visibility</mat-icon></button>
|
||||
matTooltip="View" matTooltipPosition="above"><mat-icon>visibility</mat-icon></button>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20.66" fxFlex.lg="20.66" fxFlex.xl="20.66" class="cell center">
|
||||
@ -258,7 +258,7 @@
|
||||
matTooltip="Redirected to Sales APP" matTooltipPosition="above" (click)="redirected(details)"><mat-icon>link</mat-icon></button>
|
||||
</div>
|
||||
<ng-template #elseBlock>
|
||||
<button mat-button mat-icon-button (click)="newPortal()" type="button" matTooltip="link" matTooltipPosition="above" color="primary"><mat-icon>link</mat-icon></button>
|
||||
<button mat-button mat-icon-button (click)="newPortal(details.link)" type="button" matTooltip="link" matTooltipPosition="above" color="primary"><mat-icon>link</mat-icon></button>
|
||||
</ng-template>
|
||||
</div>
|
||||
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20.66" fxFlex.lg="20.66" fxFlex.xl="20.66" class="cell center">
|
||||
@ -307,4 +307,4 @@
|
||||
</mat-card-content>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
</mat-card>
|
||||
</mat-card>
|
||||
@ -43,24 +43,23 @@ export class SalesPdComponent implements OnInit {
|
||||
user_type: string = '';
|
||||
is_sales_login: boolean = false
|
||||
public finallink: any;
|
||||
public redirect_salesapp_link = environment.redirectSalesapp;
|
||||
|
||||
// public redirect_salesapp_link = "https://sales-app-frontend-m54bsjg7fq-em.a.run.app/secure?saltkey=$2y$10$H4vSrWl15syQHO.tsT0DdOF7pYSTKZBT85sOFCJerttTdObBRsB36";
|
||||
roleID: any;
|
||||
loginTypeId: any;
|
||||
local_spdid: string;
|
||||
login_type_id: number;
|
||||
login_type_id: any;
|
||||
|
||||
constructor(private loaderService: LoaderService, private constantProvider: ConstantsProvider, private dialog: MatDialog, private route: ActivatedRoute, private router: Router, private _creditPdService: ApiServiceService, private SalesPDService: SalesPdService) {
|
||||
|
||||
// this.common = JSON.parse(localStorage.getItem('commonSettings')).default_pd_list_count;
|
||||
// this.common = this.common.count+' '+this.common.factor
|
||||
// this.user_type = localStorage.getItem('len_user_role')
|
||||
this.loginTypeId = localStorage.getItem('login_type_id');
|
||||
this.login_type_id = localStorage.getItem('login_type_id');
|
||||
setTimeout(() => {
|
||||
let userDetails = localStorage.getItem('user_details');
|
||||
console.log('userdetails');
|
||||
console.log(userDetails);
|
||||
|
||||
let role = this.constantProvider.takeDecisionRouting(JSON.parse(userDetails))
|
||||
console.log(role)
|
||||
console.log('role = '+role);
|
||||
if (role == 'sales') {
|
||||
this.is_sales_login = true
|
||||
this.getListofPD()
|
||||
@ -95,18 +94,21 @@ export class SalesPdComponent implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** uploadDatatoCET **/
|
||||
uploadDatatoCET(salespdid) {
|
||||
this.SalesPDService.uploadSalesDatatoCET(salespdid).subscribe(res => {
|
||||
if (res['dataStatus']) {
|
||||
let user1 = localStorage.getItem('user_details');
|
||||
let user = (JSON.parse(user1))
|
||||
this.roleID = localStorage.getItem('user_role')
|
||||
console.log("uploadDatatoCET fns response msg = "+res['msg']);
|
||||
alert(res['msg']);
|
||||
} else { alert(res['msg']); }
|
||||
} else { alert(res['msg']); console.log("uploadDatatoCET fns response msg = "+res['msg']); }
|
||||
}, error => {
|
||||
this.errorMessage.push(error);
|
||||
console.log("uploadDatatoCET fns error.html_format = "+error.html_format);
|
||||
alert(error.html_format);
|
||||
|
||||
});
|
||||
}
|
||||
getListofPD() {
|
||||
@ -122,7 +124,7 @@ export class SalesPdComponent implements OnInit {
|
||||
this.roleID = localStorage.getItem('user_role')
|
||||
|
||||
this.salesPdData = res['records'];
|
||||
if(this.loginTypeId == 1 && this.local_spdid != ''){
|
||||
if(this.login_type_id == 1 && this.local_spdid != ''){
|
||||
this.salesPdData = this.salesPdData.filter(d=>d['sales_pd_id'] == this.local_spdid);
|
||||
}
|
||||
|
||||
@ -134,19 +136,7 @@ export class SalesPdComponent implements OnInit {
|
||||
let products = []
|
||||
let lenders = []
|
||||
let pd_status = []
|
||||
this.salesPdData.map(val => {
|
||||
|
||||
// https://gstapp.smcfinance.com/home?saltkey=VQDa79tyBlpu7ZuKt6U&PDID=123&Email=manojsahrawat@smcfinance.com
|
||||
//let link = "http://gstapp.devopsmcfinance.com/home?saltkey=VQDa79tyBlpu7ZuKt6U"
|
||||
console.log(environment)
|
||||
let link
|
||||
if (environment.authorization == 'TnAwuc64pVpcB9xf') {
|
||||
console.log('293')
|
||||
link = "https://salesapp.smcfinance.com/app/secure?saltkey=VQDa79tyBlpu7ZuKt6U"
|
||||
} else if (environment.authorization == 'sparqvenba2018') {
|
||||
console.log('296')
|
||||
link = "http://salesapp.devopsmcfinance.com/secure?saltkey=VQDa79tyBlpu7ZuKt6U"
|
||||
}
|
||||
this.salesPdData.map((val, inx) => {
|
||||
|
||||
var string: any = {
|
||||
EmpName: user.user_first_name,
|
||||
@ -154,19 +144,21 @@ export class SalesPdComponent implements OnInit {
|
||||
PDID: val.sales_pd_sno,
|
||||
//PD_NO:val.sales_pd_sno,
|
||||
}
|
||||
//console.log(string);
|
||||
//var encodedString = btoa(JSON.stringify(string));
|
||||
//console.log("encode",encodedString); // Outputs: "SGVsbG8gV29ybGQh"
|
||||
//var decodedString = atob(encodedString);
|
||||
//console.log("decode",JSON.parse(decodedString));
|
||||
//let email="mwisesales1@sine.com";
|
||||
let PDID = val.sales_pd_sno;
|
||||
// let mail="&Email=manojsahrawat@smcfinance.com"
|
||||
this.finallink = link + "&PDID=" + PDID + "&Email=" + user.email;
|
||||
|
||||
//Here 1 means Autologin so Officer Email , 0 means user array la getting - email;
|
||||
let email = this.login_type_id == 1 ? localStorage.getItem('officer_mail_id') : user.email;
|
||||
console.log('new mail',email);
|
||||
let applicant_id = val.applicant_id;
|
||||
console.log('applicat id',val.applicant_id);
|
||||
let PDSno = val.sales_pd_sno;
|
||||
let status = 1;
|
||||
if(val.status == 'COMPLETED'){ status = 2; }
|
||||
|
||||
console.log('this.finallink')
|
||||
console.log(this.finallink);
|
||||
this.finallink = this.redirect_salesapp_link +"&applicantid=" + applicant_id + "&email="+email+"&status="+status+"&PDID="+PDSno
|
||||
|
||||
console.log('Listing Page '+inx+') Final Link = '+this.finallink);
|
||||
val.link = this.finallink;
|
||||
|
||||
|
||||
if (products.length > 0) {
|
||||
if (products.filter(pro => pro == val.product_id).length == 0) {
|
||||
@ -194,7 +186,6 @@ export class SalesPdComponent implements OnInit {
|
||||
}
|
||||
})
|
||||
this.filter_drop_down_data = { product_ids: products, lender_ids: lenders, pd_status: pd_status }
|
||||
// console.log(this.filter_drop_down_data);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -208,60 +199,15 @@ export class SalesPdComponent implements OnInit {
|
||||
, error => {
|
||||
this.errorMessage.push(error);
|
||||
// this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!');
|
||||
console.log("getListofPD fns error.html_format = "+error.html_format);
|
||||
alert(error.html_format);
|
||||
});
|
||||
}
|
||||
// editForm(value_obj){
|
||||
// alert('abc');
|
||||
// console.log('value');
|
||||
// console.log(value_obj);
|
||||
// // let product= localStorage.getItem('product_id_salesPD')
|
||||
// // storing the sales_pd_id and product id in local storagey
|
||||
// let primary_key= 'sales_pd_id'
|
||||
// if(value_obj.hasOwnProperty('local_pd_id') && value_obj.local_pd_id != null && value_obj.sales_pd_id == null && value_obj.hasOwnProperty('is_pd_synced') && value_obj.is_pd_synced == false) {
|
||||
// primary_key = 'local_pd_id'
|
||||
// }
|
||||
// // this.salesPDService.insertData_Replace('sales_pd_id_PRIMARYKEY',value_obj[primary_key]).then(()=>{
|
||||
// //this.salesPDService.insertData_Replace('sales_rand_string',value_obj['rand_string']).then(()=>{
|
||||
// // localStorage.setItem('product_id_salesPD',value_obj.product_id)
|
||||
// if(!value_obj.hasOwnProperty('sales_pd_type')&& !value_obj.sales_pd_type) {
|
||||
// value_obj.sales_pd_type = '1'
|
||||
// }
|
||||
// console.log('value');
|
||||
// console.log(value_obj);
|
||||
// this.router.navigate(['../sectionlist'])
|
||||
// // localStorage.setItem('sales_pd_type',value_obj.sales_pd_type)
|
||||
// //this.navigate.push(SectionListPage,{product_id:value_obj.product_id,sales_pd_type:value_obj.sales_pd_type})
|
||||
// // })
|
||||
// //})
|
||||
// }
|
||||
|
||||
// editForm2(value_obj){
|
||||
// // let product= localStorage.getItem('product_id_salesPD')
|
||||
// // storing the sales_pd_id and product id in local storagey
|
||||
// let primary_key= 'sales_pd_id'
|
||||
// if(value_obj.hasOwnProperty('local_pd_id') && value_obj.local_pd_id != null && value_obj.sales_pd_id == null && value_obj.hasOwnProperty('is_pd_synced') && value_obj.is_pd_synced == false) {
|
||||
// primary_key = 'local_pd_id'
|
||||
// }
|
||||
// this.salesPDService.insertData_Replace('sales_pd_id_PRIMARYKEY',value_obj[primary_key]).then(()=>{
|
||||
// this.salesPDService.insertData_Replace('sales_rand_string',value_obj['rand_string']).then(()=>{
|
||||
// localStorage.setItem('product_id_salesPD',value_obj.product_id)
|
||||
// if(!value_obj.hasOwnProperty('sales_pd_type')&& !value_obj.sales_pd_type) {
|
||||
// value_obj.sales_pd_type = '1'
|
||||
// }
|
||||
// console.log(value_obj);
|
||||
// localStorage.setItem('sales_pd_type',value_obj.sales_pd_type)
|
||||
// this.navCtrl.push(SectionListPage,{product_id:value_obj.product_id,sales_pd_type:value_obj.sales_pd_type})
|
||||
// })
|
||||
// })
|
||||
// }
|
||||
|
||||
editForm(value_obj) {
|
||||
console.log(value_obj.sales_pd_id, value_obj.rand_string)
|
||||
// alert('abc');
|
||||
console.log('value');
|
||||
console.log(value_obj);
|
||||
let campletedCase = JSON.stringify(value_obj)
|
||||
|
||||
editForm (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
|
||||
@ -280,8 +226,7 @@ export class SalesPdComponent implements OnInit {
|
||||
if (!value_obj.hasOwnProperty('sales_pd_type') && !value_obj.sales_pd_type) {
|
||||
value_obj.sales_pd_type = '1'
|
||||
}
|
||||
console.log('value');
|
||||
console.log(value_obj);
|
||||
|
||||
localStorage.setItem('sales_pd_type', value_obj.sales_pd_type)
|
||||
// this.router.navigate(['../sectionlist',value_obj.product_id,value_obj.sales_pd_type,value_obj.link],{ relativeTo: this.route })
|
||||
this.router.navigate(['../sectionlist', value_obj.product_id, value_obj.sales_pd_type], { relativeTo: this.route })
|
||||
@ -289,7 +234,13 @@ export class SalesPdComponent implements OnInit {
|
||||
//})
|
||||
}
|
||||
|
||||
newPortal(redirectedto) {
|
||||
console.log("Manual final link = "+redirectedto);
|
||||
window.open(redirectedto);
|
||||
}
|
||||
|
||||
redirected(value_obj) {
|
||||
|
||||
let campletedCase = JSON.stringify(value_obj)
|
||||
localStorage.getItem("completedPD") === null ? localStorage.setItem('completedPD', campletedCase) : '';
|
||||
localStorage.getItem("sales_pd_id_PRIMARYKEY") === null ? localStorage.setItem('sales_pd_id_PRIMARYKEY', value_obj.sales_pd_id) : '';
|
||||
@ -297,24 +248,18 @@ export class SalesPdComponent implements OnInit {
|
||||
|
||||
// window.location.href=data.records;
|
||||
let email = localStorage.getItem('officer_mail_id');
|
||||
console.log("redirected email = "+email);
|
||||
let applicant_id = value_obj.applicant_id;
|
||||
console.log(value_obj.applicant_id);
|
||||
if (environment.authorization == 'TnAwuc64pVpcB9xf') {
|
||||
let salesapp_link = "https://salesapp.smcfinance.com/app/secure?saltkey=$2y$10$H4vSrWl15syQHO.tsT0DdOF7pYSTKZBT85sOFCJerttTdObBRsB36&applicantid=" + applicant_id + "&email="+email;
|
||||
console.log('in list salesapp_link = ', salesapp_link);
|
||||
let salesapp_url = salesapp_link;
|
||||
window.open(salesapp_url);
|
||||
} else if (environment.authorization == 'sparqvenba2018') {
|
||||
let salesapp_link = "http://salesapp.devopsmcfinance.com/secure?saltkey=$2y$10$H4vSrWl15syQHO.tsT0DdOF7pYSTKZBT85sOFCJerttTdObBRsB36&applicantid=" + applicant_id + "&email="+email;
|
||||
console.log('in list salesapp_link = ', salesapp_link);
|
||||
let salesapp_url = salesapp_link;
|
||||
window.open(salesapp_url);
|
||||
}
|
||||
let PDSno = value_obj.sales_pd_sno;
|
||||
let status = 1;
|
||||
if(value_obj.status == 'COMPLETED'){ status = 2; }
|
||||
let salesapp_link = "https://new-los-frontend-aut-m54bsjg7fq-em.a.run.app/#/redirect?saltkey=$2y$10$H4vSrWl15syQHO.tsT0DdOF7pYSTKZBT85sOFCJerttTdObBRsB36&applicantid=" + applicant_id + "&email="+email+"&status="+status+"&PDID="+PDSno
|
||||
// let salesapp_link = "https://sales-app-frontend-m54bsjg7fq-em.a.run.app/secure?saltkey=$2y$10$H4vSrWl15syQHO.tsT0DdOF7pYSTKZBT85sOFCJerttTdObBRsB36&applicantid=" + applicant_id + "&email="+email+"&status="+status+"&PDID="+PDSno
|
||||
console.log("Auto final status = "+value_obj.status+", flag ="+status+" and \n Final link = "+salesapp_link);
|
||||
window.open(salesapp_link, '_blank');
|
||||
}
|
||||
|
||||
filteredDataSource(res) {
|
||||
console.log("From Parent", res);
|
||||
|
||||
if (res['dataStatus']) {
|
||||
|
||||
let user1 = localStorage.getItem('user_details');
|
||||
@ -330,19 +275,18 @@ export class SalesPdComponent implements OnInit {
|
||||
let products = []
|
||||
let lenders = []
|
||||
let pd_status = []
|
||||
this.salesPdData.map(val => {
|
||||
|
||||
this.salesPdData.map((val, inx) => {
|
||||
|
||||
// https://gstapp.smcfinance.com/home?saltkey=VQDa79tyBlpu7ZuKt6U&PDID=123&Email=manojsahrawat@smcfinance.com
|
||||
//let link = "http://gstapp.devopsmcfinance.com/home?saltkey=VQDa79tyBlpu7ZuKt6U"
|
||||
console.log(environment)
|
||||
let link
|
||||
if (environment.authorization == 'TnAwuc64pVpcB9xf') {
|
||||
console.log('293')
|
||||
link = "https://salesapp.smcfinance.com/app/secure?saltkey=VQDa79tyBlpu7ZuKt6U"
|
||||
} else if (environment.authorization == 'sparqvenba2018') {
|
||||
console.log('296')
|
||||
link = "http://salesapp.devopsmcfinance.com/secure?saltkey=VQDa79tyBlpu7ZuKt6U"
|
||||
}
|
||||
// let link = "http://gstapp.devopsmcfinance.com/home?saltkey=VQDa79tyBlpu7ZuKt6U"
|
||||
|
||||
// let link
|
||||
// if (environment.authorization == 'TnAwuc64pVpcB9xf') {
|
||||
// link = "https://salesapp.smcfinance.com/app/secure?saltkey=VQDa79tyBlpu7ZuKt6U"
|
||||
// } else if (environment.authorization == 'sparqvenba2018') {
|
||||
// link = "http://salesapp.devopsmcfinance.com/secure?saltkey=VQDa79tyBlpu7ZuKt6U"
|
||||
// }
|
||||
|
||||
var string: any = {
|
||||
EmpName: user.user_first_name,
|
||||
@ -358,10 +302,17 @@ export class SalesPdComponent implements OnInit {
|
||||
//let email="mwisesales1@sine.com";
|
||||
let PDID = val.sales_pd_sno;
|
||||
// let mail="&Email=manojsahrawat@smcfinance.com"
|
||||
this.finallink = link + "&PDID=" + PDID + "&Email=" + user.email;
|
||||
|
||||
let email = this.login_type_id == 1 ? localStorage.getItem('officer_mail_id') : user.email;
|
||||
let applicant_id = val.applicant_id;
|
||||
let PDSno = val.sales_pd_sno;
|
||||
let status = 1;
|
||||
if(val.status == 'COMPLETED'){ status = 2; }
|
||||
|
||||
console.log('this.finallink')
|
||||
console.log(this.finallink);
|
||||
this.finallink = this.redirect_salesapp_link +"&applicantid=" + applicant_id + "&email="+email+"&status="+status+"&PDID="+PDSno
|
||||
|
||||
console.log('Filtered Data '+inx+') Final Link = '+this.finallink);
|
||||
//console.log('finallink = '+this.finallink);
|
||||
val.link = this.finallink;
|
||||
|
||||
if (products.length > 0) {
|
||||
@ -418,6 +369,7 @@ export class SalesPdComponent implements OnInit {
|
||||
this.loaderService.closeMatSpinnerDialog()
|
||||
this.errorMessage.push(error);
|
||||
// this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!');
|
||||
console.log("salesPDpdf Fns error.html_format = "+error.html_format);
|
||||
alert(error.html_format);
|
||||
});
|
||||
|
||||
@ -434,7 +386,7 @@ export class SalesPdComponent implements OnInit {
|
||||
this.dataSourceTab4.filter = filterValue.trim().toLowerCase();
|
||||
}
|
||||
newcreditTrigger(curr_list_obj) {
|
||||
console.log(curr_list_obj);
|
||||
// console.log(curr_list_obj);
|
||||
|
||||
const dialogRef = this.dialog.open(DialogOverviewExampleDialog, {
|
||||
width: '500px',
|
||||
@ -455,17 +407,7 @@ export class SalesPdComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
newForm() {
|
||||
// this.salesPDService.getData_fromLocal('sec1').then(result=>{
|
||||
// console.log("image",result);
|
||||
// if(result){
|
||||
// this.alertDecision()
|
||||
// }
|
||||
// else{
|
||||
// this.navCtrl.push(HomePage)
|
||||
// }
|
||||
// });
|
||||
// this.SalesPDService.clearLocalData()
|
||||
// this.SalesPDService.clear_local_key('sales_pd_id_PRIMARYKEY');
|
||||
|
||||
parseInt(localStorage.getItem('login_type_id')) == 0 ? localStorage.removeItem('sales_pd_id_PRIMARYKEY') : '';
|
||||
localStorage.removeItem('product_id_salesPD')
|
||||
localStorage.removeItem('sales_pd_type')
|
||||
@ -475,10 +417,6 @@ export class SalesPdComponent implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
newPortal() {
|
||||
console.log(this.finallink)
|
||||
window.open(this.finallink);
|
||||
}
|
||||
|
||||
|
||||
regeneratereport(data, option) {
|
||||
@ -521,6 +459,7 @@ export class DialogOverviewExampleDialog {
|
||||
onNoClick(): void {
|
||||
this.dialogRef.close();
|
||||
}
|
||||
|
||||
onSubmit() {
|
||||
console.log(this.choosedPD);
|
||||
if (this.choosedPD != '' && !this.choosedPD) {
|
||||
@ -530,53 +469,4 @@ export class DialogOverviewExampleDialog {
|
||||
this.dialogRef.close(this.choosedPD)
|
||||
}
|
||||
|
||||
getgst(pd_id) {
|
||||
|
||||
let link = "https://gstapp.devopsmcfinance.com/home?saltkey=VQDa79tyBlpu7ZuKt6U&data="
|
||||
|
||||
var string: any = {
|
||||
|
||||
EmpName: "John Doe",
|
||||
|
||||
EmpCode: "",
|
||||
PD_ID: "",
|
||||
PD_NO: "",
|
||||
}
|
||||
|
||||
var encodedString = btoa(JSON.stringify(string));
|
||||
|
||||
console.log("encode", encodedString); // Outputs: "SGVsbG8gV29ybGQh"
|
||||
|
||||
var decodedString = atob("eyJFbXBOYW1lIjoiTXdpc2UgU2FsZXMtMSIsIkVtcENvZGUiOiIiLCJQRF9JRCI6IjQzOCIsIlBEX05PIjoiTVdJU0UtV0NUTC0yMTAifQ==");
|
||||
console.log('jumbo');
|
||||
console.log("decode", JSON.parse(decodedString));
|
||||
let finallink = link + encodedString;
|
||||
console.log('finallink');
|
||||
console.log(finallink);
|
||||
window.open(finallink, '_system', 'location=yes');
|
||||
}
|
||||
|
||||
// viewReport(){
|
||||
// const dialogRef = this.dialog.open(componen_name, {
|
||||
// data: {data:this.raw_data,section_id:section_id},
|
||||
// // position: { right: '0'},
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true,
|
||||
// closeOnNavigation:true,
|
||||
// panelClass:'no-padding'
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// // this.notifier.notify('success', 'Successfully allocated.!');
|
||||
// // if(dataresult == 'refresh') {
|
||||
// // this.loadTemplates(this.product_id,2,this.sales_pd_type);
|
||||
// // }
|
||||
// });
|
||||
// }
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ import { NotifierService } from 'angular-notifier';
|
||||
import { ConstantsProvider } from 'app/providers/constants/constants';
|
||||
import { FormComponent } from 'app/fly-hi/forms-dynamic/form/form.component';
|
||||
import { ImageVideoComponent } from 'app/fly-hi/image-video/image-video.component';
|
||||
|
||||
import { environment } from 'environments/environment';
|
||||
@Component({
|
||||
selector: 'app-section-list',
|
||||
templateUrl: './section-list.component.html',
|
||||
@ -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 = environment.redirectSalesapp;
|
||||
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
|
||||
|
||||
@ -247,6 +247,8 @@ export class QuestionServiceService {
|
||||
|
||||
// --- FOR SETTING THE VALUE DEFAULT WITH DISABLED AND GENERATE THE ANSWERS FOR FIELDS(EX. refer 'GET_FY_YEARS' switch)
|
||||
getAnswerValue(value_obj) {
|
||||
// http://localhost/AWSEC2/sparqapi/api/cetNewSalesPD?type=2&product=WCTL&applicantname=Nirmal Raja&applicantid=909227955&userid=Nirmal@smcfinance.com&officername=Nirmal&loanamount=265000&saltkey=$2y$10$H4vSrWl15syQHO.tsT0DdOF7pYSTKZBT85sOFCJerttTdObBRsB36
|
||||
|
||||
if (value_obj != null && value_obj.hasOwnProperty('answer_value')) {
|
||||
let return_value = { flag: 1, values: '' };
|
||||
let user_det: any = localStorage.getItem("user_details")
|
||||
@ -254,7 +256,9 @@ export class QuestionServiceService {
|
||||
switch (value_obj.answer_value) {
|
||||
case 'CURRENT_USER':
|
||||
console.log("current user", user_det)
|
||||
return_value.values = user_det.user_first_name + ' ' + user_det.user_last_name
|
||||
let login_type_id = parseInt(localStorage.getItem('login_type_id')); // 1 na auto-login , 0 na
|
||||
let user_name = login_type_id == 1 ? localStorage.getItem('officer_name') : user_det.user_first_name + ' ' + user_det.user_last_name;
|
||||
return_value.values = user_name
|
||||
break;
|
||||
case "CURRENT_DESIGNATION":
|
||||
return_value.values = user_det.designation_name != null ? user_det.designation_name : ''
|
||||
|
||||
@ -53,9 +53,10 @@ export class AutoLoginComponent implements OnInit {
|
||||
const date_timing = splitparts[4]; // for vaildation
|
||||
const officer_mail_id = splitparts[5].split(/\s/).join('');
|
||||
const sales_pd_id = splitparts[6].split(/\s/).join('');
|
||||
const officer_name = splitparts[7];
|
||||
|
||||
|
||||
console.log("splited Values are \n 1) UN :",mailid," \n 2) PWD :",password, " \n 3) OFFS ID : ",officer_id,"\n 4) ROLE ID : ",role_id,"\n 5) BE DATED :",date_timing,"\n 6) OFFS MAIL :",officer_mail_id," \n 7) SALES PD : ",sales_pd_id);
|
||||
console.log("splited Values are \n 1) UN :",mailid," \n 2) PWD :",password, " \n 3) OFFS ID : ",officer_id,"\n 4) ROLE ID : ",role_id,"\n 5) BE DATED :",date_timing,"\n 6) OFFS MAIL :",officer_mail_id," \n 7) SALES PD : ",sales_pd_id," \n 8) Officer Name :",officer_name);
|
||||
let today : Date = new Date();
|
||||
console.log(today);
|
||||
|
||||
@ -72,6 +73,7 @@ export class AutoLoginComponent implements OnInit {
|
||||
localStorage.setItem('login_type_id','1');
|
||||
localStorage.setItem('officer_id',officer_id);
|
||||
localStorage.setItem('officer_mail_id',officer_mail_id);
|
||||
localStorage.setItem('officer_name',officer_name);
|
||||
// this.salesPdData = this.callingSalesPDListApi(sales_pd_id);
|
||||
localStorage.setItem('sales_pd_id_PRIMARYKEY',sales_pd_id);
|
||||
|
||||
|
||||
@ -5,6 +5,8 @@ export const environment = {
|
||||
|
||||
apiEndpoint: 'https://api.pdgenie.com/sparqprod/api/',
|
||||
|
||||
redirectSalesapp : "https://newlos.smcfinance.com/#/redirect?saltkey=$2y$10$H4vSrWl15syQHO.tsT0DdOF7pYSTKZBT85sOFCJerttTdObBRsB36",
|
||||
|
||||
authorization: 'TnAwuc64pVpcB9xf',
|
||||
login_string: "cognito-idp.ap-south-1.amazonaws.com/ap-south-1_MlTee1O5V",
|
||||
|
||||
|
||||
@ -9,8 +9,10 @@ export const environment = {
|
||||
environmentName: 'Development Environment',//Localhost Environment.
|
||||
|
||||
// apiEndpoint: 'https://demo.pdgenie.com/sparqtest/api/',
|
||||
// apiEndpoint: ' https://apitest.pdgenie.com/sparqtest/api/',
|
||||
apiEndpoint: 'http://localhost/AWSEC2/sparqapi/api/',
|
||||
apiEndpoint: ' https://apitest.pdgenie.com/sparqtest/api/',
|
||||
// apiEndpoint: 'http://localhost/AWSEC2/sparqapi/api/',
|
||||
redirectSalesapp : "https://new-los-frontend-aut-m54bsjg7fq-em.a.run.app/#/redirect?saltkey=$2y$10$H4vSrWl15syQHO.tsT0DdOF7pYSTKZBT85sOFCJerttTdObBRsB36",
|
||||
|
||||
|
||||
authorization: 'sparqvenba2018',
|
||||
|
||||
|
||||
@ -11,7 +11,8 @@ export const environment = {
|
||||
// apiEndpoint: 'https://apitest.pdgenie.com/sparqtest/api/',
|
||||
apiEndpoint: ' https://apitest.pdgenie.com/sparqtest/api/',
|
||||
// apiEndpoint: 'http://localhost/AWSEC2/sparqapi/api/',
|
||||
|
||||
redirectSalesapp : "https://new-los-frontend-aut-m54bsjg7fq-em.a.run.app/#/redirect?saltkey=$2y$10$H4vSrWl15syQHO.tsT0DdOF7pYSTKZBT85sOFCJerttTdObBRsB36",
|
||||
|
||||
authorization: 'sparqvenba2018',
|
||||
|
||||
// firebase: {
|
||||
@ -74,5 +75,4 @@ export const environment = {
|
||||
s3_endpoint: '',
|
||||
accessToken:'',
|
||||
//apiUrl:'http://localhost/sparqapi/api/'
|
||||
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user