for role based sales pd list
This commit is contained in:
parent
f306a10301
commit
cdf4a07e4d
@ -1,3 +1,4 @@
|
|||||||
|
<div *ngIf="role!='11'">
|
||||||
<mat-card-content style="padding: 0;">
|
<mat-card-content style="padding: 0;">
|
||||||
<mat-expansion-panel [(expanded)]="xpandStatus">
|
<mat-expansion-panel [(expanded)]="xpandStatus">
|
||||||
<mat-expansion-panel-header>
|
<mat-expansion-panel-header>
|
||||||
@ -79,7 +80,7 @@
|
|||||||
|
|
||||||
<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" >
|
||||||
<div fxLayout="row wrap" *ngFor="let details of pagedList | async" (click)=" details.pd_status != 'BOUNCED' || details.fk_pd_allocated_to == user_id ? viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id,details.random_string) : ''" class="webhide">
|
<div fxLayout="row wrap" *ngFor="let details of pagedList | async" (click)=" details.pd_status != 'BOUNCED' || details.fk_pd_allocated_to == user_id ? viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id,details.random_string) : ''" class="webhide">
|
||||||
<!--Start Mobile View Code-->
|
<!--Start Mobile View Code-->
|
||||||
<!-- <div (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id,details.random_string)" class="webhide"> -->
|
<!-- <div (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id,details.random_string)" class="webhide"> -->
|
||||||
@ -279,3 +280,8 @@
|
|||||||
color: brown;">Showing data for last {{common}}. To see older records, please use advanced filter</h5>
|
color: brown;">Showing data for last {{common}}. To see older records, please use advanced filter</h5>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="role=='11'">
|
||||||
|
<p>data</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
@ -176,7 +176,41 @@ console.log(this.displayedColumns)
|
|||||||
// load inprogress pd list
|
// load inprogress pd list
|
||||||
public LenderRoleID : string = localStorage.getItem('LenderRoleID');
|
public LenderRoleID : string = localStorage.getItem('LenderRoleID');
|
||||||
loadPDDetails() {
|
loadPDDetails() {
|
||||||
|
const role=localStorage.getItem('len_user_role_id');
|
||||||
|
alert(role);
|
||||||
|
if(role=='11')
|
||||||
|
{
|
||||||
|
alert('if');
|
||||||
|
this._pd.getSalesPd()
|
||||||
|
.subscribe(
|
||||||
|
data => {
|
||||||
|
this.loaderService.closeMatSpinnerDialog();
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.PdListData = data.records;
|
||||||
|
console.log('pddataabi');
|
||||||
|
console.log(this.PdListData);
|
||||||
|
// this.PdListData = <GetOrInitializeYourListHere>;
|
||||||
|
if(this.startIndex && this.endIndex) {
|
||||||
|
this.pagedList.next(this.PdListData.slice(this.startIndex, this.endIndex));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.pagedList.next(this.PdListData.slice(0, 10));
|
||||||
|
}
|
||||||
|
this.length = this.PdListData.length;
|
||||||
|
this.PdListData.forEach(value=>{
|
||||||
|
let original=value.pd_sno
|
||||||
|
value.pd_sno_split={lender_name:original.replace(/[^a-z]/gi, ''),serial_no:original.match(/(\d+)/)[0]}
|
||||||
|
})
|
||||||
|
// this.dataLengthTab1 = data.records.length;
|
||||||
|
// this.dataSourceTab1.data = this.PdListData;
|
||||||
|
this.recordStatus=false;
|
||||||
|
this.limitMsg = true
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
this.LenderRoleID = localStorage.getItem('LenderRoleID');
|
this.LenderRoleID = localStorage.getItem('LenderRoleID');
|
||||||
|
|
||||||
if(this.PdListData.length == 0) {
|
if(this.PdListData.length == 0) {
|
||||||
@ -227,6 +261,7 @@ console.log(this.displayedColumns)
|
|||||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!' + '-' + error.error_text + ' occur');
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!' + '-' + error.error_text + ' occur');
|
||||||
alert(error.html_format);
|
alert(error.html_format);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
OnPageChange(event: PageEvent){
|
OnPageChange(event: PageEvent){
|
||||||
|
|||||||
@ -148,6 +148,8 @@ export class PdAllocationComponent implements OnInit {
|
|||||||
"pd_agency_id":allocateDetails.entity_id
|
"pd_agency_id":allocateDetails.entity_id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log(this.updateData);
|
||||||
|
//return
|
||||||
this._pd.updatePdOfficer(this.updateData).subscribe(
|
this._pd.updatePdOfficer(this.updateData).subscribe(
|
||||||
result => {
|
result => {
|
||||||
if (result.status == 200) {
|
if (result.status == 200) {
|
||||||
|
|||||||
@ -77,10 +77,10 @@
|
|||||||
matTooltip="View" matTooltipPosition="above">
|
matTooltip="View" matTooltipPosition="above">
|
||||||
<mat-icon>visibility</mat-icon>
|
<mat-icon>visibility</mat-icon>
|
||||||
</button>-->
|
</button>-->
|
||||||
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" color="primary" (click)="editForm(details)"
|
<!--<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" color="primary" (click)="editForm(details)"
|
||||||
matTooltip="View" matTooltipPosition="above">
|
matTooltip="View" matTooltipPosition="above">
|
||||||
<mat-icon>visibility</mat-icon>
|
<mat-icon>visibility</mat-icon>
|
||||||
</button>
|
</button>-->
|
||||||
<!-- <button style="float: right" mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Trigger Credit PD" *ngIf="user_type == 'credit'" [disabled]="details.status != 'COMPLETED'"
|
<!-- <button style="float: right" mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Trigger Credit PD" *ngIf="user_type == 'credit'" [disabled]="details.status != 'COMPLETED'"
|
||||||
matTooltipPosition="above" color="primary" (click)="newcreditTrigger(details)"><mat-icon>add</mat-icon></button> -->
|
matTooltipPosition="above" color="primary" (click)="newcreditTrigger(details)"><mat-icon>add</mat-icon></button> -->
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
|
|||||||
@ -21,6 +21,9 @@ export interface Menu {
|
|||||||
children?: ChildrenItems[];
|
children?: ChildrenItems[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const roleh=localStorage.getItem('len_user_role_id');
|
||||||
|
alert(roleh);
|
||||||
|
alert('tension1');
|
||||||
const HORIZONTALMENUITEMS = [
|
const HORIZONTALMENUITEMS = [
|
||||||
// {
|
// {
|
||||||
// state: 'home',
|
// state: 'home',
|
||||||
@ -93,7 +96,11 @@ const salesmenu = [
|
|||||||
// icon:'report',
|
// icon:'report',
|
||||||
// },
|
// },
|
||||||
];
|
];
|
||||||
|
// if(roleh=='12')
|
||||||
|
// {
|
||||||
|
// const index = salesmenu.findIndex(user1 => user1.name == 'Sales PD');
|
||||||
|
// salesmenu.splice(index, 1);
|
||||||
|
// }
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class HorizontalMenuItems {
|
export class HorizontalMenuItems {
|
||||||
getAll(): Menu[] {
|
getAll(): Menu[] {
|
||||||
|
|||||||
@ -30,6 +30,9 @@ export interface Menu {
|
|||||||
children?: ChildrenItems[];
|
children?: ChildrenItems[];
|
||||||
multichild?:Multichild[];
|
multichild?:Multichild[];
|
||||||
}
|
}
|
||||||
|
const role=localStorage.getItem('len_user_role_id');
|
||||||
|
alert(role);
|
||||||
|
alert('tension');
|
||||||
|
|
||||||
const MENUITEMS : Menu[] = [
|
const MENUITEMS : Menu[] = [
|
||||||
// {
|
// {
|
||||||
@ -175,7 +178,13 @@ const salesMenus: Menu[]= [
|
|||||||
// icon:'report',
|
// icon:'report',
|
||||||
// }
|
// }
|
||||||
];
|
];
|
||||||
|
console.log(salesMenus);
|
||||||
|
console.log('salesman');
|
||||||
|
if(role=='12')
|
||||||
|
{
|
||||||
|
const index = salesMenus.findIndex(user => user.name == 'Sales PD');
|
||||||
|
salesMenus.splice(index, 1);
|
||||||
|
}
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class MenuItems {
|
export class MenuItems {
|
||||||
getAll(): Menu[] {
|
getAll(): Menu[] {
|
||||||
@ -194,3 +203,4 @@ export class MenuItems {
|
|||||||
MENUITEMS.push(menu);
|
MENUITEMS.push(menu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -175,7 +175,6 @@
|
|||||||
],
|
],
|
||||||
"is_repeatable":"1",
|
"is_repeatable":"1",
|
||||||
"group_title":"Remarks",
|
"group_title":"Remarks",
|
||||||
"group_title_shown":"0",
|
|
||||||
"group_key":"pd_officer_recommendation_remarks"
|
"group_key":"pd_officer_recommendation_remarks"
|
||||||
} ] }
|
} ] }
|
||||||
] },
|
] },
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user