# 이슈처리 229

This commit is contained in:
leejinho 2020-02-10 09:17:57 +09:00
parent f73e45f781
commit 928e77d54c

View File

@ -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,