state initializing after logout
This commit is contained in:
parent
78b9fbdd4b
commit
eb93a1743a
|
@ -1,6 +1,7 @@
|
|||
import { createReducer, on } from '@ngrx/store';
|
||||
import { initialState } from './state';
|
||||
import { infoSuccess, appendInfoList, info, infoFailure } from './actions';
|
||||
import * as AuthenticationStore from '@app/store/account/authentication';
|
||||
|
||||
export const reducer = createReducer(
|
||||
initialState,
|
||||
|
@ -32,5 +33,11 @@ export const reducer = createReducer(
|
|||
...state,
|
||||
infoList: [...state.infoList, action.info]
|
||||
};
|
||||
}),
|
||||
|
||||
on(AuthenticationStore.logout, (state, action) => {
|
||||
return {
|
||||
...initialState
|
||||
};
|
||||
})
|
||||
);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { createReducer, on } from '@ngrx/store';
|
||||
import { initialState } from './state';
|
||||
import { regViewSuccess, regUpdateSuccess } from './actions';
|
||||
import * as AuthenticationStore from '@app/store/account/authentication';
|
||||
|
||||
export const reducer = createReducer(
|
||||
initialState,
|
||||
|
@ -15,5 +16,10 @@ export const reducer = createReducer(
|
|||
...state,
|
||||
reg: action.res
|
||||
};
|
||||
}),
|
||||
on(AuthenticationStore.logout, (state, action) => {
|
||||
return {
|
||||
...initialState
|
||||
};
|
||||
})
|
||||
);
|
||||
|
|
|
@ -2,6 +2,8 @@ import { createReducer, on } from '@ngrx/store';
|
|||
import { initialState } from './state';
|
||||
import { authSuccess, deptSuccess, deptUserSuccess } from './actions';
|
||||
|
||||
import * as AuthenticationStore from '@app/store/account/authentication';
|
||||
|
||||
export const reducer = createReducer(
|
||||
initialState,
|
||||
on(authSuccess, (state, action) => {
|
||||
|
@ -24,5 +26,10 @@ export const reducer = createReducer(
|
|||
selectedDepartmentUserInfoList: action.userInfos,
|
||||
selectedDepartmentStatus: action.res
|
||||
};
|
||||
}),
|
||||
on(AuthenticationStore.logout, (state, action) => {
|
||||
return {
|
||||
...initialState
|
||||
};
|
||||
})
|
||||
);
|
||||
|
|
|
@ -2,6 +2,8 @@ import { createReducer, on } from '@ngrx/store';
|
|||
import { initialState } from './state';
|
||||
import { infoSuccess } from './actions';
|
||||
|
||||
import * as AuthenticationStore from '@app/store/account/authentication';
|
||||
|
||||
export const reducer = createReducer(
|
||||
initialState,
|
||||
on(infoSuccess, (state, action) => {
|
||||
|
@ -11,5 +13,11 @@ export const reducer = createReducer(
|
|||
userInfoList: action.userInfoList,
|
||||
userInfoShortList: action.userInfoShortList
|
||||
};
|
||||
}),
|
||||
|
||||
on(AuthenticationStore.logout, (state, action) => {
|
||||
return {
|
||||
...initialState
|
||||
};
|
||||
})
|
||||
);
|
||||
|
|
|
@ -2,6 +2,8 @@ import { createReducer, on } from '@ngrx/store';
|
|||
import { initialState } from './state';
|
||||
import { bulkInfoSuccess } from './actions';
|
||||
|
||||
import * as AuthenticationStore from '@app/store/account/authentication';
|
||||
|
||||
export const reducer = createReducer(
|
||||
initialState,
|
||||
on(bulkInfoSuccess, (state, action) => {
|
||||
|
@ -9,5 +11,11 @@ export const reducer = createReducer(
|
|||
...state,
|
||||
statusBulkInfoList: action.statusBulkInfoList
|
||||
};
|
||||
}),
|
||||
|
||||
on(AuthenticationStore.logout, (state, action) => {
|
||||
return {
|
||||
...initialState
|
||||
};
|
||||
})
|
||||
);
|
||||
|
|
|
@ -18,6 +18,8 @@ import {
|
|||
RoomUserData
|
||||
} from '@ucap-webmessenger/protocol-sync';
|
||||
|
||||
import * as AuthenticationStore from '@app/store/account/authentication';
|
||||
|
||||
export const reducer = createReducer(
|
||||
initialState,
|
||||
on(buddy2Success, (state, action) => {
|
||||
|
@ -91,5 +93,11 @@ export const reducer = createReducer(
|
|||
{ ...state.room }
|
||||
)
|
||||
};
|
||||
}),
|
||||
|
||||
on(AuthenticationStore.logout, (state, action) => {
|
||||
return {
|
||||
...initialState
|
||||
};
|
||||
})
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue
Block a user