Commit be7130e9 authored by Florent Poittevin's avatar Florent Poittevin
Browse files

fix(archive detail): [DLCM-1915] page in error when log in then unloggue

parent 74f8e326
......@@ -56,7 +56,10 @@ import {
AppTocStateModel,
} from "@app/stores/toc/app-toc.state";
import {AppUserAction} from "@app/stores/user/app-user.action";
import {AppUserState} from "@app/stores/user/app-user.state";
import {
AppUserState,
defaultAppUserStateModel,
} from "@app/stores/user/app-user.state";
import {Enums} from "@enums";
import {environment} from "@environments/environment";
import {
......@@ -109,6 +112,7 @@ import {
SolidifyAppAction,
SolidifyAppState,
SolidifyAppStateModel,
SolidifyAppUserStateModel,
SolidifyHttpErrorResponseModel,
StoreUtil,
} from "solidify-frontend";
......@@ -450,7 +454,7 @@ export class AppState extends SolidifyAppState<AppStateModel> {
isLoggedIn: false,
userRoles: [Enums.UserApplicationRole.UserApplicationRoleEnum.guest],
token: undefined,
application_user: undefined,
application_user: {...defaultAppUserStateModel()} as SolidifyAppUserStateModel,
});
return result;
}
......
......@@ -40,6 +40,12 @@ import {
SolidifyStateError,
} from "solidify-frontend";
export const defaultAppUserStateModel: () => AppUserStateModel = () =>
({
...defaultResourceLogoStateInitValue(),
queryParameters: new QueryParameters(environment.defaultEnumValuePageSizeOption),
});
export interface AppUserStateModel extends ResourceLogoStateModel<User> {
}
......@@ -47,8 +53,7 @@ export interface AppUserStateModel extends ResourceLogoStateModel<User> {
@State<AppUserStateModel>({
name: StateEnum.application_user,
defaults: {
...defaultResourceLogoStateInitValue(),
queryParameters: new QueryParameters(environment.defaultEnumValuePageSizeOption),
...defaultAppUserStateModel(),
},
})
export class AppUserState extends ResourceLogoState<AppUserStateModel, User> {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment