sales pd B4 Auto Login : ps
This commit is contained in:
parent
d3f1b28d77
commit
fabfde8335
Binary file not shown.
@ -51,7 +51,7 @@
|
|||||||
<div fxFlex.xs="10" fxFlex.sm="10" class="webhide" style="text-align: right;">
|
<div fxFlex.xs="10" fxFlex.sm="10" class="webhide" style="text-align: right;">
|
||||||
<button style="width: 43px !important;height: 23px !important;line-height: 0px !important;" mat-button mat-icon-button type="button" [disabled]="details.status != 'COMPLETED'"
|
<button style="width: 43px !important;height: 23px !important;line-height: 0px !important;" mat-button mat-icon-button type="button" [disabled]="details.status != 'COMPLETED'"
|
||||||
color="primary" (click)="salesPDpdf(details.sales_pd_id)"><mat-icon>file_download</mat-icon></button><br>
|
color="primary" (click)="salesPDpdf(details.sales_pd_id)"><mat-icon>file_download</mat-icon></button><br>
|
||||||
<button mat-button mat-icon-button (click)="newPortal()" type="button" matTooltip="link" matTooltipPosition="above" color="primary"><mat-icon>link</mat-icon></button>
|
<button mat-button mat-icon-button (click)="callAPIForPortals(details)" type="button" matTooltip="link." matTooltipPosition="above" color="primary"><mat-icon>link</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
<mat-divider></mat-divider>
|
<mat-divider></mat-divider>
|
||||||
</div>
|
</div>
|
||||||
@ -118,7 +118,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20.66" fxFlex.lg="20.66" fxFlex.xl="20.66" class="cell center">
|
<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>
|
<button mat-button mat-icon-button (click)="newPortals(details)" type="button" matTooltip="link" matTooltipPosition="above" color="primary"><mat-icon>link</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20.66" fxFlex.lg="20.66" fxFlex.xl="20.66" class="cell center">
|
<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)"
|
<button [disabled]="details.status !== 'COMPLETED'" mat-button mat-icon-button class=" hover-icon" type="button" color="primary" (click)="uploadDatatoCET(details.sales_pd_id)"
|
||||||
@ -248,7 +248,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20.66" fxFlex.lg="20.66" fxFlex.xl="20.66" class="cell center">
|
<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>
|
<button mat-button mat-icon-button (click)="callAPIForPortals(details)" type="button" matTooltip="Link." matTooltipPosition="above" color="primary"><mat-icon>link</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20.66" fxFlex.lg="20.66" fxFlex.xl="20.66" class="cell center">
|
<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)"
|
<button [disabled]="details.status !== 'COMPLETED'" mat-button mat-icon-button class=" hover-icon" type="button" color="primary" (click)="uploadDatatoCET(details.sales_pd_id)"
|
||||||
|
|||||||
@ -437,18 +437,33 @@ editForm(value_obj){
|
|||||||
localStorage.removeItem('sales_pd_type')
|
localStorage.removeItem('sales_pd_type')
|
||||||
// this.navCtrl.push(HomePage)
|
// this.navCtrl.push(HomePage)
|
||||||
this.router.navigate(['../../sales-pd-list/add-pd'], { relativeTo: this.route });
|
this.router.navigate(['../../sales-pd-list/add-pd'], { relativeTo: this.route });
|
||||||
|
}
|
||||||
|
|
||||||
|
callAPIForPortals(value_obj) {
|
||||||
|
let user1 = localStorage.getItem('user_details');
|
||||||
|
let user = (JSON.parse(user1))
|
||||||
|
let temp_PDID = value_obj.sales_pd_sno;
|
||||||
|
let link_url = (environment.authorization == 'TnAwuc64pVpcB9xf') ? "https://salesapp.smcfinance.com/app/secure?saltkey=VQDa79tyBlpu7ZuKt6U" :
|
||||||
|
(environment.authorization == 'sparqvenba2018') ? "http://salesapp.devopsmcfinance.com/secure?saltkey=VQDa79tyBlpu7ZuKt6U" : "";
|
||||||
|
if (temp_PDID && user.email) {
|
||||||
|
link_url += "&PDID=" + temp_PDID + "&Email=" + user.email;
|
||||||
|
console.log("link = " + link_url);
|
||||||
|
this.SalesPDService.callAPIForPortals(value_obj, user, link_url).subscribe(res => {
|
||||||
|
if (res['dataStatus']) {
|
||||||
|
window.open(link_url);
|
||||||
|
} else { alert(res['message']); }
|
||||||
|
}, error => {
|
||||||
|
this.errorMessage.push(error);
|
||||||
|
alert(error.html_format);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
alert("Email And PDID not Found");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
newPortal() {
|
|
||||||
console.log(this.finallink)
|
|
||||||
window.open(this.finallink);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
regeneratereport(data, option) {
|
||||||
regeneratereport(data,option)
|
|
||||||
{
|
|
||||||
|
|
||||||
const dialogRef = this.dialog.open(ReGenerateReportComponent, {
|
const dialogRef = this.dialog.open(ReGenerateReportComponent, {
|
||||||
data: { pdid: data, option: option },
|
data: { pdid: data, option: option },
|
||||||
@ -497,8 +512,7 @@ export class DialogOverviewExampleDialog {
|
|||||||
this.dialogRef.close(this.choosedPD)
|
this.dialogRef.close(this.choosedPD)
|
||||||
}
|
}
|
||||||
|
|
||||||
getgst(pd_id)
|
getgst(pd_id) {
|
||||||
{
|
|
||||||
|
|
||||||
let link = "https://gstapp.devopsmcfinance.com/home?saltkey=VQDa79tyBlpu7ZuKt6U&data="
|
let link = "https://gstapp.devopsmcfinance.com/home?saltkey=VQDa79tyBlpu7ZuKt6U&data="
|
||||||
|
|
||||||
@ -524,27 +538,4 @@ export class DialogOverviewExampleDialog {
|
|||||||
window.open(finallink, '_system', 'location=yes');
|
window.open(finallink, '_system', 'location=yes');
|
||||||
}
|
}
|
||||||
|
|
||||||
// viewReport(){
|
|
||||||
// const dialogRef = this.dialog.open(componen_name, {
|
|
||||||
// data: {data:this.raw_data,section_id:section_id},
|
|
||||||
// // position: { right: '0'},
|
|
||||||
// maxWidth: '100vw',
|
|
||||||
// maxHeight: '100vh',
|
|
||||||
// height: '100%',
|
|
||||||
// width: '100%',
|
|
||||||
// disableClose: true,
|
|
||||||
// closeOnNavigation:true,
|
|
||||||
// panelClass:'no-padding'
|
|
||||||
// });
|
|
||||||
// dialogRef.afterClosed()
|
|
||||||
// .subscribe(dataresult => {
|
|
||||||
// // this.notifier.notify('success', 'Successfully allocated.!');
|
|
||||||
// // if(dataresult == 'refresh') {
|
|
||||||
// // this.loadTemplates(this.product_id,2,this.sales_pd_type);
|
|
||||||
// // }
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -724,6 +724,10 @@ generatesateliteimage(param:any): Observable<any>{
|
|||||||
return this._http.get<any[]>(api_url +"uploadSalesPDDataToCETApp/"+id);
|
return this._http.get<any[]>(api_url +"uploadSalesPDDataToCETApp/"+id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
callAPIForPortals(row_obj,user_obj,link_url) {
|
||||||
|
return this._http.post<any[]>(api_url + "callAPIForPortals", {'sales_object': row_obj,'user_object':user_obj,'link_url':link_url});
|
||||||
|
}
|
||||||
|
|
||||||
loadTemplatelocal(){
|
loadTemplatelocal(){
|
||||||
|
|
||||||
return this._http.get('assets/data/flyhi.json').map(rr=>{
|
return this._http.get('assets/data/flyhi.json').map(rr=>{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user