Fairoj : twilio video integration, employer info questions coloured, playback changes
This commit is contained in:
parent
85f6f20885
commit
c70b100e1c
@ -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 { }
|
||||
|
||||
@ -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);
|
||||
// }
|
||||
}
|
||||
|
||||
@ -22,11 +22,11 @@
|
||||
<mat-tab-group>
|
||||
<mat-tab label="Questions">
|
||||
<ng-template matTabContent>
|
||||
<mat-card style="min-height: 550px;background-color: #b9e9f1 !important">
|
||||
<mat-card style="min-height: 550px" >
|
||||
<mat-card-title>
|
||||
<p>Address Details</p>
|
||||
</mat-card-title>
|
||||
<mat-card-content style="background-color: #b9e9f1 !important">
|
||||
<mat-card-content [ngClass]="{'smartPd':fk_pd_type == '2'}">
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="100">
|
||||
<div formArrayName="addresses">
|
||||
|
||||
@ -74,7 +74,7 @@
|
||||
</mat-select>
|
||||
<mat-error *ngIf="employmentForm.controls['was_met'].hasError('required')">Was the employer met Required</mat-error>
|
||||
</mat-form-field>
|
||||
<div fxLayout="row wrap" fxLayoutAlign="start none" *ngIf="employmentForm.controls['was_met'].value == 'yes'">
|
||||
<div fxLayout="row wrap" fxLayoutAlign="start none" *ngIf="employmentForm.controls['was_met'].value == 'yes'" [ngClass]="{'smartPd':fk_pd_type == '2'}">
|
||||
<mat-form-field style="width: 45%">
|
||||
<input matInput placeholder="Name of Person Met" formControlName="name_person_met"
|
||||
autocomplete="off" required>
|
||||
@ -128,17 +128,19 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'" style="width: 45%">
|
||||
<div [ngClass]="{'smartPd':fk_pd_type == '2'}">
|
||||
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'" style="width: 45%" >
|
||||
<mat-select placeholder="Salary amount confirmed ?" formControlName="confirm_salary"
|
||||
required>
|
||||
required >
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="employmentForm.controls['confirm_salary'].hasError('required')">Salary amount confirmed Required</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<mat-form-field appearance="outline" style="width: 45%" *ngIf="employmentForm.controls['confirm_salary'].value == 'no'">
|
||||
<mat-form-field appearance="outline" style="width: 45%" *ngIf="employmentForm.controls['confirm_salary'].value == 'no'" [ngClass]="{'smartPd':fk_pd_type == '2'}">
|
||||
<!-- <mat-label>why salary amount was not confirmed</mat-label> -->
|
||||
<textarea matInput placeholder="why salary amount was not confirmed" formControlName="sal_amount_was_not_confirmed"></textarea>
|
||||
<!-- <mat-error *ngIf="employmentForm.controls['sal_amount_was_not_confirmed'].hasError('required')">why salary amount was not confirmed Required</mat-error> -->
|
||||
@ -155,7 +157,8 @@
|
||||
|
||||
|
||||
</div>
|
||||
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'" style="width: 45%">
|
||||
<div [ngClass]="{'smartPd':fk_pd_type == '2'}">
|
||||
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'" style="width: 45%" >
|
||||
<mat-select placeholder="Attendance register seen ?" formControlName="attendance_seen"
|
||||
required>
|
||||
<mat-option>Select</mat-option>
|
||||
@ -173,7 +176,8 @@
|
||||
</mat-select>
|
||||
<mat-error *ngIf="employmentForm.controls['sal_reg_seen'].hasError('required')">Salary register seen Required</mat-error>
|
||||
</mat-form-field>
|
||||
<div *ngIf="fk_pd_type == '2' || fk_pd_type == '3'">
|
||||
</div>
|
||||
<div *ngIf="fk_pd_type == '2' || fk_pd_type == '3'" [ngClass]="{'smartPd':fk_pd_type == '2'}">
|
||||
<mat-form-field style="width: 45%">
|
||||
<mat-select placeholder="Cash voucher" formControlName="cash_voucher"
|
||||
required>
|
||||
@ -232,8 +236,8 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<mat-form-field style="width: 45%">
|
||||
<div [ngClass]="{'smartPd':fk_pd_type == '2'}">
|
||||
<mat-form-field style="width: 45%" >
|
||||
<mat-select placeholder="Mode of getting salary" formControlName="mode_of_getting_salary"
|
||||
required>
|
||||
<mat-option>Select</mat-option>
|
||||
@ -243,6 +247,7 @@
|
||||
</mat-select>
|
||||
<!-- <mat-error *ngIf="employmentForm.controls['mode_of_getting_salary'].hasError('required')">Mode of getting salary Required</mat-error> -->
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
@ -251,7 +256,7 @@
|
||||
<mat-card-content>
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="100">
|
||||
<div fxLayout="nowrap" style="padding-left: 2%; width: 100%">
|
||||
<div fxLayout="nowrap" style="padding-left: 2%; width: 100%" [ngClass]="{'smartPd':fk_pd_type == '2'}">
|
||||
<p>Date of Salary</p>
|
||||
<mat-form-field style="width: 8%;">
|
||||
<mat-select placeholder="From" formControlName="from_date_the_salary_is_rcv" (selectionChange)="formDate($event.value)">
|
||||
@ -313,14 +318,14 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<mat-form-field style="width: 80%">
|
||||
<mat-form-field style="width: 80%" [ngClass]="{'smartPd':fk_pd_type == '2'}">
|
||||
<input matInput placeholder="Gross Monthly Salary" formControlName="gross_monthly_salary"
|
||||
OnlyNumber type="text" autocomplete="off" required (change)="setValidationForNetSal($event.target.value)">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="employmentForm.controls['gross_monthly_salary'].value != ''">{{"₹"}} {{employmentForm.controls['gross_monthly_salary'].value | numberToWords}} Only</mat-hint>
|
||||
<mat-error *ngIf="employmentForm.controls['gross_monthly_salary'].hasError('required')">Gross Monthly Salary Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:80%">
|
||||
<mat-form-field style="width:80%" [ngClass]="{'smartPd':fk_pd_type == '2'}">
|
||||
<input matInput placeholder="Net Monthly Salary" formControlName="net_monthly_salary"
|
||||
OnlyNumber type="text" autocomplete="off" required>
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="employmentForm.controls['net_monthly_salary'].value != ''">{{"₹"}} {{employmentForm.controls['net_monthly_salary'].value | numberToWords}} Only</mat-hint>
|
||||
@ -329,14 +334,14 @@
|
||||
<!-- <input matInput placeholder="Net Take Home"
|
||||
formControlName="net_take_home"> -->
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 80%" *ngIf="employmentForm.value.mode_of_getting_salary == 'both_bank_transfer_cash'">
|
||||
<mat-form-field style="width: 80%" *ngIf="employmentForm.value.mode_of_getting_salary == 'both_bank_transfer_cash'" [ngClass]="{'smartPd':fk_pd_type == '2'}">
|
||||
<input matInput placeholder="Amount paid through Bank"
|
||||
formControlName="amount_paid_through_bank" OnlyNumber type="text" autocomplete="off" (change)="ValidateNetSalary()">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="employmentForm.controls['amount_paid_through_bank'].value != ''">{{"₹"}} {{employmentForm.controls['amount_paid_through_bank'].value | numberToWords}} Only</mat-hint>
|
||||
<mat-error *ngIf="employmentForm.controls.amount_paid_through_bank.hasError('max')">Given Value is More than Net Salary</mat-error>
|
||||
<mat-error *ngIf="employmentForm.controls.amount_paid_through_bank.hasError('min')">Given Value is Less than Net Salary</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 80%" *ngIf="employmentForm.value.mode_of_getting_salary == 'both_bank_transfer_cash'">
|
||||
<mat-form-field style="width: 80%" *ngIf="employmentForm.value.mode_of_getting_salary == 'both_bank_transfer_cash'" [ngClass]="{'smartPd':fk_pd_type == '2'}">
|
||||
<input matInput placeholder="Amount paid in Cash"
|
||||
formControlName="amount_paid_in_cash" OnlyNumber type="text" autocomplete="off" (change)="ValidateNetSalary()">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="employmentForm.controls['amount_paid_in_cash'].value != ''">{{"₹"}} {{employmentForm.controls['amount_paid_in_cash'].value | numberToWords}} Only</mat-hint>
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
<div formArrayName="neighbourhood_list">
|
||||
<mat-card *ngFor="let neighbourhood of _neighbourhoodForm.controls.neighbourhood_list['controls']; let n = index; let last = last"
|
||||
[formGroupName]="n">
|
||||
<mat-card-content style="background-color: #b9e9f1 !important">
|
||||
<mat-card-content [ngClass]="{'smartPd':fk_pd_type == '2'}">
|
||||
<mat-form-field style="width: 42%" *ngIf="fk_pd_type != '3'">
|
||||
<input matInput autocomplete="off" placeholder="Neighbour Name" formControlName="neighbourhood_name" appCustomTitleCase
|
||||
[value]="neighbourhood.get('neighbourhood_name').value" type="text">
|
||||
@ -110,8 +110,8 @@
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</div>
|
||||
<mat-card-content style="background-color: #b9e9f1 !important">
|
||||
<mat-form-field style="width: 40%;background-color: #b9e9f1 !important">
|
||||
<mat-card-content [ngClass]="{'smartPd':fk_pd_type == '2'}">
|
||||
<mat-form-field >
|
||||
<mat-select placeholder="Status of the check as per PD officer?" formControlName="neighbourhood_status">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="Positive">Positive</mat-option>
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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 {
|
||||
}
|
||||
@ -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",[])))
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,9 +27,9 @@
|
||||
<mat-card style="background-color: black;margin:0px;margin-top: 3px;">
|
||||
<mat-card-content >
|
||||
<div class="playbackListClass" fxLayout="row" *ngFor="let item of playbackList;let i=index" (click)="playVideo(i,item)">
|
||||
<div fxLayout="column" fxFlex="94%" >
|
||||
<div fxLayout="column" fxFlex="90%" fxLayoutGap="10px">
|
||||
<div>
|
||||
<p style="color:white;margin:0px;font-size: 20px;font-weight: bold">Video {{item.video_name}}</p>
|
||||
<p style="color:white;margin:0px;font-size: 20px;font-weight: bold;white-space:pre-wrap">{{item.video_name}}</p>
|
||||
<p *ngIf="item.date" style="color:white;margin:0px;font-size:16px;">{{item.date}}</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -42,8 +42,17 @@
|
||||
</button> -->
|
||||
</div>
|
||||
<p *ngIf="item.duration" style="color:white;margin:0px;font-size:14px;">{{item.duration}}</p>
|
||||
<p *ngIf="item.status" style="color:white;margin:0px;font-size:14px;">{{item.status}}</p>
|
||||
</div>
|
||||
<div fxLayout="column" align="end" fxLayoutAlign="flex-end">
|
||||
<button align="end" style="float: right" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Copy Link" [disabled]="item.url == ''"
|
||||
matTooltipPosition="right" (click)="_pd.copyToClipBoard(item.url)">
|
||||
<mat-icon>link</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<mat-divider style="border-top:1px solid rgb(105, 105, 105) !important"></mat-divider>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</mat-card>
|
||||
|
||||
<notifier-container></notifier-container>
|
||||
@ -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<VideoPlayerComponent>) {
|
||||
notifier: NotifierService;
|
||||
constructor( @Inject(MAT_DIALOG_DATA) public data:any,private matDialogRef:MatDialogRef<VideoPlayerComponent>,
|
||||
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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user