Auto login Frontend : ps
This commit is contained in:
parent
6b44447829
commit
48907ffd22
@ -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>
|
||||
@ -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">
|
||||
|
||||
@ -43,22 +43,19 @@ export class SalesPdComponent implements OnInit {
|
||||
user_type: string = '';
|
||||
is_sales_login: boolean = false
|
||||
public finallink: any;
|
||||
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 = '+role);
|
||||
if (role == 'sales') {
|
||||
@ -95,18 +92,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 +122,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,17 +134,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') {
|
||||
link = "https://salesapp.smcfinance.com/app/secure?saltkey=VQDa79tyBlpu7ZuKt6U"
|
||||
} else if (environment.authorization == 'sparqvenba2018') {
|
||||
link = "http://salesapp.devopsmcfinance.com/secure?saltkey=VQDa79tyBlpu7ZuKt6U"
|
||||
}
|
||||
this.salesPdData.map((val, inx) => {
|
||||
|
||||
var string: any = {
|
||||
EmpName: user.user_first_name,
|
||||
@ -152,17 +142,18 @@ 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;
|
||||
|
||||
console.log('1st Manual Final Link = '+this.finallink);
|
||||
//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;
|
||||
let PDSno = val.sales_pd_sno;
|
||||
let status = 1;
|
||||
if(val.status == 'COMPLETED'){ status = 2; }
|
||||
|
||||
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) {
|
||||
@ -191,7 +182,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 {
|
||||
@ -205,59 +195,13 @@ 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);
|
||||
|
||||
editForm (value_obj) {
|
||||
|
||||
let campletedCase = JSON.stringify(value_obj)
|
||||
localStorage.setItem('completedPD', campletedCase)
|
||||
// let product= localStorage.getItem('product_id_salesPD')
|
||||
@ -277,8 +221,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 })
|
||||
@ -286,7 +229,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,15 +246,14 @@ export class SalesPdComponent implements OnInit {
|
||||
let applicant_id = value_obj.applicant_id;
|
||||
let PDSno = value_obj.sales_pd_sno;
|
||||
let status = 1;
|
||||
status = value_obj.status === 'COMPLETED' ? 2 : 1;
|
||||
console.log("Auto final link status = "+value_obj.status+", flag ="+status);
|
||||
if(value_obj.status == 'COMPLETED'){ status = 2; }
|
||||
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 link = "+salesapp_link);
|
||||
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');
|
||||
@ -321,20 +269,18 @@ export class SalesPdComponent implements OnInit {
|
||||
let products = []
|
||||
let lenders = []
|
||||
let pd_status = []
|
||||
console.log(environment);
|
||||
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"
|
||||
// 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"
|
||||
}
|
||||
// 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,
|
||||
@ -350,8 +296,16 @@ 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;
|
||||
console.log("2nd Manual final link = "+this.finallink);
|
||||
|
||||
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; }
|
||||
|
||||
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;
|
||||
|
||||
@ -409,6 +363,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);
|
||||
});
|
||||
|
||||
@ -446,17 +401,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')
|
||||
@ -466,10 +411,6 @@ export class SalesPdComponent implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
newPortal() {
|
||||
console.log("onclick Manual final link = "+this.finallink);
|
||||
window.open(this.finallink);
|
||||
}
|
||||
|
||||
|
||||
regeneratereport(data, option) {
|
||||
@ -512,6 +453,7 @@ export class DialogOverviewExampleDialog {
|
||||
onNoClick(): void {
|
||||
this.dialogRef.close();
|
||||
}
|
||||
|
||||
onSubmit() {
|
||||
console.log(this.choosedPD);
|
||||
if (this.choosedPD != '' && !this.choosedPD) {
|
||||
@ -521,52 +463,4 @@ export class DialogOverviewExampleDialog {
|
||||
this.dialogRef.close(this.choosedPD)
|
||||
}
|
||||
|
||||
getgst(pd_id) {
|
||||
|
||||
let link = "https://gstapp.devopsmcfinance.com/home?saltkey=VQDa79tyBlpu7ZuKt6U&data="
|
||||
console.log('gst url = '.link);
|
||||
|
||||
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("decode", JSON.parse(decodedString));
|
||||
let finallink = link + encodedString;
|
||||
console.log('GST final link = ',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);
|
||||
// // }
|
||||
// });
|
||||
// }
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -9,8 +9,8 @@ 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/',
|
||||
|
||||
authorization: 'sparqvenba2018',
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user