@things-factory/worklist 6.0.28 → 6.0.32
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.
- package/client/pages/activity/activity-list-page.ts +48 -0
- package/client/pages/activity/activity-partial-view.ts +3 -0
- package/client/pages/activity-approval/activity-approval-page.ts +6 -6
- package/client/pages/activity-template/activity-template-list-page.ts +28 -0
- package/client/pages/installable-activity/installable-activity-list-page.ts +28 -0
- package/client/pages/todo/approval-waiting-list-page.ts +7 -7
- package/client/pages/todo/done-list-page.ts +344 -0
- package/client/route.ts +4 -0
- package/client/types/activity.ts +6 -0
- package/dist-client/pages/activity/activity-list-page.js +48 -0
- package/dist-client/pages/activity/activity-list-page.js.map +1 -1
- package/dist-client/pages/activity/activity-partial-view.js +1 -1
- package/dist-client/pages/activity/activity-partial-view.js.map +1 -1
- package/dist-client/pages/activity-approval/activity-approval-page.js +6 -6
- package/dist-client/pages/activity-approval/activity-approval-page.js.map +1 -1
- package/dist-client/pages/activity-template/activity-template-list-page.js +28 -0
- package/dist-client/pages/activity-template/activity-template-list-page.js.map +1 -1
- package/dist-client/pages/installable-activity/installable-activity-list-page.js +28 -0
- package/dist-client/pages/installable-activity/installable-activity-list-page.js.map +1 -1
- package/dist-client/pages/todo/approval-waiting-list-page.js +7 -7
- package/dist-client/pages/todo/approval-waiting-list-page.js.map +1 -1
- package/dist-client/pages/todo/done-list-page.d.ts +44 -0
- package/dist-client/pages/todo/done-list-page.js +342 -0
- package/dist-client/pages/todo/done-list-page.js.map +1 -0
- package/dist-client/route.d.ts +1 -1
- package/dist-client/route.js +3 -0
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/types/activity.d.ts +3 -0
- package/dist-client/types/activity.js.map +1 -1
- package/dist-server/controllers/activity-instance/draft.js +6 -1
- package/dist-server/controllers/activity-instance/draft.js.map +1 -1
- package/dist-server/controllers/activity-instance/post.js +2 -2
- package/dist-server/controllers/activity-instance/post.js.map +1 -1
- package/dist-server/controllers/common.js +11 -3
- package/dist-server/controllers/common.js.map +1 -1
- package/dist-server/service/activity/activity-history.js +23 -1
- package/dist-server/service/activity/activity-history.js.map +1 -1
- package/dist-server/service/activity/activity-type.js +24 -0
- package/dist-server/service/activity/activity-type.js.map +1 -1
- package/dist-server/service/activity/activity.js +17 -2
- package/dist-server/service/activity/activity.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance-type.js +16 -0
- package/dist-server/service/activity-instance/activity-instance-type.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance.js +10 -0
- package/dist-server/service/activity-instance/activity-instance.js.map +1 -1
- package/dist-server/service/activity-thread/activity-thread-query.js +27 -0
- package/dist-server/service/activity-thread/activity-thread-query.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -8
- package/server/controllers/activity-instance/draft.ts +4 -2
- package/server/controllers/activity-instance/post.ts +2 -2
- package/server/service/activity/activity-history.ts +19 -1
- package/server/service/activity/activity-type.ts +18 -0
- package/server/service/activity/activity.ts +14 -2
- package/server/service/activity-instance/activity-instance-type.ts +12 -0
- package/server/service/activity-instance/activity-instance.ts +8 -0
- package/server/service/activity-thread/activity-thread-query.ts +24 -0
- package/things-factory.config.js +1 -0
- package/translations/en.json +3 -0
- package/translations/ko.json +3 -0
- package/translations/ms.json +3 -0
- package/translations/zh.json +3 -0
- package/dist-client/types.d.ts +0 -19
- package/dist-client/types.js +0 -38
- package/dist-client/types.js.map +0 -1
- package/dist-server/controllers/activity-extension-controller.js +0 -11
- package/dist-server/controllers/activity-extension-controller.js.map +0 -1
- package/dist-server/controllers/activity-installation/callback-registry.js +0 -21
- package/dist-server/controllers/activity-installation/callback-registry.js.map +0 -1
- package/dist-server/controllers/activity-installation-controller.js +0 -17
- package/dist-server/controllers/activity-installation-controller.js.map +0 -1
- package/dist-server/controllers/call-webhook.js +0 -41
- package/dist-server/controllers/call-webhook.js.map +0 -1
|
@@ -5,6 +5,7 @@ import gql from 'graphql-tag'
|
|
|
5
5
|
import { css, html } from 'lit'
|
|
6
6
|
import { customElement, property, query } from 'lit/decorators.js'
|
|
7
7
|
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
8
|
+
import moment from 'moment-timezone'
|
|
8
9
|
|
|
9
10
|
import { DataGrist, getEditor, getRenderer } from '@operato/data-grist'
|
|
10
11
|
import { client } from '@operato/graphql'
|
|
@@ -22,6 +23,8 @@ export const ActivityStatus = [
|
|
|
22
23
|
{ display: 'Released', value: 'released' },
|
|
23
24
|
{ display: 'Deprecated', value: 'deprecated' }
|
|
24
25
|
]
|
|
26
|
+
const DEFAULT_TZ = Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
27
|
+
const TIMEZONE_OPTIONS = ['', DEFAULT_TZ, ...moment.tz.names().filter(tz => tz !== DEFAULT_TZ)]
|
|
25
28
|
|
|
26
29
|
@customElement('activity-list-page')
|
|
27
30
|
export class ActivityListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
@@ -226,6 +229,22 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
226
229
|
},
|
|
227
230
|
width: 80
|
|
228
231
|
},
|
|
232
|
+
{
|
|
233
|
+
type: 'select',
|
|
234
|
+
name: 'timezone',
|
|
235
|
+
header: i18next.t('field.timezone'),
|
|
236
|
+
record: {
|
|
237
|
+
editable: true,
|
|
238
|
+
options: TIMEZONE_OPTIONS
|
|
239
|
+
},
|
|
240
|
+
width: 120,
|
|
241
|
+
imex: {
|
|
242
|
+
width: 13,
|
|
243
|
+
header: i18next.t('field.timezone'),
|
|
244
|
+
type: 'select',
|
|
245
|
+
key: 'timezone'
|
|
246
|
+
}
|
|
247
|
+
},
|
|
229
248
|
{
|
|
230
249
|
type: 'image',
|
|
231
250
|
name: 'thumbnail',
|
|
@@ -321,6 +340,34 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
321
340
|
},
|
|
322
341
|
width: 140
|
|
323
342
|
},
|
|
343
|
+
{
|
|
344
|
+
type: 'select',
|
|
345
|
+
name: 'viewType',
|
|
346
|
+
label: true,
|
|
347
|
+
header: i18next.t('field.view-type'),
|
|
348
|
+
record: {
|
|
349
|
+
editable: true,
|
|
350
|
+
options: ActivityUITypes
|
|
351
|
+
},
|
|
352
|
+
width: 80
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
type: 'string',
|
|
356
|
+
name: 'viewSource',
|
|
357
|
+
header: i18next.t('field.view-source'),
|
|
358
|
+
record: {
|
|
359
|
+
editable: true,
|
|
360
|
+
editor: function (value, column, record, rowIndex, field) {
|
|
361
|
+
var type = record.viewType !== 'board' ? 'script' : 'board'
|
|
362
|
+
return getEditor(type)(value, column, record, rowIndex, field)
|
|
363
|
+
},
|
|
364
|
+
renderer: function (value, column, record, rowIndex, field) {
|
|
365
|
+
var type = record.viewType !== 'board' ? 'script' : 'board'
|
|
366
|
+
return getRenderer(type)(value, column, record, rowIndex, field)
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
width: 140
|
|
370
|
+
},
|
|
324
371
|
{
|
|
325
372
|
type: 'select',
|
|
326
373
|
name: 'reportType',
|
|
@@ -495,6 +542,7 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
495
542
|
reportSource
|
|
496
543
|
startable
|
|
497
544
|
schedule
|
|
545
|
+
timezone
|
|
498
546
|
standardTime
|
|
499
547
|
leadTime
|
|
500
548
|
cycleTime
|
|
@@ -46,6 +46,7 @@ export class ActivityView extends localize(i18next)(LitElement) {
|
|
|
46
46
|
priority,
|
|
47
47
|
startable,
|
|
48
48
|
schedule,
|
|
49
|
+
timzeone,
|
|
49
50
|
standardTime,
|
|
50
51
|
cycleTime,
|
|
51
52
|
tactTime,
|
|
@@ -57,6 +58,8 @@ export class ActivityView extends localize(i18next)(LitElement) {
|
|
|
57
58
|
approvalLine,
|
|
58
59
|
uiType,
|
|
59
60
|
uiSource,
|
|
61
|
+
viewType,
|
|
62
|
+
viewSource,
|
|
60
63
|
reportType,
|
|
61
64
|
reportSource
|
|
62
65
|
} = this.activity
|
|
@@ -67,8 +67,8 @@ const ActivityApprovalFetchResult = `\
|
|
|
67
67
|
thumbnail
|
|
68
68
|
input
|
|
69
69
|
output
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
viewType
|
|
71
|
+
viewSource
|
|
72
72
|
dueAt
|
|
73
73
|
createdAt
|
|
74
74
|
}
|
|
@@ -181,7 +181,7 @@ export class ActivityApprovalPage extends connect(store)(localize(i18next)(PageV
|
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
activityContent() {
|
|
184
|
-
switch (this.activityThread?.activityInstance?.
|
|
184
|
+
switch (this.activityThread?.activityInstance?.viewType) {
|
|
185
185
|
case 'template':
|
|
186
186
|
return this.templateContent()
|
|
187
187
|
case 'generated':
|
|
@@ -198,7 +198,7 @@ export class ActivityApprovalPage extends connect(store)(localize(i18next)(PageV
|
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
templateContent() {
|
|
201
|
-
const {
|
|
201
|
+
const { viewSource: template } = this.activityThread?.activityInstance
|
|
202
202
|
return unsafeHTML(template)
|
|
203
203
|
}
|
|
204
204
|
|
|
@@ -271,7 +271,7 @@ export class ActivityApprovalPage extends connect(store)(localize(i18next)(PageV
|
|
|
271
271
|
|
|
272
272
|
boardContent() {
|
|
273
273
|
const { output, activityInstance } = this.activityThread
|
|
274
|
-
const {
|
|
274
|
+
const { viewSource: boardId, input } = activityInstance || {}
|
|
275
275
|
|
|
276
276
|
if (!this.board || this.board.id !== boardId) {
|
|
277
277
|
this.board = {
|
|
@@ -296,7 +296,7 @@ export class ActivityApprovalPage extends connect(store)(localize(i18next)(PageV
|
|
|
296
296
|
|
|
297
297
|
customElementContent() {
|
|
298
298
|
const { output, activityInstance } = this.activityThread
|
|
299
|
-
const {
|
|
299
|
+
const { viewSource: tagName, input } = activityInstance || {}
|
|
300
300
|
|
|
301
301
|
const element = document.createElement(tagName)
|
|
302
302
|
element.id = 'custom-content'
|
|
@@ -215,6 +215,34 @@ export class ActivityTemplateListPage extends connect(store)(localize(i18next)(P
|
|
|
215
215
|
},
|
|
216
216
|
width: 140
|
|
217
217
|
},
|
|
218
|
+
{
|
|
219
|
+
type: 'select',
|
|
220
|
+
name: 'viewType',
|
|
221
|
+
label: true,
|
|
222
|
+
header: i18next.t('field.view-type'),
|
|
223
|
+
record: {
|
|
224
|
+
editable: true,
|
|
225
|
+
options: ActivityUITypes
|
|
226
|
+
},
|
|
227
|
+
width: 80
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
type: 'string',
|
|
231
|
+
name: 'viewSource',
|
|
232
|
+
header: i18next.t('field.view-source'),
|
|
233
|
+
record: {
|
|
234
|
+
editable: true,
|
|
235
|
+
editor: function (value, column, record, rowIndex, field) {
|
|
236
|
+
var type = record.viewType !== 'board' ? 'script' : 'board'
|
|
237
|
+
return getEditor(type)(value, column, record, rowIndex, field)
|
|
238
|
+
},
|
|
239
|
+
renderer: function (value, column, record, rowIndex, field) {
|
|
240
|
+
var type = record.viewType !== 'board' ? 'script' : 'board'
|
|
241
|
+
return getRenderer(type)(value, column, record, rowIndex, field)
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
width: 140
|
|
245
|
+
},
|
|
218
246
|
{
|
|
219
247
|
type: 'select',
|
|
220
248
|
name: 'reportType',
|
|
@@ -229,6 +229,34 @@ export class ActivityTemplateListPage extends connect(store)(localize(i18next)(P
|
|
|
229
229
|
},
|
|
230
230
|
width: 140
|
|
231
231
|
},
|
|
232
|
+
{
|
|
233
|
+
type: 'select',
|
|
234
|
+
name: 'viewType',
|
|
235
|
+
label: true,
|
|
236
|
+
header: i18next.t('field.view-type'),
|
|
237
|
+
record: {
|
|
238
|
+
editable: true,
|
|
239
|
+
options: ActivityUITypes
|
|
240
|
+
},
|
|
241
|
+
width: 80
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
type: 'string',
|
|
245
|
+
name: 'viewSource',
|
|
246
|
+
header: i18next.t('field.view-source'),
|
|
247
|
+
record: {
|
|
248
|
+
editable: true,
|
|
249
|
+
editor: function (value, column, record, rowIndex, field) {
|
|
250
|
+
var type = record.viewType !== 'board' ? 'script' : 'board'
|
|
251
|
+
return getEditor(type)(value, column, record, rowIndex, field)
|
|
252
|
+
},
|
|
253
|
+
renderer: function (value, column, record, rowIndex, field) {
|
|
254
|
+
var type = record.viewType !== 'board' ? 'script' : 'board'
|
|
255
|
+
return getRenderer(type)(value, column, record, rowIndex, field)
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
width: 140
|
|
259
|
+
},
|
|
232
260
|
{
|
|
233
261
|
type: 'select',
|
|
234
262
|
name: 'reportType',
|
|
@@ -153,14 +153,14 @@ export class ApprovalWaitingListPage extends connect(store)(localize(i18next)(Pa
|
|
|
153
153
|
},
|
|
154
154
|
{
|
|
155
155
|
type: 'string',
|
|
156
|
-
name: '
|
|
157
|
-
header: i18next.t('field.
|
|
156
|
+
name: 'viewSource',
|
|
157
|
+
header: i18next.t('field.view-source'),
|
|
158
158
|
record: {
|
|
159
159
|
editable: false,
|
|
160
160
|
renderer: function (value, column, record, rowIndex, field) {
|
|
161
|
-
const {
|
|
162
|
-
var type =
|
|
163
|
-
return getRenderer(type)(
|
|
161
|
+
const { viewType, viewSource } = record.activity || {}
|
|
162
|
+
var type = viewType !== 'board' ? 'string' : 'board'
|
|
163
|
+
return getRenderer(type)(viewSource, column, record, rowIndex, field)
|
|
164
164
|
}
|
|
165
165
|
},
|
|
166
166
|
width: 140,
|
|
@@ -314,8 +314,8 @@ export class ApprovalWaitingListPage extends connect(store)(localize(i18next)(Pa
|
|
|
314
314
|
input
|
|
315
315
|
refBy
|
|
316
316
|
activityType
|
|
317
|
-
|
|
318
|
-
|
|
317
|
+
viewType
|
|
318
|
+
viewSource
|
|
319
319
|
thumbnail
|
|
320
320
|
updatedAt
|
|
321
321
|
createdAt
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
import '@operato/data-grist'
|
|
2
|
+
import '@operato/input/ox-input-select-buttons.js'
|
|
3
|
+
|
|
4
|
+
import gql from 'graphql-tag'
|
|
5
|
+
import { css, html } from 'lit'
|
|
6
|
+
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
7
|
+
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
8
|
+
|
|
9
|
+
import { DataGrist, getRenderer } from '@operato/data-grist'
|
|
10
|
+
import { client } from '@operato/graphql'
|
|
11
|
+
import { i18next, localize } from '@operato/i18n'
|
|
12
|
+
import { navigate, PageView, store } from '@operato/shell'
|
|
13
|
+
import { CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
|
14
|
+
import { isMobileDevice, sleep } from '@operato/utils'
|
|
15
|
+
|
|
16
|
+
import { Priorities } from '../../types/types.js'
|
|
17
|
+
|
|
18
|
+
const FILTERS = [
|
|
19
|
+
{
|
|
20
|
+
display: 'Important',
|
|
21
|
+
value: 'Important'
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
display: 'Imminent',
|
|
25
|
+
value: 'Imminent'
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
display: 'Disapproved',
|
|
29
|
+
value: 'Disapproved'
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
@customElement('done-list-page')
|
|
34
|
+
export class DoneListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
35
|
+
static styles = [
|
|
36
|
+
ScrollbarStyles,
|
|
37
|
+
CommonGristStyles,
|
|
38
|
+
css`
|
|
39
|
+
:host {
|
|
40
|
+
display: flex;
|
|
41
|
+
|
|
42
|
+
width: 100%;
|
|
43
|
+
|
|
44
|
+
--grid-record-emphasized-background-color: red;
|
|
45
|
+
--grid-record-emphasized-color: yellow;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
#modes {
|
|
49
|
+
margin-left: auto;
|
|
50
|
+
}
|
|
51
|
+
`
|
|
52
|
+
]
|
|
53
|
+
|
|
54
|
+
@property({ type: Object }) gristConfig?: any
|
|
55
|
+
@property({ type: String }) mode: 'GRID' | 'LIST' | 'CARD' = isMobileDevice() ? 'CARD' : 'GRID'
|
|
56
|
+
|
|
57
|
+
@query('ox-grist') grist!: DataGrist
|
|
58
|
+
|
|
59
|
+
@state() filters?: string[]
|
|
60
|
+
|
|
61
|
+
get context() {
|
|
62
|
+
return {
|
|
63
|
+
search: {
|
|
64
|
+
handler: (search: string) => {
|
|
65
|
+
this.grist.searchText = search
|
|
66
|
+
},
|
|
67
|
+
placeholder: i18next.t('title.done list'),
|
|
68
|
+
value: this.grist.searchText
|
|
69
|
+
},
|
|
70
|
+
filter: {
|
|
71
|
+
handler: () => {
|
|
72
|
+
this.grist.toggleHeadroom()
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
help: 'worklist/done-list',
|
|
76
|
+
actions: []
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
render() {
|
|
81
|
+
const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID')
|
|
82
|
+
|
|
83
|
+
return html`
|
|
84
|
+
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
85
|
+
<div slot="headroom">
|
|
86
|
+
<div id="filters">
|
|
87
|
+
<ox-input-select-buttons
|
|
88
|
+
.value=${this.filters}
|
|
89
|
+
.options=${FILTERS}
|
|
90
|
+
@change=${(e: CustomEvent) => {
|
|
91
|
+
this.filters = (e.currentTarget as any)?.value
|
|
92
|
+
}}
|
|
93
|
+
multiple
|
|
94
|
+
></ox-input-select-buttons>
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
<div id="modes">
|
|
98
|
+
<mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>
|
|
99
|
+
<mwc-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</mwc-icon>
|
|
100
|
+
<mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
</ox-grist>
|
|
104
|
+
`
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
async pageInitialized(lifecycle) {
|
|
108
|
+
this.gristConfig = {
|
|
109
|
+
list: {
|
|
110
|
+
thumbnail: 'thumbnail',
|
|
111
|
+
fields: ['name', 'description'],
|
|
112
|
+
details: ['createdAt', 'due']
|
|
113
|
+
},
|
|
114
|
+
columns: [
|
|
115
|
+
{ type: 'gutter', gutterName: 'sequence' },
|
|
116
|
+
{
|
|
117
|
+
type: 'gutter',
|
|
118
|
+
gutterName: 'button',
|
|
119
|
+
name: 'start',
|
|
120
|
+
icon: 'play_arrow',
|
|
121
|
+
handlers: {
|
|
122
|
+
click: (columns, data, column, record, rowIndex) => {
|
|
123
|
+
const { id } = record
|
|
124
|
+
this.openActivityThread(record)
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
type: 'string',
|
|
130
|
+
name: 'name',
|
|
131
|
+
header: i18next.t('field.name'),
|
|
132
|
+
record: {
|
|
133
|
+
editable: false
|
|
134
|
+
},
|
|
135
|
+
filter: 'search',
|
|
136
|
+
sortable: true,
|
|
137
|
+
width: 150
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
type: 'string',
|
|
141
|
+
name: 'description',
|
|
142
|
+
header: i18next.t('field.description'),
|
|
143
|
+
record: {
|
|
144
|
+
editable: false
|
|
145
|
+
},
|
|
146
|
+
filter: 'search',
|
|
147
|
+
width: 200
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
type: 'string',
|
|
151
|
+
name: 'viewSource',
|
|
152
|
+
header: i18next.t('field.view-source'),
|
|
153
|
+
record: {
|
|
154
|
+
editable: false,
|
|
155
|
+
renderer: function (value, column, record, rowIndex, field) {
|
|
156
|
+
const { viewType, viewSource } = record.activity || {}
|
|
157
|
+
var type = viewType !== 'board' ? 'string' : 'board'
|
|
158
|
+
return getRenderer(type)(viewSource, column, record, rowIndex, field)
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
width: 140,
|
|
162
|
+
hidden: true
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
type: 'select',
|
|
166
|
+
name: 'priority',
|
|
167
|
+
header: i18next.t('field.priority'),
|
|
168
|
+
record: {
|
|
169
|
+
editable: false,
|
|
170
|
+
options: Priorities
|
|
171
|
+
},
|
|
172
|
+
// filter: true,
|
|
173
|
+
width: 60
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
type: 'select',
|
|
177
|
+
name: 'state',
|
|
178
|
+
header: i18next.t('field.status'),
|
|
179
|
+
record: {
|
|
180
|
+
editable: false,
|
|
181
|
+
options: [
|
|
182
|
+
{ display: 'Draft', value: 'draft' },
|
|
183
|
+
{ display: 'Posted', value: 'posted' },
|
|
184
|
+
{ display: 'WaitingAssignment', value: 'waiting-assignment' },
|
|
185
|
+
{ display: 'Assigned', value: 'assigned' },
|
|
186
|
+
{ display: 'Started', value: 'started' },
|
|
187
|
+
{ display: 'Pending', value: 'pending' },
|
|
188
|
+
{ display: 'Escalated', value: 'escalated' },
|
|
189
|
+
{ display: 'Ended', value: 'ended' },
|
|
190
|
+
{ display: 'Aborted', value: 'aborted' }
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
filter: false,
|
|
194
|
+
width: 60
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
type: 'datetime',
|
|
198
|
+
name: 'dueAt',
|
|
199
|
+
header: i18next.t('field.due-at'),
|
|
200
|
+
record: {
|
|
201
|
+
editable: false,
|
|
202
|
+
options: {
|
|
203
|
+
year: 'numeric',
|
|
204
|
+
month: 'numeric',
|
|
205
|
+
day: 'numeric'
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
sortable: true,
|
|
209
|
+
width: 100
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
type: 'datetime',
|
|
213
|
+
name: 'startedAt',
|
|
214
|
+
header: i18next.t('field.started-at'),
|
|
215
|
+
record: {
|
|
216
|
+
editable: false
|
|
217
|
+
},
|
|
218
|
+
sortable: true,
|
|
219
|
+
width: 100
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
type: 'datetime',
|
|
223
|
+
name: 'terminatedAt',
|
|
224
|
+
header: i18next.t('field.terminated-at'),
|
|
225
|
+
record: {
|
|
226
|
+
editable: false
|
|
227
|
+
},
|
|
228
|
+
sortable: true,
|
|
229
|
+
width: 100
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
type: 'resource-object',
|
|
233
|
+
name: 'creator',
|
|
234
|
+
header: i18next.t('field.issuer'),
|
|
235
|
+
record: {
|
|
236
|
+
editable: false
|
|
237
|
+
},
|
|
238
|
+
sortable: true,
|
|
239
|
+
width: 120
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
type: 'datetime',
|
|
243
|
+
name: 'createdAt',
|
|
244
|
+
header: i18next.t('field.posted-at'),
|
|
245
|
+
record: {
|
|
246
|
+
editable: false
|
|
247
|
+
},
|
|
248
|
+
sortable: true,
|
|
249
|
+
filter: false,
|
|
250
|
+
width: 180
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
type: 'image',
|
|
254
|
+
name: 'thumbnail',
|
|
255
|
+
header: i18next.t('field.thumbnail'),
|
|
256
|
+
record: { editable: false },
|
|
257
|
+
hidden: true
|
|
258
|
+
}
|
|
259
|
+
],
|
|
260
|
+
rows: {
|
|
261
|
+
appendable: false
|
|
262
|
+
},
|
|
263
|
+
sorters: [
|
|
264
|
+
{
|
|
265
|
+
name: 'dueAt',
|
|
266
|
+
desc: false
|
|
267
|
+
}
|
|
268
|
+
]
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
async pageUpdated(changes, lifecycle, changedBefore) {
|
|
273
|
+
if (this.active) {
|
|
274
|
+
this.grist?.fetch()
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
async fetchHandler({ page, limit, sortings = [], filters = [] }) {
|
|
279
|
+
const response = await client.query({
|
|
280
|
+
query: gql`
|
|
281
|
+
query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
282
|
+
responses: doneList(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
283
|
+
items {
|
|
284
|
+
id
|
|
285
|
+
activityInstance {
|
|
286
|
+
activityId: id
|
|
287
|
+
name
|
|
288
|
+
description
|
|
289
|
+
priority
|
|
290
|
+
input
|
|
291
|
+
refBy
|
|
292
|
+
activityType
|
|
293
|
+
viewType
|
|
294
|
+
viewSource
|
|
295
|
+
thumbnail
|
|
296
|
+
createdAt
|
|
297
|
+
startedAt
|
|
298
|
+
terminatedAt
|
|
299
|
+
updatedAt
|
|
300
|
+
createdAt
|
|
301
|
+
creator {
|
|
302
|
+
id
|
|
303
|
+
name
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
state
|
|
307
|
+
output
|
|
308
|
+
dueAt
|
|
309
|
+
assignedAt
|
|
310
|
+
startedAt
|
|
311
|
+
terminatedAt
|
|
312
|
+
}
|
|
313
|
+
total
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
`,
|
|
317
|
+
variables: {
|
|
318
|
+
filters,
|
|
319
|
+
pagination: { page, limit },
|
|
320
|
+
sortings
|
|
321
|
+
}
|
|
322
|
+
})
|
|
323
|
+
|
|
324
|
+
return {
|
|
325
|
+
total: response.data.responses.total || 0,
|
|
326
|
+
records: (response.data.responses.items || []).map(item => {
|
|
327
|
+
return {
|
|
328
|
+
id: item.id,
|
|
329
|
+
state: item.state,
|
|
330
|
+
output: item.output,
|
|
331
|
+
dueAt: item.dueAt,
|
|
332
|
+
assignedAt: item.assignedAt,
|
|
333
|
+
startedAt: item.startedAt,
|
|
334
|
+
terminatedAt: item.terminatedAt,
|
|
335
|
+
...item.activityInstance
|
|
336
|
+
}
|
|
337
|
+
})
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
openActivityThread(activityThread) {
|
|
342
|
+
navigate(`activity-thread/${activityThread.id}?title=${activityThread.name}`)
|
|
343
|
+
}
|
|
344
|
+
}
|
package/client/route.ts
CHANGED
|
@@ -16,6 +16,10 @@ export default function route(page: string) {
|
|
|
16
16
|
import('./pages/todo/todo-list-page.js')
|
|
17
17
|
return page
|
|
18
18
|
|
|
19
|
+
case 'done-list':
|
|
20
|
+
import('./pages/todo/done-list-page.js')
|
|
21
|
+
return page
|
|
22
|
+
|
|
19
23
|
case 'approval-waiting-list':
|
|
20
24
|
import('./pages/todo/approval-waiting-list-page.js')
|
|
21
25
|
return page
|
package/client/types/activity.ts
CHANGED
|
@@ -57,6 +57,8 @@ export class Activity {
|
|
|
57
57
|
|
|
58
58
|
schedule?: string
|
|
59
59
|
|
|
60
|
+
timzeone?: string
|
|
61
|
+
|
|
60
62
|
standardTime?: number
|
|
61
63
|
|
|
62
64
|
cycleTime?: number
|
|
@@ -79,6 +81,10 @@ export class Activity {
|
|
|
79
81
|
|
|
80
82
|
uiSource?: string
|
|
81
83
|
|
|
84
|
+
viewType?: ActivityUIType
|
|
85
|
+
|
|
86
|
+
viewSource?: string
|
|
87
|
+
|
|
82
88
|
reportType?: ActivityUIType
|
|
83
89
|
|
|
84
90
|
reportSource?: string
|