Compare commits
2 Commits
0da2167591
...
8db1edb262
Author | SHA1 | Date | |
---|---|---|---|
8db1edb262 | |||
e279c04e62 |
@ -2,13 +2,21 @@
|
|||||||
export interface IItemTask {
|
export interface IItemTask {
|
||||||
code?: string;
|
code?: string;
|
||||||
taskType?: string;
|
taskType?: string;
|
||||||
attributes?:any
|
attributes?: any;
|
||||||
|
message?: string,
|
||||||
|
state?: number,
|
||||||
|
started?: Date,
|
||||||
|
finished?: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ItemTask implements IItemTask {
|
export class ItemTask implements IItemTask {
|
||||||
public code?:string;
|
public code?:string;
|
||||||
public taskType?: string;
|
public taskType?: string;
|
||||||
public attributes?: any;
|
public attributes?: any;
|
||||||
|
public message?: string;
|
||||||
|
public state?: number;
|
||||||
|
public started?: Date;
|
||||||
|
public finished?: Date;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
}
|
}
|
||||||
|
@ -148,5 +148,9 @@ export class ItemService {
|
|||||||
postItemTask(item: IItem, task: IItemTask): Observable<IItemTask> {
|
postItemTask(item: IItem, task: IItemTask): Observable<IItemTask> {
|
||||||
return this.httpClient.post<IItemTask>(`${this.ApiEndpoint()}/api/v1/items/${item.code}/tasks`, task);
|
return this.httpClient.post<IItemTask>(`${this.ApiEndpoint()}/api/v1/items/${item.code}/tasks`, task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getItemTaskList(itemcode: string): Observable<IItemTask[]> {
|
||||||
|
return this.httpClient.get<IItemTask[]>(`${this.ApiEndpoint()}/api/v1/items/${itemcode}/tasks`).pipe(map(ia => ia.map(i => this.parseDates(i))));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user