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]
});
this.messageRetrieveList$ = this.store
.pipe(
select(AppStore.MessengerSelector.MessageSelector.selectAllReceiveList)
)
.pipe(tap(info => console.log(info)));
this.messageRetrieveList$ = this.store.pipe(
select(AppStore.MessengerSelector.MessageSelector.selectAllReceiveList)
);
this.messageSendList$ = this.store.pipe(
select(AppStore.MessengerSelector.MessageSelector.selectAllSendList)

View File

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

View File

@ -35,20 +35,9 @@ export const reducer = createReducer(
}),
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 {
...state,
selectedDepartmentUserInfoList: userList,
selectedDepartmentUserInfoList: action.userInfos,
selectedDepartmentStatus: action.res,
selectedDepartmentProcessing: false
};