diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html index 809d9bc27..bd440212b 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html @@ -135,13 +135,20 @@ - + - + + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.ts index 9430abcd4..fa93ab64d 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.ts @@ -238,4 +238,12 @@ export class AllPdComponent implements OnInit, OnChanges { this.dataSourceTab1.paginator = this.paginator; this.dataSourceTab1.sort = this.sort; } + copyCusURL(randomStr) { + // console.log(window.location); + let cus_link = window.location.origin+'/customer/#/pd-images/'+randomStr; + console.log(randomStr) + this._pd.copyToClipBoard(cus_link); + this.notifier.notify('info','Customer link copied'); + } + } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html index 76b17b7f5..151d40650 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html @@ -119,7 +119,13 @@ - + + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.ts index 93dcd8951..5af8e5922 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.ts @@ -246,7 +246,13 @@ export class CompletedPdComponent implements OnInit, OnChanges { this.dataSourceTab4.paginator = this.paginator; this.dataSourceTab4.sort = this.sort; } - + copyCusURL(randomStr) { + // console.log(window.location); + let cus_link = window.location.origin+'/customer/#/pd-images/'+randomStr; + console.log(randomStr) + this._pd.copyToClipBoard(cus_link); + this.notifier.notify('info','Customer link copied'); + } } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html index 85f25dc2a..7a761204c 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html @@ -115,7 +115,12 @@ - + + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.ts index a15992328..206921694 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.ts @@ -238,5 +238,12 @@ export class InprogressPdComponent implements OnInit, OnChanges { this.dataSourceTab2.paginator = this.paginator; this.dataSourceTab2.sort = this.sort; } + copyCusURL(randomStr) { + // console.log(window.location); + let cus_link = window.location.origin+'/customer/#/pd-images/'+randomStr; + console.log(randomStr) + this._pd.copyToClipBoard(cus_link); + this.notifier.notify('info','Customer link copied'); + } } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.html index 8ac3807ec..2e6444191 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.html @@ -118,7 +118,13 @@ - + + + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.ts index b1bfc455e..7ebe5b874 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.ts @@ -220,4 +220,11 @@ export class QcCompletedPdComponent implements OnInit, OnChanges { this.loadPDDetails(); this.xpandStatus = false; } + copyCusURL(randomStr) { + // console.log(window.location); + let cus_link = window.location.origin+'/customer/#/pd-images/'+randomStr; + console.log(randomStr) + this._pd.copyToClipBoard(cus_link); + this.notifier.notify('info','Customer link copied'); + } } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.html index 4ccfaa5e3..1bdd2a6a5 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.html @@ -118,7 +118,12 @@ - + + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.ts index 14343fd89..e82cd5333 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.ts @@ -234,6 +234,13 @@ export class ScheduledPdComponent implements OnInit, OnChanges { this.loadPDDetails(); this.xpandStatus = false; } + copyCusURL(randomStr) { + // console.log(window.location); + let cus_link = window.location.origin+'/customer/#/pd-images/'+randomStr; + console.log(randomStr) + this._pd.copyToClipBoard(cus_link); + this.notifier.notify('info','Customer link copied'); + } } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts index f5ee61b1b..119183645 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts @@ -330,7 +330,7 @@ export class ViewPdComponent implements OnInit, OnDestroy { // pd allocation to pdAllocationTo(pdData: any,childData: any) { pdData.pd_id = childData.assigned_pd; - if (pdData.fk_pd_type == 1) { + if (pdData.fk_pd_type == 1 || pdData.fk_pd_type == 3) { const dialogRef = this.dialog.open(PdAllocationComponent, { data: pdData, position: { right: '0' }, @@ -357,20 +357,23 @@ export class ViewPdComponent implements OnInit, OnDestroy { this.viewPdDetails(this.viewID,this.masterRandomString) }); } - else if (pdData.fk_pd_type == 3) { - const dialogRef = this.dialog.open(TelePdAllocationComponent, { - data: pdData, - position: { right: '0' }, - width: '80%', - disableClose: true, - }); - dialogRef.afterClosed() - .subscribe(dataresult => { - // this.notifier.notify('success', 'Successfully allocated.!'); - this.viewPdDetails(this.viewID,this.masterRandomString) - }); - } + // Tele pd treated as full pd in allocation process + + // else if (pdData.fk_pd_type == 3) { + // const dialogRef = this.dialog.open(TelePdAllocationComponent, { + // data: pdData, + // position: { right: '0' }, + // width: '80%', + // disableClose: true, + // }); + // dialogRef.afterClosed() + // .subscribe(dataresult => { + // // this.notifier.notify('success', 'Successfully allocated.!'); + + // this.viewPdDetails(this.viewID,this.masterRandomString) + // }); + // } } diff --git a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts index fc2eb91b5..97bd6a98c 100755 --- a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts +++ b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts @@ -823,4 +823,18 @@ export class PdTrigerService { .pipe(catchError(this.handleError("checkExistPDDetails",[]))) } + // copy to clipboard functionality + copyToClipBoard(message) { + const selBox = document.createElement('textarea'); + selBox.style.position = 'fixed'; + selBox.style.left = '0'; + selBox.style.top = '0'; + selBox.style.opacity = '0'; + selBox.value = message; + document.body.appendChild(selBox); + selBox.focus(); + selBox.select(); + document.execCommand('copy'); + document.body.removeChild(selBox); + } }