From 928e77d54c25b9636a2d50f5e45b78d80f58d5d4 Mon Sep 17 00:00:00 2001 From: leejinho Date: Mon, 10 Feb 2020 09:17:57 +0900 Subject: [PATCH] =?UTF-8?q?#=20=EC=9D=B4=EC=8A=88=EC=B2=98=EB=A6=AC=20229?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/store/messenger/status/reducers.ts | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/status/reducers.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/status/reducers.ts index 87af000d..58b82aef 100644 --- a/projects/ucap-webmessenger-app/src/app/store/messenger/status/reducers.ts +++ b/projects/ucap-webmessenger-app/src/app/store/messenger/status/reducers.ts @@ -8,7 +8,13 @@ import { } from './actions'; import * as AuthenticationStore from '@app/store/account/authentication'; -import { StatusBulkInfo } from '@ucap-webmessenger/protocol-status'; +import { + StatusBulkInfo, + StatusInfo, + TerminalStatusInfo, + TerminalStatusNumber, + WorkStatusType +} from '@ucap-webmessenger/protocol-status'; import { StatusCode } from '@ucap-webmessenger/core'; export const reducer = createReducer( @@ -70,8 +76,28 @@ export const reducer = createReducer( }), on(AuthenticationStore.loginSuccess, (state, action) => { + const mystatus: StatusInfo = { + userSeq: action.loginRes.userSeq, + pcStatus: StatusCode.OnLine, + phoneStatus: StatusCode.Offline, + mobileStatus: StatusCode.Offline, + conferenceStatus: StatusCode.Offline, + statusMessage: '', + mobileConferenceStatus: StatusCode.Offline, + imessengerStatus: StatusCode.Offline + }; + const statusBulkInfoState: StatusBulkInfo = { + ...mystatus, + terminalStatus: TerminalStatusInfo.Unknown, + terminalStatusNumber: TerminalStatusNumber.Unknown, + workstatus: WorkStatusType.Work + }; + return { ...state, + statusBulkInfo: adapterStatusBulkInfo.upsertOne(statusBulkInfoState, { + ...state.statusBulkInfo + }), myStatus: { userSeq: action.loginRes.userSeq, pcStatus: StatusCode.OnLine,