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