|
|
|
@@ -49,7 +49,7 @@ export class ProductListComponent implements OnInit, AfterViewInit { |
|
|
|
protected appHelperService: AppHelperService, |
|
|
|
) { |
|
|
|
this.sort = new MatSort(); |
|
|
|
this.displayedColumns = ['details', 'pos', 'image', 'name', 'storage', 'number', 'unassign']; |
|
|
|
this.displayedColumns = ['details', 'pos', 'image', 'name', 'storage', 'number']; |
|
|
|
|
|
|
|
this.productsSub = new Subscription(); |
|
|
|
this.products = []; |
|
|
|
@@ -58,6 +58,9 @@ export class ProductListComponent implements OnInit, AfterViewInit { |
|
|
|
} |
|
|
|
|
|
|
|
ngOnInit(){ |
|
|
|
if (this.partner || this.contact) { |
|
|
|
this.displayedColumns.push('unassign'); |
|
|
|
} |
|
|
|
this.bShowNewProductButton = |
|
|
|
this.user === undefined && this.partner === undefined && this.contact === undefined; |
|
|
|
} |
|
|
|
@@ -225,6 +228,13 @@ export class ProductListComponent implements OnInit, AfterViewInit { |
|
|
|
const userConfirmed = window.confirm(confirmMessage); |
|
|
|
if (userConfirmed) { |
|
|
|
console.log(element); |
|
|
|
console.log(this.partner); |
|
|
|
console.log(this.contact); |
|
|
|
if (this.partner) { |
|
|
|
//this.contactPartnerProductService.contactPartnerProductsIdDelete(element.id) |
|
|
|
} else if (this.contact) { |
|
|
|
//this.partnerProductService.partnerProductsIdDelete(element.id) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |