@live-change/task-frontend 0.9.106 → 0.9.108

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,7 +26,8 @@
26
26
  </div>
27
27
 
28
28
  <div v-if="isExpanded">
29
- <TaskAdminDetails :task="task" :tasks="tasks" :taskTypes="taskTypes" />
29
+ <!-- <TaskAdminDetails :task="task" :tasks="tasks" :taskTypes="taskTypes" /> -->
30
+ <TaskAdminDetails :task="task" :taskTypes="taskTypes" />
30
31
  </div>
31
32
  </div>
32
33
  </template>
@@ -47,19 +48,19 @@
47
48
  type: Object,
48
49
  required: true
49
50
  },
50
- tasks: {
51
+ /* tasks: {
51
52
  type: Array,
52
53
  default: () => []
53
- },
54
+ }, */
54
55
  taskTypes: {
55
56
  type: Object,
56
57
  default: () => ({})
57
58
  }
58
59
  })
59
60
 
60
- const taskId = computed(() => props.task?.to || props.task?.id || props.task)
61
+ /* const taskId = computed(() => props.task?.to || props.task?.id || props.task) */
61
62
 
62
- const taskData = computed(() => props.tasks.find(t => t.to === taskId.value || t.id === taskId.value))
63
+ const taskData = computed(() => props.task)//s.find(t => t.to === taskId.value || t.id === taskId.value))
63
64
 
64
65
  const isExpanded = ref(false)
65
66
 
@@ -34,12 +34,19 @@
34
34
  <div>
35
35
  {{ (new Date(taskData.doneAt).getTime() - new Date(taskData.startedAt).getTime()) / 1000 }}s
36
36
  </div>
37
- </div>
37
+ </div>
38
38
 
39
39
  <div class="grid grid-cols-2 gap-2 text-sm" v-if="taskData.doneAt">
40
40
  <div v-if="taskData.doneAt">Done:</div>
41
41
  <div v-if="taskData.doneAt">{{ d(taskData.doneAt, 'longWithSeconds') }}</div>
42
42
  </div>
43
+
44
+ <div class="grid grid-cols-2 gap-2 text-sm" v-if="taskData.client">
45
+ <div>Client:</div>
46
+ <div>
47
+ {{ taskData.client }}
48
+ </div>
49
+ </div>
43
50
  </div>
44
51
 
45
52
  <div v-if="taskData.properties" class="mt-2">
@@ -103,12 +110,30 @@
103
110
  </div>
104
111
  </div>
105
112
 
106
- <div v-if="childTasks.length" class="mt-2">
113
+ <div class="mt-2">
114
+ <div class="font-semibold">Subtasks:</div>
115
+ <range-viewer :pathFunction="tasksPathFunction" :key="JSON.stringify(tasksPathConfig)"
116
+ :canLoadTop="false" :canDropBottom="false"
117
+ loadBottomSensorSize="3000px" dropBottomSensorSize="12000px">
118
+ <template #empty>
119
+ <div class="bg-surface-0 dark:bg-surface-900 p-3 shadow text-center text-gray-500 text-lg">
120
+ No subtasks found...
121
+ </div>
122
+ </template>
123
+
124
+ <template #default="{ item: task }">
125
+ <TaskAdminCard :task="task" class="mt-1" />
126
+ </template>
127
+ </range-viewer>
128
+ </div>
129
+
130
+
131
+ <!-- <div v-if="childTasks.length" class="mt-2">
107
132
  <div class="font-semibold">Subtasks:</div>
108
133
  <div v-for="subtask in childTasks" :key="subtask.id" class="mt-2">
109
- <TaskAdminCard :task="subtask" :tasks="tasks" :taskTypes="taskTypes" />
134
+ <TaskAdminCard :task="subtask" :tasks="tasks" :taskTypes="taskTypes" />
110
135
  </div>
111
- </div>
136
+ </div> -->
112
137
  </div>
113
138
  </template>
114
139
 
@@ -117,6 +142,7 @@
117
142
  import ProgressBar from 'primevue/progressbar'
118
143
  import TaskAdminCard from './TaskAdminCard.vue'
119
144
  import TaskRetry from './TaskRetry.vue'
145
+ import { RangeViewer } from "@live-change/vue3-components"
120
146
 
121
147
  import { useI18n } from 'vue-i18n'
122
148
  const { d } = useI18n()
@@ -126,24 +152,41 @@
126
152
  type: Object,
127
153
  required: true
128
154
  },
129
- tasks: {
155
+ /* tasks: {
130
156
  type: Array,
131
157
  default: () => []
132
- },
158
+ }, */
133
159
  taskTypes: {
134
160
  type: Object,
135
161
  default: () => ({})
136
162
  }
137
163
  })
138
164
 
139
- const taskId = computed(() => props.task?.to || props.task?.id || props.task)
165
+ /* const taskId = computed(() => props.task?.to || props.task?.id || props.task) */
140
166
 
141
- const taskData = computed(() => props.tasks.find(t => t.to === taskId.value || t.id === taskId.value))
167
+ const taskData = computed(() => props.task)//tasks.find(t => t.to === taskId.value || t.id === taskId.value))
142
168
 
143
- const childTasks = computed(() => {
169
+ /* const childTasks = computed(() => {
144
170
  return props.tasks.filter(t => t.causeType === "task_Task" && t.cause === taskId.value)
145
- })
171
+ }) */
172
+
173
+ const taskId = computed(() => props.task?.to ?? props.task?.id)
146
174
 
175
+ import { usePath, live, useClient, useActions, reverseRange, useApi } from '@live-change/vue3-ssr'
176
+ const path = usePath()
177
+ const client = useClient()
178
+ const actions = useActions()
179
+ const api = useApi()
180
+
181
+ const tasksPathConfig = computed(() => ({
182
+ causeType: 'task_Task',
183
+ cause: taskId.value
184
+ }))
185
+
186
+ const tasksPathFunction = computed(() => (range) =>
187
+ path.task.tasksByCauseAndStart({ ...tasksPathConfig.value, ...reverseRange(range) })
188
+ )
189
+
147
190
  const isResultExpanded = ref(false)
148
191
  const isPropertiesExpanded = ref(false)
149
192
 
@@ -21,8 +21,8 @@
21
21
  <!-- <pre>tasksPathConfig = {{ tasksPathConfig }}</pre> -->
22
22
 
23
23
  <range-viewer :pathFunction="tasksPathFunction" :key="JSON.stringify(tasksPathConfig)"
24
- :canLoadTop="false" canDropBottom
25
- loadBottomSensorSize="3000px" dropBottomSensorSize="5000px">
24
+ :canLoadTop="false" :canDropBottom="false"
25
+ loadBottomSensorSize="3000px" dropBottomSensorSize="12000px">
26
26
  <template #empty>
27
27
  <div class="bg-surface-0 p-3 shadow text-center text-gray-500 text-lg">
28
28
  No tasks found...
@@ -30,7 +30,8 @@
30
30
  </template>
31
31
 
32
32
  <template #default="{ item: task }">
33
- <TaskAdminCard :task="task" :tasks="task.subTasks" class="mt-1" />
33
+ <!-- <TaskAdminCard :task="task" :tasks="task.subTasks" class="mt-1" /> -->
34
+ <TaskAdminCard :task="task" class="mt-1" />
34
35
  </template>
35
36
  </range-viewer>
36
37
 
@@ -72,10 +73,10 @@
72
73
 
73
74
  const tasksPathFunction = computed(() => (range) =>
74
75
  path.task.independentTasks({ ...tasksPathConfig.value, ...reverseRange(range) })
75
- .with(task => path.task.tasksByRoot({
76
- rootType: 'task_Task',
77
- root: task.id//{ or: [task.to, task.id]}
78
- }).bind('subTasks'))
76
+ /* .with(task => path.task.tasksByRoot({
77
+ rootType: 'task_Task',
78
+ root: task.id//{ or: [task.to, task.id]}
79
+ }).bind('subTasks')) */
79
80
 
80
81
  )
81
82
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/task-frontend",
3
- "version": "0.9.106",
3
+ "version": "0.9.108",
4
4
  "scripts": {
5
5
  "memDev": "tsx --inspect --expose-gc server/start.js memDev --enableSessions --initScript ./init.js --dbAccess",
6
6
  "localDevInit": "tsx server/start.js localDev --enableSessions --initScript ./init.js --dbAccess",
@@ -37,41 +37,41 @@
37
37
  "@codemirror/language": "6.10.1",
38
38
  "@dotenvx/dotenvx": "0.27.0",
39
39
  "@fortawesome/fontawesome-free": "^6.7.2",
40
- "@live-change/access-control-frontend": "^0.9.106",
41
- "@live-change/access-control-service": "^0.9.106",
42
- "@live-change/backup-service": "^0.9.106",
43
- "@live-change/blog-frontend": "^0.9.106",
44
- "@live-change/blog-service": "^0.9.106",
45
- "@live-change/cli": "^0.9.106",
46
- "@live-change/content-frontend": "^0.9.106",
47
- "@live-change/content-service": "^0.9.106",
48
- "@live-change/dao": "^0.9.106",
49
- "@live-change/dao-vue3": "^0.9.106",
50
- "@live-change/dao-websocket": "^0.9.106",
51
- "@live-change/db-client": "^0.9.106",
52
- "@live-change/email-service": "^0.9.106",
53
- "@live-change/framework": "^0.9.106",
54
- "@live-change/frontend-auto-form": "^0.9.106",
55
- "@live-change/frontend-base": "^0.9.106",
56
- "@live-change/geoip-service": "^0.9.106",
57
- "@live-change/image-frontend": "^0.9.106",
58
- "@live-change/locale-settings-service": "^0.9.106",
59
- "@live-change/password-authentication-service": "^0.9.106",
60
- "@live-change/prosemirror-service": "^0.9.106",
61
- "@live-change/secret-code-service": "^0.9.106",
62
- "@live-change/secret-link-service": "^0.9.106",
63
- "@live-change/session-service": "^0.9.106",
64
- "@live-change/task-service": "^0.9.106",
65
- "@live-change/upload-frontend": "^0.9.106",
66
- "@live-change/url-frontend": "^0.9.106",
67
- "@live-change/url-service": "^0.9.106",
68
- "@live-change/user-frontend": "^0.9.106",
69
- "@live-change/user-identification-service": "^0.9.106",
70
- "@live-change/user-service": "^0.9.106",
71
- "@live-change/vote-service": "^0.9.106",
72
- "@live-change/vue3-components": "^0.9.106",
73
- "@live-change/vue3-ssr": "^0.9.106",
74
- "@live-change/wysiwyg-frontend": "^0.9.106",
40
+ "@live-change/access-control-frontend": "^0.9.108",
41
+ "@live-change/access-control-service": "^0.9.108",
42
+ "@live-change/backup-service": "^0.9.108",
43
+ "@live-change/blog-frontend": "^0.9.108",
44
+ "@live-change/blog-service": "^0.9.108",
45
+ "@live-change/cli": "^0.9.108",
46
+ "@live-change/content-frontend": "^0.9.108",
47
+ "@live-change/content-service": "^0.9.108",
48
+ "@live-change/dao": "^0.9.108",
49
+ "@live-change/dao-vue3": "^0.9.108",
50
+ "@live-change/dao-websocket": "^0.9.108",
51
+ "@live-change/db-client": "^0.9.108",
52
+ "@live-change/email-service": "^0.9.108",
53
+ "@live-change/framework": "^0.9.108",
54
+ "@live-change/frontend-auto-form": "^0.9.108",
55
+ "@live-change/frontend-base": "^0.9.108",
56
+ "@live-change/geoip-service": "^0.9.108",
57
+ "@live-change/image-frontend": "^0.9.108",
58
+ "@live-change/locale-settings-service": "^0.9.108",
59
+ "@live-change/password-authentication-service": "^0.9.108",
60
+ "@live-change/prosemirror-service": "^0.9.108",
61
+ "@live-change/secret-code-service": "^0.9.108",
62
+ "@live-change/secret-link-service": "^0.9.108",
63
+ "@live-change/session-service": "^0.9.108",
64
+ "@live-change/task-service": "^0.9.108",
65
+ "@live-change/upload-frontend": "^0.9.108",
66
+ "@live-change/url-frontend": "^0.9.108",
67
+ "@live-change/url-service": "^0.9.108",
68
+ "@live-change/user-frontend": "^0.9.108",
69
+ "@live-change/user-identification-service": "^0.9.108",
70
+ "@live-change/user-service": "^0.9.108",
71
+ "@live-change/vote-service": "^0.9.108",
72
+ "@live-change/vue3-components": "^0.9.108",
73
+ "@live-change/vue3-ssr": "^0.9.108",
74
+ "@live-change/wysiwyg-frontend": "^0.9.108",
75
75
  "@vueuse/core": "^12.3.0",
76
76
  "codeceptjs-assert": "^0.0.5",
77
77
  "compression": "^1.7.5",
@@ -81,7 +81,7 @@
81
81
  "pretty-bytes": "^6.1.1",
82
82
  "primeflex": "^3.3.1",
83
83
  "primeicons": "^7.0.0",
84
- "primevue": "^4.3.3",
84
+ "primevue": "^4.3.6",
85
85
  "rollup-plugin-node-builtins": "^2.1.2",
86
86
  "rollup-plugin-visualizer": "5.14.0",
87
87
  "serialize-javascript": "^6.0.2",
@@ -93,7 +93,7 @@
93
93
  "vue3-scroll-border": "0.1.7"
94
94
  },
95
95
  "devDependencies": {
96
- "@live-change/codeceptjs-helper": "^0.9.106",
96
+ "@live-change/codeceptjs-helper": "^0.9.108",
97
97
  "codeceptjs": "^3.6.10",
98
98
  "generate-password": "1.7.1",
99
99
  "playwright": "1.49.1",
@@ -104,5 +104,5 @@
104
104
  "author": "Michał Łaszczewski <michal@laszczewski.pl>",
105
105
  "license": "ISC",
106
106
  "description": "",
107
- "gitHead": "1afc853b9044a57046dae972df68d89c8c1cd1a6"
107
+ "gitHead": "c500fad0c238b17fa816248f16e9e9692abea569"
108
108
  }