uploadSalesPDDataToCETAPP Api Implemenation : ps
This commit is contained in:
parent
237054366a
commit
23bb8f6613
@ -120,6 +120,10 @@
|
||||
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20.66" fxFlex.lg="20.66" fxFlex.xl="20.66" class="cell center">
|
||||
<button mat-button mat-icon-button (click)="newPortal()" type="button" matTooltip="link" matTooltipPosition="above" color="primary"><mat-icon>link</mat-icon></button>
|
||||
</div>
|
||||
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20.66" fxFlex.lg="20.66" fxFlex.xl="20.66" class="cell center">
|
||||
<button [disabled]="details.status !== 'COMPLETED'" mat-button mat-icon-button class=" hover-icon" type="button" color="primary" (click)="uploadDatatoCET(details.sales_pd_id)"
|
||||
matTooltip="Upload Data To CET" matTooltipPosition="above" ><mat-icon>file_upload</mat-icon></button>
|
||||
</div>
|
||||
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20.66" fxFlex.lg="20.66" fxFlex.xl="20.66" class="cell center">
|
||||
<button *ngIf="roleID == 30" mat-button mat-icon-button class="hover-icon" type="button" matTooltip="ReGenerate"
|
||||
matTooltipPosition="above" color="primary" [matMenuTriggerFor]="menu1"><mat-icon>more_vert</mat-icon></button>
|
||||
|
||||
@ -90,6 +90,19 @@ export class SalesPdComponent implements OnInit {
|
||||
|
||||
|
||||
|
||||
uploadDatatoCET(salespdid) {
|
||||
this.SalesPDService.uploadSalesDatatoCET(salespdid).subscribe(res=>{
|
||||
if(res['dataStatus']){
|
||||
let user1 = localStorage.getItem('user_details');
|
||||
let user=(JSON.parse(user1))
|
||||
this.roleID = localStorage.getItem('user_role')
|
||||
alert(res['msg']);
|
||||
}else{ alert(res['msg']); }
|
||||
},error => {
|
||||
this.errorMessage.push(error);
|
||||
alert(error.html_format);
|
||||
});
|
||||
}
|
||||
getListofPD() {
|
||||
// this.SalesPDService.getSalesPDList()
|
||||
// .subscribe(
|
||||
|
||||
@ -706,4 +706,15 @@ generatemail(params :any): Observable<any> {
|
||||
generatesateliteimage(param:any): Observable<any>{
|
||||
return this._http.post<any>(api_url + 'regenerateSatelliteImg',param )
|
||||
}
|
||||
|
||||
uploadSalesDatatoCET(id): Observable<any> {
|
||||
let users:any=localStorage.getItem('user_details');
|
||||
console.log(users);
|
||||
users=JSON.parse(users);
|
||||
let apiName;
|
||||
if(users.user_role != '20'){
|
||||
apiName = 'uploadSalesPDDataToCETApp';
|
||||
}
|
||||
return this._http.get<any[]>(api_url +apiName+"/"+id);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user