Merge branch 'master' of https://git.loafle.net/ucap-web/next-ucap-messenger
This commit is contained in:
commit
76dd6883d3
|
@ -189,6 +189,7 @@
|
||||||
(checkUser)="onCheckUser($event)"
|
(checkUser)="onCheckUser($event)"
|
||||||
(openProfile)="onClickOpenProfile($event)"
|
(openProfile)="onClickOpenProfile($event)"
|
||||||
(sendCall)="onClickSendClickToCall($event)"
|
(sendCall)="onClickSendClickToCall($event)"
|
||||||
|
(sendSms)="onClickSendSms($event)"
|
||||||
(toggleUser)="onToggleUser($event)"
|
(toggleUser)="onToggleUser($event)"
|
||||||
class="organization-side"
|
class="organization-side"
|
||||||
></app-layout-chat-left-sidenav-organization>
|
></app-layout-chat-left-sidenav-organization>
|
||||||
|
|
|
@ -73,6 +73,8 @@ export class LeftSideComponent implements OnInit, OnDestroy {
|
||||||
>();
|
>();
|
||||||
@Output()
|
@Output()
|
||||||
sendCall = new EventEmitter<string>();
|
sendCall = new EventEmitter<string>();
|
||||||
|
@Output()
|
||||||
|
sendSms = new EventEmitter<string>();
|
||||||
|
|
||||||
@ViewChildren('tabs') tabs: QueryList<ElementRef<HTMLDivElement>>;
|
@ViewChildren('tabs') tabs: QueryList<ElementRef<HTMLDivElement>>;
|
||||||
currentTabLable: string;
|
currentTabLable: string;
|
||||||
|
@ -265,6 +267,9 @@ export class LeftSideComponent implements OnInit, OnDestroy {
|
||||||
onClickSendClickToCall(calleeNumber: string) {
|
onClickSendClickToCall(calleeNumber: string) {
|
||||||
this.sendCall.emit(calleeNumber);
|
this.sendCall.emit(calleeNumber);
|
||||||
}
|
}
|
||||||
|
onClickSendSms(calleeNumber: string) {
|
||||||
|
this.sendSms.emit(calleeNumber);
|
||||||
|
}
|
||||||
|
|
||||||
onSelectedTabChange(event: MatTabChangeEvent) {
|
onSelectedTabChange(event: MatTabChangeEvent) {
|
||||||
this.setFabInitial(event.tab.ariaLabel);
|
this.setFabInitial(event.tab.ariaLabel);
|
||||||
|
|
|
@ -381,6 +381,22 @@ export class GroupComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 수정불가 그룹 핸들링. */
|
||||||
|
if (
|
||||||
|
!!group &&
|
||||||
|
!!environment.customConfig &&
|
||||||
|
!!environment.customConfig.fixedGroupSeqs
|
||||||
|
) {
|
||||||
|
const fixedGroupSeqs: number[] = environment.customConfig.fixedGroupSeqs;
|
||||||
|
if (!!fixedGroupSeqs && fixedGroupSeqs.length > 0) {
|
||||||
|
if (fixedGroupSeqs.indexOf(group.seq) > -1) {
|
||||||
|
if (menuType === 'REMOVE_FROM_GROUP' || menuType === 'MOVE_BUDDY') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
async onClickProfileContextMenu(
|
async onClickProfileContextMenu(
|
||||||
|
|
|
@ -103,6 +103,8 @@ export class OrganizationComponent
|
||||||
>();
|
>();
|
||||||
@Output()
|
@Output()
|
||||||
sendCall = new EventEmitter<string>();
|
sendCall = new EventEmitter<string>();
|
||||||
|
@Output()
|
||||||
|
sendSms = new EventEmitter<string>();
|
||||||
|
|
||||||
@ViewChild('cvsvDeptUser', { static: false })
|
@ViewChild('cvsvDeptUser', { static: false })
|
||||||
cvsvDeptUser: CdkVirtualScrollViewport;
|
cvsvDeptUser: CdkVirtualScrollViewport;
|
||||||
|
@ -553,6 +555,7 @@ export class OrganizationComponent
|
||||||
break;
|
break;
|
||||||
case 'SEND_SMS':
|
case 'SEND_SMS':
|
||||||
{
|
{
|
||||||
|
this.sendSms.emit(userInfo.hpNumber);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@ import {
|
||||||
ConfirmDialogResult
|
ConfirmDialogResult
|
||||||
} from '@ucap-webmessenger/ui';
|
} from '@ucap-webmessenger/ui';
|
||||||
import { GroupDetailData, UserInfo } from '@ucap-webmessenger/protocol-sync';
|
import { GroupDetailData, UserInfo } from '@ucap-webmessenger/protocol-sync';
|
||||||
|
import { environment } from '../../../../../environments/environment';
|
||||||
|
|
||||||
export interface SelectGroupDialogData {
|
export interface SelectGroupDialogData {
|
||||||
title: string;
|
title: string;
|
||||||
|
@ -68,11 +69,27 @@ export class SelectGroupDialogComponent implements OnInit {
|
||||||
)
|
)
|
||||||
]).pipe(
|
]).pipe(
|
||||||
map(([buddyList, groupList]) => {
|
map(([buddyList, groupList]) => {
|
||||||
|
/** 수정불가 그룹 */
|
||||||
|
let fixedGroupSeqs: number[];
|
||||||
|
if (
|
||||||
|
!!environment.customConfig &&
|
||||||
|
!!environment.customConfig.fixedGroupSeqs
|
||||||
|
) {
|
||||||
|
fixedGroupSeqs = environment.customConfig.fixedGroupSeqs;
|
||||||
|
}
|
||||||
|
|
||||||
const groupBuddyList: {
|
const groupBuddyList: {
|
||||||
group: GroupDetailData;
|
group: GroupDetailData;
|
||||||
buddyList: UserInfo[];
|
buddyList: UserInfo[];
|
||||||
}[] = [];
|
}[] = [];
|
||||||
for (const group of groupList) {
|
for (const group of groupList) {
|
||||||
|
/** 수정불가 그룹 필터링. */
|
||||||
|
if (!!fixedGroupSeqs && fixedGroupSeqs.length > 0) {
|
||||||
|
if (fixedGroupSeqs.indexOf(group.seq) > -1) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
groupBuddyList.push({
|
groupBuddyList.push({
|
||||||
group,
|
group,
|
||||||
buddyList: buddyList.filter(buddy => {
|
buddyList: buddyList.filter(buddy => {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<ucap-profile-profile
|
<ucap-profile-profile
|
||||||
[userInfo]="userInfo"
|
[userInfo]="userInfo"
|
||||||
[profileImageRoot]="sessionVerinfo.profileRoot"
|
[profileImageRoot]="sessionVerinfo.profileRoot"
|
||||||
|
[editableProfileImage]="editableProfileImage"
|
||||||
[isMe]="isMe"
|
[isMe]="isMe"
|
||||||
[myMadn]="loginRes.madn"
|
[myMadn]="loginRes.madn"
|
||||||
[isBuddy]="isBuddy"
|
[isBuddy]="isBuddy"
|
||||||
|
@ -8,6 +9,7 @@
|
||||||
(openChat)="onClickChat($event)"
|
(openChat)="onClickChat($event)"
|
||||||
(sendMessage)="onClickSendMessage($event)"
|
(sendMessage)="onClickSendMessage($event)"
|
||||||
(sendCall)="onClickSendClickToCall($event)"
|
(sendCall)="onClickSendClickToCall($event)"
|
||||||
|
(sendSms)="onClickSendSms($event)"
|
||||||
(toggleFavorit)="onClickToggleFavorit($event)"
|
(toggleFavorit)="onClickToggleFavorit($event)"
|
||||||
(toggleBuddy)="onClickToggleBuddy($event)"
|
(toggleBuddy)="onClickToggleBuddy($event)"
|
||||||
(uploadProfileImage)="onUploadProfileImage($event)"
|
(uploadProfileImage)="onUploadProfileImage($event)"
|
||||||
|
|
|
@ -48,6 +48,9 @@ import {
|
||||||
PromptMessageStatusCode
|
PromptMessageStatusCode
|
||||||
} from '@ucap-webmessenger/api-prompt';
|
} from '@ucap-webmessenger/api-prompt';
|
||||||
import { NGXLogger } from 'ngx-logger';
|
import { NGXLogger } from 'ngx-logger';
|
||||||
|
import { SmsUtils } from '@ucap-webmessenger/daesang';
|
||||||
|
import { NativeService, UCAP_NATIVE_SERVICE } from '@ucap-webmessenger/native';
|
||||||
|
import { environment } from '../../../../../environments/environment';
|
||||||
|
|
||||||
export interface ProfileDialogData {
|
export interface ProfileDialogData {
|
||||||
userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN;
|
userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN;
|
||||||
|
@ -69,11 +72,13 @@ export class ProfileDialogComponent implements OnInit, OnDestroy {
|
||||||
isMe: boolean;
|
isMe: boolean;
|
||||||
isBuddy: boolean;
|
isBuddy: boolean;
|
||||||
isFavorit: boolean;
|
isFavorit: boolean;
|
||||||
|
editableProfileImage: boolean;
|
||||||
|
|
||||||
selectAllBuddy2Subscription: Subscription;
|
selectAllBuddy2Subscription: Subscription;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public dialogRef: MatDialogRef<ProfileDialogData, ProfileDialogResult>,
|
public dialogRef: MatDialogRef<ProfileDialogData, ProfileDialogResult>,
|
||||||
|
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: ProfileDialogData,
|
@Inject(MAT_DIALOG_DATA) public data: ProfileDialogData,
|
||||||
private dialogService: DialogService,
|
private dialogService: DialogService,
|
||||||
private sessionStorageService: SessionStorageService,
|
private sessionStorageService: SessionStorageService,
|
||||||
|
@ -94,6 +99,9 @@ export class ProfileDialogComponent implements OnInit, OnDestroy {
|
||||||
);
|
);
|
||||||
|
|
||||||
this.userInfo = data.userInfo;
|
this.userInfo = data.userInfo;
|
||||||
|
|
||||||
|
this.editableProfileImage =
|
||||||
|
environment.productConfig.CommonSetting.editableProfileImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
@ -222,6 +230,42 @@ export class ProfileDialogComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onClickSendSms(calleeNumber: string) {
|
||||||
|
const smsUtil = new SmsUtils(
|
||||||
|
this.sessionStorageService,
|
||||||
|
this.nativeService
|
||||||
|
);
|
||||||
|
if (!smsUtil.getAuthSms()) {
|
||||||
|
this.dialogService.open<
|
||||||
|
AlertDialogComponent,
|
||||||
|
AlertDialogData,
|
||||||
|
AlertDialogResult
|
||||||
|
>(AlertDialogComponent, {
|
||||||
|
data: {
|
||||||
|
title: '',
|
||||||
|
html: `SMS 사용 권한이 없습니다.`
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
calleeNumber = calleeNumber.replace(/\D/g, '');
|
||||||
|
if (!!calleeNumber && calleeNumber.length > 0) {
|
||||||
|
smsUtil.openSendSms(this.loginRes.tokenString, [calleeNumber]);
|
||||||
|
} else {
|
||||||
|
// this.dialogService.open<
|
||||||
|
// AlertDialogComponent,
|
||||||
|
// AlertDialogData,
|
||||||
|
// AlertDialogResult
|
||||||
|
// >(AlertDialogComponent, {
|
||||||
|
// data: {
|
||||||
|
// title: '',
|
||||||
|
// html: `상대방 번호가 없어 전화를 걸 수 없습니다.`
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onClickToggleFavorit(param: { userInfo: UserInfoSS; isFavorit: boolean }) {
|
onClickToggleFavorit(param: { userInfo: UserInfoSS; isFavorit: boolean }) {
|
||||||
this.store.dispatch(
|
this.store.dispatch(
|
||||||
SyncStore.updateBuddy({
|
SyncStore.updateBuddy({
|
||||||
|
|
|
@ -76,6 +76,8 @@ export class TopBarComponent implements OnInit, OnDestroy {
|
||||||
KEY_LOGIN_INFO
|
KEY_LOGIN_INFO
|
||||||
);
|
);
|
||||||
|
|
||||||
|
this.showWeblink = false;
|
||||||
|
|
||||||
// WebLink init..
|
// WebLink init..
|
||||||
this.initWebLink();
|
this.initWebLink();
|
||||||
})
|
})
|
||||||
|
@ -108,14 +110,14 @@ export class TopBarComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
this.weblink = urlInfo.webLink.filter(
|
this.weblink = urlInfo.webLink.filter(
|
||||||
weblink =>
|
weblink =>
|
||||||
urlInfo.webLinkAllowedList.filter(type => type === weblink.key)
|
urlInfo.webLinkAllowedList
|
||||||
.length > 0
|
.filter(
|
||||||
|
type => type !== 'WebLinkMailCnt' && type !== 'WebLinkPaymentCnt'
|
||||||
|
)
|
||||||
|
.filter(type => type === weblink.key).length > 0
|
||||||
);
|
);
|
||||||
|
|
||||||
if (
|
if (urlInfo.webLinkAllowedList.indexOf('WebLinkMail') > -1) {
|
||||||
urlInfo.webLinkAllowedList.indexOf('WebLinkMail') > -1 &&
|
|
||||||
urlInfo.webLinkAllowedList.indexOf('WebLinkMailCnt') > -1
|
|
||||||
) {
|
|
||||||
// 메일 카운트 체크.
|
// 메일 카운트 체크.
|
||||||
const link = urlInfo.webLink.filter(
|
const link = urlInfo.webLink.filter(
|
||||||
weblink => weblink.key === 'WebLinkMailCnt'
|
weblink => weblink.key === 'WebLinkMailCnt'
|
||||||
|
@ -147,10 +149,7 @@ export class TopBarComponent implements OnInit, OnDestroy {
|
||||||
.subscribe();
|
.subscribe();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (
|
if (urlInfo.webLinkAllowedList.indexOf('WebLinkPayment') > -1) {
|
||||||
urlInfo.webLinkAllowedList.indexOf('WebLinkPayment') > -1 &&
|
|
||||||
urlInfo.webLinkAllowedList.indexOf('WebLinkPaymentCnt') > -1
|
|
||||||
) {
|
|
||||||
// 결제 카운트 체크.
|
// 결제 카운트 체크.
|
||||||
const link = urlInfo.webLink.filter(
|
const link = urlInfo.webLink.filter(
|
||||||
weblink => weblink.key === 'WebLinkPaymentCnt'
|
weblink => weblink.key === 'WebLinkPaymentCnt'
|
||||||
|
|
|
@ -17,7 +17,8 @@
|
||||||
<div class="left-side">
|
<div class="left-side">
|
||||||
<app-layout-messenger-left-side
|
<app-layout-messenger-left-side
|
||||||
(openProfile)="onClickOpenProfile($event)"
|
(openProfile)="onClickOpenProfile($event)"
|
||||||
(sendCall)="onClickSendClickToCall($event)"
|
(sendCall)="sendClickToCall($event)"
|
||||||
|
(sendSms)="openSms($event)"
|
||||||
></app-layout-messenger-left-side>
|
></app-layout-messenger-left-side>
|
||||||
</div>
|
</div>
|
||||||
</as-split-area>
|
</as-split-area>
|
||||||
|
|
|
@ -41,9 +41,13 @@ import {
|
||||||
import { MatDrawer } from '@angular/material';
|
import { MatDrawer } from '@angular/material';
|
||||||
import { NGXLogger } from 'ngx-logger';
|
import { NGXLogger } from 'ngx-logger';
|
||||||
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
||||||
import { DaesangProtocolService } from '@ucap-webmessenger/daesang';
|
import { DaesangProtocolService, SmsUtils } from '@ucap-webmessenger/daesang';
|
||||||
import { CallService } from '@ucap-webmessenger/api-prompt';
|
import { CallService } from '@ucap-webmessenger/api-prompt';
|
||||||
import { EnvironmentsInfo, KEY_ENVIRONMENTS_INFO } from '@app/types';
|
import {
|
||||||
|
EnvironmentsInfo,
|
||||||
|
KEY_ENVIRONMENTS_INFO,
|
||||||
|
KEY_URL_INFO
|
||||||
|
} from '@app/types';
|
||||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||||
import {
|
import {
|
||||||
MessageApiService,
|
MessageApiService,
|
||||||
|
@ -56,6 +60,7 @@ import {
|
||||||
MessageDetailDialogResult,
|
MessageDetailDialogResult,
|
||||||
MessageDetailDialogData
|
MessageDetailDialogData
|
||||||
} from '@app/layouts/messenger/dialogs/message/message-detail.dialog.component';
|
} from '@app/layouts/messenger/dialogs/message/message-detail.dialog.component';
|
||||||
|
import { DaesangUrlInfoResponse } from '@ucap-webmessenger/api-external';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-page-messenger-main',
|
selector: 'app-page-messenger-main',
|
||||||
|
@ -280,7 +285,7 @@ export class MainPageComponent implements OnInit, OnDestroy {
|
||||||
.subscribe();
|
.subscribe();
|
||||||
}
|
}
|
||||||
|
|
||||||
async onClickSendClickToCall(calleeNumber: string) {
|
async sendClickToCall(calleeNumber: string) {
|
||||||
const madn = this.loginRes.madn;
|
const madn = this.loginRes.madn;
|
||||||
if (!madn || madn.trim().length === 0) {
|
if (!madn || madn.trim().length === 0) {
|
||||||
this.dialogService.open<
|
this.dialogService.open<
|
||||||
|
@ -342,6 +347,29 @@ export class MainPageComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
openSms(calleeNumber: string) {
|
||||||
|
const smsUtil = new SmsUtils(
|
||||||
|
this.sessionStorageService,
|
||||||
|
this.nativeService
|
||||||
|
);
|
||||||
|
if (!smsUtil.getAuthSms()) {
|
||||||
|
this.dialogService.open<
|
||||||
|
AlertDialogComponent,
|
||||||
|
AlertDialogData,
|
||||||
|
AlertDialogResult
|
||||||
|
>(AlertDialogComponent, {
|
||||||
|
data: {
|
||||||
|
title: '',
|
||||||
|
html: `SMS 사용 권한이 없습니다.`
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
calleeNumber = calleeNumber.replace(/\D/g, '');
|
||||||
|
smsUtil.openSendSms(this.loginRes.tokenString, [calleeNumber]);
|
||||||
|
}
|
||||||
|
|
||||||
onCloseRightDrawer() {
|
onCloseRightDrawer() {
|
||||||
this.rightDrawer.close();
|
this.rightDrawer.close();
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,9 @@ export const environment: Environment = {
|
||||||
notification: {
|
notification: {
|
||||||
chatMessage: true
|
chatMessage: true
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
CommonSetting: {
|
||||||
|
editableProfileImage: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,9 @@ export const environment: Environment = {
|
||||||
notification: {
|
notification: {
|
||||||
chatMessage: true
|
chatMessage: true
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
CommonSetting: {
|
||||||
|
editableProfileImage: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,9 @@ export const environment: Environment = {
|
||||||
notification: {
|
notification: {
|
||||||
chatMessage: true
|
chatMessage: true
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
CommonSetting: {
|
||||||
|
editableProfileImage: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,9 @@ export const environment: Environment = {
|
||||||
notification: {
|
notification: {
|
||||||
chatMessage: true
|
chatMessage: true
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
CommonSetting: {
|
||||||
|
editableProfileImage: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -62,6 +62,10 @@ export interface Environment {
|
||||||
intervalHour: number;
|
intervalHour: number;
|
||||||
};
|
};
|
||||||
defaultSettings: Settings;
|
defaultSettings: Settings;
|
||||||
|
|
||||||
|
CommonSetting: {
|
||||||
|
editableProfileImage: boolean;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
customConfig?: any;
|
customConfig?: any;
|
||||||
|
|
41
projects/ucap-webmessenger-daesang/src/lib/utils/SmsUtils.ts
Normal file
41
projects/ucap-webmessenger-daesang/src/lib/utils/SmsUtils.ts
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
import { DaesangUrlInfoResponse } from '@ucap-webmessenger/api-external';
|
||||||
|
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||||
|
import { KEY_URL_INFO } from '@app/types';
|
||||||
|
import { NativeService } from '@ucap-webmessenger/native';
|
||||||
|
|
||||||
|
export class SmsUtils {
|
||||||
|
constructor(
|
||||||
|
private sessionStorageService: SessionStorageService,
|
||||||
|
private nativeService: NativeService
|
||||||
|
) {}
|
||||||
|
|
||||||
|
url: string;
|
||||||
|
|
||||||
|
getAuthSms(): boolean {
|
||||||
|
const urlInfo: DaesangUrlInfoResponse = this.sessionStorageService.get<
|
||||||
|
DaesangUrlInfoResponse
|
||||||
|
>(KEY_URL_INFO);
|
||||||
|
|
||||||
|
if (
|
||||||
|
!!urlInfo &&
|
||||||
|
!!urlInfo.webLinkAllowedList &&
|
||||||
|
urlInfo.webLinkAllowedList.indexOf('WebLinkSms') > -1 &&
|
||||||
|
!!urlInfo.webLink &&
|
||||||
|
urlInfo.webLink.length > 0 &&
|
||||||
|
urlInfo.webLink.filter(weblink => weblink.key === 'WebLinkSms').length > 0
|
||||||
|
) {
|
||||||
|
this.url = urlInfo.webLink.filter(
|
||||||
|
weblink => weblink.key === 'WebLinkSms'
|
||||||
|
)[0].url;
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
openSendSms(token: string, calleeNumber?: string[]) {
|
||||||
|
const url = this.url.replace(/(\(%USER_TOKEN%\))/g, token);
|
||||||
|
|
||||||
|
this.nativeService.openDefaultBrowser(url);
|
||||||
|
}
|
||||||
|
}
|
|
@ -8,6 +8,8 @@ export * from './lib/services/daesang-api.service';
|
||||||
export * from './lib/services/daesang-cipher.service';
|
export * from './lib/services/daesang-cipher.service';
|
||||||
export * from './lib/services/daesang-protocol.service';
|
export * from './lib/services/daesang-protocol.service';
|
||||||
|
|
||||||
|
export * from './lib/utils/SmsUtils';
|
||||||
|
|
||||||
export * from './lib/ucap-daesang.module';
|
export * from './lib/ucap-daesang.module';
|
||||||
|
|
||||||
export * from './lib/protocols/data-user';
|
export * from './lib/protocols/data-user';
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
<button
|
<button
|
||||||
mat-mini-fab
|
mat-mini-fab
|
||||||
class="mat-elevation-z6 upload-profile-image-btn"
|
class="mat-elevation-z6 upload-profile-image-btn"
|
||||||
*ngIf="isMe"
|
*ngIf="isMe && editableProfileImage"
|
||||||
matTooltip="프로필 이미지 변경"
|
matTooltip="프로필 이미지 변경"
|
||||||
matTooltipPosition="above"
|
matTooltipPosition="above"
|
||||||
[disabled]="
|
[disabled]="
|
||||||
|
|
|
@ -5,13 +5,17 @@ import {
|
||||||
EventEmitter,
|
EventEmitter,
|
||||||
Output,
|
Output,
|
||||||
ViewChild,
|
ViewChild,
|
||||||
ElementRef
|
ElementRef,
|
||||||
|
Inject
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
import { UserInfo } from '@ucap-webmessenger/protocol-sync';
|
import { UserInfo } from '@ucap-webmessenger/protocol-sync';
|
||||||
import { UserInfoF, UserInfoSS } from '@ucap-webmessenger/protocol-query';
|
import { UserInfoF, UserInfoSS } from '@ucap-webmessenger/protocol-query';
|
||||||
import { FileUploadItem } from '@ucap-webmessenger/api';
|
import { FileUploadItem } from '@ucap-webmessenger/api';
|
||||||
import { FormControl } from '@angular/forms';
|
import { FormControl } from '@angular/forms';
|
||||||
|
import { SmsUtils } from '@ucap-webmessenger/daesang';
|
||||||
|
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||||
|
import { NativeService, UCAP_NATIVE_SERVICE } from '@ucap-webmessenger/native';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ucap-profile-profile',
|
selector: 'ucap-profile-profile',
|
||||||
|
@ -22,6 +26,8 @@ export class ProfileComponent implements OnInit {
|
||||||
@Input()
|
@Input()
|
||||||
profileImageRoot: string;
|
profileImageRoot: string;
|
||||||
@Input()
|
@Input()
|
||||||
|
editableProfileImage: boolean;
|
||||||
|
@Input()
|
||||||
isMe: boolean;
|
isMe: boolean;
|
||||||
@Input()
|
@Input()
|
||||||
isBuddy: boolean;
|
isBuddy: boolean;
|
||||||
|
@ -39,6 +45,8 @@ export class ProfileComponent implements OnInit {
|
||||||
@Output()
|
@Output()
|
||||||
sendCall = new EventEmitter<string>();
|
sendCall = new EventEmitter<string>();
|
||||||
@Output()
|
@Output()
|
||||||
|
sendSms = new EventEmitter<string>();
|
||||||
|
@Output()
|
||||||
toggleFavorit = new EventEmitter<{
|
toggleFavorit = new EventEmitter<{
|
||||||
userInfo: UserInfoSS;
|
userInfo: UserInfoSS;
|
||||||
isFavorit: boolean;
|
isFavorit: boolean;
|
||||||
|
@ -59,7 +67,10 @@ export class ProfileComponent implements OnInit {
|
||||||
|
|
||||||
profileImageFileUploadItem: FileUploadItem;
|
profileImageFileUploadItem: FileUploadItem;
|
||||||
|
|
||||||
constructor() {}
|
constructor(
|
||||||
|
private sessionStorageService: SessionStorageService,
|
||||||
|
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService
|
||||||
|
) {}
|
||||||
|
|
||||||
ngOnInit() {}
|
ngOnInit() {}
|
||||||
|
|
||||||
|
@ -78,7 +89,9 @@ export class ProfileComponent implements OnInit {
|
||||||
this.sendCall.emit(calleeNumber);
|
this.sendCall.emit(calleeNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
onClickSMS() {}
|
onClickSMS() {
|
||||||
|
this.sendSms.emit(this.userInfo.hpNumber);
|
||||||
|
}
|
||||||
|
|
||||||
onClickVideoConference() {}
|
onClickVideoConference() {}
|
||||||
|
|
||||||
|
@ -169,15 +182,11 @@ export class ProfileComponent implements OnInit {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else if (type === 'SMS') {
|
} else if (type === 'SMS') {
|
||||||
if (
|
const smsUtils = new SmsUtils(
|
||||||
!!this.userInfo &&
|
this.sessionStorageService,
|
||||||
!!this.userInfo.hpNumber &&
|
this.nativeService
|
||||||
this.userInfo.hpNumber.trim().length > 0
|
);
|
||||||
) {
|
return !smsUtils.getAuthSms();
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user