Add TaskProgressEvent
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
parent
ebe435027f
commit
d7ca1512bd
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user