Added deviceUpdateEvent
FarmMaps.Develop/FarmMapsLib/develop This commit looks good Details

pull/1/head
Willem Dantuma 2019-12-10 18:14:48 +01:00
parent 5d7fd63adc
commit 2e0b090fb7
2 changed files with 247 additions and 234 deletions

View File

@ -27,6 +27,8 @@ export const TASKSTARTEVENT = '[AppCommon] TaskStartEvent';
export const TASKENDEVENT = '[AppCommon] TaskEndEvent'; export const TASKENDEVENT = '[AppCommon] TaskEndEvent';
export const TASKERRORTEVENT = '[AppCommon] TaskErrorEvent'; export const TASKERRORTEVENT = '[AppCommon] TaskErrorEvent';
export const DEVICEUPDATEEVENT = '[AppCommon] DeviceUpdateEvent';
export const DELETEITEMS = '[AppCommon] DeleteItems'; export const DELETEITEMS = '[AppCommon] DeleteItems';
export const DELETEITEMSSUCCESS = '[AppCommon] DeleteItemsSuccess'; export const DELETEITEMSSUCCESS = '[AppCommon] DeleteItemsSuccess';
@ -164,6 +166,12 @@ export class TaskErrorEvent implements Action {
constructor(public itemCode: string, public attributes: any) { } constructor(public itemCode: string, public attributes: any) { }
} }
export class DeviceUpdateEvent implements Action {
readonly type = DEVICEUPDATEEVENT;
constructor(public itemCode: string, public attributes: any) { }
}
export class DeleteItems implements Action { export class DeleteItems implements Action {
readonly type = DELETEITEMS; readonly type = DELETEITEMS;
@ -231,4 +239,5 @@ export type Actions = OpenModal
| InitUserSuccess | InitUserSuccess
| TaskStartEvent | TaskStartEvent
| TaskEndEvent | TaskEndEvent
| TaskErrorEvent; | TaskErrorEvent
| DeviceUpdateEvent;

View File

@ -77,6 +77,10 @@ export class AppComponent implements OnInit, OnDestroy {
action = new commonActions.TaskErrorEvent(event.itemCode, event.attributes); action = new commonActions.TaskErrorEvent(event.itemCode, event.attributes);
break; break;
} }
case "deviceUpdate": {
action = new commonActions.DeviceUpdateEvent(event.itemCode, event.attributes);
break;
}
} }
return action; return action;
} }