@things-factory/worklist 6.0.26 → 6.0.28
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/bootstrap.ts +13 -4
- package/client/components/activity-starter-form.ts +41 -10
- package/client/grist-editor/grist-editor-activity-search-key.ts +79 -0
- package/client/grist-editor/popup-activity-search-keys-input.ts +167 -0
- package/client/pages/activity/activity-list-page.ts +74 -11
- package/client/pages/activity/activity-partial-view.ts +82 -0
- package/client/pages/activity/starter-list-page.ts +1 -0
- package/client/pages/activity-approval/activity-approval-page.ts +61 -14
- package/client/pages/activity-instance/activity-instance-page.ts +18 -0
- package/client/pages/activity-instance/activity-instance-search-page.ts +377 -0
- package/client/pages/activity-instance/activity-instance-view.ts +135 -0
- package/client/pages/activity-store/activity-store-page.ts +1 -1
- package/client/pages/activity-template/activity-template-list-page.ts +1 -1
- package/client/pages/activity-thread/activity-thread-page.ts +32 -6
- package/client/pages/activity-thread/activity-thread-view.ts +102 -0
- package/client/pages/installable-activity/installable-activity-list-page.ts +1 -1
- package/client/pages/todo/approval-waiting-list-page.ts +12 -2
- package/client/pages/todo/draft-list-page.ts +19 -5
- package/client/pages/todo/todo-list-page.ts +14 -3
- package/client/route.ts +4 -0
- package/client/types/activity-instance-type.ts +123 -0
- package/client/types/activity-instance.ts +124 -0
- package/client/types/activity-model-type.ts +40 -0
- package/client/types/activity-search-key-item-type.ts +9 -0
- package/client/types/activity-thread-type.ts +19 -0
- package/client/types/activity-thread.ts +88 -0
- package/client/types/activity.ts +97 -0
- package/client/{types.js → types/types.ts} +1 -9
- package/dist-client/bootstrap.d.ts +1 -0
- package/dist-client/bootstrap.js +7 -3
- package/dist-client/bootstrap.js.map +1 -1
- package/dist-client/components/activity-starter-form.d.ts +1 -1
- package/dist-client/components/activity-starter-form.js +40 -9
- package/dist-client/components/activity-starter-form.js.map +1 -1
- package/dist-client/grist-editor/grist-editor-activity-search-key.d.ts +12 -0
- package/dist-client/grist-editor/grist-editor-activity-search-key.js +70 -0
- package/dist-client/grist-editor/grist-editor-activity-search-key.js.map +1 -0
- package/dist-client/grist-editor/popup-activity-search-keys-input.d.ts +17 -0
- package/dist-client/grist-editor/popup-activity-search-keys-input.js +177 -0
- package/dist-client/grist-editor/popup-activity-search-keys-input.js.map +1 -0
- package/dist-client/pages/activity/activity-list-page.d.ts +4 -0
- package/dist-client/pages/activity/activity-list-page.js +73 -11
- package/dist-client/pages/activity/activity-list-page.js.map +1 -1
- package/dist-client/pages/activity/activity-partial-view.d.ts +13 -0
- package/dist-client/pages/activity/activity-partial-view.js +56 -0
- package/dist-client/pages/activity/activity-partial-view.js.map +1 -0
- package/dist-client/pages/activity/starter-list-page.js.map +1 -1
- package/dist-client/pages/activity-approval/activity-approval-page.d.ts +2 -2
- package/dist-client/pages/activity-approval/activity-approval-page.js +59 -14
- package/dist-client/pages/activity-approval/activity-approval-page.js.map +1 -1
- package/dist-client/pages/activity-instance/activity-instance-page.d.ts +2 -1
- package/dist-client/pages/activity-instance/activity-instance-page.js +15 -0
- package/dist-client/pages/activity-instance/activity-instance-page.js.map +1 -1
- package/dist-client/pages/activity-instance/activity-instance-search-page.d.ts +76 -0
- package/dist-client/pages/activity-instance/activity-instance-search-page.js +371 -0
- package/dist-client/pages/activity-instance/activity-instance-search-page.js.map +1 -0
- package/dist-client/pages/activity-instance/activity-instance-view.d.ts +14 -0
- package/dist-client/pages/activity-instance/activity-instance-view.js +130 -0
- package/dist-client/pages/activity-instance/activity-instance-view.js.map +1 -0
- package/dist-client/pages/activity-store/activity-store-page.js +1 -1
- package/dist-client/pages/activity-store/activity-store-page.js.map +1 -1
- package/dist-client/pages/activity-template/activity-template-list-page.js +1 -1
- package/dist-client/pages/activity-template/activity-template-list-page.js.map +1 -1
- package/dist-client/pages/activity-thread/activity-thread-page.d.ts +2 -2
- package/dist-client/pages/activity-thread/activity-thread-page.js +29 -6
- package/dist-client/pages/activity-thread/activity-thread-page.js.map +1 -1
- package/dist-client/pages/activity-thread/activity-thread-view.d.ts +11 -0
- package/dist-client/pages/activity-thread/activity-thread-view.js +103 -0
- package/dist-client/pages/activity-thread/activity-thread-view.js.map +1 -0
- package/dist-client/pages/installable-activity/installable-activity-list-page.js +1 -1
- package/dist-client/pages/installable-activity/installable-activity-list-page.js.map +1 -1
- package/dist-client/pages/todo/approval-waiting-list-page.js +12 -2
- package/dist-client/pages/todo/approval-waiting-list-page.js.map +1 -1
- package/dist-client/pages/todo/draft-list-page.d.ts +4 -8
- package/dist-client/pages/todo/draft-list-page.js +16 -3
- package/dist-client/pages/todo/draft-list-page.js.map +1 -1
- package/dist-client/pages/todo/todo-list-page.js +13 -3
- package/dist-client/pages/todo/todo-list-page.js.map +1 -1
- 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-instance-type.d.ts +76 -0
- package/dist-client/types/activity-instance-type.js +11 -0
- package/dist-client/types/activity-instance-type.js.map +1 -0
- package/dist-client/types/activity-instance.d.ts +70 -0
- package/dist-client/types/activity-instance.js +36 -0
- package/dist-client/types/activity-instance.js.map +1 -0
- package/dist-client/types/activity-model-type.d.ts +31 -0
- package/dist-client/types/activity-model-type.js +18 -0
- package/dist-client/types/activity-model-type.js.map +1 -0
- package/dist-client/types/activity-search-key-item-type.d.ts +6 -0
- package/dist-client/types/activity-search-key-item-type.js +3 -0
- package/dist-client/types/activity-search-key-item-type.js.map +1 -0
- package/dist-client/types/activity-thread-type.d.ts +15 -0
- package/dist-client/types/activity-thread-type.js +7 -0
- package/dist-client/types/activity-thread-type.js.map +1 -0
- package/dist-client/types/activity-thread.d.ts +37 -0
- package/dist-client/types/activity-thread.js +51 -0
- package/dist-client/types/activity-thread.js.map +1 -0
- package/dist-client/types/activity.d.ts +62 -0
- package/dist-client/types/activity.js +35 -0
- package/dist-client/types/activity.js.map +1 -0
- package/dist-client/types/types.d.ts +15 -0
- package/dist-client/types/types.js +30 -0
- package/dist-client/types/types.js.map +1 -0
- package/dist-client/types.js +1 -0
- package/dist-client/types.js.map +1 -1
- package/dist-server/controllers/activity-approval/approve.js +3 -1
- package/dist-server/controllers/activity-approval/approve.js.map +1 -1
- package/dist-server/controllers/activity-approval/reject.js +2 -0
- package/dist-server/controllers/activity-approval/reject.js.map +1 -1
- package/dist-server/controllers/activity-installation/activity-installation-controller.js +25 -0
- package/dist-server/controllers/activity-installation/activity-installation-controller.js.map +1 -0
- package/dist-server/controllers/activity-installation/call-webhook.js +41 -0
- package/dist-server/controllers/activity-installation/call-webhook.js.map +1 -0
- package/dist-server/controllers/activity-installation/callback-registry.js +21 -0
- package/dist-server/controllers/activity-installation/callback-registry.js.map +1 -0
- package/dist-server/controllers/activity-instance/abort.js +1 -1
- package/dist-server/controllers/activity-instance/abort.js.map +1 -1
- package/dist-server/controllers/activity-instance/adjust.js +1 -1
- package/dist-server/controllers/activity-instance/adjust.js.map +1 -1
- package/dist-server/controllers/activity-instance/delegate.js +5 -0
- package/dist-server/controllers/activity-instance/delegate.js.map +1 -1
- package/dist-server/controllers/activity-instance/draft.js +27 -1
- package/dist-server/controllers/activity-instance/draft.js.map +1 -1
- package/dist-server/controllers/activity-instance/post.js +39 -4
- package/dist-server/controllers/activity-instance/post.js.map +1 -1
- package/dist-server/controllers/activity-instance/start.js +1 -1
- package/dist-server/controllers/activity-instance/start.js.map +1 -1
- package/dist-server/controllers/activity-thread/submit.js +2 -2
- package/dist-server/controllers/activity-thread/submit.js.map +1 -1
- package/dist-server/controllers/common.js +105 -57
- package/dist-server/controllers/common.js.map +1 -1
- package/dist-server/controllers/index.js +1 -1
- package/dist-server/controllers/index.js.map +1 -1
- package/dist-server/service/activity/activity-history.js +15 -0
- package/dist-server/service/activity/activity-history.js.map +1 -1
- package/dist-server/service/activity/activity-search-key-item-type.js +28 -0
- package/dist-server/service/activity/activity-search-key-item-type.js.map +1 -0
- package/dist-server/service/activity/activity-type.js +32 -0
- package/dist-server/service/activity/activity-type.js.map +1 -1
- package/dist-server/service/activity/activity.js +25 -3
- package/dist-server/service/activity/activity.js.map +1 -1
- package/dist-server/service/activity-approval/event-subscriber.js +1 -1
- package/dist-server/service/activity-approval/event-subscriber.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance-history.js +53 -0
- package/dist-server/service/activity-instance/activity-instance-history.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance-query.js +70 -0
- package/dist-server/service/activity-instance/activity-instance-query.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance.js +53 -0
- package/dist-server/service/activity-instance/activity-instance.js.map +1 -1
- package/dist-server/service/activity-instance/event-subscriber.js +4 -4
- package/dist-server/service/activity-instance/event-subscriber.js.map +1 -1
- package/dist-server/service/activity-thread/activity-thread.js +4 -1
- package/dist-server/service/activity-thread/activity-thread.js.map +1 -1
- package/dist-server/service/installable-activity/installable-activity-mutation.js +1 -1
- package/dist-server/service/installable-activity/installable-activity-mutation.js.map +1 -1
- package/dist-server/service/installable-activity/installable-activity-query.js +1 -1
- package/dist-server/service/installable-activity/installable-activity-query.js.map +1 -1
- package/dist-server/service/installable-activity/installable-activity.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -7
- package/server/controllers/activity-approval/approve.ts +5 -2
- package/server/controllers/activity-approval/reject.ts +3 -0
- package/server/controllers/{activity-installation-controller.ts → activity-installation/activity-installation-controller.ts} +12 -1
- package/server/controllers/activity-instance/abort.ts +1 -1
- package/server/controllers/activity-instance/adjust.ts +1 -1
- package/server/controllers/activity-instance/delegate.ts +9 -1
- package/server/controllers/activity-instance/draft.ts +30 -3
- package/server/controllers/activity-instance/post.ts +55 -7
- package/server/controllers/activity-instance/start.ts +1 -1
- package/server/controllers/activity-thread/submit.ts +3 -2
- package/server/controllers/common.ts +133 -56
- package/server/controllers/index.ts +1 -1
- package/server/service/activity/activity-history.ts +13 -0
- package/server/service/activity/activity-search-key-item-type.ts +16 -0
- package/server/service/activity/activity-type.ts +28 -1
- package/server/service/activity/activity.ts +22 -3
- package/server/service/activity-approval/event-subscriber.ts +1 -1
- package/server/service/activity-instance/activity-instance-history.ts +41 -0
- package/server/service/activity-instance/activity-instance-query.ts +74 -1
- package/server/service/activity-instance/activity-instance.ts +41 -0
- package/server/service/activity-instance/event-subscriber.ts +4 -4
- package/server/service/activity-thread/activity-thread.ts +6 -3
- package/server/service/installable-activity/installable-activity-mutation.ts +1 -1
- package/server/service/installable-activity/installable-activity-query.ts +1 -1
- package/server/service/installable-activity/installable-activity.ts +3 -1
- package/things-factory.config.js +5 -5
- package/translations/en.json +5 -0
- package/translations/ko.json +5 -0
- package/translations/ms.json +5 -0
- package/translations/zh.json +5 -0
- package/dist-client/pages/installed-activity/installed-activity-list-page.d.ts +0 -45
- package/dist-client/pages/installed-activity/installed-activity-list-page.js +0 -412
- package/dist-client/pages/installed-activity/installed-activity-list-page.js.map +0 -1
- package/dist-client/pages/installed-activity/installed-activity-model-item-list.d.ts +0 -1
- package/dist-client/pages/installed-activity/installed-activity-model-item-list.js +0 -20
- package/dist-client/pages/installed-activity/installed-activity-model-item-list.js.map +0 -1
- package/dist-client/templates/activity-context-template.d.ts +0 -2
- package/dist-client/templates/activity-context-template.js +0 -62
- package/dist-client/templates/activity-context-template.js.map +0 -1
- package/dist-server/service/installed-activity/index.js +0 -10
- package/dist-server/service/installed-activity/index.js.map +0 -1
- package/dist-server/service/installed-activity/installed-activity-mutation.js +0 -60
- package/dist-server/service/installed-activity/installed-activity-mutation.js.map +0 -1
- package/dist-server/service/installed-activity/installed-activity-query.js +0 -48
- package/dist-server/service/installed-activity/installed-activity-query.js.map +0 -1
- package/dist-server/service/installed-activity/installed-activity-type.js +0 -21
- package/dist-server/service/installed-activity/installed-activity-type.js.map +0 -1
- package/dist-server/service/installed-activity/installed-activity.js +0 -70
- package/dist-server/service/installed-activity/installed-activity.js.map +0 -1
- /package/server/controllers/{call-webhook.ts → activity-installation/call-webhook.ts} +0 -0
|
@@ -13,7 +13,7 @@ import { openPopup } from '@operato/layout'
|
|
|
13
13
|
import { PageView, store } from '@operato/shell'
|
|
14
14
|
import { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
|
15
15
|
|
|
16
|
-
import { ActivityTypes } from '../../types.js'
|
|
16
|
+
import { ActivityTypes } from '../../types/types.js'
|
|
17
17
|
|
|
18
18
|
@customElement('activity-store-page')
|
|
19
19
|
export class ActivityStorePage extends connect(store)(localize(i18next)(PageView)) {
|
|
@@ -15,7 +15,7 @@ import { PageView, store } from '@operato/shell'
|
|
|
15
15
|
import { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
|
16
16
|
import { isMobileDevice } from '@operato/utils'
|
|
17
17
|
|
|
18
|
-
import { ActivityTypes, ActivityUITypes } from '../../types.js'
|
|
18
|
+
import { ActivityTypes, ActivityUITypes } from '../../types/types.js'
|
|
19
19
|
|
|
20
20
|
@customElement('activity-template-list-page')
|
|
21
21
|
export class ActivityTemplateListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import '@operato/property-editor/ox-properties-dynamic-view.js'
|
|
2
2
|
import '@operato/board/ox-board-viewer.js'
|
|
3
|
-
import '@things-factory/organization'
|
|
4
3
|
|
|
5
4
|
import gql from 'graphql-tag'
|
|
6
5
|
import { css, html } from 'lit'
|
|
7
6
|
import { unsafeHTML } from 'lit-html/directives/unsafe-html.js'
|
|
8
|
-
import { customElement, property, query } from 'lit/decorators.js'
|
|
7
|
+
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
9
8
|
import { keyed } from 'lit/directives/keyed.js'
|
|
10
9
|
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
11
10
|
|
|
@@ -48,6 +47,7 @@ const ActivityThreadFetchResult = `\
|
|
|
48
47
|
}
|
|
49
48
|
approvalLine {
|
|
50
49
|
type
|
|
50
|
+
value
|
|
51
51
|
approver {
|
|
52
52
|
id
|
|
53
53
|
name
|
|
@@ -93,11 +93,15 @@ export class ActivityThreadPage extends connect(store)(localize(i18next)(PageVie
|
|
|
93
93
|
width: 100%;
|
|
94
94
|
height: 100%;
|
|
95
95
|
}
|
|
96
|
+
|
|
97
|
+
#custom-content {
|
|
98
|
+
flex: 1;
|
|
99
|
+
}
|
|
96
100
|
`
|
|
97
101
|
]
|
|
98
102
|
|
|
99
|
-
@
|
|
100
|
-
@
|
|
103
|
+
@state() activityThread: any
|
|
104
|
+
@state() board: any
|
|
101
105
|
|
|
102
106
|
get context() {
|
|
103
107
|
const state = this.activityThread?.state
|
|
@@ -165,6 +169,8 @@ export class ActivityThreadPage extends connect(store)(localize(i18next)(PageVie
|
|
|
165
169
|
return this.generatedContent()
|
|
166
170
|
case 'board':
|
|
167
171
|
return this.boardContent()
|
|
172
|
+
case 'custom-element':
|
|
173
|
+
return this.customElementContent()
|
|
168
174
|
case 'page':
|
|
169
175
|
case 'external':
|
|
170
176
|
default:
|
|
@@ -220,7 +226,7 @@ export class ActivityThreadPage extends connect(store)(localize(i18next)(PageVie
|
|
|
220
226
|
}
|
|
221
227
|
|
|
222
228
|
return keyed(
|
|
223
|
-
|
|
229
|
+
this.activityThread.id,
|
|
224
230
|
html`
|
|
225
231
|
<fieldset>
|
|
226
232
|
<legend>Input</legend>
|
|
@@ -254,8 +260,13 @@ export class ActivityThreadPage extends connect(store)(localize(i18next)(PageVie
|
|
|
254
260
|
}
|
|
255
261
|
}
|
|
256
262
|
|
|
263
|
+
/*
|
|
264
|
+
ox-board-viewer에서 provider에 의해 공급되는 board가 각 id별로 instance를 하나씩 밖에 가지지 않으므로,
|
|
265
|
+
동일한 id의 보드를 다른 page에 뺏기는 경우가 있다.
|
|
266
|
+
따라서, Page가 active될 때마다 타임스탬프를 refresh key로 설정하였다.
|
|
267
|
+
*/
|
|
257
268
|
return keyed(
|
|
258
|
-
|
|
269
|
+
this.activityThread.id,
|
|
259
270
|
html`
|
|
260
271
|
<ox-board-viewer
|
|
261
272
|
style="background-color: white;"
|
|
@@ -269,6 +280,21 @@ export class ActivityThreadPage extends connect(store)(localize(i18next)(PageVie
|
|
|
269
280
|
)
|
|
270
281
|
}
|
|
271
282
|
|
|
283
|
+
customElementContent() {
|
|
284
|
+
const { output, activityInstance } = this.activityThread
|
|
285
|
+
const { uiSource: tagName, input } = activityInstance || {}
|
|
286
|
+
|
|
287
|
+
const element = document.createElement(tagName)
|
|
288
|
+
element.id = 'custom-content'
|
|
289
|
+
element.input = input
|
|
290
|
+
element.output = output
|
|
291
|
+
element.addEventListener('change', (e: CustomEvent) => {
|
|
292
|
+
this.activityThread.output = e.detail
|
|
293
|
+
})
|
|
294
|
+
|
|
295
|
+
return element
|
|
296
|
+
}
|
|
297
|
+
|
|
272
298
|
@query('ox-board-viewer') oxBoardViewer: any
|
|
273
299
|
|
|
274
300
|
getOutputFromBoard() {
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import gql from 'graphql-tag'
|
|
2
|
+
import { css, html, LitElement } from 'lit'
|
|
3
|
+
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
4
|
+
|
|
5
|
+
import { client } from '@operato/graphql'
|
|
6
|
+
import { i18next, localize } from '@operato/i18n'
|
|
7
|
+
import { ScrollbarStyles } from '@operato/styles'
|
|
8
|
+
|
|
9
|
+
@customElement('activity-thread-view')
|
|
10
|
+
export class ActivityThreadView extends localize(i18next)(LitElement) {
|
|
11
|
+
static styles = [
|
|
12
|
+
ScrollbarStyles,
|
|
13
|
+
css`
|
|
14
|
+
:host {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
|
|
18
|
+
background-color: #fff;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
div[content] {
|
|
22
|
+
flex: 1;
|
|
23
|
+
|
|
24
|
+
display: flex;
|
|
25
|
+
overflow: auto;
|
|
26
|
+
}
|
|
27
|
+
`
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
@property({
|
|
31
|
+
type: String,
|
|
32
|
+
attribute: 'activity-instance-id'
|
|
33
|
+
})
|
|
34
|
+
activityInstanceId?: string
|
|
35
|
+
@state() activityInstance?: any //ActivityInstance
|
|
36
|
+
|
|
37
|
+
render() {
|
|
38
|
+
const { id, name, description, activity } = this.activityInstance
|
|
39
|
+
const instance = this.activityInstance
|
|
40
|
+
|
|
41
|
+
return html`<div content>XXX</div>`
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
updated(changes) {
|
|
45
|
+
if (changes.has('activityInstanceId')) {
|
|
46
|
+
this.fetchActivityInstance()
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
async fetchActivityInstance() {
|
|
51
|
+
const id = this.activityInstanceId
|
|
52
|
+
|
|
53
|
+
const response = await client.query({
|
|
54
|
+
query: gql`
|
|
55
|
+
query ($id: String!) {
|
|
56
|
+
activityInstance(id: $id) {
|
|
57
|
+
id
|
|
58
|
+
name
|
|
59
|
+
description
|
|
60
|
+
key01
|
|
61
|
+
key02
|
|
62
|
+
key03
|
|
63
|
+
key04
|
|
64
|
+
key05
|
|
65
|
+
input
|
|
66
|
+
output
|
|
67
|
+
activity {
|
|
68
|
+
id
|
|
69
|
+
name
|
|
70
|
+
description
|
|
71
|
+
}
|
|
72
|
+
activityThreads {
|
|
73
|
+
state
|
|
74
|
+
transaction
|
|
75
|
+
output
|
|
76
|
+
assignee {
|
|
77
|
+
id
|
|
78
|
+
name
|
|
79
|
+
email
|
|
80
|
+
}
|
|
81
|
+
round
|
|
82
|
+
assignedAt
|
|
83
|
+
startedAt
|
|
84
|
+
terminatedAt
|
|
85
|
+
}
|
|
86
|
+
updater {
|
|
87
|
+
id
|
|
88
|
+
name
|
|
89
|
+
}
|
|
90
|
+
updatedAt
|
|
91
|
+
collectedAt
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
`,
|
|
95
|
+
variables: {
|
|
96
|
+
id
|
|
97
|
+
}
|
|
98
|
+
})
|
|
99
|
+
|
|
100
|
+
this.activityInstance = response.data.activityInstance
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -13,7 +13,7 @@ import { PageView, store } from '@operato/shell'
|
|
|
13
13
|
import { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
|
14
14
|
import { isMobileDevice } from '@operato/utils'
|
|
15
15
|
|
|
16
|
-
import { ActivityTypes, ActivityUITypes } from '../../types.js'
|
|
16
|
+
import { ActivityTypes, ActivityUITypes } from '../../types/types.js'
|
|
17
17
|
|
|
18
18
|
@customElement('installable-activity-list-page')
|
|
19
19
|
export class ActivityTemplateListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
@@ -14,7 +14,7 @@ import { navigate, PageView, store } from '@operato/shell'
|
|
|
14
14
|
import { CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
|
15
15
|
import { isMobileDevice, sleep } from '@operato/utils'
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import { Priorities } from '../../types/types.js'
|
|
18
18
|
|
|
19
19
|
const MIN = 60
|
|
20
20
|
const HOUR = 60 * MIN
|
|
@@ -183,7 +183,17 @@ export class ApprovalWaitingListPage extends connect(store)(localize(i18next)(Pa
|
|
|
183
183
|
header: i18next.t('field.status'),
|
|
184
184
|
record: {
|
|
185
185
|
editable: false,
|
|
186
|
-
options:
|
|
186
|
+
options: [
|
|
187
|
+
{ display: 'Draft', value: 'draft' },
|
|
188
|
+
{ display: 'Posted', value: 'posted' },
|
|
189
|
+
{ display: 'WaitingAssignment', value: 'waiting-assignment' },
|
|
190
|
+
{ display: 'Assigned', value: 'assigned' },
|
|
191
|
+
{ display: 'Started', value: 'started' },
|
|
192
|
+
{ display: 'Pending', value: 'pending' },
|
|
193
|
+
{ display: 'Escalated', value: 'escalated' },
|
|
194
|
+
{ display: 'Ended', value: 'ended' },
|
|
195
|
+
{ display: 'Aborted', value: 'aborted' }
|
|
196
|
+
]
|
|
187
197
|
},
|
|
188
198
|
// filter: true,
|
|
189
199
|
width: 60
|
|
@@ -6,15 +6,17 @@ 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
8
|
|
|
9
|
-
import { DataGrist, getRenderer } from '@operato/data-grist'
|
|
9
|
+
import { DataGrist, FetchOption, getRenderer } from '@operato/data-grist'
|
|
10
10
|
import { client } from '@operato/graphql'
|
|
11
11
|
import { i18next, localize } from '@operato/i18n'
|
|
12
12
|
import { openPopup } from '@operato/layout'
|
|
13
13
|
import { PageView, store } from '@operato/shell'
|
|
14
14
|
import { CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
|
15
15
|
import { isMobileDevice } from '@operato/utils'
|
|
16
|
+
import { OxPopup } from '@operato/popup'
|
|
16
17
|
|
|
17
|
-
import { ActivityInstanceStatus
|
|
18
|
+
import { ActivityInstanceStatus } from '../../types/activity-instance'
|
|
19
|
+
import { Priorities } from '../../types/types.js'
|
|
18
20
|
|
|
19
21
|
const MIN = 60
|
|
20
22
|
const HOUR = 60 * MIN
|
|
@@ -59,7 +61,7 @@ export class DraftListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
59
61
|
}
|
|
60
62
|
}
|
|
61
63
|
|
|
62
|
-
@query('#sorter-control') sorterControl
|
|
64
|
+
@query('#sorter-control') sorterControl!: OxPopup
|
|
63
65
|
@query('ox-grist') grist!: DataGrist
|
|
64
66
|
|
|
65
67
|
render() {
|
|
@@ -192,7 +194,17 @@ export class DraftListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
192
194
|
header: i18next.t('field.status'),
|
|
193
195
|
record: {
|
|
194
196
|
editable: false,
|
|
195
|
-
options:
|
|
197
|
+
options: [
|
|
198
|
+
{ display: 'Draft', value: 'draft' },
|
|
199
|
+
{ display: 'Posted', value: 'posted' },
|
|
200
|
+
{ display: 'WaitingAssignment', value: 'waiting-assignment' },
|
|
201
|
+
{ display: 'Assigned', value: 'assigned' },
|
|
202
|
+
{ display: 'Started', value: 'started' },
|
|
203
|
+
{ display: 'Pending', value: 'pending' },
|
|
204
|
+
{ display: 'Escalated', value: 'escalated' },
|
|
205
|
+
{ display: 'Ended', value: 'ended' },
|
|
206
|
+
{ display: 'Aborted', value: 'aborted' }
|
|
207
|
+
]
|
|
196
208
|
},
|
|
197
209
|
// filter: true,
|
|
198
210
|
width: 60
|
|
@@ -283,7 +295,7 @@ export class DraftListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
283
295
|
}
|
|
284
296
|
}
|
|
285
297
|
|
|
286
|
-
async fetchHandler({ page, limit, sortings = [], filters = [] }) {
|
|
298
|
+
async fetchHandler({ page, limit, sortings = [], filters = [] }: FetchOption) {
|
|
287
299
|
const response = await client.query({
|
|
288
300
|
query: gql`
|
|
289
301
|
query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
@@ -303,6 +315,7 @@ export class DraftListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
303
315
|
activityType
|
|
304
316
|
assignees {
|
|
305
317
|
type
|
|
318
|
+
value
|
|
306
319
|
assignee {
|
|
307
320
|
id
|
|
308
321
|
name
|
|
@@ -312,6 +325,7 @@ export class DraftListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
312
325
|
}
|
|
313
326
|
approvalLine {
|
|
314
327
|
type
|
|
328
|
+
value
|
|
315
329
|
approver {
|
|
316
330
|
id
|
|
317
331
|
name
|
|
@@ -14,7 +14,8 @@ import { navigate, PageView, store } from '@operato/shell'
|
|
|
14
14
|
import { CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
|
15
15
|
import { isMobileDevice, sleep } from '@operato/utils'
|
|
16
16
|
|
|
17
|
-
import { ActivityInstanceStatus
|
|
17
|
+
import { ActivityInstanceStatus } from '../../types/activity-instance'
|
|
18
|
+
import { Priorities } from '../../types/types.js'
|
|
18
19
|
|
|
19
20
|
const MIN = 60
|
|
20
21
|
const HOUR = 60 * MIN
|
|
@@ -183,9 +184,19 @@ export class TodoListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
183
184
|
header: i18next.t('field.status'),
|
|
184
185
|
record: {
|
|
185
186
|
editable: false,
|
|
186
|
-
options:
|
|
187
|
+
options: [
|
|
188
|
+
{ display: 'Draft', value: 'draft' },
|
|
189
|
+
{ display: 'Posted', value: 'posted' },
|
|
190
|
+
{ display: 'WaitingAssignment', value: 'waiting-assignment' },
|
|
191
|
+
{ display: 'Assigned', value: 'assigned' },
|
|
192
|
+
{ display: 'Started', value: 'started' },
|
|
193
|
+
{ display: 'Pending', value: 'pending' },
|
|
194
|
+
{ display: 'Escalated', value: 'escalated' },
|
|
195
|
+
{ display: 'Ended', value: 'ended' },
|
|
196
|
+
{ display: 'Aborted', value: 'aborted' }
|
|
197
|
+
]
|
|
187
198
|
},
|
|
188
|
-
|
|
199
|
+
filter: false,
|
|
189
200
|
width: 60
|
|
190
201
|
},
|
|
191
202
|
{
|
package/client/route.ts
CHANGED
|
@@ -60,6 +60,10 @@ export default function route(page: string) {
|
|
|
60
60
|
import('./pages/activity-instance/activity-instance-list-page.js')
|
|
61
61
|
return page
|
|
62
62
|
|
|
63
|
+
case 'activity-instance-search':
|
|
64
|
+
import('./pages/activity-instance/activity-instance-search-page.js')
|
|
65
|
+
return page
|
|
66
|
+
|
|
63
67
|
case 'activity-template-list':
|
|
64
68
|
import('./pages/activity-template/activity-template-list-page.js')
|
|
65
69
|
return page
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { Role } from '@operato/shell'
|
|
2
|
+
import { ApprovalLineItem } from '@things-factory/organization'
|
|
3
|
+
|
|
4
|
+
import { ActivityType, ActivityUIType } from './activity'
|
|
5
|
+
import { AssigneeItem, ActivityInstance, ActivityInstanceStatus } from './activity-instance'
|
|
6
|
+
|
|
7
|
+
export class NewActivityInstance {
|
|
8
|
+
name?: string
|
|
9
|
+
|
|
10
|
+
activityId?: string
|
|
11
|
+
|
|
12
|
+
description?: string
|
|
13
|
+
|
|
14
|
+
priority?: number
|
|
15
|
+
|
|
16
|
+
reason?: string
|
|
17
|
+
|
|
18
|
+
threadsMin?: number
|
|
19
|
+
|
|
20
|
+
threadsMax?: number
|
|
21
|
+
|
|
22
|
+
dueAt?: Date
|
|
23
|
+
|
|
24
|
+
input?: { [key: string]: any }
|
|
25
|
+
|
|
26
|
+
adhocType?: string
|
|
27
|
+
|
|
28
|
+
refBy?: string
|
|
29
|
+
|
|
30
|
+
activityType?: ActivityType
|
|
31
|
+
|
|
32
|
+
uiType?: ActivityUIType
|
|
33
|
+
|
|
34
|
+
uiSource?: string
|
|
35
|
+
|
|
36
|
+
supervisoryRole?: Role
|
|
37
|
+
|
|
38
|
+
assigneeRole?: Role
|
|
39
|
+
|
|
40
|
+
assignees?: AssigneeItem[]
|
|
41
|
+
|
|
42
|
+
approvalLine?: ApprovalLineItem[]
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export class ActivityInstancePost {
|
|
46
|
+
id?: string
|
|
47
|
+
|
|
48
|
+
name?: string
|
|
49
|
+
|
|
50
|
+
activityId?: string
|
|
51
|
+
|
|
52
|
+
description?: string
|
|
53
|
+
|
|
54
|
+
priority?: number
|
|
55
|
+
|
|
56
|
+
reason?: string
|
|
57
|
+
|
|
58
|
+
threadsMin?: number
|
|
59
|
+
|
|
60
|
+
threadsMax?: number
|
|
61
|
+
|
|
62
|
+
dueAt?: Date
|
|
63
|
+
|
|
64
|
+
input?: { [key: string]: any }
|
|
65
|
+
|
|
66
|
+
adhocType?: string
|
|
67
|
+
|
|
68
|
+
refBy?: string
|
|
69
|
+
|
|
70
|
+
activityType?: ActivityType
|
|
71
|
+
|
|
72
|
+
uiType?: ActivityUIType
|
|
73
|
+
|
|
74
|
+
uiSource?: string
|
|
75
|
+
|
|
76
|
+
supervisoryRole?: Role
|
|
77
|
+
|
|
78
|
+
assigneeRole?: Role
|
|
79
|
+
|
|
80
|
+
assignees?: AssigneeItem[]
|
|
81
|
+
|
|
82
|
+
approvalLine?: ApprovalLineItem[]
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export class ActivityInstanceSave {
|
|
86
|
+
output?: { [key: string]: any }
|
|
87
|
+
|
|
88
|
+
assignees?: AssigneeItem[]
|
|
89
|
+
|
|
90
|
+
approvalLine?: ApprovalLineItem[]
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export class ActivityInstancePatch {
|
|
94
|
+
id?: string
|
|
95
|
+
|
|
96
|
+
name?: string
|
|
97
|
+
|
|
98
|
+
description?: string
|
|
99
|
+
|
|
100
|
+
priority?: number
|
|
101
|
+
|
|
102
|
+
state?: ActivityInstanceStatus
|
|
103
|
+
|
|
104
|
+
threadsMin?: number
|
|
105
|
+
|
|
106
|
+
threadsMax?: number
|
|
107
|
+
|
|
108
|
+
dueAt?: Date
|
|
109
|
+
|
|
110
|
+
input?: { [key: string]: any }
|
|
111
|
+
|
|
112
|
+
assignees?: AssigneeItem[]
|
|
113
|
+
|
|
114
|
+
approvalLine?: ApprovalLineItem[]
|
|
115
|
+
|
|
116
|
+
cuFlag?: string
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export class ActivityInstanceList {
|
|
120
|
+
items?: ActivityInstance[]
|
|
121
|
+
|
|
122
|
+
total?: number
|
|
123
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { Domain, User, Role } from '@operato/shell'
|
|
2
|
+
import { OrgMemberTargetType, OrgMemberTarget, ApprovalLineItem } from '@things-factory/organization'
|
|
3
|
+
|
|
4
|
+
import { ActivityThread } from './activity-thread'
|
|
5
|
+
import { Activity, ActivityType, ActivityUIType } from './activity'
|
|
6
|
+
|
|
7
|
+
export enum ActivityInstanceStatus {
|
|
8
|
+
Draft = 'draft',
|
|
9
|
+
Posted = 'posted',
|
|
10
|
+
WaitingAssignment = 'waiting-assignment',
|
|
11
|
+
Assigned = 'assigned',
|
|
12
|
+
Started = 'started',
|
|
13
|
+
Pending = 'pending',
|
|
14
|
+
Ended = 'ended',
|
|
15
|
+
Aborted = 'aborted'
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export class AssigneeItem {
|
|
19
|
+
type?: OrgMemberTargetType
|
|
20
|
+
|
|
21
|
+
value?: string
|
|
22
|
+
|
|
23
|
+
assignee?: OrgMemberTarget
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export class ActivityInstance {
|
|
27
|
+
id?: string
|
|
28
|
+
|
|
29
|
+
version?: number = 1
|
|
30
|
+
|
|
31
|
+
domain?: Domain
|
|
32
|
+
|
|
33
|
+
name?: string
|
|
34
|
+
|
|
35
|
+
description?: string
|
|
36
|
+
|
|
37
|
+
activityType?: ActivityType
|
|
38
|
+
|
|
39
|
+
adhocType?: string
|
|
40
|
+
|
|
41
|
+
key01?: string = ''
|
|
42
|
+
|
|
43
|
+
key02?: string = ''
|
|
44
|
+
|
|
45
|
+
key03?: string = ''
|
|
46
|
+
|
|
47
|
+
key04?: string = ''
|
|
48
|
+
|
|
49
|
+
key05?: string = ''
|
|
50
|
+
|
|
51
|
+
activityThreads?: ActivityThread[]
|
|
52
|
+
|
|
53
|
+
uiType?: ActivityUIType
|
|
54
|
+
|
|
55
|
+
uiSource?: string
|
|
56
|
+
|
|
57
|
+
priority?: number = 1
|
|
58
|
+
|
|
59
|
+
state?: ActivityInstanceStatus
|
|
60
|
+
|
|
61
|
+
reason?: string
|
|
62
|
+
|
|
63
|
+
threadsMin?: number = 0
|
|
64
|
+
|
|
65
|
+
threadsMax?: number = 0
|
|
66
|
+
|
|
67
|
+
input?: { [key: string]: any }
|
|
68
|
+
|
|
69
|
+
output?: { [key: string]: any }
|
|
70
|
+
|
|
71
|
+
refBy?: string
|
|
72
|
+
|
|
73
|
+
activity?: Activity
|
|
74
|
+
|
|
75
|
+
assigneeRole?: Role
|
|
76
|
+
|
|
77
|
+
supervisoryRole?: Role
|
|
78
|
+
|
|
79
|
+
dueAt?: Date
|
|
80
|
+
|
|
81
|
+
transaction?: string
|
|
82
|
+
|
|
83
|
+
assignees?: AssigneeItem[]
|
|
84
|
+
|
|
85
|
+
approvalLine?: ApprovalLineItem[]
|
|
86
|
+
|
|
87
|
+
createdAt?: Date
|
|
88
|
+
|
|
89
|
+
updatedAt?: Date
|
|
90
|
+
|
|
91
|
+
assignedAt?: Date
|
|
92
|
+
|
|
93
|
+
startedAt?: Date
|
|
94
|
+
|
|
95
|
+
terminatedAt?: Date
|
|
96
|
+
|
|
97
|
+
creator?: User
|
|
98
|
+
|
|
99
|
+
creatorId?: string
|
|
100
|
+
|
|
101
|
+
updater?: User
|
|
102
|
+
|
|
103
|
+
updaterId?: string
|
|
104
|
+
|
|
105
|
+
starter?: User
|
|
106
|
+
|
|
107
|
+
starterId?: string
|
|
108
|
+
|
|
109
|
+
terminator?: User
|
|
110
|
+
|
|
111
|
+
terminatorId?: string
|
|
112
|
+
|
|
113
|
+
thumbnail?: string
|
|
114
|
+
|
|
115
|
+
isDelegatable(): boolean {
|
|
116
|
+
switch (this.state) {
|
|
117
|
+
case ActivityInstanceStatus.Posted:
|
|
118
|
+
case ActivityInstanceStatus.Assigned:
|
|
119
|
+
return true
|
|
120
|
+
default:
|
|
121
|
+
return false
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export enum ActivityModelItemInoutType {
|
|
2
|
+
in = 'in',
|
|
3
|
+
out = 'out',
|
|
4
|
+
inout = 'inout'
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export enum ActivityModelItemType {
|
|
8
|
+
number = 'number',
|
|
9
|
+
text = 'text',
|
|
10
|
+
textarea = 'textarea',
|
|
11
|
+
boolean = 'boolean',
|
|
12
|
+
select = 'select',
|
|
13
|
+
file = 'file'
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export class ActivityModelItem {
|
|
17
|
+
name?: string
|
|
18
|
+
|
|
19
|
+
description?: string
|
|
20
|
+
|
|
21
|
+
tag?: string
|
|
22
|
+
|
|
23
|
+
active?: boolean
|
|
24
|
+
|
|
25
|
+
hidden?: boolean
|
|
26
|
+
|
|
27
|
+
mandatory?: boolean
|
|
28
|
+
|
|
29
|
+
inout?: ActivityModelItemInoutType
|
|
30
|
+
|
|
31
|
+
type?: ActivityModelItemType
|
|
32
|
+
|
|
33
|
+
options?: { [option: string]: any }
|
|
34
|
+
|
|
35
|
+
unit?: string
|
|
36
|
+
|
|
37
|
+
quantifier?: number[]
|
|
38
|
+
|
|
39
|
+
spec?: { [key: string]: any }
|
|
40
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ActivityThread, ActivityThreadStatus } from './activity-thread'
|
|
2
|
+
|
|
3
|
+
export class ActivityThreadPatch {
|
|
4
|
+
id?: string
|
|
5
|
+
|
|
6
|
+
state?: ActivityThreadStatus
|
|
7
|
+
|
|
8
|
+
active?: boolean
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class ActivityThreadSave {
|
|
12
|
+
output?: { [key: string]: any }
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export class ActivityThreadList {
|
|
16
|
+
items?: ActivityThread[]
|
|
17
|
+
|
|
18
|
+
total?: number
|
|
19
|
+
}
|