2019-02-12 09:08:37 +01:00
|
|
|
import { AttractRowsSourceBase } from '../../attracttable/rows/AttractRowsSourceBase'
|
|
|
|
import { TaskRow } from './TaskRow'
|
|
|
|
|
|
|
|
class TaskRowsSource extends AttractRowsSourceBase {
|
|
|
|
constructor(projectId) {
|
|
|
|
super(projectId, 'attract_task', TaskRow);
|
|
|
|
}
|
|
|
|
|
2019-03-13 13:53:40 +01:00
|
|
|
thenFetchObjects() {
|
2019-02-12 09:08:37 +01:00
|
|
|
return attract.api.thenGetProjectTasks(this.projectId)
|
|
|
|
.then((result) => {
|
|
|
|
let tasks = result._items;
|
|
|
|
this.initRowObjects(tasks);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export { TaskRowsSource }
|