@things-factory/worklist 5.0.11 → 6.0.0-alpha.0
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/components/activity-/{bowner-view.js → bowner-view.ts} +27 -35
- package/client/components/{activity-instance-preview.js → activity-instance-preview.ts} +39 -52
- package/client/components/activity-intro-view.ts +0 -1
- package/client/components/{activity-reporter-view.js → activity-reporter-view.ts} +27 -40
- package/client/components/{activity-starter-form.js → activity-starter-form.ts} +55 -71
- package/client/pages/activity/{activity-list-page.js → activity-list-page.ts} +26 -35
- package/client/pages/activity/{activity-model-item-list.js → activity-model-item-list.ts} +15 -19
- package/client/pages/activity/{activity-page.js → activity-page.ts} +37 -42
- package/client/pages/activity/{starter-list-page.js → starter-list-page.ts} +15 -20
- package/client/pages/activity-instance/{activity-instance-list-page.js → activity-instance-list-page.ts} +22 -30
- package/client/pages/activity-instance/{activity-instance-page.js → activity-instance-page.ts} +37 -42
- package/client/pages/activity-store/{activity-store-page.js → activity-store-page.ts} +22 -29
- package/client/pages/activity-supervisor/{reporter-list-page.js → reporter-list-page.ts} +14 -21
- package/client/pages/activity-template/{activity-template-importer.js → activity-template-importer.ts} +32 -38
- package/client/pages/activity-template/{activity-template-list-page.js → activity-template-list-page.ts} +30 -37
- package/client/pages/activity-template/{activity-template-model-item-list.js → activity-template-model-item-list.ts} +5 -4
- package/client/pages/activity-thread/{activity-thread-importer.js → activity-thread-importer.ts} +32 -37
- package/client/pages/activity-thread/{activity-thread-list-page.js → activity-thread-list-page.ts} +20 -27
- package/client/pages/activity-thread/{activity-thread-page.js → activity-thread-page.ts} +37 -41
- package/client/pages/dashboard/{dashboard-home.js → dashboard-home.ts} +3 -7
- package/client/pages/todo/{assigned-list-page.js → assigned-list-page.ts} +13 -20
- package/client/pages/todo/{draft-list-page.js → draft-list-page.ts} +15 -20
- package/client/pages/todo/{pickable-list-page.js → pickable-list-page.ts} +13 -20
- package/client/pages/todo/{todo-list-page.js → todo-list-page.ts} +12 -19
- package/client/pages/{worklist-home.js → worklist-home.ts} +3 -7
- package/dist-client/components/activity-/bowner-view.d.ts +1 -1
- package/dist-client/components/activity-/bowner-view.js +44 -37
- package/dist-client/components/activity-/bowner-view.js.map +1 -1
- package/dist-client/components/activity-instance-preview.d.ts +2 -1
- package/dist-client/components/activity-instance-preview.js +59 -53
- package/dist-client/components/activity-instance-preview.js.map +1 -1
- package/dist-client/components/activity-intro-view.d.ts +0 -1
- package/dist-client/components/activity-intro-view.js +0 -1
- package/dist-client/components/activity-intro-view.js.map +1 -1
- package/dist-client/components/activity-reporter-view.d.ts +1 -1
- package/dist-client/components/activity-reporter-view.js +44 -38
- package/dist-client/components/activity-reporter-view.js.map +1 -1
- package/dist-client/components/activity-starter-form.d.ts +16 -0
- package/dist-client/components/activity-starter-form.js +70 -70
- package/dist-client/components/activity-starter-form.js.map +1 -1
- package/dist-client/pages/activity/activity-list-page.d.ts +13 -262
- package/dist-client/pages/activity/activity-list-page.js +49 -35
- package/dist-client/pages/activity/activity-list-page.js.map +1 -1
- package/dist-client/pages/activity/activity-model-item-list.d.ts +13 -155
- package/dist-client/pages/activity/activity-model-item-list.js +56 -45
- package/dist-client/pages/activity/activity-model-item-list.js.map +1 -1
- package/dist-client/pages/activity/activity-page.d.ts +29 -22
- package/dist-client/pages/activity/activity-page.js +54 -46
- package/dist-client/pages/activity/activity-page.js.map +1 -1
- package/dist-client/pages/activity/starter-list-page.d.ts +14 -120
- package/dist-client/pages/activity/starter-list-page.js +47 -31
- package/dist-client/pages/activity/starter-list-page.js.map +1 -1
- package/dist-client/pages/activity-instance/activity-instance-list-page.d.ts +9 -114
- package/dist-client/pages/activity-instance/activity-instance-list-page.js +40 -30
- package/dist-client/pages/activity-instance/activity-instance-list-page.js.map +1 -1
- package/dist-client/pages/activity-instance/activity-instance-page.d.ts +22 -22
- package/dist-client/pages/activity-instance/activity-instance-page.js +58 -45
- package/dist-client/pages/activity-instance/activity-instance-page.js.map +1 -1
- package/dist-client/pages/activity-store/activity-store-page.d.ts +23 -150
- package/dist-client/pages/activity-store/activity-store-page.js +40 -31
- package/dist-client/pages/activity-store/activity-store-page.js.map +1 -1
- package/dist-client/pages/activity-supervisor/reporter-list-page.d.ts +13 -120
- package/dist-client/pages/activity-supervisor/reporter-list-page.js +47 -31
- package/dist-client/pages/activity-supervisor/reporter-list-page.js.map +1 -1
- package/dist-client/pages/activity-template/activity-template-importer.d.ts +7 -21
- package/dist-client/pages/activity-template/activity-template-importer.js +42 -36
- package/dist-client/pages/activity-template/activity-template-importer.js.map +1 -1
- package/dist-client/pages/activity-template/activity-template-list-page.d.ts +17 -218
- package/dist-client/pages/activity-template/activity-template-list-page.js +58 -37
- package/dist-client/pages/activity-template/activity-template-list-page.js.map +1 -1
- package/dist-client/pages/activity-template/activity-template-model-item-list.js +10 -5
- package/dist-client/pages/activity-template/activity-template-model-item-list.js.map +1 -1
- package/dist-client/pages/activity-thread/activity-thread-importer.d.ts +7 -21
- package/dist-client/pages/activity-thread/activity-thread-importer.js +42 -36
- package/dist-client/pages/activity-thread/activity-thread-importer.js.map +1 -1
- package/dist-client/pages/activity-thread/activity-thread-list-page.d.ts +16 -100
- package/dist-client/pages/activity-thread/activity-thread-list-page.js +55 -36
- package/dist-client/pages/activity-thread/activity-thread-list-page.js.map +1 -1
- package/dist-client/pages/activity-thread/activity-thread-page.d.ts +26 -19
- package/dist-client/pages/activity-thread/activity-thread-page.js +54 -45
- package/dist-client/pages/activity-thread/activity-thread-page.js.map +1 -1
- package/dist-client/pages/dashboard/dashboard-home.js +8 -7
- package/dist-client/pages/dashboard/dashboard-home.js.map +1 -1
- package/dist-client/pages/todo/assigned-list-page.d.ts +12 -100
- package/dist-client/pages/todo/assigned-list-page.js +45 -30
- package/dist-client/pages/todo/assigned-list-page.js.map +1 -1
- package/dist-client/pages/todo/draft-list-page.d.ts +13 -174
- package/dist-client/pages/todo/draft-list-page.js +48 -30
- package/dist-client/pages/todo/draft-list-page.js.map +1 -1
- package/dist-client/pages/todo/pickable-list-page.d.ts +13 -126
- package/dist-client/pages/todo/pickable-list-page.js +46 -30
- package/dist-client/pages/todo/pickable-list-page.js.map +1 -1
- package/dist-client/pages/todo/todo-list-page.d.ts +12 -206
- package/dist-client/pages/todo/todo-list-page.js +44 -30
- package/dist-client/pages/todo/todo-list-page.js.map +1 -1
- package/dist-client/pages/worklist-home.js +8 -7
- package/dist-client/pages/worklist-home.js.map +1 -1
- package/dist-client/route.d.ts +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/controllers/activity-instance/abort.js +8 -6
- package/dist-server/controllers/activity-instance/abort.js.map +1 -1
- package/dist-server/controllers/activity-instance/adjust.js +5 -3
- package/dist-server/controllers/activity-instance/adjust.js.map +1 -1
- package/dist-server/controllers/activity-instance/assign.js +11 -25
- package/dist-server/controllers/activity-instance/assign.js.map +1 -1
- package/dist-server/controllers/activity-instance/delegate.js +8 -6
- package/dist-server/controllers/activity-instance/delegate.js.map +1 -1
- package/dist-server/controllers/activity-instance/draft.js +9 -8
- package/dist-server/controllers/activity-instance/draft.js.map +1 -1
- package/dist-server/controllers/activity-instance/end.js +8 -6
- package/dist-server/controllers/activity-instance/end.js.map +1 -1
- package/dist-server/controllers/activity-instance/pick.js +9 -6
- package/dist-server/controllers/activity-instance/pick.js.map +1 -1
- package/dist-server/controllers/activity-instance/post.js +26 -6
- package/dist-server/controllers/activity-instance/post.js.map +1 -1
- package/dist-server/controllers/activity-instance/start.js +5 -3
- package/dist-server/controllers/activity-instance/start.js.map +1 -1
- package/dist-server/controllers/activity-instance/terminate.js +8 -6
- package/dist-server/controllers/activity-instance/terminate.js.map +1 -1
- package/dist-server/controllers/activity-thread/abort.js +7 -5
- package/dist-server/controllers/activity-thread/abort.js.map +1 -1
- package/dist-server/controllers/activity-thread/adjust.js +4 -2
- package/dist-server/controllers/activity-thread/adjust.js.map +1 -1
- package/dist-server/controllers/activity-thread/delegate.js +7 -5
- package/dist-server/controllers/activity-thread/delegate.js.map +1 -1
- package/dist-server/controllers/activity-thread/end.js +7 -5
- package/dist-server/controllers/activity-thread/end.js.map +1 -1
- package/dist-server/controllers/activity-thread/save.js +4 -2
- package/dist-server/controllers/activity-thread/save.js.map +1 -1
- package/dist-server/controllers/activity-thread/start.js +6 -4
- package/dist-server/controllers/activity-thread/start.js.map +1 -1
- package/dist-server/controllers/activity-thread/terminate.js +7 -5
- package/dist-server/controllers/activity-thread/terminate.js.map +1 -1
- package/dist-server/controllers/common.js +31 -10
- package/dist-server/controllers/common.js.map +1 -1
- package/dist-server/service/activity/activity-history.js +6 -7
- package/dist-server/service/activity/activity-history.js.map +1 -1
- package/dist-server/service/activity/activity-mutation.js +10 -4
- package/dist-server/service/activity/activity-mutation.js.map +1 -1
- package/dist-server/service/activity/activity-query.js +18 -19
- package/dist-server/service/activity/activity-query.js.map +1 -1
- package/dist-server/service/activity/activity-type.js +6 -7
- package/dist-server/service/activity/activity-type.js.map +1 -1
- package/dist-server/service/activity/activity.js +6 -7
- package/dist-server/service/activity/activity.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance-history.js +7 -8
- package/dist-server/service/activity-instance/activity-instance-history.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance-mutation.js +17 -19
- package/dist-server/service/activity-instance/activity-instance-mutation.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance-query.js +24 -25
- package/dist-server/service/activity-instance/activity-instance-query.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance-subscription.js +1 -2
- package/dist-server/service/activity-instance/activity-instance-subscription.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance-type.js +13 -6
- package/dist-server/service/activity-instance/activity-instance-type.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance.js +7 -8
- package/dist-server/service/activity-instance/activity-instance.js.map +1 -1
- package/dist-server/service/activity-instance/event-subscriber.js +0 -5
- package/dist-server/service/activity-instance/event-subscriber.js.map +1 -1
- package/dist-server/service/activity-template/activity-template-history.js +3 -4
- package/dist-server/service/activity-template/activity-template-history.js.map +1 -1
- package/dist-server/service/activity-template/activity-template-mutation.js +4 -4
- package/dist-server/service/activity-template/activity-template-mutation.js.map +1 -1
- package/dist-server/service/activity-template/activity-template-query.js +23 -11
- package/dist-server/service/activity-template/activity-template-query.js.map +1 -1
- package/dist-server/service/activity-template/activity-template.js +3 -4
- package/dist-server/service/activity-template/activity-template.js.map +1 -1
- package/dist-server/service/activity-thread/activity-thread-mutation.js +15 -11
- package/dist-server/service/activity-thread/activity-thread-mutation.js.map +1 -1
- package/dist-server/service/activity-thread/activity-thread-query.js +11 -13
- package/dist-server/service/activity-thread/activity-thread-query.js.map +1 -1
- package/dist-server/service/activity-thread/activity-thread.js +4 -5
- package/dist-server/service/activity-thread/activity-thread.js.map +1 -1
- package/dist-server/service/activity-thread/event-subscriber.js +15 -3
- package/dist-server/service/activity-thread/event-subscriber.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/server/controllers/activity-instance/abort.ts +9 -6
- package/server/controllers/activity-instance/adjust.ts +7 -4
- package/server/controllers/activity-instance/assign.ts +16 -44
- package/server/controllers/activity-instance/delegate.ts +10 -7
- package/server/controllers/activity-instance/draft.ts +9 -8
- package/server/controllers/activity-instance/end.ts +9 -7
- package/server/controllers/activity-instance/pick.ts +15 -7
- package/server/controllers/activity-instance/post.ts +30 -7
- package/server/controllers/activity-instance/start.ts +7 -4
- package/server/controllers/activity-instance/terminate.ts +10 -7
- package/server/controllers/activity-thread/abort.ts +7 -5
- package/server/controllers/activity-thread/adjust.ts +5 -3
- package/server/controllers/activity-thread/delegate.ts +8 -6
- package/server/controllers/activity-thread/end.ts +8 -6
- package/server/controllers/activity-thread/save.ts +5 -7
- package/server/controllers/activity-thread/start.ts +7 -4
- package/server/controllers/activity-thread/terminate.ts +6 -5
- package/server/controllers/common.ts +44 -21
- package/server/service/activity/activity-mutation.ts +19 -10
- package/server/service/activity/activity-query.ts +14 -14
- package/server/service/activity-instance/activity-instance-mutation.ts +18 -20
- package/server/service/activity-instance/activity-instance-query.ts +27 -21
- package/server/service/activity-instance/activity-instance-subscription.ts +1 -2
- package/server/service/activity-instance/activity-instance-type.ts +10 -4
- package/server/service/activity-instance/event-subscriber.ts +0 -6
- package/server/service/activity-template/activity-template-mutation.ts +13 -10
- package/server/service/activity-template/activity-template-query.ts +18 -9
- package/server/service/activity-thread/activity-thread-mutation.ts +27 -20
- package/server/service/activity-thread/activity-thread-query.ts +10 -11
- package/server/service/activity-thread/event-subscriber.ts +15 -3
- package/translations/en.json +3 -0
- package/translations/ko.json +3 -0
- package/translations/ms.json +3 -0
- package/translations/zh.json +3 -0
|
@@ -1,48 +1,42 @@
|
|
|
1
1
|
import '@material/mwc-button'
|
|
2
|
-
import '@operato/property-editor/ox-properties-dynamic-view.js'
|
|
3
2
|
|
|
4
3
|
import gql from 'graphql-tag'
|
|
5
4
|
import { css, html, LitElement } from 'lit'
|
|
5
|
+
import { customElement, property } from 'lit/decorators.js'
|
|
6
6
|
|
|
7
7
|
import { client } from '@operato/graphql'
|
|
8
8
|
import { i18next, localize } from '@operato/i18n'
|
|
9
9
|
import { ScrollbarStyles } from '@operato/styles'
|
|
10
10
|
|
|
11
|
+
@customElement('activity-owner-view')
|
|
11
12
|
class ActivityOwnerView extends localize(i18next)(LitElement) {
|
|
12
|
-
static
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return [
|
|
22
|
-
ScrollbarStyles,
|
|
23
|
-
css`
|
|
24
|
-
:host {
|
|
25
|
-
display: flex;
|
|
26
|
-
flex-direction: column;
|
|
27
|
-
|
|
28
|
-
background-color: #fff;
|
|
29
|
-
}
|
|
13
|
+
static styles = [
|
|
14
|
+
ScrollbarStyles,
|
|
15
|
+
css`
|
|
16
|
+
:host {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
|
|
20
|
+
background-color: #fff;
|
|
21
|
+
}
|
|
30
22
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
23
|
+
content {
|
|
24
|
+
flex: 1;
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
padding: var(--padding-default);
|
|
28
|
+
overflow: auto;
|
|
29
|
+
}
|
|
38
30
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
31
|
+
section {
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
}
|
|
35
|
+
`
|
|
36
|
+
]
|
|
37
|
+
@property({ type: String }) activityId?: string
|
|
38
|
+
@property({ type: Object }) activity: any
|
|
39
|
+
@property({ type: Object }) activityInstance: any
|
|
46
40
|
|
|
47
41
|
constructor() {
|
|
48
42
|
super()
|
|
@@ -104,5 +98,3 @@ class ActivityOwnerView extends localize(i18next)(LitElement) {
|
|
|
104
98
|
this.activity = response.data.activity
|
|
105
99
|
}
|
|
106
100
|
}
|
|
107
|
-
|
|
108
|
-
window.customElements.define('activity-owner-view', ActivityOwnerView)
|
|
@@ -3,67 +3,57 @@ import '@operato/property-editor/ox-properties-dynamic-view.js'
|
|
|
3
3
|
|
|
4
4
|
import gql from 'graphql-tag'
|
|
5
5
|
import { css, html, LitElement } from 'lit'
|
|
6
|
+
import { customElement, property } from 'lit/decorators.js'
|
|
6
7
|
|
|
7
8
|
import { client } from '@operato/graphql'
|
|
8
9
|
import { i18next, localize } from '@operato/i18n'
|
|
9
10
|
import { notify } from '@operato/layout'
|
|
10
11
|
import { ScrollbarStyles } from '@operato/styles'
|
|
11
12
|
|
|
13
|
+
@customElement('activity-instance-preview')
|
|
12
14
|
class ActivityInstancePreview extends localize(i18next)(LitElement) {
|
|
13
|
-
static
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return [
|
|
23
|
-
ScrollbarStyles,
|
|
24
|
-
css`
|
|
25
|
-
:host {
|
|
26
|
-
display: flex;
|
|
27
|
-
flex-direction: column;
|
|
28
|
-
|
|
29
|
-
background-color: #fff;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
content {
|
|
33
|
-
flex: 1;
|
|
34
|
-
display: flex;
|
|
35
|
-
flex-direction: column;
|
|
36
|
-
padding: var(--padding-default);
|
|
37
|
-
overflow: auto;
|
|
38
|
-
}
|
|
15
|
+
static styles = [
|
|
16
|
+
ScrollbarStyles,
|
|
17
|
+
css`
|
|
18
|
+
:host {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
|
|
22
|
+
background-color: #fff;
|
|
23
|
+
}
|
|
39
24
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
25
|
+
content {
|
|
26
|
+
flex: 1;
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
padding: var(--padding-default);
|
|
30
|
+
overflow: auto;
|
|
31
|
+
}
|
|
44
32
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
33
|
+
section {
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
}
|
|
48
37
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
padding: var(--padding-default);
|
|
53
|
-
}
|
|
38
|
+
#description {
|
|
39
|
+
height: 60px;
|
|
40
|
+
}
|
|
54
41
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
42
|
+
.button-container {
|
|
43
|
+
display: flex;
|
|
44
|
+
margin-left: auto;
|
|
45
|
+
padding: var(--padding-default);
|
|
46
|
+
}
|
|
61
47
|
|
|
62
|
-
|
|
63
|
-
|
|
48
|
+
mwc-button {
|
|
49
|
+
margin-left: var(--margin-default);
|
|
50
|
+
}
|
|
51
|
+
`
|
|
52
|
+
]
|
|
64
53
|
|
|
65
|
-
|
|
66
|
-
}
|
|
54
|
+
@property({ type: String }) activityInstanceId?: string
|
|
55
|
+
@property({ type: Object }) activityInstance: any = {}
|
|
56
|
+
@property({ type: Array }) activityThreads: any
|
|
67
57
|
|
|
68
58
|
render() {
|
|
69
59
|
const {
|
|
@@ -106,8 +96,7 @@ class ActivityInstancePreview extends localize(i18next)(LitElement) {
|
|
|
106
96
|
<ox-properties-dynamic-view
|
|
107
97
|
.props=${inputSpec}
|
|
108
98
|
.value=${input}
|
|
109
|
-
@change=${e => {
|
|
110
|
-
/* TODO remove this comment, after solving the problem of sometimes not saving. */
|
|
99
|
+
@property-change=${e => {
|
|
111
100
|
this.activityInstance.input = e.currentTarget.value
|
|
112
101
|
console.log('activity-instance', this.activityInstance.input)
|
|
113
102
|
}}
|
|
@@ -203,5 +192,3 @@ class ActivityInstancePreview extends localize(i18next)(LitElement) {
|
|
|
203
192
|
}
|
|
204
193
|
}
|
|
205
194
|
}
|
|
206
|
-
|
|
207
|
-
window.customElements.define('activity-instance-preview', ActivityInstancePreview)
|
|
@@ -1,54 +1,43 @@
|
|
|
1
1
|
import '@material/mwc-button'
|
|
2
|
-
import '@operato/property-editor/ox-properties-dynamic-view.js'
|
|
3
2
|
|
|
4
3
|
import gql from 'graphql-tag'
|
|
5
4
|
import { css, html, LitElement } from 'lit'
|
|
5
|
+
import { customElement, property } from 'lit/decorators.js'
|
|
6
6
|
|
|
7
7
|
import { client } from '@operato/graphql'
|
|
8
8
|
import { i18next, localize } from '@operato/i18n'
|
|
9
9
|
import { ScrollbarStyles } from '@operato/styles'
|
|
10
10
|
|
|
11
|
+
@customElement('activity-reporter-view')
|
|
11
12
|
class ActivityReporterView extends localize(i18next)(LitElement) {
|
|
12
|
-
static
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return [
|
|
22
|
-
ScrollbarStyles,
|
|
23
|
-
css`
|
|
24
|
-
:host {
|
|
25
|
-
display: flex;
|
|
26
|
-
flex-direction: column;
|
|
27
|
-
|
|
28
|
-
background-color: #fff;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
content {
|
|
32
|
-
flex: 1;
|
|
33
|
-
display: flex;
|
|
34
|
-
flex-direction: column;
|
|
35
|
-
padding: var(--padding-default);
|
|
36
|
-
overflow: auto;
|
|
37
|
-
}
|
|
13
|
+
static styles = [
|
|
14
|
+
ScrollbarStyles,
|
|
15
|
+
css`
|
|
16
|
+
:host {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
|
|
20
|
+
background-color: #fff;
|
|
21
|
+
}
|
|
38
22
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
23
|
+
content {
|
|
24
|
+
flex: 1;
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
padding: var(--padding-default);
|
|
28
|
+
overflow: auto;
|
|
29
|
+
}
|
|
46
30
|
|
|
47
|
-
|
|
48
|
-
|
|
31
|
+
section {
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
}
|
|
35
|
+
`
|
|
36
|
+
]
|
|
49
37
|
|
|
50
|
-
|
|
51
|
-
}
|
|
38
|
+
@property({ type: String }) activityId?: string
|
|
39
|
+
@property({ type: Object }) activity: any
|
|
40
|
+
@property({ type: Object }) activityInstance: any = {}
|
|
52
41
|
|
|
53
42
|
render() {
|
|
54
43
|
const { name, description, thumbnail } = this.activity || {}
|
|
@@ -104,5 +93,3 @@ class ActivityReporterView extends localize(i18next)(LitElement) {
|
|
|
104
93
|
this.activity = response.data.activity
|
|
105
94
|
}
|
|
106
95
|
}
|
|
107
|
-
|
|
108
|
-
window.customElements.define('activity-reporter-view', ActivityReporterView)
|
|
@@ -3,67 +3,58 @@ import '@operato/property-editor/ox-properties-dynamic-view.js'
|
|
|
3
3
|
|
|
4
4
|
import gql from 'graphql-tag'
|
|
5
5
|
import { css, html, LitElement } from 'lit'
|
|
6
|
+
import { customElement, property } from 'lit/decorators.js'
|
|
7
|
+
import { when } from 'lit/directives/when.js'
|
|
6
8
|
|
|
7
9
|
import { client } from '@operato/graphql'
|
|
8
10
|
import { i18next, localize } from '@operato/i18n'
|
|
9
11
|
import { notify } from '@operato/layout'
|
|
10
12
|
import { ScrollbarStyles } from '@operato/styles'
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
@customElement('activity-starter-form')
|
|
15
|
+
export class ActivityStarterForm extends localize(i18next)(LitElement) {
|
|
16
|
+
static styles = [
|
|
17
|
+
ScrollbarStyles,
|
|
18
|
+
css`
|
|
19
|
+
:host {
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
ScrollbarStyles,
|
|
24
|
-
css`
|
|
25
|
-
:host {
|
|
26
|
-
display: flex;
|
|
27
|
-
flex-direction: column;
|
|
28
|
-
|
|
29
|
-
background-color: #fff;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
content {
|
|
33
|
-
flex: 1;
|
|
34
|
-
display: flex;
|
|
35
|
-
flex-direction: column;
|
|
36
|
-
padding: var(--padding-default);
|
|
37
|
-
overflow: auto;
|
|
38
|
-
}
|
|
23
|
+
background-color: #fff;
|
|
24
|
+
}
|
|
39
25
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
26
|
+
content {
|
|
27
|
+
flex: 1;
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
padding: var(--padding-default);
|
|
31
|
+
overflow: auto;
|
|
32
|
+
}
|
|
44
33
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
34
|
+
section {
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
}
|
|
48
38
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
padding: var(--padding-default);
|
|
53
|
-
}
|
|
39
|
+
#description {
|
|
40
|
+
height: 60px;
|
|
41
|
+
}
|
|
54
42
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
43
|
+
.button-container {
|
|
44
|
+
display: flex;
|
|
45
|
+
margin-left: auto;
|
|
46
|
+
padding: var(--padding-default);
|
|
47
|
+
}
|
|
61
48
|
|
|
62
|
-
|
|
63
|
-
|
|
49
|
+
mwc-button {
|
|
50
|
+
margin-left: var(--margin-default);
|
|
51
|
+
}
|
|
52
|
+
`
|
|
53
|
+
]
|
|
64
54
|
|
|
65
|
-
|
|
66
|
-
}
|
|
55
|
+
@property({ type: String }) activityId?: string
|
|
56
|
+
@property({ type: Object }) activity?: any
|
|
57
|
+
@property({ type: Object }) activityInstance: any = {}
|
|
67
58
|
|
|
68
59
|
render() {
|
|
69
60
|
const { model, thumbnail } = this.activity || {}
|
|
@@ -134,8 +125,7 @@ class ActivityStarterForm extends localize(i18next)(LitElement) {
|
|
|
134
125
|
<ox-properties-dynamic-view
|
|
135
126
|
.props=${inputSpec}
|
|
136
127
|
.value=${input}
|
|
137
|
-
@change=${e => {
|
|
138
|
-
/* TODO remove this comment, after solving the problem of sometimes not saving. */
|
|
128
|
+
@property-change=${e => {
|
|
139
129
|
this.activityInstance.input = e.currentTarget.value
|
|
140
130
|
console.log('activity-instance', this.activityInstance.input)
|
|
141
131
|
}}
|
|
@@ -146,24 +136,20 @@ class ActivityStarterForm extends localize(i18next)(LitElement) {
|
|
|
146
136
|
|
|
147
137
|
<div class="button-container">
|
|
148
138
|
<mwc-button raised @click=${e => history.back()}>${i18next.t('button.close')}</mwc-button>
|
|
149
|
-
${
|
|
150
|
-
draftable
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
>
|
|
164
|
-
`
|
|
165
|
-
: html``
|
|
166
|
-
}
|
|
139
|
+
${when(
|
|
140
|
+
draftable,
|
|
141
|
+
() => html`
|
|
142
|
+
<mwc-button raised @click=${this.draftActivityInstance.bind(this)}>${i18next.t('button.draft')}</mwc-button>
|
|
143
|
+
`
|
|
144
|
+
)}
|
|
145
|
+
|
|
146
|
+
${when(
|
|
147
|
+
postable,
|
|
148
|
+
() => html`
|
|
149
|
+
<mwc-button raised @click=${this.updateActivityInstance.bind(this)}>${i18next.t('button.save')}</mwc-button>
|
|
150
|
+
<mwc-button raised @click=${this.postActivityInstance.bind(this)}>${i18next.t('button.post')}</mwc-button>
|
|
151
|
+
`
|
|
152
|
+
)}
|
|
167
153
|
</div>
|
|
168
154
|
`
|
|
169
155
|
}
|
|
@@ -279,7 +265,7 @@ class ActivityStarterForm extends localize(i18next)(LitElement) {
|
|
|
279
265
|
this.activityInstance = response.data.updateActivityInstance
|
|
280
266
|
notify({
|
|
281
267
|
message: i18next.t('text.info_x_successfully', {
|
|
282
|
-
x: `${i18next.t('label.activity-instance')} ${i18next.t('text.
|
|
268
|
+
x: `${i18next.t('label.activity-instance')} ${i18next.t('text.save')}`
|
|
283
269
|
})
|
|
284
270
|
})
|
|
285
271
|
}
|
|
@@ -326,5 +312,3 @@ class ActivityStarterForm extends localize(i18next)(LitElement) {
|
|
|
326
312
|
}
|
|
327
313
|
}
|
|
328
314
|
}
|
|
329
|
-
|
|
330
|
-
window.customElements.define('activity-starter-form', ActivityStarterForm)
|
|
@@ -3,6 +3,7 @@ import './activity-model-item-list.js'
|
|
|
3
3
|
|
|
4
4
|
import gql from 'graphql-tag'
|
|
5
5
|
import { css, html } from 'lit'
|
|
6
|
+
import { customElement, property, query } from 'lit/decorators.js'
|
|
6
7
|
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
7
8
|
|
|
8
9
|
import { getEditor, getRenderer } from '@operato/data-grist'
|
|
@@ -15,30 +16,28 @@ import { isMobileDevice } from '@operato/utils'
|
|
|
15
16
|
|
|
16
17
|
import { ActivityTypes, ActivityUITypes } from '../../types.js'
|
|
17
18
|
|
|
19
|
+
@customElement('activity-list-page')
|
|
18
20
|
export class ActivityListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
19
|
-
static
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
static styles = [
|
|
22
|
+
ScrollbarStyles,
|
|
23
|
+
CommonGristStyles,
|
|
24
|
+
css`
|
|
25
|
+
:host {
|
|
26
|
+
display: flex;
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
return [
|
|
28
|
-
ScrollbarStyles,
|
|
29
|
-
CommonGristStyles,
|
|
30
|
-
css`
|
|
31
|
-
:host {
|
|
32
|
-
display: flex;
|
|
28
|
+
width: 100%;
|
|
33
29
|
|
|
34
|
-
|
|
30
|
+
--grid-record-emphasized-background-color: red;
|
|
31
|
+
--grid-record-emphasized-color: yellow;
|
|
32
|
+
}
|
|
33
|
+
`
|
|
34
|
+
]
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
36
|
+
@property({ type: Object }) gristConfig?: any
|
|
37
|
+
@property({ type: String }) mode: 'CARD' | 'GRID' = isMobileDevice() ? 'CARD' : 'GRID'
|
|
38
|
+
|
|
39
|
+
@query('ox-grist') grist?: HTMLElement & { fetch: any; dirtyRecords: any }
|
|
40
|
+
@query('#sorter-control') sorterControl: any
|
|
42
41
|
|
|
43
42
|
get context() {
|
|
44
43
|
return {
|
|
@@ -55,7 +54,7 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
55
54
|
}
|
|
56
55
|
|
|
57
56
|
render() {
|
|
58
|
-
const mode = this.mode
|
|
57
|
+
const mode = this.mode
|
|
59
58
|
|
|
60
59
|
return html`
|
|
61
60
|
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
@@ -69,7 +68,7 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
69
68
|
<mwc-icon
|
|
70
69
|
@click=${e => {
|
|
71
70
|
const target = e.currentTarget
|
|
72
|
-
this.
|
|
71
|
+
this.sorterControl.open({
|
|
73
72
|
right: 0,
|
|
74
73
|
top: target.offsetTop + target.offsetHeight
|
|
75
74
|
})
|
|
@@ -83,7 +82,6 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
83
82
|
|
|
84
83
|
<div id="modes">
|
|
85
84
|
<mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>
|
|
86
|
-
<mwc-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</mwc-icon>
|
|
87
85
|
<mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
|
|
88
86
|
</div>
|
|
89
87
|
</div>
|
|
@@ -91,10 +89,6 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
91
89
|
`
|
|
92
90
|
}
|
|
93
91
|
|
|
94
|
-
get grist() {
|
|
95
|
-
return this.renderRoot.querySelector('ox-grist')
|
|
96
|
-
}
|
|
97
|
-
|
|
98
92
|
async pageInitialized(lifecycle) {
|
|
99
93
|
this.gristConfig = {
|
|
100
94
|
list: {
|
|
@@ -122,7 +116,7 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
122
116
|
}
|
|
123
117
|
)
|
|
124
118
|
popup.onclosed = () => {
|
|
125
|
-
this.grist
|
|
119
|
+
this.grist?.fetch()
|
|
126
120
|
}
|
|
127
121
|
}
|
|
128
122
|
}
|
|
@@ -201,8 +195,7 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
201
195
|
objectified: true
|
|
202
196
|
}
|
|
203
197
|
},
|
|
204
|
-
width: 80
|
|
205
|
-
label: true
|
|
198
|
+
width: 80
|
|
206
199
|
},
|
|
207
200
|
{
|
|
208
201
|
type: 'image',
|
|
@@ -451,10 +444,10 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
451
444
|
}
|
|
452
445
|
|
|
453
446
|
async _updateActivity() {
|
|
454
|
-
let patches = this.grist
|
|
447
|
+
let patches = this.grist?.dirtyRecords
|
|
455
448
|
if (patches && patches.length) {
|
|
456
449
|
patches = patches.map(patch => {
|
|
457
|
-
let patchField = patch.id ? { id: patch.id } : {}
|
|
450
|
+
let patchField: any = patch.id ? { id: patch.id } : {}
|
|
458
451
|
const dirtyFields = patch.__dirtyfields__
|
|
459
452
|
for (let key in dirtyFields) {
|
|
460
453
|
patchField[key] = dirtyFields[key].after
|
|
@@ -481,10 +474,8 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
481
474
|
})
|
|
482
475
|
|
|
483
476
|
if (!response.errors) {
|
|
484
|
-
this.grist
|
|
477
|
+
this.grist?.fetch()
|
|
485
478
|
}
|
|
486
479
|
}
|
|
487
480
|
}
|
|
488
481
|
}
|
|
489
|
-
|
|
490
|
-
window.customElements.define('activity-list-page', ActivityListPage)
|
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
import gql from 'graphql-tag'
|
|
2
2
|
import { css, html, LitElement } from 'lit'
|
|
3
|
+
import { customElement, property, query } from 'lit/decorators.js'
|
|
3
4
|
|
|
4
5
|
import { client } from '@operato/graphql'
|
|
5
6
|
import { i18next, localize } from '@operato/i18n'
|
|
6
7
|
import { OxPropertyEditor } from '@operato/property-editor'
|
|
7
8
|
import { isMobileDevice } from '@operato/utils'
|
|
8
9
|
|
|
9
|
-
export class ActivityModelItemList extends localize(i18next)(LitElement) {
|
|
10
|
-
static get properties() {
|
|
11
|
-
return {
|
|
12
|
-
activity: Object,
|
|
13
|
-
gristConfig: Object
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
10
|
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
@customElement('activity-model-item-list')
|
|
12
|
+
export class ActivityModelItemList extends localize(i18next)(LitElement) {
|
|
13
|
+
static styles = [
|
|
19
14
|
css`
|
|
20
15
|
:host {
|
|
21
16
|
display: flex;
|
|
@@ -42,11 +37,11 @@ export class ActivityModelItemList extends localize(i18next)(LitElement) {
|
|
|
42
37
|
}
|
|
43
38
|
`
|
|
44
39
|
]
|
|
45
|
-
}
|
|
46
40
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
@property({ type: Object }) gristConfig?:any
|
|
42
|
+
@property({ type: Object }) activity: any
|
|
43
|
+
|
|
44
|
+
@query('ox-grist') grist?: HTMLElement & { fetch: any; commit: any; deleteSelectedRecords: any; data: any }
|
|
50
45
|
|
|
51
46
|
render() {
|
|
52
47
|
return html`
|
|
@@ -101,7 +96,10 @@ export class ActivityModelItemList extends localize(i18next)(LitElement) {
|
|
|
101
96
|
record: {
|
|
102
97
|
editable: true
|
|
103
98
|
},
|
|
104
|
-
width: 140
|
|
99
|
+
width: 140,
|
|
100
|
+
validation: (after, before, record, column) => {
|
|
101
|
+
return after
|
|
102
|
+
}
|
|
105
103
|
},
|
|
106
104
|
{
|
|
107
105
|
type: 'string',
|
|
@@ -257,7 +255,7 @@ export class ActivityModelItemList extends localize(i18next)(LitElement) {
|
|
|
257
255
|
}
|
|
258
256
|
|
|
259
257
|
async _updateDataItems() {
|
|
260
|
-
this.grist
|
|
258
|
+
this.grist?.commit()
|
|
261
259
|
|
|
262
260
|
const response = await client.mutate({
|
|
263
261
|
mutation: gql`
|
|
@@ -270,7 +268,7 @@ export class ActivityModelItemList extends localize(i18next)(LitElement) {
|
|
|
270
268
|
variables: {
|
|
271
269
|
id: this.activity.id,
|
|
272
270
|
patch: {
|
|
273
|
-
model: this.grist
|
|
271
|
+
model: this.grist?.data.records,
|
|
274
272
|
cuFlag: 'M'
|
|
275
273
|
}
|
|
276
274
|
}
|
|
@@ -294,8 +292,6 @@ export class ActivityModelItemList extends localize(i18next)(LitElement) {
|
|
|
294
292
|
return
|
|
295
293
|
}
|
|
296
294
|
|
|
297
|
-
this.grist
|
|
295
|
+
this.grist?.deleteSelectedRecords(false)
|
|
298
296
|
}
|
|
299
297
|
}
|
|
300
|
-
|
|
301
|
-
window.customElements.define('activity-model-item-list', ActivityModelItemList)
|