From 0a9e3bc84cffd0a1aaf9f3c73814bfd8feed6406 Mon Sep 17 00:00:00 2001 From: Richard Park Date: Thu, 28 Nov 2019 13:44:41 +0900 Subject: [PATCH] consts are added --- .../ucap-webmessenger-app/src/app/app-store.module.ts | 2 +- .../src/app/resolvers/messenger.resolver.ts | 8 +++++--- .../src/environments/environment.dev.ts | 9 +++++++++ .../src/environments/environment.prod.ts | 9 +++++++++ .../src/environments/environment.type.ts | 9 +++++++++ 5 files changed, 33 insertions(+), 4 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/app-store.module.ts b/projects/ucap-webmessenger-app/src/app/app-store.module.ts index 5c69901c..d516baca 100644 --- a/projects/ucap-webmessenger-app/src/app/app-store.module.ts +++ b/projects/ucap-webmessenger-app/src/app/app-store.module.ts @@ -44,7 +44,7 @@ import { ROOT_REDUCERS, metaReducers, effects } from './store'; * See: https://github.com/zalmoxisus/redux-devtools-extension */ StoreDevtoolsModule.instrument({ - name: 'NgRx Book Store App' + name: 'UCAP Store App' // In a production build you would want to disable the Store Devtools // logOnly: environment.production, diff --git a/projects/ucap-webmessenger-app/src/app/resolvers/messenger.resolver.ts b/projects/ucap-webmessenger-app/src/app/resolvers/messenger.resolver.ts index 20066cce..932580bf 100644 --- a/projects/ucap-webmessenger-app/src/app/resolvers/messenger.resolver.ts +++ b/projects/ucap-webmessenger-app/src/app/resolvers/messenger.resolver.ts @@ -50,6 +50,8 @@ import * as SyncStore from '@app/store/messenger/sync'; import { KEY_VER_INFO } from '@app/types/ver-info.type'; import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type'; +import { environment } from '../../environments/environment'; + @Injectable() export class AppMessengerResolver implements Resolve { constructor( @@ -115,8 +117,8 @@ export class AppMessengerResolver implements Resolve { hostName: '', ssoMode: SSOMode.AUTH, userSpecificInformation: 'PRO_000482', - productId: 'PRO_000482', - productName: 'EZMessenger' + productId: environment.productConfig.productId, + productName: environment.productConfig.productName }); }), switchMap(res => { @@ -141,7 +143,7 @@ export class AppMessengerResolver implements Resolve { this.store.dispatch( CompanyStore.companyList({ - companyGroupCode: 'LG' + companyGroupCode: environment.companyConfig.companyGroupCode }) ); }), diff --git a/projects/ucap-webmessenger-app/src/environments/environment.dev.ts b/projects/ucap-webmessenger-app/src/environments/environment.dev.ts index 1eee7899..88aedc74 100644 --- a/projects/ucap-webmessenger-app/src/environments/environment.dev.ts +++ b/projects/ucap-webmessenger-app/src/environments/environment.dev.ts @@ -13,6 +13,15 @@ export const environment: Environment = { production: false, title: `[개발] UCapMessenger`, + companyConfig: { + companyGroupCode: 'LG' + }, + + productConfig: { + productId: 'PRO_000482', + productName: 'EZMessenger' + }, + commonApiModuleConfig: { hostConfig: { protocol: 'http', diff --git a/projects/ucap-webmessenger-app/src/environments/environment.prod.ts b/projects/ucap-webmessenger-app/src/environments/environment.prod.ts index 61cb4408..17741bab 100644 --- a/projects/ucap-webmessenger-app/src/environments/environment.prod.ts +++ b/projects/ucap-webmessenger-app/src/environments/environment.prod.ts @@ -13,6 +13,15 @@ export const environment: Environment = { production: true, title: `[개발] UCapMessenger`, + companyConfig: { + companyGroupCode: 'LG' + }, + + productConfig: { + productId: 'PRO_000482', + productName: 'EZMessenger' + }, + commonApiModuleConfig: { hostConfig: { protocol: 'http', diff --git a/projects/ucap-webmessenger-app/src/environments/environment.type.ts b/projects/ucap-webmessenger-app/src/environments/environment.type.ts index 5cc06f38..3b9f053f 100644 --- a/projects/ucap-webmessenger-app/src/environments/environment.type.ts +++ b/projects/ucap-webmessenger-app/src/environments/environment.type.ts @@ -31,6 +31,15 @@ export interface Environment { runtime?: UCapRuntime; title: string; + companyConfig: { + companyGroupCode: string; + }; + + productConfig: { + productId: string; + productName: string; + }; + commonApiModuleConfig: CommonApiModuleConfig; publicApiModuleConfig: PublicApiModuleConfig; externalApiModuleConfig: ExternalApiModuleConfig;