From c70b100e1c7dbe1764dcbe791ed06ff24a89332d Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Thu, 1 Oct 2020 19:18:54 +0530 Subject: [PATCH] Fairoj : twilio video integration, employer info questions coloured, playback changes --- ng6-seed/src/app/app.module.ts | 13 +- .../layouts/admin/admin-layout.component.ts | 181 +++++++++--------- .../forms/address/address.component.html | 4 +- .../employment-info.component.html | 31 +-- .../neighbour-hood.component.html | 6 +- .../list-pd/view-pd/view-pd.component.ts | 25 ++- .../manage-pd/manage-pd.module.ts | 7 +- .../pd-service/pd-triger.service.ts | 4 + .../video-player/video-player.component.html | 15 +- .../video-player/video-player.component.ts | 11 +- 10 files changed, 167 insertions(+), 130 deletions(-) diff --git a/ng6-seed/src/app/app.module.ts b/ng6-seed/src/app/app.module.ts index 989ef549f..457d3b32c 100755 --- a/ng6-seed/src/app/app.module.ts +++ b/ng6-seed/src/app/app.module.ts @@ -63,7 +63,6 @@ import { IncomingCallComponent } from './video-chat/incoming-call/incoming-call. import { VideoChatComponent } from './video-chat/video-chat.component' import { PushNotifyService } from './shared/push-notify.service'; import { MatVideoModule } from 'mat-video'; -import { VideoPlayerComponent } from './video-chat/video-player/video-player.component'; import { ReqTokenInterceptor } from './_guard/req-token.interceptor'; export function HttpLoaderFactory(http: HttpClient) { @@ -78,14 +77,15 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true }; -const socketConfig: SocketIoConfig = { url: environment.socketServerUrl, options: {} }; +// const socketConfig: SocketIoConfig = { url: environment.socketServerUrl, options: {} }; @NgModule({ declarations: [ AppComponent, AdminLayoutComponent, AuthLayoutComponent, - NewPasswordDialog,ForgotPass,ChangePasswordDialog, RoleMenuItemsPipe, HttpLoaderComponent, IncomingCallComponent, VideoChatComponent, VideoPlayerComponent + NewPasswordDialog,ForgotPass,ChangePasswordDialog, RoleMenuItemsPipe, HttpLoaderComponent, + IncomingCallComponent, VideoChatComponent, ], imports: [ MatDialogModule, @@ -126,7 +126,7 @@ const socketConfig: SocketIoConfig = { url: environment.socketServerUrl, options AngularFireAuthModule, AngularFireMessagingModule, AngularFireModule.initializeApp(environment.firebase), - SocketIoModule.forRoot(socketConfig), + // SocketIoModule.forRoot(socketConfig), MatVideoModule ], providers: [ @@ -149,7 +149,8 @@ const socketConfig: SocketIoConfig = { url: environment.socketServerUrl, options }, MessagingService, AsyncPipe,LoaderService ], - entryComponents: [NewPasswordDialog,ForgotPass,ChangePasswordDialog,IncomingCallComponent,VideoChatComponent,VideoPlayerComponent], - bootstrap: [AppComponent] + entryComponents: [NewPasswordDialog,ForgotPass,ChangePasswordDialog,] + // IncomingCallComponent,VideoChatComponent,], + ,bootstrap: [AppComponent] }) export class AppModule { } diff --git a/ng6-seed/src/app/layouts/admin/admin-layout.component.ts b/ng6-seed/src/app/layouts/admin/admin-layout.component.ts index 807e64ee7..26678980d 100755 --- a/ng6-seed/src/app/layouts/admin/admin-layout.component.ts +++ b/ng6-seed/src/app/layouts/admin/admin-layout.component.ts @@ -15,10 +15,10 @@ import { AwsService } from '../../AwsService/aws.service'; import { RoleMenuItemsPipe } from './../role-menu-items.pipe'; import 'rxjs/add/observable/interval'; import { MessagingService } from 'app/shared/messaging.service'; -import { IncomingCallComponent } from '../../video-chat/incoming-call/incoming-call.component'; +// import { IncomingCallComponent } from '../../video-chat/incoming-call/incoming-call.component'; import { Socket } from 'ngx-socket-io'; import { MatDialog } from '@angular/material'; -import { VideoChatComponent } from 'app/video-chat/video-chat.component'; +// import { VideoChatComponent } from 'app/video-chat/video-chat.component'; import { PushNotifyService } from 'app/shared/push-notify.service'; @@ -66,8 +66,9 @@ export class AdminLayoutComponent implements OnInit, OnDestroy { countTAT: number; incomingDialogOpened:boolean = false dialogRef: any; - constructor(private router: Router, public menuItems: MenuItems, public horizontalMenuItems : HorizontalMenuItems, public translate: TranslateService,public aws:AwsService,public users:UserService,private _dashboardService: DashboardService,private messagingService:MessagingService,private socket:Socket,private matDialog:MatDialog, - private _notificationService:PushNotifyService) { + constructor(private router: Router, public menuItems: MenuItems, public horizontalMenuItems : HorizontalMenuItems, public translate: TranslateService,public aws:AwsService,public users:UserService,private _dashboardService: DashboardService,private messagingService:MessagingService + // ,private socket:Socket,private matDialog:MatDialog + ,private _notificationService:PushNotifyService) { const browserLang: string = translate.getBrowserLang(); translate.use(browserLang.match(/en|fr/) ? browserLang : 'en'); @@ -147,9 +148,9 @@ export class AdminLayoutComponent implements OnInit, OnDestroy { // Ps.update(elemContent); } }); - setTimeout(()=>{ - this.listenForCalls() - },5000) + // setTimeout(()=>{ + // this.listenForCalls() + // },5000) // this.openIncomingDialog(); console.log("Ng On Init") } @@ -329,87 +330,87 @@ export class AdminLayoutComponent implements OnInit, OnDestroy { } } // FOR LISTENING TO RECIEVE CALLS FROM CALLER - listenForCalls() { - // this.socket.on('BackOffer', this.connectPeer) - let userrole = localStorage.getItem('user_role') - if(userrole == '5') { - this.socket.fromEvent('BackOffer').subscribe((res:any)=>{ - let pd_short_info:any = localStorage.getItem('pd_short_info') - pd_short_info = JSON.parse(pd_short_info); - console.log(res) - if(res && res.hasOwnProperty('random_string') && res.random_string && res.hasOwnProperty('user_type') && res.user_type != 'officer'){ - if(pd_short_info.filter(val=>val.random_string == res.random_string).length > 0){ - let curr_pd_info= pd_short_info.filter(val=>val.random_string == res.random_string)[0] - if(curr_pd_info && (curr_pd_info.pd_type == '3' || curr_pd_info.pd_type == '2')) { - this.connectPeer(res,curr_pd_info); - } - } - } - }) - } - } - connectPeer(offer,curr_pd_info) { - console.log(offer) - // alert("Offer is listened"); - this.notify('Incoming Call','Calling from ' + curr_pd_info.applicant_name + ' (' +curr_pd_info.pd_sno+ ')') - this.openIncomingDialog(offer,curr_pd_info); - } - openIncomingDialog(offer?,curr_pd_info?) { - offer.pd_id = curr_pd_info.pd_id - if(this.incomingDialogOpened == true) { - if(this.dialogRef) { - console.log("dialog",this.dialogRef) - this.dialogRef.close(); - } - else { - return; - } - } - let autoCloseDialog:any; - this.incomingDialogOpened = true - this.dialogRef = this.matDialog.open(IncomingCallComponent,{ - // minWidth:'25%', - // maxWidth:'30%', - data:curr_pd_info, - disableClose: true, - backdropClass: 'incoming-call-background' , - panelClass:'incoming-call-background' - }) - autoCloseDialog = setTimeout(()=>{ - this.dialogRef.close() - },30000) - this.dialogRef.afterClosed().subscribe(data=>{ - console.log(data) - if(autoCloseDialog != undefined && autoCloseDialog) { - clearTimeout(autoCloseDialog) - } - if(data == 'decline'){ - this.incomingDialogOpened = false - this.socket.emit('callStatus',{random_string:curr_pd_info.random_string,status:'declined',status_code:3}) - } - else if(data == 'answered'){ - this.incomingDialogOpened = false - this.openVideoChatDialog(offer) - } - }) - } - openVideoChatDialog(offer) { - let dialogRef = this.matDialog.open(VideoChatComponent,{ - data:offer, - maxWidth: '100vw', - maxHeight: '100vh', - height: '100%', - width: '100%', - disableClose: true, - panelClass:'video-chat' - }) - } - notify(title,approval) { - let data: Array < any >= []; - data.push({ - 'title': title, - 'body': approval - }); - this._notificationService.generateNotificationWithTitle(data); -} +// listenForCalls() { +// // this.socket.on('BackOffer', this.connectPeer) +// let userrole = localStorage.getItem('user_role') +// if(userrole == '5') { +// this.socket.fromEvent('BackOffer').subscribe((res:any)=>{ +// let pd_short_info:any = localStorage.getItem('pd_short_info') +// pd_short_info = JSON.parse(pd_short_info); +// console.log(res) +// if(res && res.hasOwnProperty('random_string') && res.random_string && res.hasOwnProperty('user_type') && res.user_type != 'officer'){ +// if(pd_short_info.filter(val=>val.random_string == res.random_string).length > 0){ +// let curr_pd_info= pd_short_info.filter(val=>val.random_string == res.random_string)[0] +// if(curr_pd_info && (curr_pd_info.pd_type == '3' || curr_pd_info.pd_type == '2')) { +// this.connectPeer(res,curr_pd_info); +// } +// } +// } +// }) +// } +// } +// connectPeer(offer,curr_pd_info) { +// console.log(offer) +// // alert("Offer is listened"); +// this.notify('Incoming Call','Calling from ' + curr_pd_info.applicant_name + ' (' +curr_pd_info.pd_sno+ ')') +// this.openIncomingDialog(offer,curr_pd_info); +// } +// openIncomingDialog(offer?,curr_pd_info?) { +// offer.pd_id = curr_pd_info.pd_id +// if(this.incomingDialogOpened == true) { +// if(this.dialogRef) { +// console.log("dialog",this.dialogRef) +// this.dialogRef.close(); +// } +// else { +// return; +// } +// } +// let autoCloseDialog:any; +// this.incomingDialogOpened = true +// this.dialogRef = this.matDialog.open(IncomingCallComponent,{ +// // minWidth:'25%', +// // maxWidth:'30%', +// data:curr_pd_info, +// disableClose: true, +// backdropClass: 'incoming-call-background' , +// panelClass:'incoming-call-background' +// }) +// autoCloseDialog = setTimeout(()=>{ +// this.dialogRef.close() +// },30000) +// this.dialogRef.afterClosed().subscribe(data=>{ +// console.log(data) +// if(autoCloseDialog != undefined && autoCloseDialog) { +// clearTimeout(autoCloseDialog) +// } +// if(data == 'decline'){ +// this.incomingDialogOpened = false +// this.socket.emit('callStatus',{random_string:curr_pd_info.random_string,status:'declined',status_code:3}) +// } +// else if(data == 'answered'){ +// this.incomingDialogOpened = false +// this.openVideoChatDialog(offer) +// } +// }) +// } +// openVideoChatDialog(offer) { +// let dialogRef = this.matDialog.open(VideoChatComponent,{ +// data:offer, +// maxWidth: '100vw', +// maxHeight: '100vh', +// height: '100%', +// width: '100%', +// disableClose: true, +// panelClass:'video-chat' +// }) +// } +// notify(title,approval) { +// let data: Array < any >= []; +// data.push({ +// 'title': title, +// 'body': approval +// }); +// this._notificationService.generateNotificationWithTitle(data); +// } } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html index 4df5eb549..7bf1792c3 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html @@ -22,11 +22,11 @@ - +

Address Details

- +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html index 9dbd1beab..a7362bbf7 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html @@ -74,7 +74,7 @@ Was the employer met Required -
+
@@ -128,17 +128,19 @@
- +
+ + required > Select Yes No Salary amount confirmed Required +
- + @@ -155,7 +157,8 @@
- +
+ Select @@ -173,7 +176,8 @@ Salary register seen Required -
+
+
@@ -232,8 +236,8 @@
- - +
+ Select @@ -243,6 +247,7 @@ +
@@ -251,7 +256,7 @@
-
+

Date of Salary

@@ -313,14 +318,14 @@
- + {{"₹"}} {{employmentForm.controls['gross_monthly_salary'].value | numberToWords}} Only Gross Monthly Salary Required - + {{"₹"}} {{employmentForm.controls['net_monthly_salary'].value | numberToWords}} Only @@ -329,14 +334,14 @@ - + {{"₹"}} {{employmentForm.controls['amount_paid_through_bank'].value | numberToWords}} Only Given Value is More than Net Salary Given Value is Less than Net Salary - + {{"₹"}} {{employmentForm.controls['amount_paid_in_cash'].value | numberToWords}} Only diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.html index 5e5ce4ff7..5f143ad69 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.html @@ -30,7 +30,7 @@
- + @@ -110,8 +110,8 @@
- - + + Select Positive 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 6abba62e8..82571a7f6 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 @@ -209,6 +209,9 @@ export class ViewPdComponent implements OnInit, OnDestroy { this.vendor_form_status_arr = JSON.stringify(data.records.vendor_form_status) localStorage.setItem("vendorFormStatus_arr",this.vendor_form_status_arr) } + this._pd.updateTwlioVideoStatus({"pd_id":this.viewID,"random_string":this.masterRandomString}).subscribe(rr=>{ + + }) } } }, error => { @@ -625,7 +628,7 @@ export class ViewPdComponent implements OnInit, OnDestroy { console.log(event) let cus_link; if(event && event.btnValue == 'video') { - cus_link = window.location.origin+'/vchat/#/chat/'+this.pdMasterData[0].random_string; + 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; @@ -657,15 +660,17 @@ export class ViewPdComponent implements OnInit, OnDestroy { } 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 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) { 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 32fda8e70..b3e72edcf 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 @@ -136,6 +136,8 @@ import { SpeedDialFabComponent } from './list-pd/view-pd/speed-dial-fab/speed-di import { DynamicFormComponent } from './list-pd/start-pd/forms/dynamic-form/dynamic-form/dynamic-form.component'; import { DynamicQuestionTemplateComponent } from './list-pd/start-pd/forms/dynamic-form/dynamic-question-template/dynamic-question-template.component'; import { QuesFormService } from './list-pd/start-pd/forms/dynamic-form/ques-form/ques-form.service'; +import { VideoPlayerComponent } from 'app/video-chat/video-player/video-player.component'; +import { MatVideoModule } from 'mat-video'; /** * Custom angular notifier options @@ -182,7 +184,7 @@ const pdCustomNotifierOptions: NotifierOptions = { }; @NgModule({ - declarations: [TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent,VendorPdAllocationComponent, DuplicatePdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, 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,PurchaseCalculationComponent,QueriesDocsComponent, ImageDocsComponent,CustomTitleCaseDirective, SpeedDialFabComponent, + declarations: [TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent,VendorPdAllocationComponent, DuplicatePdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, 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,PurchaseCalculationComponent,QueriesDocsComponent, ImageDocsComponent,CustomTitleCaseDirective, SpeedDialFabComponent,VideoPlayerComponent, DynamicFormComponent,DynamicQuestionTemplateComponent], imports: [ CommonModule, @@ -217,6 +219,7 @@ const pdCustomNotifierOptions: NotifierOptions = { AgmCoreModule.forRoot({apiKey: environment.map_api_key}),OwlDateTimeModule, OwlNativeDateTimeModule, AngularSplitModule, + MatVideoModule ], exports: [DuplicatePdComponent,VendorPdAllocationComponent,PdLocatedMapViewDirective, PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent, AssessedIncomeComponent, AllocationViewMoreComponent, GeneralInfoComponent, PdRequirementComponent,PdCollectedDocsComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, BusinessOtherFamilyMemberComponent, BusinessInfoGroupComponent,DailySalesDetailsComponent, SalesCalculationComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, ViewLocationComponent, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent, DailyPurchaseDetailsComponent, ManageDailyPurchaseComponent,ManageRentalVerificationComponent,ImageCropComponent,PurchaseCalculationComponent], @@ -226,7 +229,7 @@ const pdCustomNotifierOptions: NotifierOptions = { entryComponents: [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,QueriesDocsComponent, - DynamicFormComponent,DynamicQuestionTemplateComponent], + DynamicFormComponent,DynamicQuestionTemplateComponent,VideoPlayerComponent], }) export class ManagePdModule { } \ No newline at end of file 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 1e357af4f..cce04cd46 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 @@ -1003,4 +1003,8 @@ export class PdTrigerService { return this._http.post(this.apiUrl+'updateVendorFormStatus',params) .pipe(catchError(this.handleError("checkExistPDDetails",[]))) } + updateTwlioVideoStatus(params) { + return this._http.post(this.apiUrl+'updateTwlioVideoStatus',params) + .pipe(catchError(this.handleError("updateTwlioVideoStatus",[]))) + } } diff --git a/ng6-seed/src/app/video-chat/video-player/video-player.component.html b/ng6-seed/src/app/video-chat/video-player/video-player.component.html index 3bd40062b..8189046a0 100755 --- a/ng6-seed/src/app/video-chat/video-player/video-player.component.html +++ b/ng6-seed/src/app/video-chat/video-player/video-player.component.html @@ -27,9 +27,9 @@
-
+
-

Video {{item.video_name}}

+

{{item.video_name}}

{{item.date}}

@@ -42,8 +42,17 @@ -->

{{item.duration}}

+

{{item.status}}

+
+
+
- \ No newline at end of file + + + \ No newline at end of file diff --git a/ng6-seed/src/app/video-chat/video-player/video-player.component.ts b/ng6-seed/src/app/video-chat/video-player/video-player.component.ts index e178410fa..dee7db066 100755 --- a/ng6-seed/src/app/video-chat/video-player/video-player.component.ts +++ b/ng6-seed/src/app/video-chat/video-player/video-player.component.ts @@ -1,5 +1,7 @@ import { Component, OnInit, Inject, ViewChild, ElementRef } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; +import { NotifierService } from 'angular-notifier'; +import { PdTrigerService } from 'app/personal-discussion/pd-service/pd-triger.service'; @Component({ selector: 'app-video-player', @@ -21,7 +23,10 @@ export class VideoPlayerComponent implements OnInit { // = 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4' // = 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerFun.mp4' @ViewChild('videoPlayer') videoPlayerEle:ElementRef - constructor( @Inject(MAT_DIALOG_DATA) public data:any,private matDialogRef:MatDialogRef) { + notifier: NotifierService; + constructor( @Inject(MAT_DIALOG_DATA) public data:any,private matDialogRef:MatDialogRef, + notifier:NotifierService,private _pd:PdTrigerService) { + this.notifier=notifier if(data) { if(data.hasOwnProperty('videoUrl') && data.videoUrl && data.videoUrl.length > 0) { this.playbackList = data.videoUrl @@ -42,6 +47,10 @@ export class VideoPlayerComponent implements OnInit { } playVideo(i,obj) { console.log(obj,this.videoPlayerEle); + if(obj.url == '' || !obj.url) { + this.notifier.notify("info","Status of the playback is "+obj.status+' try again later!!') + return + } this.selectedVideoIndex= i; this.videoSrc = obj.url