diff --git a/projects/common/src/fm/actions/app-common.actions.ts b/projects/common/src/fm/actions/app-common.actions.ts index eeb4fa9..5198e54 100644 --- a/projects/common/src/fm/actions/app-common.actions.ts +++ b/projects/common/src/fm/actions/app-common.actions.ts @@ -31,7 +31,8 @@ export const ITEMDELETEDEVENT = '[AppCommon] ItemDeletedEvent'; export const TASKSTARTEVENT = '[AppCommon] TaskStartEvent'; export const TASKENDEVENT = '[AppCommon] TaskEndEvent'; -export const TASKERRORTEVENT = '[AppCommon] TaskErrorEvent'; +export const TASKERROREVENT = '[AppCommon] TaskErrorEvent'; +export const TASKPROGRESSEVENT = '[AppCommon] TaskProgressEvent'; export const DEVICEUPDATEEVENT = '[AppCommon] DeviceUpdateEvent'; @@ -195,7 +196,13 @@ export class TaskEndEvent implements Action { } export class TaskErrorEvent implements Action { - readonly type = TASKERRORTEVENT; + readonly type = TASKERROREVENT; + + constructor(public itemCode: string, public attributes: any) { } +} + +export class TaskProgressEvent implements Action { + readonly type = TASKPROGRESSEVENT; constructor(public itemCode: string, public attributes: any) { } } @@ -304,6 +311,7 @@ export type Actions = OpenModal | TaskStartEvent | TaskEndEvent | TaskErrorEvent + | TaskProgressEvent | DeviceUpdateEvent | ToggleMenu | SetMenuVisible diff --git a/projects/common/src/fm/components/app/app.component.ts b/projects/common/src/fm/components/app/app.component.ts index 3d4abc1..027d4ae 100644 --- a/projects/common/src/fm/components/app/app.component.ts +++ b/projects/common/src/fm/components/app/app.component.ts @@ -91,6 +91,10 @@ export class AppComponent implements OnInit, OnDestroy { action = new commonActions.TaskErrorEvent(event.itemCode, event.attributes); break; } + case "taskProgress": { + action = new commonActions.TaskProgressEvent(event.itemCode, event.attributes); + break; + } case "deviceUpdate": { action = new commonActions.DeviceUpdateEvent(event.itemCode, event.attributes); break;