diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/main-contents/organization.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/main-contents/organization.component.ts index 79414605..b28cd693 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/main-contents/organization.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/main-contents/organization.component.ts @@ -23,7 +23,8 @@ import { ConfirmDialogData, AlertDialogComponent, AlertDialogResult, - AlertDialogData + AlertDialogData, + StringFormatterPhonePipe } from '@ucap-webmessenger/ui'; import { SessionStorageService } from '@ucap-webmessenger/web-storage'; import { Store, select } from '@ngrx/store'; @@ -416,42 +417,44 @@ export class OrganizationComponent implements OnInit, OnDestroy { calleeNumber = calleeNumber.replace(/\D/g, ''); if (!!calleeNumber && calleeNumber.length > 0) { - // const result = await this.dialogService.open< - // ConfirmDialogComponent, - // ConfirmDialogData, - // ConfirmDialogResult - // >(ConfirmDialogComponent, { - // width: '360px', - // data: { - // title: this.translateService.instant('call.callTo'), - // html: this.translateService.instant('call.callWithNumber', { - // phoneNumber: calleeNumber - // }) - // } - // }); + const result = await this.dialogService.open< + ConfirmDialogComponent, + ConfirmDialogData, + ConfirmDialogResult + >(ConfirmDialogComponent, { + panelClass: 'miniSize-dialog', + data: { + title: this.translateService.instant('call.callTo'), + html: this.translateService.instant('call.callWithNumber', { + phoneNumber: `${new StringFormatterPhonePipe().transform( + calleeNumber + )}` + }) + } + }); - // if (!!result && !!result.choice && result.choice) { - this.callService - .sendCall({ - userSeq: this.loginRes.userSeq, - deviceType: this.environmentsInfo.deviceType, - tokenKey: this.loginRes.tokenString, - calleeNumber - }) - .pipe( - take(1), - map(res => { - if (res.responseCode === PromptMessageStatusCode.Success) { - this.logger.debug('SUCCESS'); - this.logger.debug(res); - } else { - this.logger.error(res); - } - }), - catchError(error => of(this.logger.debug(error))) - ) - .subscribe(); - // } + if (!!result && !!result.choice && result.choice) { + this.callService + .sendCall({ + userSeq: this.loginRes.userSeq, + deviceType: this.environmentsInfo.deviceType, + tokenKey: this.loginRes.tokenString, + calleeNumber + }) + .pipe( + take(1), + map(res => { + if (res.responseCode === PromptMessageStatusCode.Success) { + this.logger.debug('SUCCESS'); + this.logger.debug(res); + } else { + this.logger.error(res); + } + }), + catchError(error => of(this.logger.debug(error))) + ) + .subscribe(); + } } else { this.dialogService.open< AlertDialogComponent, diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/search/integrated-search.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/search/integrated-search.dialog.component.ts index d12c696a..7a289c80 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/search/integrated-search.dialog.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/search/integrated-search.dialog.component.ts @@ -37,7 +37,8 @@ import { ConfirmDialogComponent, ConfirmDialogData, ConfirmDialogResult, - TranslateService as UCapTranslateService + TranslateService as UCapTranslateService, + StringFormatterPhonePipe } from '@ucap-webmessenger/ui'; import { ProfileDialogComponent, @@ -438,42 +439,44 @@ export class IntegratedSearchDialogComponent implements OnInit, OnDestroy { calleeNumber = calleeNumber.replace(/\D/g, ''); if (!!calleeNumber && calleeNumber.length > 0) { - // const result = await this.dialogService.open< - // ConfirmDialogComponent, - // ConfirmDialogData, - // ConfirmDialogResult - // >(ConfirmDialogComponent, { - // width: '360px', - // data: { - // title: this.translateService.instant('call.callTo'), - // html: this.translateService.instant('call.callWithNumber', { - // phoneNumber: calleeNumber - // }) - // } - // }); + const result = await this.dialogService.open< + ConfirmDialogComponent, + ConfirmDialogData, + ConfirmDialogResult + >(ConfirmDialogComponent, { + panelClass: 'miniSize-dialog', + data: { + title: this.translateService.instant('call.callTo'), + html: this.translateService.instant('call.callWithNumber', { + phoneNumber: `${new StringFormatterPhonePipe().transform( + calleeNumber + )}` + }) + } + }); - // if (!!result && !!result.choice && result.choice) { - this.callService - .sendCall({ - userSeq: this.loginRes.userSeq, - deviceType: this.environmentsInfo.deviceType, - tokenKey: this.loginRes.tokenString, - calleeNumber - }) - .pipe( - take(1), - map(res => { - if (res.responseCode === PromptMessageStatusCode.Success) { - this.logger.debug('SUCCESS'); - this.logger.debug(res); - } else { - this.logger.error(res); - } - }), - catchError(error => of(this.logger.debug(error))) - ) - .subscribe(); - // } + if (!!result && !!result.choice && result.choice) { + this.callService + .sendCall({ + userSeq: this.loginRes.userSeq, + deviceType: this.environmentsInfo.deviceType, + tokenKey: this.loginRes.tokenString, + calleeNumber + }) + .pipe( + take(1), + map(res => { + if (res.responseCode === PromptMessageStatusCode.Success) { + this.logger.debug('SUCCESS'); + this.logger.debug(res); + } else { + this.logger.error(res); + } + }), + catchError(error => of(this.logger.debug(error))) + ) + .subscribe(); + } } else { this.dialogService.open< AlertDialogComponent,