웹링크 디자인 수정에 따른 프로그램 보정.

This commit is contained in:
leejinho 2020-01-03 11:05:17 +09:00
parent 404d6c0dfe
commit dc5986a153
7 changed files with 186 additions and 244 deletions

View File

@ -6,6 +6,7 @@ import {
APIDecoder, APIDecoder,
ParameterUtil ParameterUtil
} from '@ucap-webmessenger/api'; } from '@ucap-webmessenger/api';
import { WebLinkType } from '@ucap-webmessenger/daesang';
export interface UrlInfoRequest extends APIRequest { export interface UrlInfoRequest extends APIRequest {
deviceType: DeviceType; deviceType: DeviceType;
@ -74,7 +75,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
if (!!res.WebLinkWebhard) { if (!!res.WebLinkWebhard) {
const arr = res.WebLinkWebhard.split(','); const arr = res.WebLinkWebhard.split(',');
webLink.push({ webLink.push({
key: 'WebLinkWebhard', key: WebLinkType.Webhard,
title: arr.length > 1 ? arr[0] : '', title: arr.length > 1 ? arr[0] : '',
url: arr.length > 1 ? arr[1] : arr[0] url: arr.length > 1 ? arr[1] : arr[0]
}); });
@ -82,7 +83,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
if (!!res.WebLinkDsp) { if (!!res.WebLinkDsp) {
const arr = res.WebLinkDsp.split(','); const arr = res.WebLinkDsp.split(',');
webLink.push({ webLink.push({
key: 'WebLinkDsp', key: WebLinkType.Dsp,
title: arr.length > 1 ? arr[0] : '', title: arr.length > 1 ? arr[0] : '',
url: arr.length > 1 ? arr[1] : arr[0] url: arr.length > 1 ? arr[1] : arr[0]
}); });
@ -90,7 +91,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
if (!!res.WebLinkSms) { if (!!res.WebLinkSms) {
const arr = res.WebLinkSms.split(','); const arr = res.WebLinkSms.split(',');
webLink.push({ webLink.push({
key: 'WebLinkSms', key: WebLinkType.Sms,
title: arr.length > 1 ? arr[0] : '', title: arr.length > 1 ? arr[0] : '',
url: arr.length > 1 ? arr[1] : arr[0] url: arr.length > 1 ? arr[1] : arr[0]
}); });
@ -98,7 +99,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
if (!!res.WebLinkConf) { if (!!res.WebLinkConf) {
const arr = res.WebLinkConf.split(','); const arr = res.WebLinkConf.split(',');
webLink.push({ webLink.push({
key: 'WebLinkConf', key: WebLinkType.Conf,
title: arr.length > 1 ? arr[0] : '', title: arr.length > 1 ? arr[0] : '',
url: arr.length > 1 ? arr[1] : arr[0] url: arr.length > 1 ? arr[1] : arr[0]
}); });
@ -106,7 +107,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
if (!!res.WebLinkEp) { if (!!res.WebLinkEp) {
const arr = res.WebLinkEp.split(','); const arr = res.WebLinkEp.split(',');
webLink.push({ webLink.push({
key: 'WebLinkEp', key: WebLinkType.Ep,
title: arr.length > 1 ? arr[0] : '', title: arr.length > 1 ? arr[0] : '',
url: arr.length > 1 ? arr[1] : arr[0] url: arr.length > 1 ? arr[1] : arr[0]
}); });
@ -114,7 +115,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
if (!!res.WebLinkSop) { if (!!res.WebLinkSop) {
const arr = res.WebLinkSop.split(','); const arr = res.WebLinkSop.split(',');
webLink.push({ webLink.push({
key: 'WebLinkSop', key: WebLinkType.Sop,
title: arr.length > 1 ? arr[0] : '', title: arr.length > 1 ? arr[0] : '',
url: arr.length > 1 ? arr[1] : arr[0] url: arr.length > 1 ? arr[1] : arr[0]
}); });
@ -122,7 +123,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
if (!!res.WebLinkSom) { if (!!res.WebLinkSom) {
const arr = res.WebLinkSom.split(','); const arr = res.WebLinkSom.split(',');
webLink.push({ webLink.push({
key: 'WebLinkSom', key: WebLinkType.Som,
title: arr.length > 1 ? arr[0] : '', title: arr.length > 1 ? arr[0] : '',
url: arr.length > 1 ? arr[1] : arr[0] url: arr.length > 1 ? arr[1] : arr[0]
}); });
@ -130,7 +131,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
if (!!res.WebLinkElephant) { if (!!res.WebLinkElephant) {
const arr = res.WebLinkElephant.split(','); const arr = res.WebLinkElephant.split(',');
webLink.push({ webLink.push({
key: 'WebLinkElephant', key: WebLinkType.Elephant,
title: arr.length > 1 ? arr[0] : '', title: arr.length > 1 ? arr[0] : '',
url: arr.length > 1 ? arr[1] : arr[0] url: arr.length > 1 ? arr[1] : arr[0]
}); });
@ -138,7 +139,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
if (!!res.WebLinkItsvcdesk) { if (!!res.WebLinkItsvcdesk) {
const arr = res.WebLinkItsvcdesk.split(','); const arr = res.WebLinkItsvcdesk.split(',');
webLink.push({ webLink.push({
key: 'WebLinkItsvcdesk', key: WebLinkType.Itsvcdesk,
title: arr.length > 1 ? arr[0] : '', title: arr.length > 1 ? arr[0] : '',
url: arr.length > 1 ? arr[1] : arr[0] url: arr.length > 1 ? arr[1] : arr[0]
}); });
@ -146,7 +147,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
if (!!res.WebLinkUrgntNews) { if (!!res.WebLinkUrgntNews) {
const arr = res.WebLinkUrgntNews.split(','); const arr = res.WebLinkUrgntNews.split(',');
webLink.push({ webLink.push({
key: 'WebLinkUrgntNews', key: WebLinkType.UrgntNews,
title: arr.length > 1 ? arr[0] : '', title: arr.length > 1 ? arr[0] : '',
url: arr.length > 1 ? arr[1] : arr[0] url: arr.length > 1 ? arr[1] : arr[0]
}); });
@ -154,7 +155,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
if (!!res.WebLinkMailCnt) { if (!!res.WebLinkMailCnt) {
const arr = res.WebLinkMailCnt.split(','); const arr = res.WebLinkMailCnt.split(',');
webLink.push({ webLink.push({
key: 'WebLinkMailCnt', key: WebLinkType.MailCnt,
title: arr.length > 1 ? arr[0] : '', title: arr.length > 1 ? arr[0] : '',
url: arr.length > 1 ? arr[1] : arr[0] url: arr.length > 1 ? arr[1] : arr[0]
}); });
@ -162,7 +163,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
if (!!res.WebLinkMail) { if (!!res.WebLinkMail) {
const arr = res.WebLinkMail.split(','); const arr = res.WebLinkMail.split(',');
webLink.push({ webLink.push({
key: 'WebLinkMail', key: WebLinkType.Mail,
title: arr.length > 1 ? arr[0] : '', title: arr.length > 1 ? arr[0] : '',
url: arr.length > 1 ? arr[1] : arr[0] url: arr.length > 1 ? arr[1] : arr[0]
}); });
@ -170,7 +171,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
if (!!res.WebLinkPaymentCnt) { if (!!res.WebLinkPaymentCnt) {
const arr = res.WebLinkPaymentCnt.split(','); const arr = res.WebLinkPaymentCnt.split(',');
webLink.push({ webLink.push({
key: 'WebLinkPaymentCnt', key: WebLinkType.PaymentCnt,
title: arr.length > 1 ? arr[0] : '', title: arr.length > 1 ? arr[0] : '',
url: arr.length > 1 ? arr[1] : arr[0] url: arr.length > 1 ? arr[1] : arr[0]
}); });
@ -178,7 +179,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
if (!!res.WebLinkPayment) { if (!!res.WebLinkPayment) {
const arr = res.WebLinkPayment.split(','); const arr = res.WebLinkPayment.split(',');
webLink.push({ webLink.push({
key: 'WebLinkPayment', key: WebLinkType.Payment,
title: arr.length > 1 ? arr[0] : '', title: arr.length > 1 ? arr[0] : '',
url: arr.length > 1 ? arr[1] : arr[0] url: arr.length > 1 ? arr[1] : arr[0]
}); });
@ -186,7 +187,7 @@ export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
if (!!res.WebLinkChgPassword) { if (!!res.WebLinkChgPassword) {
const arr = res.WebLinkChgPassword.split(','); const arr = res.WebLinkChgPassword.split(',');
webLink.push({ webLink.push({
key: 'WebLinkChgPassword', key: WebLinkType.ChgPassword,
title: arr.length > 1 ? arr[0] : '', title: arr.length > 1 ? arr[0] : '',
url: arr.length > 1 ? arr[1] : arr[0] url: arr.length > 1 ? arr[1] : arr[0]
}); });

View File

@ -6,162 +6,117 @@
<div class="app-layout-native-title-bar-spacer"></div> <div class="app-layout-native-title-bar-spacer"></div>
<div class="btn-area"> <div class="btn-area">
<div *ngIf="!!loginRes" class="app-layout-native-title-bar-link"> <div *ngIf="!!loginRes" class="app-layout-native-title-bar-link">
<!--s[추가된 전체 웹링크] weblink--> <ng-container *ngFor="let link of weblink" [ngSwitch]="link.key">
<button <button
mat-icon-button mat-icon-button
*ngFor="let link of weblink" *ngSwitchCase="WebLinkType.Webhard"
class="button" class="button"
[matTooltip]="link.title" [matTooltip]="link.title"
matTooltip="웹하드" (click)="onClickWebLink(link)"
(click)="onClickWebLink(link)" >
> <span class="weblink webhard">웹하드</span>
<span class="weblink webhard">웹하드</span> </button>
</button> <button
<button mat-icon-button
mat-icon-button *ngSwitchCase="WebLinkType.Dsp"
*ngFor="let link of weblink" class="button"
class="button" [matTooltip]="link.title"
[matTooltip]="link.title" (click)="onClickWebLink(link)"
matTooltip="DSP" >
(click)="onClickWebLink(link)" <span class="weblink dsp">DSP</span>
> </button>
<span class="weblink dsp">DSP</span> <button
</button> mat-icon-button
<button *ngSwitchCase="WebLinkType.Sms"
mat-icon-button class="button"
*ngFor="let link of weblink" [matTooltip]="link.title"
class="button" (click)="onClickWebLink(link)"
[matTooltip]="link.title" >
matTooltip="SMS" <span class="weblink sms">SMS</span>
(click)="onClickWebLink(link)" </button>
> <button
<span class="weblink sms">SMS</span> mat-icon-button
</button> *ngSwitchCase="WebLinkType.Conf"
<button class="button"
mat-icon-button [matTooltip]="link.title"
*ngFor="let link of weblink" (click)="onClickWebLink(link)"
class="button" >
[matTooltip]="link.title" <span class="weblink vc">화상회의</span>
matTooltip="화상회의" </button>
(click)="onClickWebLink(link)" <button
> mat-icon-button
<span class="weblink vc">화상회의</span> *ngSwitchCase="WebLinkType.Ep"
</button> class="button"
<button [matTooltip]="link.title"
mat-icon-button (click)="onClickWebLink(link)"
*ngFor="let link of weblink" >
class="button" <span class="weblink ep">EP</span>
[matTooltip]="link.title" </button>
matTooltip="EP" <button
(click)="onClickWebLink(link)" mat-icon-button
> *ngSwitchCase="WebLinkType.Som"
<span class="weblink ep">EP</span> class="button"
</button> [matTooltip]="link.title"
<button (click)="onClickWebLink(link)"
mat-icon-button >
*ngFor="let link of weblink" <span class="weblink S_OM">S&OM</span>
class="button" </button>
[matTooltip]="link.title" <button
matTooltip="S&OM" mat-icon-button
(click)="onClickWebLink(link)" *ngSwitchCase="WebLinkType.Elephant"
> class="button"
<span class="weblink S_OM">S&OM</span> [matTooltip]="link.title"
</button> (click)="onClickWebLink(link)"
<button >
mat-icon-button <span class="weblink elephant">코끼리</span>
*ngFor="let link of weblink" </button>
class="button" <button
[matTooltip]="link.title" mat-icon-button
matTooltip="코끼리" *ngSwitchCase="WebLinkType.Itsvcdesk"
(click)="onClickWebLink(link)" class="button"
> [matTooltip]="link.title"
<span class="weblink elephant">코끼리</span> (click)="onClickWebLink(link)"
</button> >
<button <span class="weblink it-service">IT</span>
mat-icon-button </button>
*ngFor="let link of weblink" <button
class="button" mat-icon-button
[matTooltip]="link.title" *ngSwitchCase="WebLinkType.UrgntNews"
matTooltip="IT서비스" class="button"
(click)="onClickWebLink(link)" [matTooltip]="link.title"
> (click)="onClickWebLink(link)"
<span class="weblink it-service">IT</span> >
</button> <span class="weblink Personal-news">NEWS</span>
<button </button>
mat-icon-button <button
*ngFor="let link of weblink" mat-icon-button
class="button" *ngSwitchCase="WebLinkType.Mail"
[matTooltip]="link.title" class="button"
matTooltip="개인속보" [matBadgeHidden]="webLinkBadgeMail === 0"
(click)="onClickWebLink(link)" [matBadge]="webLinkBadgeMail"
> matBadgeDescription="확인하지 않은 메시지가 있습니다."
<span class="weblink Personal-news">NEWS</span> matBadgeColor="accent"
</button> matBadgePosition="above after"
<button [matTooltip]="link.title"
mat-icon-button (click)="onClickWebLink(link)"
*ngFor="let link of weblink" >
class="button" <span class="weblink mail">메일</span>
[matTooltip]="link.title" </button>
matTooltip="메일" <button
(click)="onClickWebLink(link)" mat-icon-button
> *ngSwitchCase="WebLinkType.Payment"
<span class="weblink mail">메일</span> class="button"
</button> [matBadgeHidden]="webLinkBadgePayment === 0"
<button [matBadge]="webLinkBadgePayment"
mat-icon-button matBadgeDescription="확인하지 않은 메시지가 있습니다."
*ngFor="let link of weblink" matBadgeColor="accent"
class="button" matBadgePosition="above after"
[matTooltip]="link.title" [matTooltip]="link.title"
matTooltip="결제" (click)="onClickWebLink(link)"
(click)="onClickWebLink(link)" >
> <span class="weblink approved">결제</span>
<span class="weblink approved">결제</span> </button>
</button> </ng-container>
<!--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>
<button <button
*ngIf="updateInfo$ | async as updateInfo" *ngIf="updateInfo$ | async as updateInfo"
mat-icon-button mat-icon-button
@ -187,7 +142,10 @@
></path> ></path>
</svg> </svg>
</button> </button>
<span class="stroke-bar"></span> <span
*ngIf="(!!weblink && weblink.length > 0) || (updateInfo$ | async)"
class="stroke-bar"
></span>
<!--S[삭제예정] 마이프로필 설정을 이동 <!--S[삭제예정] 마이프로필 설정을 이동
<button <button
mat-icon-button mat-icon-button

View File

@ -36,7 +36,8 @@ import { AppUserInfo, KEY_APP_USER_INFO } from '@app/types/app-user-info.type';
import { environment } from '../../../../environments/environment'; import { environment } from '../../../../environments/environment';
import { import {
DaesangApiService, DaesangApiService,
DaesangProtocolService DaesangProtocolService,
WebLinkType
} from '@ucap-webmessenger/daesang'; } from '@ucap-webmessenger/daesang';
import { NGXLogger } from 'ngx-logger'; import { NGXLogger } from 'ngx-logger';
import { VersionInfo2Response } from '@ucap-webmessenger/api-public'; import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
@ -64,10 +65,11 @@ export class TopBarComponent implements OnInit, OnDestroy {
loginInfo: LoginInfo; loginInfo: LoginInfo;
weblink: WebLink[] = []; weblink: WebLink[] = [];
weblinkBadgeTypes: WebLink[] = [];
webLinkBadgeMail = 0; webLinkBadgeMail = 0;
webLinkBadgePayment = 0; webLinkBadgePayment = 0;
WebLinkType = WebLinkType;
constructor( constructor(
private store: Store<any>, private store: Store<any>,
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService, @Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService,
@ -77,8 +79,7 @@ export class TopBarComponent implements OnInit, OnDestroy {
private daesangApiService: DaesangApiService, private daesangApiService: DaesangApiService,
private daesangProtocolService: DaesangProtocolService, private daesangProtocolService: DaesangProtocolService,
private logger: NGXLogger private logger: NGXLogger
) { ) {}
}
ngOnInit() { ngOnInit() {
this.windowStateChanged$ = this.nativeService.windowStateChanged(); this.windowStateChanged$ = this.nativeService.windowStateChanged();
@ -93,9 +94,9 @@ export class TopBarComponent implements OnInit, OnDestroy {
KEY_LOGIN_INFO KEY_LOGIN_INFO
); );
this.sessionVerinfo = this.sessionStorageService.get<VersionInfo2Response>( this.sessionVerinfo = this.sessionStorageService.get<
KEY_VER_INFO VersionInfo2Response
); >(KEY_VER_INFO);
// WebLink init.. // WebLink init..
this.initWebLink(); this.initWebLink();
@ -106,7 +107,6 @@ export class TopBarComponent implements OnInit, OnDestroy {
this.updateInfo$ = this.store.pipe( this.updateInfo$ = this.store.pipe(
select(AppStore.SettingSelector.UpdateSelector.updateInfo) select(AppStore.SettingSelector.UpdateSelector.updateInfo)
); );
} }
initWebLink(): void { initWebLink(): void {
@ -119,38 +119,12 @@ export class TopBarComponent implements OnInit, OnDestroy {
>(KEY_URL_INFO); >(KEY_URL_INFO);
if (!!urlInfo && !!urlInfo.webLink) { if (!!urlInfo && !!urlInfo.webLink) {
// urlInfo.webLinkAllowedList.push( this.weblink = urlInfo.webLink;
// ...[
// 'WebLinkMail',
// 'WebLinkMailCnt',
// 'WebLinkPayment',
// 'WebLinkPaymentCnt'
// ]
// );
this.weblink = urlInfo.webLink.filter( if (urlInfo.webLinkAllowedList.indexOf(WebLinkType.Mail) > -1) {
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) {
// 메일 카운트 체크. // 메일 카운트 체크.
const link = urlInfo.webLink.filter( const link = urlInfo.webLink.filter(
weblink => weblink.key === 'WebLinkMailCnt' weblink => weblink.key === WebLinkType.MailCnt
); );
if (link.length > 0) { if (link.length > 0) {
const appUserInfo = this.localStorageService.encGet<AppUserInfo>( const appUserInfo = this.localStorageService.encGet<AppUserInfo>(
@ -179,10 +153,10 @@ export class TopBarComponent implements OnInit, OnDestroy {
.subscribe(); .subscribe();
} }
} }
if (urlInfo.webLinkAllowedList.indexOf('WebLinkPayment') > -1) { if (urlInfo.webLinkAllowedList.indexOf(WebLinkType.Payment) > -1) {
// 결제 카운트 체크. // 결제 카운트 체크.
const link = urlInfo.webLink.filter( const link = urlInfo.webLink.filter(
weblink => weblink.key === 'WebLinkPaymentCnt' weblink => weblink.key === WebLinkType.PaymentCnt
); );
if (link.length > 0) { if (link.length > 0) {
const appUserInfo = this.localStorageService.encGet<AppUserInfo>( const appUserInfo = this.localStorageService.encGet<AppUserInfo>(
@ -191,13 +165,12 @@ export class TopBarComponent implements OnInit, OnDestroy {
); );
const WebLinkPaymentCnt = link[0]; const WebLinkPaymentCnt = link[0];
const WebLinkMailCnt = link[0];
const loginPw = appUserInfo.loginPw; const loginPw = appUserInfo.loginPw;
const loginPw2 = this.loginInfo.loginPw; const loginPw2 = this.loginInfo.loginPw;
const loginId = this.loginInfo.loginId; const loginId = this.loginInfo.loginId;
const token = loginRes.tokenString; const token = loginRes.tokenString;
const url = WebLinkMailCnt.url const url = WebLinkPaymentCnt.url
.replace(/(\(%USER_TOKEN%\))/g, token) .replace(/(\(%USER_TOKEN%\))/g, token)
.replace(/(\(%USER_ID%\))/g, loginId) .replace(/(\(%USER_ID%\))/g, loginId)
.replace(/(\(%USER_PASS%\))/g, loginPw); .replace(/(\(%USER_PASS%\))/g, loginPw);
@ -332,32 +305,6 @@ export class TopBarComponent implements OnInit, OnDestroy {
this.nativeService.openDefaultBrowser(url); 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() { onClickUpdate() {
this.store.dispatch(UpdateStore.applyInstantUpdate()); this.store.dispatch(UpdateStore.applyInstantUpdate());

View File

@ -77,7 +77,7 @@ import {
} from '@ucap-webmessenger/protocol-service'; } from '@ucap-webmessenger/protocol-service';
import { DaesangUrlInfoResponse } from '@ucap-webmessenger/api-external'; import { DaesangUrlInfoResponse } from '@ucap-webmessenger/api-external';
import { AppUserInfo, KEY_APP_USER_INFO } from '@app/types/app-user-info.type'; 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() @Injectable()
export class Effects { export class Effects {
@ -311,7 +311,7 @@ export class Effects {
}); });
const passwordChangeUrl = urlInfo.webLink.filter( const passwordChangeUrl = urlInfo.webLink.filter(
weblink => weblink.key === 'WebLinkChgPassword' weblink => weblink.key === WebLinkType.ChgPassword
); );
if (passwordChangeUrl.length > 0) { if (passwordChangeUrl.length > 0) {
const appUserInfo = this.localStorageService.encGet<AppUserInfo>( const appUserInfo = this.localStorageService.encGet<AppUserInfo>(

View File

@ -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'
}

View File

@ -2,6 +2,7 @@ import { DaesangUrlInfoResponse } from '@ucap-webmessenger/api-external';
import { SessionStorageService } from '@ucap-webmessenger/web-storage'; import { SessionStorageService } from '@ucap-webmessenger/web-storage';
import { KEY_URL_INFO } from '@app/types'; import { KEY_URL_INFO } from '@app/types';
import { NativeService } from '@ucap-webmessenger/native'; import { NativeService } from '@ucap-webmessenger/native';
import { WebLinkType } from '../types/web-link.type';
export class SmsUtils { export class SmsUtils {
constructor( constructor(
@ -19,13 +20,14 @@ export class SmsUtils {
if ( if (
!!urlInfo && !!urlInfo &&
!!urlInfo.webLinkAllowedList && !!urlInfo.webLinkAllowedList &&
urlInfo.webLinkAllowedList.indexOf('WebLinkSms') > -1 && urlInfo.webLinkAllowedList.indexOf(WebLinkType.Sms) > -1 &&
!!urlInfo.webLink && !!urlInfo.webLink &&
urlInfo.webLink.length > 0 && 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( this.url = urlInfo.webLink.filter(
weblink => weblink.key === 'WebLinkSms' weblink => weblink.key === WebLinkType.Sms
)[0].url; )[0].url;
return true; return true;
} else { } else {

View File

@ -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/types/web-link.type';
export * from './lib/utils/SmsUtils'; export * from './lib/utils/SmsUtils';
export * from './lib/ucap-daesang.module'; export * from './lib/ucap-daesang.module';