bug fixed
This commit is contained in:
parent
cc973df61b
commit
638f41d26f
6
package-lock.json
generated
6
package-lock.json
generated
|
@ -1926,9 +1926,9 @@
|
||||||
"integrity": "sha512-JnILmpoqUc8zQKZqbucBJ2H68y3Oy7HB4h/Ax6bq4Ctqxk6qaA2/Eda65WTS8L4EresYdVGW07AR4Z0p0XLIzg=="
|
"integrity": "sha512-JnILmpoqUc8zQKZqbucBJ2H68y3Oy7HB4h/Ax6bq4Ctqxk6qaA2/Eda65WTS8L4EresYdVGW07AR4Z0p0XLIzg=="
|
||||||
},
|
},
|
||||||
"@ucap/ng-store-authentication": {
|
"@ucap/ng-store-authentication": {
|
||||||
"version": "0.0.6",
|
"version": "0.0.7",
|
||||||
"resolved": "http://10.81.13.221:8081/nexus/repository/npm-all/@ucap/ng-store-authentication/-/ng-store-authentication-0.0.6.tgz",
|
"resolved": "http://10.81.13.221:8081/nexus/repository/npm-all/@ucap/ng-store-authentication/-/ng-store-authentication-0.0.7.tgz",
|
||||||
"integrity": "sha512-qP3+rsni/z/JOTR/VPjH+09buvHphJc4IHMSS+HlAFvJPeLcWXWChANzpUG3tWNxEbrh8GhaOlzYkGyqBJTVLA=="
|
"integrity": "sha512-6IxxjFYpmN3xC2zIix9BfXbHHKpZeeS09SlT7RujMGt58CPyLnWkCFa/a4NILYQpUaXwQn+CmB1o8nhaZvwMNw=="
|
||||||
},
|
},
|
||||||
"@ucap/ng-store-chat": {
|
"@ucap/ng-store-chat": {
|
||||||
"version": "0.0.4",
|
"version": "0.0.4",
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
"@ucap/ng-protocol-status": "~0.0.2",
|
"@ucap/ng-protocol-status": "~0.0.2",
|
||||||
"@ucap/ng-protocol-sync": "~0.0.2",
|
"@ucap/ng-protocol-sync": "~0.0.2",
|
||||||
"@ucap/ng-protocol-umg": "~0.0.2",
|
"@ucap/ng-protocol-umg": "~0.0.2",
|
||||||
"@ucap/ng-store-authentication": "~0.0.6",
|
"@ucap/ng-store-authentication": "~0.0.7",
|
||||||
"@ucap/ng-store-chat": "~0.0.4",
|
"@ucap/ng-store-chat": "~0.0.4",
|
||||||
"@ucap/ng-store-group": "~0.0.5",
|
"@ucap/ng-store-group": "~0.0.5",
|
||||||
"@ucap/ng-store-organization": "~0.0.3",
|
"@ucap/ng-store-organization": "~0.0.3",
|
||||||
|
|
|
@ -25,7 +25,10 @@ import { QueryProtocolService } from '@ucap/ng-protocol-query';
|
||||||
import { OptionProtocolService } from '@ucap/ng-protocol-option';
|
import { OptionProtocolService } from '@ucap/ng-protocol-option';
|
||||||
|
|
||||||
import { CompanyActions } from '@ucap/ng-store-organization';
|
import { CompanyActions } from '@ucap/ng-store-organization';
|
||||||
import { LoginActions } from '@ucap/ng-store-authentication';
|
import {
|
||||||
|
ConfigurationActions,
|
||||||
|
LoginActions
|
||||||
|
} from '@ucap/ng-store-authentication';
|
||||||
|
|
||||||
import { LoginSession } from '@app/models/login-session';
|
import { LoginSession } from '@app/models/login-session';
|
||||||
import { AppKey } from '@app/types/app-key.type';
|
import { AppKey } from '@app/types/app-key.type';
|
||||||
|
@ -100,7 +103,7 @@ export class AppAuthenticationResolver implements Resolve<void> {
|
||||||
) {
|
) {
|
||||||
if (StatusCode.Fail === versionInfo2Res.statusCode) {
|
if (StatusCode.Fail === versionInfo2Res.statusCode) {
|
||||||
this.store.dispatch(
|
this.store.dispatch(
|
||||||
AppActions.versionInfo2Failure({
|
ConfigurationActions.versionInfo2Failure({
|
||||||
error: versionInfo2Res.errorMessage
|
error: versionInfo2Res.errorMessage
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
@ -110,7 +113,7 @@ export class AppAuthenticationResolver implements Resolve<void> {
|
||||||
|
|
||||||
if (StatusCode.Fail === urlInfoRes.statusCode) {
|
if (StatusCode.Fail === urlInfoRes.statusCode) {
|
||||||
this.store.dispatch(
|
this.store.dispatch(
|
||||||
AppActions.urlInfoFailure({
|
ConfigurationActions.urlInfoFailure({
|
||||||
error: urlInfoRes.errorMessage
|
error: urlInfoRes.errorMessage
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
@ -122,13 +125,13 @@ export class AppAuthenticationResolver implements Resolve<void> {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.store.dispatch(
|
this.store.dispatch(
|
||||||
AppActions.versionInfo2Success({
|
ConfigurationActions.versionInfo2Success({
|
||||||
res: versionInfo2Res
|
res: versionInfo2Res
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
this.store.dispatch(
|
this.store.dispatch(
|
||||||
AppActions.urlInfoSuccess({
|
ConfigurationActions.urlInfoSuccess({
|
||||||
res: urlInfoRes
|
res: urlInfoRes
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,34 +1,3 @@
|
||||||
import { createAction, props } from '@ngrx/store';
|
import { createAction, props } from '@ngrx/store';
|
||||||
|
|
||||||
import { VersionInfo2Response, VersionInfo2Request } from '@ucap/api-public';
|
export const init = createAction('[ucap::LG::app] init');
|
||||||
import { UrlInfoRequest, UrlInfoResponse } from '@ucap/api-external';
|
|
||||||
|
|
||||||
export const versionInfo2 = createAction(
|
|
||||||
'[ucap::app::app] versionInfo2',
|
|
||||||
props<{ req: VersionInfo2Request }>()
|
|
||||||
);
|
|
||||||
|
|
||||||
export const versionInfo2Success = createAction(
|
|
||||||
'[ucap::app::app] versionInfo2 Success',
|
|
||||||
props<{ res: VersionInfo2Response }>()
|
|
||||||
);
|
|
||||||
|
|
||||||
export const versionInfo2Failure = createAction(
|
|
||||||
'[ucap::app::app] versionInfo2 Failure',
|
|
||||||
props<{ error: any }>()
|
|
||||||
);
|
|
||||||
|
|
||||||
export const urlInfo = createAction(
|
|
||||||
'[ucap::app::app] urlInfo',
|
|
||||||
props<{ req: UrlInfoRequest }>()
|
|
||||||
);
|
|
||||||
|
|
||||||
export const urlInfoSuccess = createAction(
|
|
||||||
'[ucap::app::app] urlInfo Success',
|
|
||||||
props<{ res: UrlInfoResponse }>()
|
|
||||||
);
|
|
||||||
|
|
||||||
export const urlInfoFailure = createAction(
|
|
||||||
'[ucap::app::app] urlInfo Failure',
|
|
||||||
props<{ error: any }>()
|
|
||||||
);
|
|
||||||
|
|
|
@ -1,25 +1,4 @@
|
||||||
import { createReducer, on } from '@ngrx/store';
|
import { createReducer, on } from '@ngrx/store';
|
||||||
import { initialState } from './state';
|
import { initialState } from './state';
|
||||||
import { versionInfo2Success, urlInfoSuccess } from './actions';
|
|
||||||
|
|
||||||
export const reducer = createReducer(
|
export const reducer = createReducer(initialState);
|
||||||
initialState,
|
|
||||||
on(versionInfo2Success, (state, action) => {
|
|
||||||
return {
|
|
||||||
...state,
|
|
||||||
versionInfo2Response: {
|
|
||||||
...state.versionInfo2Response,
|
|
||||||
...action.res
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}),
|
|
||||||
on(urlInfoSuccess, (state, action) => {
|
|
||||||
return {
|
|
||||||
...state,
|
|
||||||
urlInfoResponse: {
|
|
||||||
...state.urlInfoResponse,
|
|
||||||
...action.res
|
|
||||||
}
|
|
||||||
};
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
|
@ -1,27 +1,9 @@
|
||||||
import { Selector, createSelector } from '@ngrx/store';
|
import { Selector, createSelector } from '@ngrx/store';
|
||||||
|
|
||||||
import { VersionInfo2Response } from '@ucap/api-public';
|
export interface State {}
|
||||||
import { UrlInfoResponse } from '@ucap/api-external';
|
|
||||||
|
|
||||||
export interface State {
|
export const initialState: State = {};
|
||||||
versionInfo2Response: VersionInfo2Response | null;
|
|
||||||
urlInfoResponse: UrlInfoResponse | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const initialState: State = {
|
|
||||||
versionInfo2Response: null,
|
|
||||||
urlInfoResponse: null
|
|
||||||
};
|
|
||||||
|
|
||||||
export function selectors<S>(selector: Selector<any, State>) {
|
export function selectors<S>(selector: Selector<any, State>) {
|
||||||
return {
|
return {};
|
||||||
versionInfo2Response: createSelector(
|
|
||||||
selector,
|
|
||||||
(state: State) => state.versionInfo2Response
|
|
||||||
),
|
|
||||||
urlInfoResponse: createSelector(
|
|
||||||
selector,
|
|
||||||
(state: State) => state.urlInfoResponse
|
|
||||||
)
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { Type } from '@angular/core';
|
import { Type } from '@angular/core';
|
||||||
|
|
||||||
import { Effects as AuthenticationEffects } from './authentication/effects';
|
import { Effects as AppEffects } from './app/effects';
|
||||||
|
import { Effects as AppAuthenticationEffects } from './authentication/effects';
|
||||||
|
|
||||||
export const effects: Type<any>[] = [AuthenticationEffects];
|
export const effects: Type<any>[] = [AppEffects, AppAuthenticationEffects];
|
||||||
|
|
|
@ -1,17 +1,19 @@
|
||||||
import { InjectionToken } from '@angular/core';
|
import { InjectionToken } from '@angular/core';
|
||||||
|
|
||||||
import { combineReducers, Action, ActionReducerMap } from '@ngrx/store';
|
import { Action, ActionReducerMap } from '@ngrx/store';
|
||||||
import * as fromRouter from '@ngrx/router-store';
|
import * as fromRouter from '@ngrx/router-store';
|
||||||
|
|
||||||
import { State } from './state';
|
import { State } from './state';
|
||||||
|
|
||||||
import { reducer as authenticationReducer } from './authentication/reducers';
|
import { reducer as appReducer } from './app/reducers';
|
||||||
|
import { reducer as appAuthenticationReducer } from './authentication/reducers';
|
||||||
|
|
||||||
export const ROOT_REDUCERS = new InjectionToken<
|
export const ROOT_REDUCERS = new InjectionToken<
|
||||||
ActionReducerMap<State, Action>
|
ActionReducerMap<State, Action>
|
||||||
>('Root reducers token', {
|
>('Root reducers token', {
|
||||||
factory: () => ({
|
factory: () => ({
|
||||||
appRouter: fromRouter.routerReducer,
|
appRouter: fromRouter.routerReducer,
|
||||||
appAuthentication: authenticationReducer
|
app: appReducer,
|
||||||
|
appAuthentication: appAuthenticationReducer
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
|
@ -8,11 +8,13 @@ import * as fromRouter from '@ngrx/router-store';
|
||||||
|
|
||||||
import { environment } from '@environments';
|
import { environment } from '@environments';
|
||||||
|
|
||||||
import { State as AuthenticationState } from './authentication/state';
|
import { State as AppState } from './app/state';
|
||||||
|
import { State as AppAuthenticationState } from './authentication/state';
|
||||||
|
|
||||||
export interface State {
|
export interface State {
|
||||||
appRouter: fromRouter.RouterReducerState<any>;
|
appRouter: fromRouter.RouterReducerState<any>;
|
||||||
appAuthentication: AuthenticationState;
|
app: AppState;
|
||||||
|
appAuthentication: AppAuthenticationState;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const metaReducers: MetaReducer<State>[] = !environment.production
|
export const metaReducers: MetaReducer<State>[] = !environment.production
|
||||||
|
|
Loading…
Reference in New Issue
Block a user