summaryrefslogtreecommitdiff
path: root/client/components/Tasks/TaskListView.jsx
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2017-07-07 21:18:33 +0200
committerJules Laplace <julescarbon@gmail.com>2017-07-07 21:18:33 +0200
commitf8b61281be84a6e4e7a44be5109e688a7c56c671 (patch)
tree43797c6b6cfa5c0f89c020f8c89e0da10f791a55 /client/components/Tasks/TaskListView.jsx
parent3d3a7b80d34c100846c8ae130b424b63ba3c0784 (diff)
refactor files so list updates while processing
Diffstat (limited to 'client/components/Tasks/TaskListView.jsx')
-rw-r--r--client/components/Tasks/TaskListView.jsx23
1 files changed, 23 insertions, 0 deletions
diff --git a/client/components/Tasks/TaskListView.jsx b/client/components/Tasks/TaskListView.jsx
new file mode 100644
index 0000000..dc1d9b4
--- /dev/null
+++ b/client/components/Tasks/TaskListView.jsx
@@ -0,0 +1,23 @@
+import { h, Component } from 'preact'
+
+import FileLink from '../../containers/fileLink.js'
+
+export default function TaskListView (props) {
+ const tasks = (props.tasks || []).map( (task, i) => {
+ return (
+ <div key={i}>
+ <span>{task.id}</span>
+ <span>{task.created_at}</span>
+ <span class='name'><FileLink file={task.content_file}>{task.content_file.name}</FileLink></span>
+ <span class='name'><FileLink file={task.style_file}>{task.style_file.name}</FileLink></span>
+ <span>{task.alpha}</span>
+ </div>
+ )
+ // <span class='name'>{task.result_file.name}</span>
+ })
+ return (
+ <div class='list'>
+ {tasks}
+ </div>
+ )
+}