diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/future-plans-and-business-environment/future-plans-and-business-environment.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/future-plans-and-business-environment/future-plans-and-business-environment.component.html index 7afcb34cd..e8105b521 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/future-plans-and-business-environment/future-plans-and-business-environment.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/future-plans-and-business-environment/future-plans-and-business-environment.component.html @@ -31,12 +31,12 @@ Future plans for business expansion Required - + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/image-video/image-video.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/image-video/image-video.component.html new file mode 100644 index 000000000..898205e01 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/image-video/image-video.component.html @@ -0,0 +1,158 @@ + + +
+

+
+ Image Capture URL +
+
+ + +
+ +

+ +
+
+ {{details.Link}} +
+
+ +
+
+ +
+
+
+ +
+

This link will be sent as SMS to ({{details.applicantNo}}). Please proceed if this number is correct, else close this window and edit the applicant mobile number

+
+
+ +
+
+
+
+ + +
+

+
+ VIDEO CALL +
+
+ + + + + + +
+ +

+
+
+ +
+ + +
+ +
+ + +
+ + +
+ + +
+
+ {{pdGenie_GMeet_Link}} +
+
+ +
+
+
+
+ +
+

This link will be sent as SMS to ({{details.applicantNo}}). Please proceed if this number is correct, else close this window and edit the applicant mobile number

+
+
+ +
+
+
+
+ + +
+

+
+ VIDEO CALL +
+
+ +
+ +

+
+
+ + +
+
+
+ + \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/image-video/image-video.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/image-video/image-video.component.scss new file mode 100644 index 000000000..414c14270 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/image-video/image-video.component.scss @@ -0,0 +1,12 @@ +.linkStyle{ + width: 100% !important; + padding: 15px !important; + letter-spacing: .00625em !important; + font-family: Roboto,Arial,sans-serif !important; + font-size: 1rem !important; + font-weight: 400 !important; + line-height: 1.5rem !important; + color: #202124 !important; + box-flex: 1 !important; + background-color: #8080803b !important; +} \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/image-video/image-video.component.spec.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/image-video/image-video.component.spec.ts new file mode 100644 index 000000000..1f390e578 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/image-video/image-video.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ImageVideoComponent } from './image-video.component'; + +describe('ImageVideoComponent', () => { + let component: ImageVideoComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ImageVideoComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ImageVideoComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/image-video/image-video.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/image-video/image-video.component.ts new file mode 100644 index 000000000..a98d33aff --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/image-video/image-video.component.ts @@ -0,0 +1,183 @@ +import { Component, OnInit, Inject } from '@angular/core'; +import { NotifierService } from 'angular-notifier'; +import { FormBuilder } from '@angular/forms'; +import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material'; +import { ViewPdComponent } from '../view-pd.component'; +import { PdTrigerService } from 'app/personal-discussion/pd-service/pd-triger.service'; +import { VideoPlayerComponent } from 'app/video-chat/video-player/video-player.component'; +import { UploadVideoComponent } from 'app/quality-check/upload-video/upload-video.component'; + +@Component({ + selector: 'app-image-video', + templateUrl: './image-video.component.html', + styleUrls: ['./image-video.component.scss'] +}) +export class ImageVideoComponent implements OnInit { + private notifier: NotifierService; + hideDetails: boolean = false; + details: any; + master: any; + g_code: Object | any[]; + google_Meet_Link: string; + pdGenie_GMeet_Link: any; + showLinkCard: boolean = false; + videoplayback: any = {enableBtn:true,url:null}; + g_meet_hide_button: boolean = false; + pdgenie_hide_button: boolean = false; + constructor( notifier: NotifierService, + private _fb: FormBuilder, + private dialogRef: MatDialogRef, + private _pd: PdTrigerService, private dialog: MatDialog, + @Inject(MAT_DIALOG_DATA) public data: any) { + this.details =data + this.notifier = notifier; + console.log(this.details) + + if(this.details.flag == 1){ + let masterDetailsData = this.details.masterDetails + if(masterDetailsData.gmeet_code == '' || masterDetailsData.gmeet_code == null){ + console.log('711 createG_Meet') + this.createG_Meet() + // cus_link = 'http://meet.google.com/'+this.pdMasterData[0].gmeet_code; + } else { + let g_link = this.details.masterDetails.gmeet_code + let cus_link = 'http://meet.google.com/'+g_link; + this.google_Meet_Link = cus_link + + } + } + this.master = this.details.masterDetails + } + + ngOnInit() { + } + + /** For Popup Close Button */ + closeComponent(): void { + this.dialogRef.close(); + } + + copyToClipBoard(linkData,iconDetails){ + + if(iconDetails == 'imageURL'){ + this._pd.copyToClipBoard(linkData); + this.notifier.notify('info','Image Capture Customer link copied'); + + }else if(iconDetails == 'videoChat'){ + this.g_meet_hide_button = true + this.showLinkCard = true + this._pd.copyToClipBoard(linkData); + this.pdGenie_GMeet_Link = this.details.videoChatLink + this.notifier.notify('info','Video Chat Customer link copied'); + + }else if(iconDetails == 'G_Meet'){ + this.pdgenie_hide_button = true + this.showLinkCard = true + this._pd.copyToClipBoard(linkData); + this.pdGenie_GMeet_Link = this.google_Meet_Link + this.notifier.notify('info','Google Meet Customer link copied'); + + } + + } + + createG_Meet(){ + console.log('727 createG_Meet') + let pdid = this.details.masterDetails.pd_id + console.log(pdid) + this._pd.create_G_Video_Status(pdid).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.google_Meet_Link = cus_link_Gmeet + } + } 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; '); + }); + } + + smsCheck(event){ + if(event == 1){ + this.hideDetails = true + } + } + + onClickSmsLink(){ + + let param={ + pd_id: this.master.pd_id, + mobile_no: this.details.applicantNo, + random_string: this.master.random_string, + sms_flag:'1' + // pd_type:master.fk_pd_type + } + // sms_flag options + // 1 - Image Capture for Telepd and smart pd + // 2 - Image Recapture for Telepd and smart pd + this._pd.smsLink(param).subscribe(res=>{ + if(res['dataStatus']){ + this.notifier.notify("info","SMS Sent Successfully") + this.hideDetails = false + } + }) + } + + openVideoChat(){ + // let dialogRef = this.dialog.open(VideoChatComponent,{ + // data:{type:'init',random_string:this.pdMasterData[0].random_string,pd_id:this.viewID}, + // maxWidth: '100vw', + // maxHeight: '100vh', + // height: '100%', + // width: '100%', + // disableClose: true, + // panelClass:'video-chat' + // }) + let url = window.location.origin+'/vchat/#/chat/'+this.master.random_string+';id='+this.master.pd_id+';type=2' + window.open(url,'_blank') + } + openPlayer(){ + // if(this.videoplayback.url == null) { + // this.notifier.notify('info',"No Videos Found"); + // return; + // } + let params = {"pd_id":this.master.pd_id,"random_string":this.master.random_string} + this._pd.getRecordedPlaybackUrl(params).subscribe(result=>{ + if(result && result['dataStatus'] && result['records'] && result['records'].length > 0) { + let dialogRef = this.dialog.open(VideoPlayerComponent,{ + data:{videoUrl:result['records'],masterData:this.master}, + maxWidth: '100vw', + maxHeight: '100vh', + height: '90%', + width: '70%', + disableClose: false, + panelClass:'video-player' + }) + } + else { + this.notifier.notify('info',"No Videos Found"); + } + }) + } + + uploadRecordedVideo() { + const dialogRef = this.dialog.open(UploadVideoComponent,{ + minWidth:'50vw', + disableClose:true, + data:{pd_id:this.master.pd_id,random_string:this.master.random_string} + // maxWidth:'75vw' + }) + } + +} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html index 69c409b61..e6efc5b4c 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html @@ -129,12 +129,23 @@
-
+
+    +    @@ -156,15 +167,14 @@ --> -    + textsms +    --> - - + 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 037bb4362..fa33f337b 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 @@ -25,6 +25,7 @@ import { MastersComponent } from 'app/settings/masters/masters.component'; import { VideoPlayerComponent } from 'app/video-chat/video-player/video-player.component'; import { VendorPdAllocationComponent } from '../vendor-pd-allocation/VendorPdAllocationComponent'; import { ImagesAllComponent } from '../start-pd/forms/images-all/images-all.component'; +import { ImageVideoComponent } from './image-video/image-video.component'; @Component({ selector: 'app-view-pd', @@ -119,7 +120,7 @@ export class ViewPdComponent implements OnInit, OnDestroy { btnValue:'G_Meet' }, { - icon: 'camera', + icon: 'add_a_photo', placeholder:'Image Capture', btnValue:'image' }, @@ -697,120 +698,162 @@ export class ViewPdComponent implements OnInit, OnDestroy { }) } - copyCusURL(event) { - // console.log(window.location); - console.log(event) - let cus_link; - if(event && event.btnValue == 'video') { - cus_link = window.location.origin+'/vchat/#/chat/'+this.pdMasterData[0].random_string+';id='+this.viewID+';type=1' - } - else if(event && event.btnValue == 'image') { - cus_link = window.location.origin+'/customer/#/pd-images/'+this.pdMasterData[0].random_string; - } else if(event && event.btnValue == 'G_Meet'){ - console.log('G_meet') - 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'); + // copyCusURL(event) { + // // console.log(window.location); + // console.log(event) + // let cus_link; + // if(event && event.btnValue == 'video') { + // cus_link = window.location.origin+'/vchat/#/chat/'+this.pdMasterData[0].random_string+';id='+this.viewID+';type=1' + // } + // else if(event && event.btnValue == 'image') { + // cus_link = window.location.origin+'/customer/#/pd-images/'+this.pdMasterData[0].random_string; + // } else if(event && event.btnValue == 'G_Meet'){ + // console.log('G_meet') + // 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) - if(event.btnValue == 'video' && event.btnValue == 'image'){ - 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) + // // 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; '); + // 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; '); + // }); + // } + + onClickImageCapture(master) { + + let cus_link = window.location.origin+'/customer/#/pd-images/'+this.pdMasterData[0].random_string; + console.log(cus_link) + const dialogApplicant = this.dialog.open(ImageVideoComponent, { + data: {masterDetails:master,Link:cus_link,applicantNo:this.pdApplicantData[0].mobile_no,flag:0}, + // position: { right: '0' }, + maxWidth: '70vw', + maxHeight: '60vw', + height: '60%', + width: '70%', + disableClose: true }); + dialogApplicant.afterClosed() + .subscribe(dataresult => { + // this.notifier.notify('success', 'Successfully allocated.!'); + this.viewPdDetails(this.viewID,this.masterRandomString) + }); } - onClickSmsLink(master){ - console.log('SMS',master); - let param={ - pd_id: master.pd_id, - mobile_no: this.pdApplicantData[0].mobile_no, - random_string: master.random_string, - sms_flag:'1' - // pd_type:master.fk_pd_type - } - // sms_flag options - // 1 - Image Capture for Telepd and smart pd - // 2 - Image Recapture for Telepd and smart pd - this._pd.smsLink(param).subscribe(res=>{ - if(res['dataStatus']){ - this.notifier.notify("info","SMS Sent Successfully") - } - }) - } + onClickVideoChat(master) { + let videoChatLink = window.location.origin+'/vchat/#/chat/'+this.pdMasterData[0].random_string+';id='+this.viewID+';type=1' + console.log(videoChatLink) + const dialogApplicant = this.dialog.open(ImageVideoComponent, { + data: {masterDetails:master,videoChatLink:videoChatLink,applicantNo:this.pdApplicantData[0].mobile_no,flag:1}, + // position: { right: '0' }, + maxWidth: '70vw', + maxHeight: '50vw', + height: '50%', + width: '70%', + disableClose: true + }); + dialogApplicant.afterClosed() + .subscribe(dataresult => { + // this.notifier.notify('success', 'Successfully allocated.!'); + this.viewPdDetails(this.viewID,this.masterRandomString) + }); + } - openVideoChat(){ - // let dialogRef = this.dialog.open(VideoChatComponent,{ - // data:{type:'init',random_string:this.pdMasterData[0].random_string,pd_id:this.viewID}, - // maxWidth: '100vw', - // maxHeight: '100vh', - // height: '100%', - // width: '100%', - // disableClose: true, - // panelClass:'video-chat' - // }) - let url = window.location.origin+'/vchat/#/chat/'+this.pdMasterData[0].random_string+';id='+this.viewID+';type=2' - window.open(url,'_blank') - } - openPlayer(){ - // if(this.videoplayback.url == null) { - // this.notifier.notify('info',"No Videos Found"); - // return; - // } - let params = {"pd_id":this.viewID,"random_string":this.masterRandomString} - this._pd.getRecordedPlaybackUrl(params).subscribe(result=>{ - if(result && result['dataStatus'] && result['records'] && result['records'].length > 0) { - let dialogRef = this.dialog.open(VideoPlayerComponent,{ - data:{videoUrl:result['records'],masterData:this.pdMasterData[0]}, - maxWidth: '100vw', - maxHeight: '100vh', - height: '90%', - width: '70%', - disableClose: false, - panelClass:'video-player' - }) -} -else { - this.notifier.notify('info',"No Videos Found"); -} -}) -} + // onClickSmsLink(master){ + // console.log('SMS',master); + // let param={ + // pd_id: master.pd_id, + // mobile_no: this.pdApplicantData[0].mobile_no, + // random_string: master.random_string, + // sms_flag:'1' + // // pd_type:master.fk_pd_type + // } + // // sms_flag options + // // 1 - Image Capture for Telepd and smart pd + // // 2 - Image Recapture for Telepd and smart pd + // this._pd.smsLink(param).subscribe(res=>{ + // if(res['dataStatus']){ + // this.notifier.notify("info","SMS Sent Successfully") + // } + // }) + // } + +// openVideoChat(){ +// // let dialogRef = this.dialog.open(VideoChatComponent,{ +// // data:{type:'init',random_string:this.pdMasterData[0].random_string,pd_id:this.viewID}, +// // maxWidth: '100vw', +// // maxHeight: '100vh', +// // height: '100%', +// // width: '100%', +// // disableClose: true, +// // panelClass:'video-chat' +// // }) +// let url = window.location.origin+'/vchat/#/chat/'+this.pdMasterData[0].random_string+';id='+this.viewID+';type=2' +// window.open(url,'_blank') +// } +// openPlayer(){ +// console.log(this.pdMasterData[0].random_string) +// console.log(this.masterRandomString) +// // if(this.videoplayback.url == null) { +// // this.notifier.notify('info',"No Videos Found"); +// // return; +// // } +// let params = {"pd_id":this.viewID,"random_string":this.masterRandomString} +// this._pd.getRecordedPlaybackUrl(params).subscribe(result=>{ +// if(result && result['dataStatus'] && result['records'] && result['records'].length > 0) { +// let dialogRef = this.dialog.open(VideoPlayerComponent,{ +// data:{videoUrl:result['records'],masterData:this.pdMasterData[0]}, +// maxWidth: '100vw', +// maxHeight: '100vh', +// height: '90%', +// width: '70%', +// disableClose: false, +// panelClass:'video-player' +// }) +// } +// else { +// this.notifier.notify('info',"No Videos Found"); +// } +// }) +// } // getVideoUrl(pd_id,randomStr){ // let params = {"pd_id":pd_id,"random_string":randomStr} // this._pd.getRecordedPlaybackUrl(params).subscribe(result=>{ diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts index d9a4c5256..46e1e5702 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts @@ -164,6 +164,7 @@ import { } from '@angular/material'; import { CropToolsComponent } from './list-pd/start-pd/forms/dialogue/crop-tools/crop-tools.component'; import { FacialRecognitionModalComponent } from './list-pd/start-pd/forms/facial-recognition/facial-recognition-modal/facial-recognition-modal.component'; +import { ImageVideoComponent } from './list-pd/view-pd/image-video/image-video.component'; /** * Custom angular notifier options */ @@ -210,7 +211,7 @@ const pdCustomNotifierOptions: NotifierOptions = { @NgModule({ declarations: [TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent,VendorPdAllocationComponent, DuplicatePdComponent,FacialRecognitionModalComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent,StartPd2Component, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent, PdReportComponent, AssessedIncomeComponent, AllocationViewMoreComponent, PdRequirementComponent,PdCollectedDocsComponent, GeneralInfoComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent, SearchRelationPipe, RupeeCurrencyFormatPipe, NumberToWordsPipe, DeleteRecordsCountPipe, BusinessAssetsInfoComponent, BusinessBankingDetailsComponent, SalesDetailsComponent, DailySalesDetailsComponent, SalesCalculationComponent, ManageSalesComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, PdLocatedMapViewDirective, ViewLocationComponent, GetAnswerableFormsPipe, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent ,ManageDailyPurchaseComponent, DailyPurchaseDetailsComponent, ManageRentalVerificationComponent, FuturePlansAndBusinessEnvironmentComponent, ImageCropComponent,CropToolsComponent,PurchaseCalculationComponent,QueriesDocsComponent, ImageDocsComponent,CustomTitleCaseDirective, SpeedDialFabComponent,VideoPlayerComponent, - DynamicFormComponent,DynamicQuestionTemplateComponent, ImagesAllComponent,AnswerOptionCreateDialogComponent,FormComponent,FormGroupComponent], + DynamicFormComponent,DynamicQuestionTemplateComponent, ImagesAllComponent,AnswerOptionCreateDialogComponent,FormComponent,FormGroupComponent, ImageVideoComponent], imports: [ CommonModule, ManagePdRoutingModule, @@ -266,7 +267,7 @@ const pdCustomNotifierOptions: NotifierOptions = { {provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE]}, {provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS}, PdLocatedMapViewDirective,QuesFormService], - entryComponents: [FacialRecognitionModalComponent,DuplicatePdComponent,VendorPdAllocationComponent,PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, AllocationViewMoreComponent, PersonalInfoComponent,BusinessAssetsInfoComponent, + entryComponents: [ImageVideoComponent,FacialRecognitionModalComponent,DuplicatePdComponent,VendorPdAllocationComponent,PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, AllocationViewMoreComponent, PersonalInfoComponent,BusinessAssetsInfoComponent, ClientInfoComponent, SupplierInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent, AssessedIncomeComponent, GeneralInfoComponent, PdRequirementComponent,PdCollectedDocsComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent,BusinessBankingDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, ManageDailySalesComponent,PdStatusChangeDialogueComponent, ViewLocationComponent, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent, ManageDailyPurchaseComponent,ManageRentalVerificationComponent,FuturePlansAndBusinessEnvironmentComponent,ImageCropComponent,CropToolsComponent,QueriesDocsComponent, DynamicFormComponent,DynamicQuestionTemplateComponent,VideoPlayerComponent,ImageDocsComponent,ImagesAllComponent,FormComponent,FormGroupComponent], }) diff --git a/ng6-seed/src/app/quality-check/qc-cus-images/qc-cus-images.component.html b/ng6-seed/src/app/quality-check/qc-cus-images/qc-cus-images.component.html index 3748d6a71..c7d7ded60 100644 --- a/ng6-seed/src/app/quality-check/qc-cus-images/qc-cus-images.component.html +++ b/ng6-seed/src/app/quality-check/qc-cus-images/qc-cus-images.component.html @@ -2,7 +2,7 @@

Customer Images done_all
- Images to be ReCapture by customer + Images to be Recaptured by customer
+
+
+
+ {{link}} +
+
+ +
+
+ +
+
+
+
+ +
+

This link will be sent as SMS to ({{pdApplicantData.mobile_no}}). Please proceed if this number is correct, else close this window and edit the applicant mobile number

+
+
+ +
+
+
+
-
+
@@ -169,13 +194,13 @@ -
+
Total Re-capturing Images : {{imgReCaptureBucket.length}}
- + diff --git a/ng6-seed/src/app/quality-check/qc-cus-images/qc-cus-images.component.scss b/ng6-seed/src/app/quality-check/qc-cus-images/qc-cus-images.component.scss index c6e4d93fb..0b1c5afd5 100644 --- a/ng6-seed/src/app/quality-check/qc-cus-images/qc-cus-images.component.scss +++ b/ng6-seed/src/app/quality-check/qc-cus-images/qc-cus-images.component.scss @@ -3,6 +3,17 @@ overflow-y: scroll !important; } } +.linkStyle{ + padding: 15px !important; + letter-spacing: .00625em !important; + font-family: Roboto,Arial,sans-serif !important; + font-size: 1rem !important; + font-weight: 400 !important; + line-height: 1.5rem !important; + color: #202124 !important; + box-flex: 1 !important; + background-color: #8080803b !important; +} .paragraph_change { color: #fff !important; background-color: #e00201 !important; diff --git a/ng6-seed/src/app/quality-check/qc-cus-images/qc-cus-images.component.ts b/ng6-seed/src/app/quality-check/qc-cus-images/qc-cus-images.component.ts index c561a66f2..2119a51f0 100644 --- a/ng6-seed/src/app/quality-check/qc-cus-images/qc-cus-images.component.ts +++ b/ng6-seed/src/app/quality-check/qc-cus-images/qc-cus-images.component.ts @@ -2,6 +2,7 @@ import { Component, OnInit, ViewChild, ElementRef, Inject } from '@angular/core' import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material'; import { QcService } from '../qc-service/qc.service'; import { NotifierService } from 'angular-notifier'; +import { PdTrigerService } from 'app/personal-discussion/pd-service/pd-triger.service'; @Component({ selector: 'app-qc-cus-images', @@ -15,12 +16,24 @@ export class QcCusImagesComponent implements OnInit { current_index: any; @ViewChild('dummy_img_more') dummyImgMoreRef:ElementRef imgReCaptureBucket: any[] =[]; - notifier: NotifierService; + private notifier:NotifierService; + pdMasterData: any; + pdApplicantData: any; + link: any; + show_link: boolean = false; + hideDetails: boolean = false; constructor(private apiService:QcService, private dialogRef: MatDialogRef, - private dialog: MatDialog, notifier:NotifierService, + private dialog: MatDialog,notifier:NotifierService,private pdService:PdTrigerService, @Inject(MAT_DIALOG_DATA) public pd_all_details: any) { - this.notifier = notifier + this.notifier=notifier + console.log('data',pd_all_details) + this.pdMasterData = pd_all_details.pdMasterData + console.log('data',this.pdMasterData) + this.pdApplicantData = pd_all_details.pdApplicantData + console.log('data',this.pdApplicantData) + this.link = pd_all_details.Link + console.log('data',this.link) } ngOnInit() { @@ -30,14 +43,14 @@ export class QcCusImagesComponent implements OnInit { // // this.records = this.dataService.getPDImageData.img_data // this.imageData = this.records - console.log(this.pd_all_details) + console.log(this.pdMasterData) console.log(typeof(this.records)) // console.log(); // console.log(this.actRoute.snapshot.paramMap.getAll('randomStr')) this.getPDImageDetails(); } getPDImageDetails() { - let params = {"pd_id":"","random_string":this.pd_all_details.random_string} + let params = {"pd_id":"","random_string":this.pdMasterData.random_string} this.apiService.getPDImgDetails(params).subscribe(result=>{ if(result.dataStatus) { this.records = result.records @@ -268,14 +281,23 @@ openBase64(url) { } console.log(this.imgReCaptureBucket) } + + smsCheck(event){ + if(event == 1){ + this.hideDetails = true + } + } + submitQcImages() { console.log(this.imgReCaptureBucket,JSON.stringify(this.imgReCaptureBucket)) this.apiService.auditSmartPDImages(this.imgReCaptureBucket).subscribe(res=>{ if(res['dataStatus']) { this.notifier.notify('info','Submitted successfully..'); - setTimeout(()=>{ - this.dialogRef.close() - },2000) + this.show_link = true + // setTimeout(()=>{ + // this.dialogRef.close() + // },2000) + } else { this.notifier.notify('warning',res.hasOwnProperty('msg') && res['msg'] ? res['msg'] : 'Something went wrong try again later!!') @@ -294,4 +316,59 @@ openBase64(url) { this.imgReCaptureBucket = [] } + copyCusURL() { + // console.log(window.location); + + // let cus_link = window.location.origin+'/customer/#/pd-images/'+this.pdMasterData.random_string+'/recapture'; + // if(event && event.btnValue == 'video') { + // cus_link = window.location.origin+'/vchat/#/chat/'+this.pdMasterData[0].random_string; + // } + // else if(event && event.btnValue == 'image') { + // cus_link = window.location.origin+'/customer/#/pd-images/'+this.pdMasterData[0].random_string; + // } + // return; + // let cus_link = window.location.origin+'/customer/#/pd-images/'+randomStr; + console.log(this.link) + this.pdService.copyToClipBoard(this.link); + this.notifier.notify('info','Customer Image Recapture link copied'); + } + + // fabAction(event,master) { + // console.log(event); + // event = event.btnValue + // if(event == 'open_cus_images') { + // this.openCusImages() + // } + // if(event == 'send_cus_images_link') { + // this.onClickSmsLink(master) + // } + // if(event == 'copy_cus_images_link') { + // this.copyCusURL() + // } + // } + onClickSmsLink(){ + console.log('SMS',this.pdMasterData); + let param={ + pd_id: this.pdMasterData.pd_id, + mobile_no: this.pdApplicantData.mobile_no, + random_string: this.pdMasterData.random_string, + sms_flag:'2' + // pd_type:master.fk_pd_type + } + console.log(param) + // sms_flag options + // 1 - Image Capture for Telepd and smart pd + // 2 - Image Recapture for Telepd and smart pd + this.pdService.smsLink(param).subscribe(res=>{ + if(res['dataStatus']){ + console.log('1212') + this.notifier.notify("info","SMS Sent Successfully") + } + else{ + let msg = res.hasOwnProperty('msg') ? res.msg : "Something Went wrong"; + this.notifier.notify("warning",msg) + } + }) + } + } diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html index 1055950f4..000f66fea 100755 --- a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html +++ b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html @@ -132,20 +132,30 @@
-
+
+    +    - diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts index 5c87a3cd5..92fc46ff0 100755 --- a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts +++ b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts @@ -24,6 +24,7 @@ import { VideoPlayerComponent } from 'app/video-chat/video-player/video-player.c import { PdVisitTimeComponent } from '../pd-visit-time/pd-visit-time.component'; import { UploadVideoComponent } from 'app/quality-check/upload-video/upload-video.component'; import { DecisionDialogComponent } from 'app/shared/decision-dialog/decision-dialog.component'; +import { ImageVideoComponent } from 'app/personal-discussion/manage-pd/list-pd/view-pd/image-video/image-video.component'; @Component({ selector: 'app-qc-view', @@ -384,8 +385,10 @@ export class QcViewComponent implements OnInit, OnDestroy { }) } openCusImages() { + let cus_link = window.location.origin+'/customer/#/pd-images/'+this.pdMasterData[0].random_string+'/recapture'; + const dialogRef = this.dialog.open(QcCusImagesComponent, { - data: this.pdMasterData[0], + data: {pdMasterData:this.pdMasterData[0],pdApplicantData:this.pdApplicantData[0],Link:cus_link}, // position: { right: '0'}, maxWidth: '100vw', maxHeight: '100vh', @@ -532,6 +535,25 @@ updateFieldVisitStatus(field_visit_done) { } } + + onClickVideoChat(master) { + let videoChatLink = window.location.origin+'/vchat/#/chat/'+this.pdMasterData[0].random_string+';id='+this.viewID+';type=1' + console.log(videoChatLink) + const dialogApplicant = this.dialog.open(ImageVideoComponent, { + data:{masterDetails:master,pd_id:this.viewID,random_string:this.masterRandomString,flag:2}, + // position: { right: '0' }, + maxWidth: '70vw', + maxHeight: '50vw', + height: '50%', + width: '70%', + disableClose: true + }); + dialogApplicant.afterClosed() + .subscribe(dataresult => { + // this.notifier.notify('success', 'Successfully allocated.!'); + this.viewPdDetails(this.viewID,this.masterRandomString) + }); + } }