웹링크 디자인 수정에 따른 프로그램 보정.
This commit is contained in:
parent
404d6c0dfe
commit
dc5986a153
|
@ -6,6 +6,7 @@ import {
|
|||
APIDecoder,
|
||||
ParameterUtil
|
||||
} from '@ucap-webmessenger/api';
|
||||
import { WebLinkType } from '@ucap-webmessenger/daesang';
|
||||
|
||||
export interface UrlInfoRequest extends APIRequest {
|
||||
deviceType: DeviceType;
|
||||
|
@ -74,7 +75,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
|
|||
if (!!res.WebLinkWebhard) {
|
||||
const arr = res.WebLinkWebhard.split(',');
|
||||
webLink.push({
|
||||
key: 'WebLinkWebhard',
|
||||
key: WebLinkType.Webhard,
|
||||
title: arr.length > 1 ? arr[0] : '',
|
||||
url: arr.length > 1 ? arr[1] : arr[0]
|
||||
});
|
||||
|
@ -82,7 +83,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
|
|||
if (!!res.WebLinkDsp) {
|
||||
const arr = res.WebLinkDsp.split(',');
|
||||
webLink.push({
|
||||
key: 'WebLinkDsp',
|
||||
key: WebLinkType.Dsp,
|
||||
title: arr.length > 1 ? arr[0] : '',
|
||||
url: arr.length > 1 ? arr[1] : arr[0]
|
||||
});
|
||||
|
@ -90,7 +91,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
|
|||
if (!!res.WebLinkSms) {
|
||||
const arr = res.WebLinkSms.split(',');
|
||||
webLink.push({
|
||||
key: 'WebLinkSms',
|
||||
key: WebLinkType.Sms,
|
||||
title: arr.length > 1 ? arr[0] : '',
|
||||
url: arr.length > 1 ? arr[1] : arr[0]
|
||||
});
|
||||
|
@ -98,7 +99,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
|
|||
if (!!res.WebLinkConf) {
|
||||
const arr = res.WebLinkConf.split(',');
|
||||
webLink.push({
|
||||
key: 'WebLinkConf',
|
||||
key: WebLinkType.Conf,
|
||||
title: arr.length > 1 ? arr[0] : '',
|
||||
url: arr.length > 1 ? arr[1] : arr[0]
|
||||
});
|
||||
|
@ -106,7 +107,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
|
|||
if (!!res.WebLinkEp) {
|
||||
const arr = res.WebLinkEp.split(',');
|
||||
webLink.push({
|
||||
key: 'WebLinkEp',
|
||||
key: WebLinkType.Ep,
|
||||
title: arr.length > 1 ? arr[0] : '',
|
||||
url: arr.length > 1 ? arr[1] : arr[0]
|
||||
});
|
||||
|
@ -114,7 +115,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
|
|||
if (!!res.WebLinkSop) {
|
||||
const arr = res.WebLinkSop.split(',');
|
||||
webLink.push({
|
||||
key: 'WebLinkSop',
|
||||
key: WebLinkType.Sop,
|
||||
title: arr.length > 1 ? arr[0] : '',
|
||||
url: arr.length > 1 ? arr[1] : arr[0]
|
||||
});
|
||||
|
@ -122,7 +123,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
|
|||
if (!!res.WebLinkSom) {
|
||||
const arr = res.WebLinkSom.split(',');
|
||||
webLink.push({
|
||||
key: 'WebLinkSom',
|
||||
key: WebLinkType.Som,
|
||||
title: arr.length > 1 ? arr[0] : '',
|
||||
url: arr.length > 1 ? arr[1] : arr[0]
|
||||
});
|
||||
|
@ -130,7 +131,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
|
|||
if (!!res.WebLinkElephant) {
|
||||
const arr = res.WebLinkElephant.split(',');
|
||||
webLink.push({
|
||||
key: 'WebLinkElephant',
|
||||
key: WebLinkType.Elephant,
|
||||
title: arr.length > 1 ? arr[0] : '',
|
||||
url: arr.length > 1 ? arr[1] : arr[0]
|
||||
});
|
||||
|
@ -138,7 +139,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
|
|||
if (!!res.WebLinkItsvcdesk) {
|
||||
const arr = res.WebLinkItsvcdesk.split(',');
|
||||
webLink.push({
|
||||
key: 'WebLinkItsvcdesk',
|
||||
key: WebLinkType.Itsvcdesk,
|
||||
title: arr.length > 1 ? arr[0] : '',
|
||||
url: arr.length > 1 ? arr[1] : arr[0]
|
||||
});
|
||||
|
@ -146,7 +147,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
|
|||
if (!!res.WebLinkUrgntNews) {
|
||||
const arr = res.WebLinkUrgntNews.split(',');
|
||||
webLink.push({
|
||||
key: 'WebLinkUrgntNews',
|
||||
key: WebLinkType.UrgntNews,
|
||||
title: arr.length > 1 ? arr[0] : '',
|
||||
url: arr.length > 1 ? arr[1] : arr[0]
|
||||
});
|
||||
|
@ -154,7 +155,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
|
|||
if (!!res.WebLinkMailCnt) {
|
||||
const arr = res.WebLinkMailCnt.split(',');
|
||||
webLink.push({
|
||||
key: 'WebLinkMailCnt',
|
||||
key: WebLinkType.MailCnt,
|
||||
title: arr.length > 1 ? arr[0] : '',
|
||||
url: arr.length > 1 ? arr[1] : arr[0]
|
||||
});
|
||||
|
@ -162,7 +163,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
|
|||
if (!!res.WebLinkMail) {
|
||||
const arr = res.WebLinkMail.split(',');
|
||||
webLink.push({
|
||||
key: 'WebLinkMail',
|
||||
key: WebLinkType.Mail,
|
||||
title: arr.length > 1 ? arr[0] : '',
|
||||
url: arr.length > 1 ? arr[1] : arr[0]
|
||||
});
|
||||
|
@ -170,7 +171,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
|
|||
if (!!res.WebLinkPaymentCnt) {
|
||||
const arr = res.WebLinkPaymentCnt.split(',');
|
||||
webLink.push({
|
||||
key: 'WebLinkPaymentCnt',
|
||||
key: WebLinkType.PaymentCnt,
|
||||
title: arr.length > 1 ? arr[0] : '',
|
||||
url: arr.length > 1 ? arr[1] : arr[0]
|
||||
});
|
||||
|
@ -178,7 +179,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
|
|||
if (!!res.WebLinkPayment) {
|
||||
const arr = res.WebLinkPayment.split(',');
|
||||
webLink.push({
|
||||
key: 'WebLinkPayment',
|
||||
key: WebLinkType.Payment,
|
||||
title: arr.length > 1 ? arr[0] : '',
|
||||
url: arr.length > 1 ? arr[1] : arr[0]
|
||||
});
|
||||
|
@ -186,7 +187,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
|
|||
if (!!res.WebLinkChgPassword) {
|
||||
const arr = res.WebLinkChgPassword.split(',');
|
||||
webLink.push({
|
||||
key: 'WebLinkChgPassword',
|
||||
key: WebLinkType.ChgPassword,
|
||||
title: arr.length > 1 ? arr[0] : '',
|
||||
url: arr.length > 1 ? arr[1] : arr[0]
|
||||
});
|
||||
|
|
|
@ -6,162 +6,117 @@
|
|||
<div class="app-layout-native-title-bar-spacer"></div>
|
||||
<div class="btn-area">
|
||||
<div *ngIf="!!loginRes" class="app-layout-native-title-bar-link">
|
||||
<!--s[추가된 전체 웹링크] weblink-->
|
||||
<button
|
||||
mat-icon-button
|
||||
*ngFor="let link of weblink"
|
||||
class="button"
|
||||
[matTooltip]="link.title"
|
||||
matTooltip="웹하드"
|
||||
(click)="onClickWebLink(link)"
|
||||
>
|
||||
<span class="weblink webhard">웹하드</span>
|
||||
</button>
|
||||
<button
|
||||
mat-icon-button
|
||||
*ngFor="let link of weblink"
|
||||
class="button"
|
||||
[matTooltip]="link.title"
|
||||
matTooltip="DSP"
|
||||
(click)="onClickWebLink(link)"
|
||||
>
|
||||
<span class="weblink dsp">DSP</span>
|
||||
</button>
|
||||
<button
|
||||
mat-icon-button
|
||||
*ngFor="let link of weblink"
|
||||
class="button"
|
||||
[matTooltip]="link.title"
|
||||
matTooltip="SMS"
|
||||
(click)="onClickWebLink(link)"
|
||||
>
|
||||
<span class="weblink sms">SMS</span>
|
||||
</button>
|
||||
<button
|
||||
mat-icon-button
|
||||
*ngFor="let link of weblink"
|
||||
class="button"
|
||||
[matTooltip]="link.title"
|
||||
matTooltip="화상회의"
|
||||
(click)="onClickWebLink(link)"
|
||||
>
|
||||
<span class="weblink vc">화상회의</span>
|
||||
</button>
|
||||
<button
|
||||
mat-icon-button
|
||||
*ngFor="let link of weblink"
|
||||
class="button"
|
||||
[matTooltip]="link.title"
|
||||
matTooltip="EP"
|
||||
(click)="onClickWebLink(link)"
|
||||
>
|
||||
<span class="weblink ep">EP</span>
|
||||
</button>
|
||||
<button
|
||||
mat-icon-button
|
||||
*ngFor="let link of weblink"
|
||||
class="button"
|
||||
[matTooltip]="link.title"
|
||||
matTooltip="S&OM"
|
||||
(click)="onClickWebLink(link)"
|
||||
>
|
||||
<span class="weblink S_OM">S&OM</span>
|
||||
</button>
|
||||
<button
|
||||
mat-icon-button
|
||||
*ngFor="let link of weblink"
|
||||
class="button"
|
||||
[matTooltip]="link.title"
|
||||
matTooltip="코끼리"
|
||||
(click)="onClickWebLink(link)"
|
||||
>
|
||||
<span class="weblink elephant">코끼리</span>
|
||||
</button>
|
||||
<button
|
||||
mat-icon-button
|
||||
*ngFor="let link of weblink"
|
||||
class="button"
|
||||
[matTooltip]="link.title"
|
||||
matTooltip="IT서비스"
|
||||
(click)="onClickWebLink(link)"
|
||||
>
|
||||
<span class="weblink it-service">IT</span>
|
||||
</button>
|
||||
<button
|
||||
mat-icon-button
|
||||
*ngFor="let link of weblink"
|
||||
class="button"
|
||||
[matTooltip]="link.title"
|
||||
matTooltip="개인속보"
|
||||
(click)="onClickWebLink(link)"
|
||||
>
|
||||
<span class="weblink Personal-news">NEWS</span>
|
||||
</button>
|
||||
<button
|
||||
mat-icon-button
|
||||
*ngFor="let link of weblink"
|
||||
class="button"
|
||||
[matTooltip]="link.title"
|
||||
matTooltip="메일"
|
||||
(click)="onClickWebLink(link)"
|
||||
>
|
||||
<span class="weblink mail">메일</span>
|
||||
</button>
|
||||
<button
|
||||
mat-icon-button
|
||||
*ngFor="let link of weblink"
|
||||
class="button"
|
||||
[matTooltip]="link.title"
|
||||
matTooltip="결제"
|
||||
(click)="onClickWebLink(link)"
|
||||
>
|
||||
<span class="weblink approved">결제</span>
|
||||
</button>
|
||||
<!--E[추가된 전체 웹링크] weblink-->
|
||||
<button
|
||||
mat-icon-button
|
||||
*ngFor="let link of weblink"
|
||||
class="button app-layout-native-title-bar-logout"
|
||||
[matTooltip]="link.title"
|
||||
(click)="onClickWebLink(link)"
|
||||
>
|
||||
<svg class="svg-icon" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path
|
||||
d="M13.29 9.29l-4 4a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l4-4a1 1 0 0 0-1.42-1.42z"
|
||||
/>
|
||||
<path
|
||||
d="M12.28 17.4L11 18.67a4.2 4.2 0 0 1-5.58.4 4 4 0 0 1-.27-5.93l1.42-1.43a1 1 0 0 0 0-1.42 1 1 0 0 0-1.42 0l-1.27 1.28a6.15 6.15 0 0 0-.67 8.07 6.06 6.06 0 0 0 9.07.6l1.42-1.42a1 1 0 0 0-1.42-1.42z"
|
||||
/>
|
||||
<path
|
||||
d="M19.66 3.22a6.18 6.18 0 0 0-8.13.68L10.45 5a1.09 1.09 0 0 0-.17 1.61 1 1 0 0 0 1.42 0L13 5.3a4.17 4.17 0 0 1 5.57-.4 4 4 0 0 1 .27 5.95l-1.42 1.43a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l1.42-1.42a6.06 6.06 0 0 0-.6-9.06z"
|
||||
/>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<button
|
||||
mat-icon-button
|
||||
*ngFor="let link of weblinkBadgeTypes"
|
||||
class="button app-layout-native-title-bar-logout"
|
||||
[matBadgeHidden]="getHideWebLinkbadge(link)"
|
||||
[matBadge]="getWebLinkBadgeCount(link)"
|
||||
matBadgeDescription="확인하지 않은 메시지가 있습니다."
|
||||
matBadgeColor="accent"
|
||||
matBadgePosition="above after"
|
||||
[matTooltip]="link.title"
|
||||
(click)="onClickWebLink(link)"
|
||||
>
|
||||
<svg class="svg-icon" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path
|
||||
d="M13.29 9.29l-4 4a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l4-4a1 1 0 0 0-1.42-1.42z"
|
||||
/>
|
||||
<path
|
||||
d="M12.28 17.4L11 18.67a4.2 4.2 0 0 1-5.58.4 4 4 0 0 1-.27-5.93l1.42-1.43a1 1 0 0 0 0-1.42 1 1 0 0 0-1.42 0l-1.27 1.28a6.15 6.15 0 0 0-.67 8.07 6.06 6.06 0 0 0 9.07.6l1.42-1.42a1 1 0 0 0-1.42-1.42z"
|
||||
/>
|
||||
<path
|
||||
d="M19.66 3.22a6.18 6.18 0 0 0-8.13.68L10.45 5a1.09 1.09 0 0 0-.17 1.61 1 1 0 0 0 1.42 0L13 5.3a4.17 4.17 0 0 1 5.57-.4 4 4 0 0 1 .27 5.95l-1.42 1.43a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l1.42-1.42a6.06 6.06 0 0 0-.6-9.06z"
|
||||
/>
|
||||
</svg>
|
||||
</button>
|
||||
<ng-container *ngFor="let link of weblink" [ngSwitch]="link.key">
|
||||
<button
|
||||
mat-icon-button
|
||||
*ngSwitchCase="WebLinkType.Webhard"
|
||||
class="button"
|
||||
[matTooltip]="link.title"
|
||||
(click)="onClickWebLink(link)"
|
||||
>
|
||||
<span class="weblink webhard">웹하드</span>
|
||||
</button>
|
||||
<button
|
||||
mat-icon-button
|
||||
*ngSwitchCase="WebLinkType.Dsp"
|
||||
class="button"
|
||||
[matTooltip]="link.title"
|
||||
(click)="onClickWebLink(link)"
|
||||
>
|
||||
<span class="weblink dsp">DSP</span>
|
||||
</button>
|
||||
<button
|
||||
mat-icon-button
|
||||
*ngSwitchCase="WebLinkType.Sms"
|
||||
class="button"
|
||||
[matTooltip]="link.title"
|
||||
(click)="onClickWebLink(link)"
|
||||
>
|
||||
<span class="weblink sms">SMS</span>
|
||||
</button>
|
||||
<button
|
||||
mat-icon-button
|
||||
*ngSwitchCase="WebLinkType.Conf"
|
||||
class="button"
|
||||
[matTooltip]="link.title"
|
||||
(click)="onClickWebLink(link)"
|
||||
>
|
||||
<span class="weblink vc">화상회의</span>
|
||||
</button>
|
||||
<button
|
||||
mat-icon-button
|
||||
*ngSwitchCase="WebLinkType.Ep"
|
||||
class="button"
|
||||
[matTooltip]="link.title"
|
||||
(click)="onClickWebLink(link)"
|
||||
>
|
||||
<span class="weblink ep">EP</span>
|
||||
</button>
|
||||
<button
|
||||
mat-icon-button
|
||||
*ngSwitchCase="WebLinkType.Som"
|
||||
class="button"
|
||||
[matTooltip]="link.title"
|
||||
(click)="onClickWebLink(link)"
|
||||
>
|
||||
<span class="weblink S_OM">S&OM</span>
|
||||
</button>
|
||||
<button
|
||||
mat-icon-button
|
||||
*ngSwitchCase="WebLinkType.Elephant"
|
||||
class="button"
|
||||
[matTooltip]="link.title"
|
||||
(click)="onClickWebLink(link)"
|
||||
>
|
||||
<span class="weblink elephant">코끼리</span>
|
||||
</button>
|
||||
<button
|
||||
mat-icon-button
|
||||
*ngSwitchCase="WebLinkType.Itsvcdesk"
|
||||
class="button"
|
||||
[matTooltip]="link.title"
|
||||
(click)="onClickWebLink(link)"
|
||||
>
|
||||
<span class="weblink it-service">IT</span>
|
||||
</button>
|
||||
<button
|
||||
mat-icon-button
|
||||
*ngSwitchCase="WebLinkType.UrgntNews"
|
||||
class="button"
|
||||
[matTooltip]="link.title"
|
||||
(click)="onClickWebLink(link)"
|
||||
>
|
||||
<span class="weblink Personal-news">NEWS</span>
|
||||
</button>
|
||||
<button
|
||||
mat-icon-button
|
||||
*ngSwitchCase="WebLinkType.Mail"
|
||||
class="button"
|
||||
[matBadgeHidden]="webLinkBadgeMail === 0"
|
||||
[matBadge]="webLinkBadgeMail"
|
||||
matBadgeDescription="확인하지 않은 메시지가 있습니다."
|
||||
matBadgeColor="accent"
|
||||
matBadgePosition="above after"
|
||||
[matTooltip]="link.title"
|
||||
(click)="onClickWebLink(link)"
|
||||
>
|
||||
<span class="weblink mail">메일</span>
|
||||
</button>
|
||||
<button
|
||||
mat-icon-button
|
||||
*ngSwitchCase="WebLinkType.Payment"
|
||||
class="button"
|
||||
[matBadgeHidden]="webLinkBadgePayment === 0"
|
||||
[matBadge]="webLinkBadgePayment"
|
||||
matBadgeDescription="확인하지 않은 메시지가 있습니다."
|
||||
matBadgeColor="accent"
|
||||
matBadgePosition="above after"
|
||||
[matTooltip]="link.title"
|
||||
(click)="onClickWebLink(link)"
|
||||
>
|
||||
<span class="weblink approved">결제</span>
|
||||
</button>
|
||||
</ng-container>
|
||||
<button
|
||||
*ngIf="updateInfo$ | async as updateInfo"
|
||||
mat-icon-button
|
||||
|
@ -187,7 +142,10 @@
|
|||
></path>
|
||||
</svg>
|
||||
</button>
|
||||
<span class="stroke-bar"></span>
|
||||
<span
|
||||
*ngIf="(!!weblink && weblink.length > 0) || (updateInfo$ | async)"
|
||||
class="stroke-bar"
|
||||
></span>
|
||||
<!--S[삭제예정] 마이프로필 설정을 이동
|
||||
<button
|
||||
mat-icon-button
|
||||
|
|
|
@ -36,7 +36,8 @@ import { AppUserInfo, KEY_APP_USER_INFO } from '@app/types/app-user-info.type';
|
|||
import { environment } from '../../../../environments/environment';
|
||||
import {
|
||||
DaesangApiService,
|
||||
DaesangProtocolService
|
||||
DaesangProtocolService,
|
||||
WebLinkType
|
||||
} from '@ucap-webmessenger/daesang';
|
||||
import { NGXLogger } from 'ngx-logger';
|
||||
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
||||
|
@ -64,10 +65,11 @@ export class TopBarComponent implements OnInit, OnDestroy {
|
|||
|
||||
loginInfo: LoginInfo;
|
||||
weblink: WebLink[] = [];
|
||||
weblinkBadgeTypes: WebLink[] = [];
|
||||
webLinkBadgeMail = 0;
|
||||
webLinkBadgePayment = 0;
|
||||
|
||||
WebLinkType = WebLinkType;
|
||||
|
||||
constructor(
|
||||
private store: Store<any>,
|
||||
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService,
|
||||
|
@ -77,8 +79,7 @@ export class TopBarComponent implements OnInit, OnDestroy {
|
|||
private daesangApiService: DaesangApiService,
|
||||
private daesangProtocolService: DaesangProtocolService,
|
||||
private logger: NGXLogger
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.windowStateChanged$ = this.nativeService.windowStateChanged();
|
||||
|
@ -93,9 +94,9 @@ export class TopBarComponent implements OnInit, OnDestroy {
|
|||
KEY_LOGIN_INFO
|
||||
);
|
||||
|
||||
this.sessionVerinfo = this.sessionStorageService.get<VersionInfo2Response>(
|
||||
KEY_VER_INFO
|
||||
);
|
||||
this.sessionVerinfo = this.sessionStorageService.get<
|
||||
VersionInfo2Response
|
||||
>(KEY_VER_INFO);
|
||||
|
||||
// WebLink init..
|
||||
this.initWebLink();
|
||||
|
@ -106,7 +107,6 @@ export class TopBarComponent implements OnInit, OnDestroy {
|
|||
this.updateInfo$ = this.store.pipe(
|
||||
select(AppStore.SettingSelector.UpdateSelector.updateInfo)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
initWebLink(): void {
|
||||
|
@ -119,38 +119,12 @@ export class TopBarComponent implements OnInit, OnDestroy {
|
|||
>(KEY_URL_INFO);
|
||||
|
||||
if (!!urlInfo && !!urlInfo.webLink) {
|
||||
// urlInfo.webLinkAllowedList.push(
|
||||
// ...[
|
||||
// 'WebLinkMail',
|
||||
// 'WebLinkMailCnt',
|
||||
// 'WebLinkPayment',
|
||||
// 'WebLinkPaymentCnt'
|
||||
// ]
|
||||
// );
|
||||
this.weblink = urlInfo.webLink;
|
||||
|
||||
this.weblink = urlInfo.webLink.filter(
|
||||
weblink =>
|
||||
urlInfo.webLinkAllowedList
|
||||
.filter(
|
||||
type =>
|
||||
type !== 'WebLinkMailCnt' &&
|
||||
type !== 'WebLinkPaymentCnt' &&
|
||||
type !== 'WebLinkMail' &&
|
||||
type !== 'WebLinkPayment'
|
||||
)
|
||||
.filter(type => type === weblink.key).length > 0
|
||||
);
|
||||
this.weblinkBadgeTypes = urlInfo.webLink.filter(
|
||||
weblink =>
|
||||
urlInfo.webLinkAllowedList
|
||||
.filter(type => type === 'WebLinkMail' || type === 'WebLinkPayment')
|
||||
.filter(type => type === weblink.key).length > 0
|
||||
);
|
||||
|
||||
if (urlInfo.webLinkAllowedList.indexOf('WebLinkMail') > -1) {
|
||||
if (urlInfo.webLinkAllowedList.indexOf(WebLinkType.Mail) > -1) {
|
||||
// 메일 카운트 체크.
|
||||
const link = urlInfo.webLink.filter(
|
||||
weblink => weblink.key === 'WebLinkMailCnt'
|
||||
weblink => weblink.key === WebLinkType.MailCnt
|
||||
);
|
||||
if (link.length > 0) {
|
||||
const appUserInfo = this.localStorageService.encGet<AppUserInfo>(
|
||||
|
@ -179,10 +153,10 @@ export class TopBarComponent implements OnInit, OnDestroy {
|
|||
.subscribe();
|
||||
}
|
||||
}
|
||||
if (urlInfo.webLinkAllowedList.indexOf('WebLinkPayment') > -1) {
|
||||
if (urlInfo.webLinkAllowedList.indexOf(WebLinkType.Payment) > -1) {
|
||||
// 결제 카운트 체크.
|
||||
const link = urlInfo.webLink.filter(
|
||||
weblink => weblink.key === 'WebLinkPaymentCnt'
|
||||
weblink => weblink.key === WebLinkType.PaymentCnt
|
||||
);
|
||||
if (link.length > 0) {
|
||||
const appUserInfo = this.localStorageService.encGet<AppUserInfo>(
|
||||
|
@ -191,13 +165,12 @@ export class TopBarComponent implements OnInit, OnDestroy {
|
|||
);
|
||||
|
||||
const WebLinkPaymentCnt = link[0];
|
||||
const WebLinkMailCnt = link[0];
|
||||
const loginPw = appUserInfo.loginPw;
|
||||
const loginPw2 = this.loginInfo.loginPw;
|
||||
const loginId = this.loginInfo.loginId;
|
||||
const token = loginRes.tokenString;
|
||||
|
||||
const url = WebLinkMailCnt.url
|
||||
const url = WebLinkPaymentCnt.url
|
||||
.replace(/(\(%USER_TOKEN%\))/g, token)
|
||||
.replace(/(\(%USER_ID%\))/g, loginId)
|
||||
.replace(/(\(%USER_PASS%\))/g, loginPw);
|
||||
|
@ -332,32 +305,6 @@ export class TopBarComponent implements OnInit, OnDestroy {
|
|||
|
||||
this.nativeService.openDefaultBrowser(url);
|
||||
}
|
||||
getHideWebLinkbadge(link: WebLink): boolean {
|
||||
const showType = ['WebLinkMail', 'WebLinkPayment'];
|
||||
|
||||
if (showType.indexOf(link.key) > -1) {
|
||||
if (link.key === 'WebLinkMail' && this.webLinkBadgeMail === 0) {
|
||||
return true;
|
||||
} else if (
|
||||
link.key === 'WebLinkPayment' &&
|
||||
this.webLinkBadgePayment === 0
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
getWebLinkBadgeCount(link: WebLink): number {
|
||||
if (link.key === 'WebLinkMail') {
|
||||
return this.webLinkBadgeMail;
|
||||
} else if (link.key === 'WebLinkPayment') {
|
||||
return this.webLinkBadgePayment;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
onClickUpdate() {
|
||||
this.store.dispatch(UpdateStore.applyInstantUpdate());
|
||||
|
|
|
@ -77,7 +77,7 @@ import {
|
|||
} from '@ucap-webmessenger/protocol-service';
|
||||
import { DaesangUrlInfoResponse } from '@ucap-webmessenger/api-external';
|
||||
import { AppUserInfo, KEY_APP_USER_INFO } from '@app/types/app-user-info.type';
|
||||
import { DaesangCipherService } from '@ucap-webmessenger/daesang';
|
||||
import { DaesangCipherService, WebLinkType } from '@ucap-webmessenger/daesang';
|
||||
|
||||
@Injectable()
|
||||
export class Effects {
|
||||
|
@ -311,7 +311,7 @@ export class Effects {
|
|||
});
|
||||
|
||||
const passwordChangeUrl = urlInfo.webLink.filter(
|
||||
weblink => weblink.key === 'WebLinkChgPassword'
|
||||
weblink => weblink.key === WebLinkType.ChgPassword
|
||||
);
|
||||
if (passwordChangeUrl.length > 0) {
|
||||
const appUserInfo = this.localStorageService.encGet<AppUserInfo>(
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
export enum WebLinkType {
|
||||
/** 웹하드 URL */
|
||||
Webhard = 'WebLinkWebhard',
|
||||
/** DSP URL */
|
||||
Dsp = 'WebLinkDsp ',
|
||||
/** SMS URL */
|
||||
Sms = 'WebLinkSms',
|
||||
/** 화상회의 URL */
|
||||
Conf = 'WebLinkConf',
|
||||
/** EP URL */
|
||||
Ep = 'WebLinkEp',
|
||||
/** S&OP회의 URL */
|
||||
Sop = 'WebLinkSop',
|
||||
/** S&OM회의 URL */
|
||||
Som = 'WebLinkSom',
|
||||
/** 코끼리 URL */
|
||||
Elephant = 'WebLinkElephant',
|
||||
/** IT서비스데스크 URL */
|
||||
Itsvcdesk = 'WebLinkItsvcdesk',
|
||||
/** 개인속보 URL */
|
||||
UrgntNews = 'WebLinkUrgntNews',
|
||||
/** 메일Count URL */
|
||||
MailCnt = 'WebLinkMailCnt',
|
||||
/** 메일 링크 URL */
|
||||
Mail = 'WebLinkMail',
|
||||
/** 결재Count URL */
|
||||
PaymentCnt = 'WebLinkPaymentCnt',
|
||||
/** 결재링크 URL */
|
||||
Payment = 'WebLinkPayment',
|
||||
/** 비밀번호변경 URL ; PC 메신저만 해당 비밀번호 만료시 */
|
||||
ChgPassword = 'WebLinkChgPassword'
|
||||
}
|
|
@ -2,6 +2,7 @@ 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';
|
||||
import { WebLinkType } from '../types/web-link.type';
|
||||
|
||||
export class SmsUtils {
|
||||
constructor(
|
||||
|
@ -19,13 +20,14 @@ export class SmsUtils {
|
|||
if (
|
||||
!!urlInfo &&
|
||||
!!urlInfo.webLinkAllowedList &&
|
||||
urlInfo.webLinkAllowedList.indexOf('WebLinkSms') > -1 &&
|
||||
urlInfo.webLinkAllowedList.indexOf(WebLinkType.Sms) > -1 &&
|
||||
!!urlInfo.webLink &&
|
||||
urlInfo.webLink.length > 0 &&
|
||||
urlInfo.webLink.filter(weblink => weblink.key === 'WebLinkSms').length > 0
|
||||
urlInfo.webLink.filter(weblink => weblink.key === WebLinkType.Sms)
|
||||
.length > 0
|
||||
) {
|
||||
this.url = urlInfo.webLink.filter(
|
||||
weblink => weblink.key === 'WebLinkSms'
|
||||
weblink => weblink.key === WebLinkType.Sms
|
||||
)[0].url;
|
||||
return true;
|
||||
} else {
|
||||
|
|
|
@ -8,6 +8,8 @@ export * from './lib/services/daesang-api.service';
|
|||
export * from './lib/services/daesang-cipher.service';
|
||||
export * from './lib/services/daesang-protocol.service';
|
||||
|
||||
export * from './lib/types/web-link.type';
|
||||
|
||||
export * from './lib/utils/SmsUtils';
|
||||
|
||||
export * from './lib/ucap-daesang.module';
|
||||
|
|
Loading…
Reference in New Issue
Block a user