Auto LOgin new changes : ps
This commit is contained in:
parent
c1dc6b59c6
commit
4e9138e61f
@ -18,8 +18,10 @@
|
|||||||
<mat-tab>
|
<mat-tab>
|
||||||
<ng-template mat-tab-label>Sales PD</ng-template>
|
<ng-template mat-tab-label>Sales PD</ng-template>
|
||||||
<mat-card-content style="padding: 0px !important;">
|
<mat-card-content style="padding: 0px !important;">
|
||||||
|
<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>
|
||||||
|
</span>
|
||||||
<p class="note" *ngIf="!recordStatus && limitMsg">Showing data for last {{common}}. To see older records, please use advanced filter</p>
|
<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">
|
||||||
|
|||||||
@ -45,6 +45,8 @@ export class SalesPdComponent implements OnInit {
|
|||||||
public finallink: any;
|
public finallink: any;
|
||||||
roleID: any;
|
roleID: any;
|
||||||
loginTypeId: any;
|
loginTypeId: any;
|
||||||
|
local_spdid: string;
|
||||||
|
login_type_id: number;
|
||||||
|
|
||||||
constructor(private loaderService: LoaderService, private constantProvider: ConstantsProvider, private dialog: MatDialog, private route: ActivatedRoute, private router: Router, private _creditPdService: ApiServiceService, private SalesPDService: SalesPdService) {
|
constructor(private loaderService: LoaderService, private constantProvider: ConstantsProvider, private dialog: MatDialog, private route: ActivatedRoute, private router: Router, private _creditPdService: ApiServiceService, private SalesPDService: SalesPdService) {
|
||||||
|
|
||||||
@ -88,6 +90,8 @@ export class SalesPdComponent implements OnInit {
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
// this.getListofPD();
|
// this.getListofPD();
|
||||||
// this.salesPDpdf();
|
// this.salesPDpdf();
|
||||||
|
this.local_spdid = localStorage.getItem("sales_pd_id_PRIMARYKEY");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -118,6 +122,10 @@ export class SalesPdComponent implements OnInit {
|
|||||||
this.roleID = localStorage.getItem('user_role')
|
this.roleID = localStorage.getItem('user_role')
|
||||||
|
|
||||||
this.salesPdData = res['records'];
|
this.salesPdData = res['records'];
|
||||||
|
if(this.loginTypeId == 1 && this.local_spdid != ''){
|
||||||
|
this.salesPdData = this.salesPdData.filter(d=>d['sales_pd_id'] == this.local_spdid);
|
||||||
|
}
|
||||||
|
|
||||||
this.dataLengthTab4 = res['records'].length;
|
this.dataLengthTab4 = res['records'].length;
|
||||||
this.dataSourceTab4.data = this.salesPdData;
|
this.dataSourceTab4.data = this.salesPdData;
|
||||||
this.recordStatus = false
|
this.recordStatus = false
|
||||||
@ -312,7 +320,7 @@ export class SalesPdComponent implements OnInit {
|
|||||||
let user = (JSON.parse(user1))
|
let user = (JSON.parse(user1))
|
||||||
this.roleID = localStorage.getItem('user_role')
|
this.roleID = localStorage.getItem('user_role')
|
||||||
|
|
||||||
this.salesPdData = res['records']
|
this.salesPdData = res['records'];
|
||||||
this.dataLengthTab4 = res['records'].length;
|
this.dataLengthTab4 = res['records'].length;
|
||||||
this.dataSourceTab4.data = this.salesPdData;
|
this.dataSourceTab4.data = this.salesPdData;
|
||||||
this.recordStatus = false
|
this.recordStatus = false
|
||||||
|
|||||||
@ -73,6 +73,7 @@ export class AutoLoginComponent implements OnInit {
|
|||||||
localStorage.setItem('officer_id',officer_id);
|
localStorage.setItem('officer_id',officer_id);
|
||||||
localStorage.setItem('officer_mail_id',officer_mail_id);
|
localStorage.setItem('officer_mail_id',officer_mail_id);
|
||||||
// this.salesPdData = this.callingSalesPDListApi(sales_pd_id);
|
// this.salesPdData = this.callingSalesPDListApi(sales_pd_id);
|
||||||
|
localStorage.setItem('sales_pd_id_PRIMARYKEY',sales_pd_id);
|
||||||
|
|
||||||
|
|
||||||
this.router.navigate(['/sales-pd-list']);
|
this.router.navigate(['/sales-pd-list']);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user