for salespd
This commit is contained in:
parent
baa487c48f
commit
59567aff14
@ -7,7 +7,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<mat-tab-group class="mt-1">
|
||||
<mat-tab>
|
||||
<mat-tab>
|
||||
<ng-template mat-tab-label>Sales PD</ng-template>
|
||||
<mat-card-content>
|
||||
<app-advance-filter [drop_down_datas]="filter_drop_down_data" (filteredlistData)="filteredDataSource($event)"
|
||||
@ -73,6 +73,10 @@
|
||||
<mat-cell class="cell" *matCellDef="let details;" style="justify-content: flex-end;padding: 0 !important" fxFlex.xs="10" fxFlex.sm="15" fxFlex.md="15" fxFlex.lg="18">
|
||||
<button style="float: right" mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PDF Download" [disabled]="details.status != 'COMPLETED'"
|
||||
matTooltipPosition="above" color="primary" (click)="salesPDpdf(details.sales_pd_id)"><mat-icon>file_download</mat-icon></button>
|
||||
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" color="primary" (click)="editForm(details)"
|
||||
matTooltip="View" matTooltipPosition="above">
|
||||
<mat-icon>visibility</mat-icon>
|
||||
</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'"
|
||||
matTooltipPosition="above" color="primary" (click)="newcreditTrigger(details)"><mat-icon>add</mat-icon></button> -->
|
||||
</mat-cell>
|
||||
|
||||
@ -1,17 +1,14 @@
|
||||
import { Component, OnInit, ViewChild, Inject } from '@angular/core';
|
||||
import { MatTableDataSource, MatPaginator, MatSort, PageEvent, MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
|
||||
import { PdTrigerService } from 'app/personal-discussion/pd-service/pd-triger.service';
|
||||
import { UserService } from 'app/settings/service/user.service';
|
||||
import { NotifierService } from 'angular-notifier';
|
||||
import { Router } from '@angular/router';
|
||||
import { ApiServiceService } from 'app/lender-credit-pd/services/apiService/api-service.service';
|
||||
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
@Component({
|
||||
selector: 'app-sales-pd',
|
||||
templateUrl: './sales-pd.component.html',
|
||||
styleUrls: ['./sales-pd.component.scss']
|
||||
})
|
||||
export class SalesPdComponent implements OnInit {
|
||||
export class SalesPdComponent implements OnInit {
|
||||
public dataLengthTab4: number;
|
||||
public dataSourceTab4 = new MatTableDataSource();
|
||||
|
||||
@ -40,7 +37,7 @@ export class SalesPdComponent implements OnInit {
|
||||
common: any;
|
||||
user_type: string ='';
|
||||
|
||||
constructor(private _pdSales: PdTrigerService,private dialog:MatDialog,private router:Router,private _creditPdService:ApiServiceService) {
|
||||
constructor(private _pdSales: PdTrigerService,private dialog:MatDialog,private route: ActivatedRoute, private router: Router,private _creditPdService:ApiServiceService) {
|
||||
|
||||
this.common = JSON.parse(localStorage.getItem('commonSettings')).default_pd_list_count;
|
||||
this.common = this.common.count+' '+this.common.factor
|
||||
@ -113,6 +110,30 @@ export class SalesPdComponent implements OnInit {
|
||||
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})
|
||||
// })
|
||||
//})
|
||||
}
|
||||
filteredDataSource(data){
|
||||
console.log("From Parent",data);
|
||||
if(data.dataStatus){
|
||||
|
||||
Loading…
Reference in New Issue
Block a user