G_meet created api added

This commit is contained in:
venbainfotech 2022-05-26 16:50:17 +05:30
parent 19b1d9743d
commit 013a77c3e8
2 changed files with 50 additions and 3 deletions

View File

@ -141,6 +141,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
openvendorallocation: any;
vendor_form_status_arr: any =[];
spinner_access:boolean=false;
g_code: any;
constructor(notifier: NotifierService, private dialog: MatDialog, private _fb: FormBuilder,
private _pd: PdTrigerService, private route: ActivatedRoute, private router: Router, private ListPdComponent: ListPdComponent) {
@ -707,13 +708,52 @@ export class ViewPdComponent implements OnInit, OnDestroy {
cus_link = window.location.origin+'/customer/#/pd-images/'+this.pdMasterData[0].random_string;
} else if(event && event.btnValue == 'G_Meet'){
console.log('G_meet')
cus_link = 'http://meet.google.com/'+this.pdMasterData[0].gmeet_code;
if(this.pdMasterData[0].gmeet_code == '' || this.pdMasterData[0].gmeet_code == null){
console.log('711 createG_Meet')
this.createG_Meet(event)
// cus_link = 'http://meet.google.com/'+this.pdMasterData[0].gmeet_code;
} else {
console.log('715 createG_Meet')
cus_link = 'http://meet.google.com/'+this.pdMasterData[0].gmeet_code;
this._pd.copyToClipBoard(cus_link);
this.notifier.notify('info',event.placeholder+' Customer link copied');
}
}
// return;
// let cus_link = window.location.origin+'/customer/#/pd-images/'+randomStr;
// console.log(randomStr)
this._pd.copyToClipBoard(cus_link);
this.notifier.notify('info',event.placeholder+' Customer link copied');
if(event.btnValue == 'video' && event.btnValue == 'image'){
this._pd.copyToClipBoard(cus_link);
this.notifier.notify('info',event.placeholder+' Customer link copied');
}
}
createG_Meet(event){
console.log('727 createG_Meet')
this._pd.create_G_Video_Status(this.viewID).subscribe(data => {
console.log(data)
if (data['status'] == 200) {
console.log('732')
// console.log('create_G_Video_Status',data)
this.g_code = data
console.log(this.g_code)
if(data['dataStatus'] == true){
let cus_link_Gmeet = 'http://meet.google.com/'+this.g_code['data'].gmeet_code
console.log(cus_link_Gmeet)
this._pd.copyToClipBoard(cus_link_Gmeet);
this.notifier.notify('info',event.placeholder+' Customer link copied');
}
} else {
console.log('743')
let msg_G_meet = data['msg']
console.log(msg_G_meet)
this.notifier.notify('info',msg_G_meet);
}
}, error => {
console.log('%c Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!', 'font-weight: bold; font-size: 50px;color: red; ');
});
}
onClickSmsLink(master){

View File

@ -311,6 +311,13 @@ export class PdTrigerService {
)
}
create_G_Video_Status(pdid: any){
return this._http.get(this.apiUrl+'createGmeetLink?pdid='+pdid)
.pipe(
catchError(this.handleError('role', []))
)
}
// update pd applicant
updatePdApplicant(editData: any): Observable<any> {
// editData.fk_updatedby = this._aws.getlocale();