Autologin Fixes : ps
This commit is contained in:
parent
4e9138e61f
commit
71f48b4593
@ -210,10 +210,12 @@
|
|||||||
<mat-icon>settings</mat-icon>
|
<mat-icon>settings</mat-icon>
|
||||||
Setting
|
Setting
|
||||||
</button>
|
</button>
|
||||||
|
<span *ngIf="login_type_id == 0">
|
||||||
<button mat-menu-item (click)="userprofile()">
|
<button mat-menu-item (click)="userprofile()">
|
||||||
<mat-icon>account_box</mat-icon>
|
<mat-icon>account_box</mat-icon>
|
||||||
Profile
|
Profile
|
||||||
</button>
|
</button>
|
||||||
|
</span>
|
||||||
<!-- <button mat-menu-item>
|
<!-- <button mat-menu-item>
|
||||||
<mat-icon>notifications_off</mat-icon>
|
<mat-icon>notifications_off</mat-icon>
|
||||||
Disable notifications
|
Disable notifications
|
||||||
|
|||||||
@ -56,9 +56,11 @@ export class AdminLayoutComponent implements OnInit, OnDestroy {
|
|||||||
userRoleType: any;
|
userRoleType: any;
|
||||||
userDetails: any;
|
userDetails: any;
|
||||||
role_id: any;
|
role_id: any;
|
||||||
|
login_type_id: number;
|
||||||
constructor(private router: Router, public menuItems: MenuItems, public horizontalMenuItems : HorizontalMenuItems, public translate: TranslateService,public aws:AwsService,public users:UserService,private _dashboardService: DashboardService) {
|
constructor(private router: Router, public menuItems: MenuItems, public horizontalMenuItems : HorizontalMenuItems, public translate: TranslateService,public aws:AwsService,public users:UserService,private _dashboardService: DashboardService) {
|
||||||
const browserLang: string = translate.getBrowserLang();
|
const browserLang: string = translate.getBrowserLang();
|
||||||
this.role_id = localStorage.getItem('user_role_nav')
|
this.role_id = localStorage.getItem('user_role_nav')
|
||||||
|
this.login_type_id = parseInt(localStorage.getItem('login_type_id'));
|
||||||
translate.use(browserLang.match(/en|fr/) ? browserLang : 'en');
|
translate.use(browserLang.match(/en|fr/) ? browserLang : 'en');
|
||||||
this.users.getroles().subscribe(res=>{
|
this.users.getroles().subscribe(res=>{
|
||||||
console.log(res)
|
console.log(res)
|
||||||
@ -293,6 +295,7 @@ export class AdminLayoutComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
logout(){
|
logout(){
|
||||||
//alert();
|
//alert();
|
||||||
|
this.login_type_id == 1 ? localStorage.removeItem('sales_pd_id_PRIMARYKEY') : localStorage.removeItem('sales_pd_id_PRIMARYKEY');
|
||||||
this.aws.logout().subscribe(res=>{
|
this.aws.logout().subscribe(res=>{
|
||||||
//alert("res");
|
//alert("res");
|
||||||
this.router.navigate(['/authentication/login']);
|
this.router.navigate(['/authentication/login']);
|
||||||
|
|||||||
@ -2291,17 +2291,19 @@ this.proceedonChangeProperty(modified)
|
|||||||
}
|
}
|
||||||
|
|
||||||
redirectSMC(applicant_id){
|
redirectSMC(applicant_id){
|
||||||
|
|
||||||
console.log("calling SMC redirect",environment.authorization);
|
console.log("calling SMC redirect",environment.authorization);
|
||||||
// window.location.href=data.records;
|
// window.location.href=data.records;
|
||||||
let email = localStorage.getItem('officer_mail_id');
|
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
|
// http://salesapp.devopsmcfinance.com/secure?saltkey=$2y$10$H4vSrWl15syQHO.tsT0DdOF7pYSTKZBT85sOFCJerttTdObBRsB36&applicantid=4231&email=aniltiwari@smcfinance.com
|
||||||
if(environment.authorization == 'TnAwuc64pVpcB9xf'){
|
if(environment.authorization == 'TnAwuc64pVpcB9xf'){
|
||||||
|
|
||||||
let salesapp_link ="http://salesapp.smcfinance.com/app/secure?saltkey=$2y$10$H4vSrWl15syQHO.tsT0DdOF7pYSTKZBT85sOFCJerttTdObBRsB36&applicantid="+applicant_id+"&email=aniltiwari@smcfinance.com";
|
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);
|
console.log('2p salesapp_link = ',salesapp_link);
|
||||||
window.open(salesapp_link, '_blank');
|
window.open(salesapp_link, '_blank');
|
||||||
}else if(environment.authorization == 'sparqvenba2018'){
|
}else if(environment.authorization == 'sparqvenba2018'){
|
||||||
let salesapp_link ="http://salesapp.devopsmcfinance.com/secure?saltkey=$2y$10$H4vSrWl15syQHO.tsT0DdOF7pYSTKZBT85sOFCJerttTdObBRsB36&applicantid="+applicant_id+"&email=aniltiwari@smcfinance.com";
|
let salesapp_link ="http://salesapp.devopsmcfinance.com/secure?saltkey=$2y$10$H4vSrWl15syQHO.tsT0DdOF7pYSTKZBT85sOFCJerttTdObBRsB36&applicantid="+applicant_id+"&email="+email;
|
||||||
console.log('2t salesapp_link = ',salesapp_link);
|
console.log('2t salesapp_link = ',salesapp_link);
|
||||||
window.open(salesapp_link, '_blank');
|
window.open(salesapp_link, '_blank');
|
||||||
// this.router.navigate([salesapp_link]);
|
// this.router.navigate([salesapp_link]);
|
||||||
|
|||||||
@ -101,7 +101,7 @@ export class HomePage{
|
|||||||
localStorage.removeItem('sales_pd_type');
|
localStorage.removeItem('sales_pd_type');
|
||||||
// this.salesPDService.clearLocalData()
|
// this.salesPDService.clearLocalData()
|
||||||
// this.salesPDService.clear_local_key('sales_pd_id_PRIMARYKEY');
|
// this.salesPDService.clear_local_key('sales_pd_id_PRIMARYKEY');
|
||||||
localStorage.removeItem('sales_pd_id_PRIMARYKEY');
|
parseInt(localStorage.getItem('login_type_id')) == 0 ? localStorage.removeItem('sales_pd_id_PRIMARYKEY') : '';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -858,13 +858,13 @@ checkTheUploadingProgress(sec_value){
|
|||||||
console.log("else part")
|
console.log("else part")
|
||||||
// this.sendDatatoApi()
|
// this.sendDatatoApi()
|
||||||
// this.SalesPDService.clearLocalData()
|
// this.SalesPDService.clearLocalData()
|
||||||
localStorage.removeItem('sales_pd_id_PRIMARYKEY')
|
parseInt(localStorage.getItem('login_type_id')) == 0 ? localStorage.removeItem('sales_pd_id_PRIMARYKEY') : '';
|
||||||
// this.SalesPDService.clear_local_key('sales_pd_id_PRIMARYKEY');
|
// this.SalesPDService.clear_local_key('sales_pd_id_PRIMARYKEY');
|
||||||
let msg=event.hasOwnProperty('is_completed') && event.is_completed == true ? "Completed Successfully" : 'Saved Successfully..!'
|
let msg=event.hasOwnProperty('is_completed') && event.is_completed == true ? "Completed Successfully" : 'Saved Successfully..!'
|
||||||
this.notifier.notify('success', msg);
|
this.notifier.notify('success', msg);
|
||||||
// this.toastProvider.lenderappmessage(msg);
|
// this.toastProvider.lenderappmessage(msg);
|
||||||
// this.SalesPDService.clearLocalData()
|
// this.SalesPDService.clearLocalData()
|
||||||
localStorage.removeItem('sales_pd_id_PRIMARYKEY')
|
|
||||||
// this.SalesPDService.clear_local_key('sales_pd_id_PRIMARYKEY');
|
// this.SalesPDService.clear_local_key('sales_pd_id_PRIMARYKEY');
|
||||||
localStorage.removeItem('product_id_salesPD')
|
localStorage.removeItem('product_id_salesPD')
|
||||||
this.dialogRef.close(event);
|
this.dialogRef.close(event);
|
||||||
|
|||||||
@ -1,4 +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">
|
<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">
|
||||||
<div fxLayout="row">
|
<div fxLayout="row">
|
||||||
<div fxFlex="50" class="pb-0 text-sm-left">
|
<div fxFlex="50" class="pb-0 text-sm-left">
|
||||||
<mat-form-field dividerColor="primary" style="width: 50%;">
|
<mat-form-field dividerColor="primary" style="width: 50%;">
|
||||||
@ -14,6 +15,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</span>
|
||||||
<mat-tab-group class="mt-1">
|
<mat-tab-group class="mt-1">
|
||||||
<mat-tab>
|
<mat-tab>
|
||||||
<ng-template mat-tab-label>Sales PD</ng-template>
|
<ng-template mat-tab-label>Sales PD</ng-template>
|
||||||
@ -21,8 +23,9 @@
|
|||||||
<span *ngIf="loginTypeId == 0">
|
<span *ngIf="loginTypeId == 0">
|
||||||
<app-advance-filter [drop_down_datas]="filter_drop_down_data" (filteredlistData)="filteredDataSource($event)"
|
<app-advance-filter [drop_down_datas]="filter_drop_down_data" (filteredlistData)="filteredDataSource($event)"
|
||||||
></app-advance-filter>
|
></app-advance-filter>
|
||||||
|
<p class="note" *ngIf="!recordStatus && limitMsg">Showing data for last {{common}}. To see older records, please use advanced filter</p>
|
||||||
</span>
|
</span>
|
||||||
<p class="note" *ngIf="!recordStatus && limitMsg">Showing data for last {{common}}. To see older records, please use advanced filter</p>
|
|
||||||
<br/>
|
<br/>
|
||||||
<div class="example-container">
|
<div class="example-container">
|
||||||
<!--Start Mobile View Code-->
|
<!--Start Mobile View Code-->
|
||||||
|
|||||||
@ -297,15 +297,16 @@ export class SalesPdComponent implements OnInit {
|
|||||||
|
|
||||||
// window.location.href=data.records;
|
// window.location.href=data.records;
|
||||||
let email = localStorage.getItem('officer_mail_id');
|
let email = localStorage.getItem('officer_mail_id');
|
||||||
|
console.log("redirected email = "+email);
|
||||||
let applicant_id = value_obj.applicant_id;
|
let applicant_id = value_obj.applicant_id;
|
||||||
console.log(value_obj.applicant_id);
|
console.log(value_obj.applicant_id);
|
||||||
if (environment.authorization == 'TnAwuc64pVpcB9xf') {
|
if (environment.authorization == 'TnAwuc64pVpcB9xf') {
|
||||||
let salesapp_link = "https://salesapp.smcfinance.com/app/secure?saltkey=$2y$10$H4vSrWl15syQHO.tsT0DdOF7pYSTKZBT85sOFCJerttTdObBRsB36&applicantid=" + applicant_id + "&email=aniltiwari@smcfinance.com";
|
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);
|
console.log('in list salesapp_link = ', salesapp_link);
|
||||||
let salesapp_url = salesapp_link;
|
let salesapp_url = salesapp_link;
|
||||||
window.open(salesapp_url);
|
window.open(salesapp_url);
|
||||||
} else if (environment.authorization == 'sparqvenba2018') {
|
} else if (environment.authorization == 'sparqvenba2018') {
|
||||||
let salesapp_link = "http://salesapp.devopsmcfinance.com/secure?saltkey=$2y$10$H4vSrWl15syQHO.tsT0DdOF7pYSTKZBT85sOFCJerttTdObBRsB36&applicantid=" + applicant_id + "&email=aniltiwari@smcfinance.com";
|
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);
|
console.log('in list salesapp_link = ', salesapp_link);
|
||||||
let salesapp_url = salesapp_link;
|
let salesapp_url = salesapp_link;
|
||||||
window.open(salesapp_url);
|
window.open(salesapp_url);
|
||||||
@ -465,7 +466,7 @@ export class SalesPdComponent implements OnInit {
|
|||||||
// });
|
// });
|
||||||
// this.SalesPDService.clearLocalData()
|
// this.SalesPDService.clearLocalData()
|
||||||
// this.SalesPDService.clear_local_key('sales_pd_id_PRIMARYKEY');
|
// this.SalesPDService.clear_local_key('sales_pd_id_PRIMARYKEY');
|
||||||
localStorage.removeItem('sales_pd_id_PRIMARYKEY')
|
parseInt(localStorage.getItem('login_type_id')) == 0 ? localStorage.removeItem('sales_pd_id_PRIMARYKEY') : '';
|
||||||
localStorage.removeItem('product_id_salesPD')
|
localStorage.removeItem('product_id_salesPD')
|
||||||
localStorage.removeItem('sales_pd_type')
|
localStorage.removeItem('sales_pd_type')
|
||||||
// this.navCtrl.push(HomePage)
|
// this.navCtrl.push(HomePage)
|
||||||
|
|||||||
@ -37,6 +37,8 @@ export class SectionListComponent implements OnInit {
|
|||||||
flyHiUserId: any;
|
flyHiUserId: any;
|
||||||
sales_pd_id_PRIMARYKEY: string;
|
sales_pd_id_PRIMARYKEY: string;
|
||||||
rand_string: string;
|
rand_string: string;
|
||||||
|
login_type_id: number;
|
||||||
|
|
||||||
constructor(public dialogRef: MatDialogRef<SectionListComponent>,private constantProvider:ConstantsProvider,notifier: NotifierService,private dialog: MatDialog, private fb: FormBuilder, private route: ActivatedRoute,private SalesPDService:SalesPdService,
|
constructor(public dialogRef: MatDialogRef<SectionListComponent>,private constantProvider:ConstantsProvider,notifier: NotifierService,private dialog: MatDialog, private fb: FormBuilder, private route: ActivatedRoute,private SalesPDService:SalesPdService,
|
||||||
private router: Router,private loaderService:LoaderService ) {
|
private router: Router,private loaderService:LoaderService ) {
|
||||||
|
|
||||||
@ -48,6 +50,7 @@ export class SectionListComponent implements OnInit {
|
|||||||
this.sales_pd_type = localStorage.getItem('sales_pd_type')
|
this.sales_pd_type = localStorage.getItem('sales_pd_type')
|
||||||
console.log( this.sales_pd_type)
|
console.log( this.sales_pd_type)
|
||||||
this.sales_pd_id_PRIMARYKEY = localStorage.getItem('sales_pd_id_PRIMARYKEY')
|
this.sales_pd_id_PRIMARYKEY = localStorage.getItem('sales_pd_id_PRIMARYKEY')
|
||||||
|
this.login_type_id = parseInt(localStorage.getItem('login_type_id'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.route.snapshot.params['product_id']){
|
if(this.route.snapshot.params['product_id']){
|
||||||
@ -297,8 +300,9 @@ export class SectionListComponent implements OnInit {
|
|||||||
|
|
||||||
merge_saved_status(res){
|
merge_saved_status(res){
|
||||||
let saved_sections=res['records'].map(val=>{return {'section_id':val.section_id , 'status':val.status,'is_synced':val.is_synced}});
|
let saved_sections=res['records'].map(val=>{return {'section_id':val.section_id , 'status':val.status,'is_synced':val.is_synced}});
|
||||||
|
console.log("B4 saved",saved_sections);
|
||||||
console.log("saved",saved_sections);
|
saved_sections = saved_sections.filter(val=>parseInt(val.status) == 1);
|
||||||
|
console.log("After saved",saved_sections);
|
||||||
const mergeById = (a1, a2) =>
|
const mergeById = (a1, a2) =>
|
||||||
a1.map(itm => ({
|
a1.map(itm => ({
|
||||||
...a2.find((item) => (item.section_id === itm.section_id) && item),
|
...a2.find((item) => (item.section_id === itm.section_id) && item),
|
||||||
|
|||||||
@ -108,6 +108,9 @@ export class HorizontalMenuItems {
|
|||||||
salesgetAll(): Menu[] {
|
salesgetAll(): Menu[] {
|
||||||
let filtered_sales_menu = salesmenu
|
let filtered_sales_menu = salesmenu
|
||||||
let user_type= localStorage.getItem('len_user_role')
|
let user_type= localStorage.getItem('len_user_role')
|
||||||
|
if(parseInt(localStorage.getItem('login_type_id')) == 1){
|
||||||
|
filtered_sales_menu = salesmenu.filter(vv=>vv.icon != 'work')
|
||||||
|
}
|
||||||
// if(user_type != 'credit'){
|
// if(user_type != 'credit'){
|
||||||
// filtered_sales_menu = salesmenu.filter(vv=>vv.state != 'credit_pd')
|
// filtered_sales_menu = salesmenu.filter(vv=>vv.state != 'credit_pd')
|
||||||
// }
|
// }
|
||||||
|
|||||||
@ -193,6 +193,9 @@ export class MenuItems {
|
|||||||
// if(user_type != 'credit'){
|
// if(user_type != 'credit'){
|
||||||
// filtered_sales_menu = salesMenus.filter(vv=>vv.state != 'credit_pd')
|
// filtered_sales_menu = salesMenus.filter(vv=>vv.state != 'credit_pd')
|
||||||
// }
|
// }
|
||||||
|
if(parseInt(localStorage.getItem('login_type_id')) == 1){
|
||||||
|
filtered_sales_menu = salesMenus.filter(vv=>vv.icon != 'work')
|
||||||
|
}
|
||||||
return filtered_sales_menu;
|
return filtered_sales_menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user