Commit 45d2ac6f authored by François Agneray's avatar François Agneray
Browse files

Merge branch '4-conserver-l-etat-de-la-recherche-dans-les-steps' into 'develop'

Resolve "Conserver l'état de la recherche dans les steps"

Closes #4

See merge request !40
parents 08761abd d7c997c4
Pipeline #1354 passed with stages
in 7 minutes and 22 seconds
......@@ -4,11 +4,11 @@ import { environment } from '../environments/environment';
import * as fromRouter from '@ngrx/router-store';
export interface State {
routerReducer: fromRouter.RouterReducerState;
router: fromRouter.RouterReducerState;
}
export const reducers: ActionReducerMap<State> = {
routerReducer: fromRouter.routerReducer
router: fromRouter.routerReducer
};
export function logger(reducer: ActionReducer<State>): ActionReducer<State> {
......
......@@ -3,22 +3,22 @@ import { Action } from '@ngrx/store';
import { Login, LoginToken, ChangePassword, } from '../store/model';
import { AnisServerError } from '../../shared/model';
export const LOGIN_LOCAL_STORAGE = 'Login Anis User By Local Storage';
export const LOGIN_LOCAL_STORAGE_SUCCESS = 'Login Anis User By Local Storage Success';
export const LOGIN = 'Login Anis User';
export const LOGIN_SUCCESS = 'Login Anis User Success';
export const LOGIN_FAIL = 'Login Anis User Fail';
export const LOGOUT = 'Logout';
export const LOGOUT_SUCCESS = 'Logout Success';
export const REGISTER = 'Register Anis User';
export const REGISTER_SUCCESS = 'Register Anis User Success';
export const REGISTER_FAIL = 'Register Anis User Fail';
export const FORGOT_PASSWORD = 'Forgot Anis User Password';
export const FORGOT_PASSWORD_SUCCESS = 'Forgot Anis User Password Success';
export const FORGOT_PASSWORD_FAIL = 'Forgot Anis User Password Fail';
export const CHANGE_PASSWORD = 'Change Anis User Password';
export const CHANGE_PASSWORD_SUCCESS = 'Change Anis User Password Success';
export const CHANGE_PASSWORD_FAIL = 'Change Anis User Password Fail';
export const LOGIN_LOCAL_STORAGE = '[Login] Login Anis User By Local Storage';
export const LOGIN_LOCAL_STORAGE_SUCCESS = '[Login] Login Anis User By Local Storage Success';
export const LOGIN = '[Login] Login Anis User';
export const LOGIN_SUCCESS = '[Login] Login Anis User Success';
export const LOGIN_FAIL = '[Login] Login Anis User Fail';
export const LOGOUT = '[Login] Logout';
export const LOGOUT_SUCCESS = '[Login] Logout Success';
export const REGISTER = '[Login] Register Anis User';
export const REGISTER_SUCCESS = '[Login] Register Anis User Success';
export const REGISTER_FAIL = '[Login] Register Anis User Fail';
export const FORGOT_PASSWORD = '[Login] Forgot Anis User Password';
export const FORGOT_PASSWORD_SUCCESS = '[Login] Forgot Anis User Password Success';
export const FORGOT_PASSWORD_FAIL = '[Login] Forgot Anis User Password Fail';
export const CHANGE_PASSWORD = '[Login] Change Anis User Password';
export const CHANGE_PASSWORD_SUCCESS = '[Login] Change Anis User Password Success';
export const CHANGE_PASSWORD_FAIL = '[Login] Change Anis User Password Fail';
export class LoginLocalStorageAction implements Action {
type = LOGIN_LOCAL_STORAGE;
......
......@@ -33,7 +33,7 @@ export class LoginEffects {
if (loginToken) {
return new loginActions.LoginLocalStorageSuccessAction(loginToken);
} else {
return {type: 'No Action'};
return {type: '[Login] No Action'};
}
})
)
......
import { Action } from '@ngrx/store';
import { Attribute } from '../model';
export const LOAD_ATTRIBUTE_SEARCH_META = '[Attribute] Load Attribute Search Meta';
export const LOAD_ATTRIBUTE_SEARCH_META_SUCCESS = '[Attribute] Load Attribute Search Meta Success';
export const LOAD_ATTRIBUTE_SEARCH_META_FAIL = '[Attribute] Load Attribute Search Meta Fail';
export class LoadAttributeSearchMetaAction implements Action {
type = LOAD_ATTRIBUTE_SEARCH_META;
constructor(public payload: string) { }
}
export class LoadAttributeSearchMetaSuccessAction implements Action {
type = LOAD_ATTRIBUTE_SEARCH_META_SUCCESS;
constructor(public payload: Attribute[]) { }
}
export class LoadAttributeSearchMetaFailAction implements Action {
type = LOAD_ATTRIBUTE_SEARCH_META_FAIL;
constructor(public payload: {} = null) { }
}
export type Actions
= LoadAttributeSearchMetaAction
| LoadAttributeSearchMetaSuccessAction
| LoadAttributeSearchMetaFailAction;
import { Action } from '@ngrx/store';
import { Family, Attribute } from '../model';
import { Family } from '../model';
export const LOAD_CRITERIA_FAMILY_LIST = 'Load Criteria Family List';
export const LOAD_CRITERIA_FAMILY_LIST_SUCCESS = 'Load Criteria Family List Success';
export const LOAD_CRITERIA_FAMILY_LIST_FAILED = 'Load Criteria Family List Failed';
export const LOAD_DATASET_ATTRIBUTE_LIST = 'Load Dataset Attribute List';
export const LOAD_DATASET_ATTRIBUTE_LIST_SUCCESS = 'Load Dataset Attribute List Success';
export const LOAD_DATASET_ATTRIBUTE_LIST_FAILED = 'Load Dataset Attribute List Failed';
export const LOAD_DATASET_CRITERIA_FAMILY = 'Load Dataset Criteria Family';
export const LOAD_ATTRIBUTE_OPTION_LIST = 'Load Attribute Option List';
export const LOAD_ATTRIBUTE_OPTION_LIST_SUCCESS = 'Load Attribute Option List Success';
export const LOAD_ATTRIBUTE_OPTION_LIST_FAILED = 'Load Attribute Option List Failed';
export const LOAD_CRITERIA_SEARCH_META = '[Criteria] Load Criteria Search Meta';
export const LOAD_CRITERIA_SEARCH_META_WIP = '[Criteria] Load Criteria Search Meta WIP';
export const LOAD_CRITERIA_SEARCH_META_SUCCESS = '[Criteria] Load Criteria Search Meta Success';
export const LOAD_CRITERIA_SEARCH_META_FAIL = '[Criteria] Load Criteria Search Meta Fail';
export class LoadCriteriaFamilyListAction implements Action {
type = LOAD_CRITERIA_FAMILY_LIST;
export class LoadCriteriaSearchMetaAction implements Action {
type = LOAD_CRITERIA_SEARCH_META;
constructor(public payload: {} = null) { }
}
export class LoadCriteriaFamilyListSuccessAction implements Action {
type = LOAD_CRITERIA_FAMILY_LIST_SUCCESS;
constructor(public payload: Family[]) { }
}
export class LoadCriteriaFamilyListFailedAction implements Action {
type = LOAD_CRITERIA_FAMILY_LIST_FAILED;
export class LoadCriteriaSearchMetaWipAction implements Action {
type = LOAD_CRITERIA_SEARCH_META_WIP;
constructor(public payload: {} = null) { }
}
export class LoadDatasetAttributeListAction implements Action {
type = LOAD_DATASET_ATTRIBUTE_LIST;
constructor(public payload: string) { }
}
export class LoadCriteriaSearchMetaSuccessAction implements Action {
type = LOAD_CRITERIA_SEARCH_META_SUCCESS;
export class LoadDatasetAttributeListSuccessAction implements Action {
type = LOAD_DATASET_ATTRIBUTE_LIST_SUCCESS;
constructor(public payload: Attribute[]) { }
constructor(public payload: Family[]) { }
}
export class LoadDatasetAttributeListFailedAction implements Action {
type = LOAD_DATASET_ATTRIBUTE_LIST_FAILED;
export class LoadCriteriaSearchMetaFailAction implements Action {
type = LOAD_CRITERIA_SEARCH_META_FAIL;
constructor(public payload: {} = null) { }
}
export class LoadDatasetCriteriaFamilyAction implements Action {
type = LOAD_DATASET_CRITERIA_FAMILY;
constructor(public payload: string) { }
}
export type Actions
= LoadCriteriaFamilyListAction
| LoadCriteriaFamilyListSuccessAction
| LoadCriteriaFamilyListFailedAction
| LoadDatasetAttributeListAction
| LoadDatasetAttributeListSuccessAction
| LoadDatasetAttributeListFailedAction
| LoadDatasetCriteriaFamilyAction;
= LoadCriteriaSearchMetaAction
| LoadCriteriaSearchMetaWipAction
| LoadCriteriaSearchMetaSuccessAction
| LoadCriteriaSearchMetaFailAction;
......@@ -2,10 +2,10 @@ import { Action } from '@ngrx/store';
import { Dataset, Project, Family } from '../model';
export const LOAD_DATASET_SEARCH_META = 'Load Dataset Search Meta';
export const LOAD_DATASET_SEARCH_META_WIP = 'Load Dataset Search Meta WIP';
export const LOAD_DATASET_SEARCH_META_SUCCESS = 'Load Dataset Search Meta Success';
export const LOAD_DATASET_SEARCH_META_FAIL = 'Load Dataset Search Meta Fail';
export const LOAD_DATASET_SEARCH_META = '[Dataset] Load Dataset Search Meta';
export const LOAD_DATASET_SEARCH_META_WIP = '[Dataset] Load Dataset Search Meta WIP';
export const LOAD_DATASET_SEARCH_META_SUCCESS = '[Dataset] Load Dataset Search Meta Success';
export const LOAD_DATASET_SEARCH_META_FAIL = '[Dataset] Load Dataset Search Meta Fail';
export class LoadDatasetSearchMetaAction implements Action {
type = LOAD_DATASET_SEARCH_META;
......@@ -33,5 +33,6 @@ export class LoadDatasetSearchMetaFailAction implements Action {
export type Actions
= LoadDatasetSearchMetaAction
| LoadDatasetSearchMetaWipAction
| LoadDatasetSearchMetaSuccessAction
| LoadDatasetSearchMetaFailAction;
......@@ -2,61 +2,37 @@ import { Action } from '@ngrx/store';
import { Family, Category } from '../model';
export const LOAD_OUTPUT_FAMILY_LIST = 'Load Output Family List';
export const LOAD_OUTPUT_FAMILY_LIST_SUCCESS = 'Load Output Family List Success';
export const LOAD_OUTPUT_FAMILY_LIST_FAILED = 'Load Output Family List Failed';
export const LOAD_CATEGORY_LIST = 'Load Category List';
export const LOAD_CATEGORY_LIST_SUCCESS = 'Load Category List Success';
export const LOAD_CATEGORY_LIST_FAILED = 'Load Category List Failed';
export const LOAD_DATASET_OUTPUT_FAMILY = 'Load Dataset Output Family';
export const LOAD_OUTPUT_SEARCH_META = '[Output] Load Output Search Meta';
export const LOAD_OUTPUT_SEARCH_META_WIP = '[Output] Load Output Search Meta WIP';
export const LOAD_OUTPUT_SEARCH_META_SUCCESS = '[Output] Load Output Search Meta Success';
export const LOAD_OUTPUT_SEARCH_META_FAIL = '[Output] Load Output Search Meta Fail';
export class LoadOutputFamilyListAction implements Action {
type = LOAD_OUTPUT_FAMILY_LIST;
export class LoadOutputSearchMetaAction implements Action {
type = LOAD_OUTPUT_SEARCH_META;
constructor(public payload: {} = null) { }
}
export class LoadOutputFamilyListSuccessAction implements Action {
type = LOAD_OUTPUT_FAMILY_LIST_SUCCESS;
constructor(public payload: Family[]) { }
}
export class LoadOutputFamilyListFailedAction implements Action {
type = LOAD_OUTPUT_FAMILY_LIST_FAILED;
constructor(public payload: {} = null) { }
}
export class LoadCategoryListAction implements Action {
type = LOAD_CATEGORY_LIST;
export class LoadOutputSearchMetaWipAction implements Action {
type = LOAD_OUTPUT_SEARCH_META_WIP;
constructor(public payload: {} = null) { }
}
export class LoadCategoryListSuccessAction implements Action {
type = LOAD_CATEGORY_LIST_SUCCESS;
export class LoadOutputSearchMetaSuccessAction implements Action {
type = LOAD_OUTPUT_SEARCH_META_SUCCESS;
constructor(public payload: Category[]) { }
constructor(public payload: [Family[], Category[]]) { }
}
export class LoadCategoryListFailedAction implements Action {
type = LOAD_CATEGORY_LIST_FAILED;
export class LoadOutputSearchMetaFailAction implements Action {
type = LOAD_OUTPUT_SEARCH_META_FAIL;
constructor(public payload: {} = null) { }
}
export class LoadDatasetOutputFamilyAction implements Action {
type = LOAD_DATASET_OUTPUT_FAMILY;
constructor(public payload: string) { }
}
export type Actions
= LoadOutputFamilyListAction
| LoadOutputFamilyListSuccessAction
| LoadOutputFamilyListFailedAction
| LoadCategoryListAction
| LoadCategoryListSuccessAction
| LoadCategoryListFailedAction
| LoadDatasetOutputFamilyAction;
= LoadOutputSearchMetaAction
| LoadOutputSearchMetaWipAction
| LoadOutputSearchMetaSuccessAction
| LoadOutputSearchMetaFailAction;
import { Injectable } from '@angular/core';
import { ToastrService } from 'ngx-toastr';
import { Effect, Actions, ofType } from '@ngrx/effects';
import { Store } from '@ngrx/store';
import { of } from 'rxjs';
import { withLatestFrom, switchMap, map, catchError, tap } from 'rxjs/operators';
import { Attribute } from '../model';
import * as attributeActions from '../action/attribute.action';
import * as fromMetamodel from '../reducers';
import { AttributeService } from '../services/attribute.service';
@Injectable()
export class AttributeEffects {
constructor(
private actions$: Actions,
private attributeService: AttributeService,
private toastr: ToastrService,
private store$: Store<{ metamodel: fromMetamodel.State }>
) { }
@Effect()
loadAttributeSearchMetaAction$ = this.actions$.pipe(
ofType(attributeActions.LOAD_ATTRIBUTE_SEARCH_META),
switchMap((action: attributeActions.LoadAttributeSearchMetaAction) =>
this.attributeService.retrieveAttributeSearchMeta(action.payload).pipe(
map((attributeList: Attribute[]) =>
new attributeActions.LoadAttributeSearchMetaSuccessAction(attributeList)),
catchError(() => of(new attributeActions.LoadAttributeSearchMetaFailAction()))
)
)
);
@Effect({ dispatch: false })
loadAttributeSearchMetaFailedAction$ = this.actions$.pipe(
ofType(attributeActions.LOAD_ATTRIBUTE_SEARCH_META_FAIL),
tap(_ => this.toastr.error('Loading Failed!', 'Attribute search info loading failed'))
);
}
......@@ -2,58 +2,52 @@ import { Injectable } from '@angular/core';
import { ToastrService } from 'ngx-toastr';
import { Effect, Actions, ofType } from '@ngrx/effects';
import { Store } from '@ngrx/store';
import { of } from 'rxjs';
import { switchMap, map, tap, catchError } from 'rxjs/operators';
import { withLatestFrom, switchMap, map, tap, catchError } from 'rxjs/operators';
import { Family, Attribute } from '../model';
import { CriteriaService } from '../services/criteria.service';
import { Family } from '../model';
import * as criteriaActions from '../action/criteria.action';
import * as fromMetamodel from '../reducers';
import { CriteriaService } from '../services/criteria.service';
@Injectable()
export class CriteriaEffects {
constructor(
private actions$: Actions,
private criteriaService: CriteriaService,
private toastr: ToastrService
private toastr: ToastrService,
private store$: Store<{ metamodel: fromMetamodel.State }>
) { }
@Effect()
loadCriteriaFamilyListAction$ = this.actions$.pipe(
ofType(criteriaActions.LOAD_CRITERIA_FAMILY_LIST),
switchMap(() =>
this.criteriaService.retrieveCriteriaFamilyList().pipe(
map((criteriaFamilyList: Family[]) => new criteriaActions.LoadCriteriaFamilyListSuccessAction(criteriaFamilyList)),
catchError(() => of(new criteriaActions.LoadCriteriaFamilyListFailedAction()))
)
)
);
@Effect({ dispatch: false })
loadCriteriaFamilyListFailedAction$ = this.actions$.pipe(
ofType(criteriaActions.LOAD_CRITERIA_FAMILY_LIST_FAILED),
tap(_ => this.toastr.error('Loading Failed!', 'The criteria family list loading failed'))
loadCriteriaSearchMetaAction$ = this.actions$.pipe(
ofType(criteriaActions.LOAD_CRITERIA_SEARCH_META),
withLatestFrom(this.store$),
switchMap(([action, state]) => {
if (state.metamodel.criteria.criteriaSearchMetaIsLoaded) {
return of({ type: '[No Action] [Criteria] Criteria search meta is already loaded' });
} else {
return of(new criteriaActions.LoadCriteriaSearchMetaWipAction())
}
})
);
@Effect()
loadDatasetAttributeListAction$ = this.actions$.pipe(
ofType(criteriaActions.LOAD_DATASET_ATTRIBUTE_LIST),
switchMap((action: criteriaActions.LoadDatasetAttributeListAction) =>
this.criteriaService.retrieveAttributeList(action.payload).pipe(
map((datasetAttributeList: Attribute[]) => new criteriaActions.LoadDatasetAttributeListSuccessAction(datasetAttributeList)),
catchError(() => of(new criteriaActions.LoadDatasetAttributeListFailedAction()))
loadCriteriaSearchMetaWipAction$ = this.actions$.pipe(
ofType(criteriaActions.LOAD_CRITERIA_SEARCH_META_WIP),
switchMap(_ =>
this.criteriaService.retrieveCriteriaSearchMeta().pipe(
map((datasetSearchMeta: Family[]) =>
new criteriaActions.LoadCriteriaSearchMetaSuccessAction(datasetSearchMeta)),
catchError(() => of(new criteriaActions.LoadCriteriaSearchMetaFailAction()))
)
)
);
@Effect({ dispatch: false })
loadDatasetAttributeListFailedAction$ = this.actions$.pipe(
ofType(criteriaActions.LOAD_DATASET_ATTRIBUTE_LIST_FAILED),
tap(_ => this.toastr.error('Loading Failed!', 'The dataset attribute list loading failed'))
);
@Effect({ dispatch: false })
loadAttributeOptionListFailedAction$ = this.actions$.pipe(
ofType(criteriaActions.LOAD_ATTRIBUTE_OPTION_LIST_FAILED),
tap(_ => this.toastr.error('Loading Failed!', 'The attribute option list loading failed'))
loadCriteriaSearchMetaFailedAction$ = this.actions$.pipe(
ofType(criteriaActions.LOAD_CRITERIA_SEARCH_META_FAIL),
tap(_ => this.toastr.error('Loading Failed!', 'Criteria search info loading failed'))
);
}
......@@ -2,8 +2,8 @@ import { Injectable } from '@angular/core';
import { ToastrService } from 'ngx-toastr';
import { Effect, Actions, ofType } from '@ngrx/effects';
import { of } from 'rxjs';
import { Store } from '@ngrx/store';
import { of } from 'rxjs';
import { withLatestFrom, switchMap, map, catchError, tap } from 'rxjs/operators';
import { Project, Dataset, Family } from '../model';
......@@ -13,41 +13,41 @@ import { DatasetService } from '../services/dataset.service';
@Injectable()
export class DatasetEffects {
constructor(
private actions$: Actions,
private datasetService: DatasetService,
private toastr: ToastrService,
private store$: Store<{ metamodel: fromMetamodel.State }>
) { }
constructor(
private actions$: Actions,
private datasetService: DatasetService,
private toastr: ToastrService,
private store$: Store<{ metamodel: fromMetamodel.State }>
) { }
@Effect()
loadDatasetSearchMetaAction$ = this.actions$.pipe(
ofType(datasetActions.LOAD_DATASET_SEARCH_META),
withLatestFrom(this.store$),
switchMap(([action, state]) => {
if (state.metamodel.dataset.datasetSearchMetaIsLoaded) {
return of({ type: 'Dataset search meta is already loaded' });
} else {
return of(new datasetActions.LoadDatasetSearchMetaWipAction())
}
})
);
@Effect()
loadDatasetSearchMetaAction$ = this.actions$.pipe(
ofType(datasetActions.LOAD_DATASET_SEARCH_META),
withLatestFrom(this.store$),
switchMap(([action, state]) => {
if (state.metamodel.dataset.datasetSearchMetaIsLoaded) {
return of({ type: '[No Action] [Dataset] Dataset search meta is already loaded' });
} else {
return of(new datasetActions.LoadDatasetSearchMetaWipAction())
}
})
);
@Effect()
loadDatasetSearchMetaWipAction$ = this.actions$.pipe(
ofType(datasetActions.LOAD_DATASET_SEARCH_META_WIP),
switchMap(_ =>
this.datasetService.retrieveDatasetSearchMeta().pipe(
map((datasetSearchMeta: [Project[], Dataset[], Family[]]) =>
new datasetActions.LoadDatasetSearchMetaSuccessAction(datasetSearchMeta)),
catchError(() => of(new datasetActions.LoadDatasetSearchMetaFailAction()))
)
)
);
@Effect()
loadDatasetSearchMetaWipAction$ = this.actions$.pipe(
ofType(datasetActions.LOAD_DATASET_SEARCH_META_WIP),
switchMap(_ =>
this.datasetService.retrieveDatasetSearchMeta().pipe(
map((datasetSearchMeta: [Project[], Dataset[], Family[]]) =>
new datasetActions.LoadDatasetSearchMetaSuccessAction(datasetSearchMeta)),
catchError(() => of(new datasetActions.LoadDatasetSearchMetaFailAction()))
)
)
);
@Effect({ dispatch: false })
loadDatasetSearchMetaFailedAction$ = this.actions$.pipe(
ofType(datasetActions.LOAD_DATASET_SEARCH_META_FAIL),
tap(_ => this.toastr.error('Loading Failed!', 'Dataset search info loading failed'))
);
@Effect({ dispatch: false })
loadDatasetSearchMetaFailedAction$ = this.actions$.pipe(
ofType(datasetActions.LOAD_DATASET_SEARCH_META_FAIL),
tap(_ => this.toastr.error('Loading Failed!', 'Dataset search info loading failed'))
);
}
import { AttributeEffects } from './attribute.effects';
import { DatasetEffects } from './dataset.effects';
import { CriteriaEffects } from './criteria.effects';
import { OutputEffects } from './output.effects';
export const effects = [
AttributeEffects,
DatasetEffects,
CriteriaEffects,
OutputEffects
......
......@@ -2,11 +2,13 @@ import { Injectable } from '@angular/core';
import { ToastrService } from 'ngx-toastr';
import { Effect, Actions, ofType } from '@ngrx/effects';
import { Store } from '@ngrx/store';
import { of } from 'rxjs';
import { switchMap, map, catchError, tap } from 'rxjs/operators';
import { withLatestFrom, switchMap, map, catchError, tap } from 'rxjs/operators';
import { Family, Category } from '../model';
import * as outputActions from '../action/output.action';
import * as fromMetamodel from '../reducers';
import { OutputService } from '../services/output.service';
@Injectable()
......@@ -14,41 +16,38 @@ export class OutputEffects {
constructor(
private actions$: Actions,
private outputService: OutputService,
private toastr: ToastrService
private toastr: ToastrService,
private store$: Store<{ metamodel: fromMetamodel.State }>
) { }
@Effect()
loadOutputFamilyListAction$ = this.actions$.pipe(
ofType(outputActions.LOAD_OUTPUT_FAMILY_LIST),
switchMap(() =>
this.outputService.retrieveOutputFamilyList().pipe(
map((outputFamilyList: Family[]) => new outputActions.LoadOutputFamilyListSuccessAction(outputFamilyList)),
catchError(() => of(new outputActions.LoadOutputFamilyListFailedAction()))
)
)
);
@Effect({ dispatch: false })
loadOutputFamilyListFailedAction$ = this.actions$.pipe(
ofType(outputActions.LOAD_OUTPUT_FAMILY_LIST_FAILED),
tap(_ => this.toastr.error('Loading Failed!', 'The output family list loading failed'))
loadOutputSearchMetaAction$ = this.actions$.pipe(
ofType(outputActions.LOAD_OUTPUT_SEARCH_META),
withLatestFrom(this.store$),
switchMap(([action, state]) => {
if (state.metamodel.output.outputSearchMetaIsLoaded) {
return of({ type: '[No Action] [Output] Output search meta is already loaded' });
} else {
return of(new outputActions.LoadOutputSearchMetaWipAction())
}
})
);
@Effect()
loadCategoryListAction$ = this.actions$.pipe(
ofType(outputActions.LOAD_CATEGORY_LIST),
switchMap(() =>
this.outputService.retrieveCategoryList().pipe(
map((categoryList: Category[]) => new outputActions.LoadCategoryListSuccessAction(categoryList)),
catchError(() => of(new outputActions.LoadCategoryListFailedAction()))
loadOutputSearchMetaWipAction$ = this.actions$.pipe(
ofType(outputActions.LOAD_OUTPUT_SEARCH_META_WIP),
switchMap(_ =>
this.outputService.retrieveOutputSearchMeta().pipe(
map((outputSearchMeta: [Family[], Category[]]) =>
new outputActions.LoadOutputSearchMetaSuccessAction(outputSearchMeta)),
catchError(() => of(new outputActions.LoadOutputSearchMetaFailAction()))
)
)
);
@Effect({ dispatch: false })
loadCategoryListFailedAction$ = this.actions$.pipe(