This commit is contained in:
병준 박 2019-12-27 17:35:35 +09:00
commit 6c94596eb8
3 changed files with 15 additions and 20 deletions

View File

@ -117,11 +117,9 @@ export class MessageBoxComponent
searchMessageSearchType: [MessageSearchType.Name] searchMessageSearchType: [MessageSearchType.Name]
}); });
this.messageRetrieveList$ = this.store this.messageRetrieveList$ = this.store.pipe(
.pipe( select(AppStore.MessengerSelector.MessageSelector.selectAllReceiveList)
select(AppStore.MessengerSelector.MessageSelector.selectAllReceiveList) );
)
.pipe(tap(info => console.log(info)));
this.messageSendList$ = this.store.pipe( this.messageSendList$ = this.store.pipe(
select(AppStore.MessengerSelector.MessageSelector.selectAllSendList) select(AppStore.MessengerSelector.MessageSelector.selectAllSendList)

View File

@ -88,9 +88,17 @@ export class Effects {
userInfos.push(...(res as DeptUserData).userInfos); userInfos.push(...(res as DeptUserData).userInfos);
break; break;
case SSVC_TYPE_QUERY_DEPT_USER_RES: case SSVC_TYPE_QUERY_DEPT_USER_RES:
userInfos.sort((a, b) => { userInfos.sort((a, b) =>
return a.name < b.name ? -1 : a.name > b.name ? 1 : 0; a.order < b.order
}); ? -1
: a.order > b.order
? 1
: a.name < b.name
? -1
: a.name > b.name
? 1
: 0
);
this.store.dispatch( this.store.dispatch(
deptUserSuccess({ deptUserSuccess({

View File

@ -35,20 +35,9 @@ export const reducer = createReducer(
}), }),
on(deptUserSuccess, (state, action) => { on(deptUserSuccess, (state, action) => {
const userList = action.userInfos.sort((a, b) =>
a.order < b.order
? -1
: a.order > b.order
? 1
: a.name < b.name
? -1
: a.name > b.name
? 1
: 0
);
return { return {
...state, ...state,
selectedDepartmentUserInfoList: userList, selectedDepartmentUserInfoList: action.userInfos,
selectedDepartmentStatus: action.res, selectedDepartmentStatus: action.res,
selectedDepartmentProcessing: false selectedDepartmentProcessing: false
}; };