limitations under the License.
============LICENSE_END============================================
*/
+
import { Injectable } from '@angular/core';
import { Action, Store } from '@ngrx/store';
import { IBlueprint } from '../models/blueprint.model';
export const SET_BLUEPRINT = 'SET Blueprint';
export const REMOVE_BLUEPRINT = 'Remove Blueprint';
+export const SET_BLUEPRINT_STATE = 'SET Blueprint state';
+
export class LoadBlueprint implements Action {
readonly type = LOAD_BLUEPRINT;
constructor(public error: any) {}
}
+export class SetBlueprintState implements Action {
+ readonly type = SET_BLUEPRINT_STATE;
+ constructor(public payload: IBlueprintState) {}
+}
+
// export class SetBlueprint implements Action {
// readonly type = SET_BLUEPRINT;
// constructor(public payload: Blueprint) {}
constructor(public payload: IBlueprint) {}
}
-export type Actions = LoadBlueprint | LoadBlueprintSuccess | LoadBlueprintFailure;
\ No newline at end of file
+export type Actions = LoadBlueprint | LoadBlueprintSuccess | LoadBlueprintFailure | SetBlueprintState;
\ No newline at end of file
limitations under the License.
============LICENSE_END============================================
*/
-
import { IMetaData } from './metadata.model';
import { IImportModel } from './imports.model';
import { IBlueprint } from './blueprint.model';
export interface IBlueprintState {
blueprint: IBlueprint,
- isLoadSuccess: boolean;
- isUpdateSuccess: boolean;
- isSaveSuccess: boolean;
+ files?: any;
+ filesData?: any;
+ isLoadSuccess?: boolean;
+ isUpdateSuccess?: boolean;
+ isSaveSuccess?: boolean;
}
\ No newline at end of file
return {...state,
blueprint: action.payload
}
+ case BlueprintActions.SET_BLUEPRINT_STATE :
+ return {...state,
+ blueprint: action.payload.blueprint,
+ files: action.payload.files,
+ filesData: action.payload.filesData
+ }
default:
return state;
}