@things-factory/worklist 6.0.43 → 6.0.46
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 +5 -0
- package/client/components/activity-starter-form.ts +52 -303
- package/client/pages/activity/activity-list-page.ts +44 -28
- package/client/pages/activity/activity-page.ts +3 -3
- package/client/pages/activity/activity-partial-view.ts +2 -1
- package/client/pages/activity/starter-list-page.ts +16 -11
- package/client/pages/activity-instance/activity-instance-search-page.ts +2 -19
- package/client/pages/activity-instance/activity-instance-start-page.ts +514 -0
- package/client/pages/activity-stats/activity-stats-importer.ts +97 -0
- package/client/pages/activity-stats/activity-stats-list-page.ts +348 -0
- package/client/pages/activity-thread/activity-thread-page.ts +1 -1
- package/client/pages/installable-activity/installable-activity-list-page.ts +7 -5
- package/client/pages/todo/approval-done-list-page.ts +340 -0
- package/client/pages/todo/approval-pending-list-page.ts +2 -2
- package/client/pages/todo/done-list-calendar-page.ts +115 -0
- package/client/pages/todo/done-list-page.ts +2 -3
- package/client/pages/todo/draft-list-page.ts +26 -102
- package/client/pages/todo/pickable-list-page.ts +2 -1
- package/client/pages/todo/todo-list-page.ts +1 -1
- package/client/route.ts +14 -2
- package/client/templates/activity-approval-context-template.ts +4 -0
- package/client/templates/activity-instance-context-template.ts +171 -0
- package/client/templates/activity-thread-context-template.ts +4 -0
- package/client/themes/calendar-theme.css +54 -0
- package/client/types/activity-instance-type.ts +4 -2
- package/client/types/activity-instance.ts +2 -2
- package/client/types/activity.ts +7 -0
- package/client/types/types.ts +8 -0
- package/dist-client/bootstrap.d.ts +1 -0
- package/dist-client/bootstrap.js +5 -0
- package/dist-client/bootstrap.js.map +1 -1
- package/dist-client/components/activity-starter-form.d.ts +2 -5
- package/dist-client/components/activity-starter-form.js +54 -247
- package/dist-client/components/activity-starter-form.js.map +1 -1
- package/dist-client/pages/activity/activity-list-page.d.ts +1 -1
- package/dist-client/pages/activity/activity-list-page.js +45 -30
- package/dist-client/pages/activity/activity-list-page.js.map +1 -1
- package/dist-client/pages/activity/activity-page.d.ts +1 -1
- package/dist-client/pages/activity/activity-page.js +3 -3
- package/dist-client/pages/activity/activity-page.js.map +1 -1
- package/dist-client/pages/activity/activity-partial-view.js +2 -2
- package/dist-client/pages/activity/activity-partial-view.js.map +1 -1
- package/dist-client/pages/activity/starter-list-page.d.ts +1 -0
- package/dist-client/pages/activity/starter-list-page.js +14 -11
- package/dist-client/pages/activity/starter-list-page.js.map +1 -1
- package/dist-client/pages/activity-instance/activity-instance-page.d.ts +2 -2
- package/dist-client/pages/activity-instance/activity-instance-page.js +19 -10
- package/dist-client/pages/activity-instance/activity-instance-page.js.map +1 -1
- package/dist-client/pages/activity-instance/activity-instance-search-page.js +1 -8
- package/dist-client/pages/activity-instance/activity-instance-search-page.js.map +1 -1
- package/dist-client/pages/activity-instance/activity-instance-start-page.d.ts +49 -0
- package/dist-client/pages/activity-instance/activity-instance-start-page.js +450 -0
- package/dist-client/pages/activity-instance/activity-instance-start-page.js.map +1 -0
- package/dist-client/pages/activity-stats/activity-stats-importer.d.ts +22 -0
- package/dist-client/pages/activity-stats/activity-stats-importer.js +100 -0
- package/dist-client/pages/activity-stats/activity-stats-importer.js.map +1 -0
- package/dist-client/pages/activity-stats/activity-stats-list-page.d.ts +62 -0
- package/dist-client/pages/activity-stats/activity-stats-list-page.js +326 -0
- package/dist-client/pages/activity-stats/activity-stats-list-page.js.map +1 -0
- package/dist-client/pages/activity-thread/activity-thread-page.js +1 -1
- package/dist-client/pages/activity-thread/activity-thread-page.js.map +1 -1
- package/dist-client/pages/installable-activity/installable-activity-list-page.js +7 -5
- package/dist-client/pages/installable-activity/installable-activity-list-page.js.map +1 -1
- package/dist-client/pages/todo/approval-done-list-page.d.ts +39 -0
- package/dist-client/pages/todo/approval-done-list-page.js +338 -0
- package/dist-client/pages/todo/approval-done-list-page.js.map +1 -0
- package/dist-client/pages/todo/approval-pending-list-page.js +2 -2
- package/dist-client/pages/todo/approval-pending-list-page.js.map +1 -1
- package/dist-client/pages/todo/done-list-calendar-page.d.ts +24 -0
- package/dist-client/pages/todo/done-list-calendar-page.js +107 -0
- package/dist-client/pages/todo/done-list-calendar-page.js.map +1 -0
- package/dist-client/pages/todo/done-list-page.js +2 -3
- package/dist-client/pages/todo/done-list-page.js.map +1 -1
- package/dist-client/pages/todo/draft-list-page.d.ts +1 -0
- package/dist-client/pages/todo/draft-list-page.js +25 -99
- package/dist-client/pages/todo/draft-list-page.js.map +1 -1
- package/dist-client/pages/todo/pickable-list-page.d.ts +1 -0
- package/dist-client/pages/todo/pickable-list-page.js +2 -1
- package/dist-client/pages/todo/pickable-list-page.js.map +1 -1
- package/dist-client/pages/todo/todo-list-page.js +1 -1
- 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 +11 -2
- package/dist-client/route.js.map +1 -1
- package/dist-client/templates/activity-approval-context-template.js +4 -0
- package/dist-client/templates/activity-approval-context-template.js.map +1 -1
- package/dist-client/templates/activity-instance-context-template.d.ts +2 -0
- package/dist-client/templates/activity-instance-context-template.js +145 -0
- package/dist-client/templates/activity-instance-context-template.js.map +1 -0
- package/dist-client/templates/activity-thread-context-template.js +4 -0
- package/dist-client/templates/activity-thread-context-template.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/types/activity-instance-type.d.ts +3 -2
- package/dist-client/types/activity-instance-type.js +2 -2
- package/dist-client/types/activity-instance-type.js.map +1 -1
- package/dist-client/types/activity-instance.d.ts +1 -1
- package/dist-client/types/activity-instance.js +2 -2
- package/dist-client/types/activity-instance.js.map +1 -1
- package/dist-client/types/activity.d.ts +5 -0
- package/dist-client/types/activity.js +5 -0
- package/dist-client/types/activity.js.map +1 -1
- package/dist-client/types/types.d.ts +4 -0
- package/dist-client/types/types.js +6 -0
- package/dist-client/types/types.js.map +1 -1
- package/dist-server/controllers/activity-instance/assign.js +1 -1
- package/dist-server/controllers/activity-instance/assign.js.map +1 -1
- package/dist-server/controllers/activity-instance/draft.js +24 -6
- package/dist-server/controllers/activity-instance/draft.js.map +1 -1
- package/dist-server/controllers/activity-instance/index.js +1 -1
- package/dist-server/controllers/activity-instance/index.js.map +1 -1
- package/dist-server/controllers/activity-instance/issue.js +105 -0
- package/dist-server/controllers/activity-instance/issue.js.map +1 -0
- package/dist-server/controllers/activity-instance/pick.js +1 -1
- package/dist-server/controllers/activity-instance/pick.js.map +1 -1
- package/dist-server/controllers/activity-instance/post.js +7 -7
- package/dist-server/controllers/activity-instance/post.js.map +1 -1
- package/dist-server/controllers/common.js +33 -9
- package/dist-server/controllers/common.js.map +1 -1
- package/dist-server/routes.js +2 -2
- package/dist-server/routes.js.map +1 -1
- package/dist-server/service/activity/activity-history.js +6 -2
- package/dist-server/service/activity/activity-history.js.map +1 -1
- package/dist-server/service/activity/activity-query.js +84 -1
- package/dist-server/service/activity/activity-query.js.map +1 -1
- package/dist-server/service/activity/activity-type.js +8 -0
- package/dist-server/service/activity/activity-type.js.map +1 -1
- package/dist-server/service/activity/activity.js +36 -3
- package/dist-server/service/activity/activity.js.map +1 -1
- package/dist-server/service/activity-approval/activity-approval-query.js +48 -0
- package/dist-server/service/activity-approval/activity-approval-query.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance-history.js +1 -1
- package/dist-server/service/activity-instance/activity-instance-history.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance-mutation.js +6 -6
- package/dist-server/service/activity-instance/activity-instance-mutation.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance-query.js +2 -2
- package/dist-server/service/activity-instance/activity-instance-query.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance-type.js +62 -50
- package/dist-server/service/activity-instance/activity-instance-type.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance.js +4 -23
- package/dist-server/service/activity-instance/activity-instance.js.map +1 -1
- package/dist-server/service/activity-stats/activity-stats-query.js +93 -0
- package/dist-server/service/activity-stats/activity-stats-query.js.map +1 -0
- package/dist-server/service/activity-stats/activity-stats-type.js +47 -0
- package/dist-server/service/activity-stats/activity-stats-type.js.map +1 -0
- package/dist-server/service/activity-stats/index.js +6 -0
- package/dist-server/service/activity-stats/index.js.map +1 -0
- package/dist-server/service/activity-summary/activity-summary-query.js +5 -23
- package/dist-server/service/activity-summary/activity-summary-query.js.map +1 -1
- package/dist-server/service/index.js +2 -0
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/installable-activity/installable-activity.js +4 -0
- package/dist-server/service/installable-activity/installable-activity.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/helps/worklist/activity-bank.md +22 -0
- package/helps/worklist/{activity-approval.md → activity-stats.md} +1 -1
- package/helps/worklist/activity.md +91 -0
- package/helps/worklist/draft-list.md +19 -0
- package/helps/worklist/starter-list.md +34 -0
- package/helps/worklist/worklist-concept.md +11 -8
- package/package.json +3 -2
- package/server/controllers/activity-instance/assign.ts +1 -1
- package/server/controllers/activity-instance/draft.ts +33 -6
- package/server/controllers/activity-instance/index.ts +1 -1
- package/server/controllers/activity-instance/issue.ts +175 -0
- package/server/controllers/activity-instance/pick.ts +1 -1
- package/server/controllers/common.ts +43 -9
- package/server/routes.ts +2 -2
- package/server/service/activity/activity-history.ts +5 -2
- package/server/service/activity/activity-query.ts +85 -2
- package/server/service/activity/activity-type.ts +15 -2
- package/server/service/activity/activity.ts +28 -2
- package/server/service/activity-approval/activity-approval-query.ts +45 -1
- package/server/service/activity-instance/activity-instance-history.ts +1 -1
- package/server/service/activity-instance/activity-instance-mutation.ts +7 -7
- package/server/service/activity-instance/activity-instance-query.ts +3 -3
- package/server/service/activity-instance/activity-instance-type.ts +13 -4
- package/server/service/activity-instance/activity-instance.ts +4 -16
- package/server/service/activity-stats/activity-stats-query.ts +94 -0
- package/server/service/activity-stats/activity-stats-type.ts +34 -0
- package/server/service/activity-stats/index.ts +3 -0
- package/server/service/activity-summary/activity-summary-query.ts +5 -23
- package/server/service/index.ts +2 -0
- package/server/service/installable-activity/installable-activity.ts +4 -1
- package/things-factory.config.js +5 -2
- package/translations/en.json +23 -0
- package/translations/ko.json +29 -6
- package/translations/ms.json +23 -0
- package/translations/zh.json +23 -0
- package/client/pages/activity-instance/activity-instance-page.ts +0 -445
- package/server/controllers/activity-instance/post.ts +0 -140
package/client/bootstrap.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import '@material/mwc-icon'
|
|
2
2
|
import './templates/activity-approval-context-template.js'
|
|
3
3
|
import './templates/activity-thread-context-template.js'
|
|
4
|
+
import './templates/activity-instance-context-template.js'
|
|
4
5
|
|
|
5
6
|
import { html } from 'lit-html'
|
|
6
7
|
import { store } from '@operato/shell'
|
|
@@ -24,6 +25,10 @@ export default function bootstrap() {
|
|
|
24
25
|
{
|
|
25
26
|
template: html` <activity-thread-context-template></activity-thread-context-template> `,
|
|
26
27
|
context: 'activityThread'
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
template: html` <activity-instance-context-template></activity-instance-context-template> `,
|
|
31
|
+
context: 'activityInstance'
|
|
27
32
|
}
|
|
28
33
|
].forEach(({ template, context }) => {
|
|
29
34
|
store.dispatch({
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import '@material/mwc-button'
|
|
2
1
|
import '@material/mwc-icon-button'
|
|
3
2
|
import '@operato/property-editor/ox-properties-dynamic-view.js'
|
|
3
|
+
import '@material/mwc-button'
|
|
4
4
|
import '@things-factory/organization'
|
|
5
5
|
|
|
6
6
|
import gql from 'graphql-tag'
|
|
7
7
|
import { css, html, LitElement } from 'lit'
|
|
8
8
|
import { customElement, property, state } from 'lit/decorators.js'
|
|
9
|
-
import { when } from 'lit/directives/when.js'
|
|
10
9
|
|
|
10
|
+
import { navigate } from '@operato/shell'
|
|
11
11
|
import { client } from '@operato/graphql'
|
|
12
12
|
import { i18next, localize } from '@operato/i18n'
|
|
13
|
-
import { notify
|
|
13
|
+
import { notify } from '@operato/layout'
|
|
14
14
|
import { ScrollbarStyles } from '@operato/styles'
|
|
15
15
|
|
|
16
16
|
@customElement('activity-starter-form')
|
|
@@ -30,14 +30,19 @@ export class ActivityStarterForm extends localize(i18next)(LitElement) {
|
|
|
30
30
|
display: flex;
|
|
31
31
|
flex-direction: column;
|
|
32
32
|
padding: var(--padding-default);
|
|
33
|
+
gap: 10px;
|
|
33
34
|
overflow: auto;
|
|
34
35
|
}
|
|
35
36
|
|
|
36
|
-
|
|
37
|
+
content > div {
|
|
37
38
|
display: flex;
|
|
38
39
|
flex-direction: column;
|
|
39
40
|
}
|
|
40
41
|
|
|
42
|
+
content span {
|
|
43
|
+
color: navy;
|
|
44
|
+
}
|
|
45
|
+
|
|
41
46
|
#description {
|
|
42
47
|
height: 60px;
|
|
43
48
|
}
|
|
@@ -56,49 +61,37 @@ export class ActivityStarterForm extends localize(i18next)(LitElement) {
|
|
|
56
61
|
|
|
57
62
|
@property({ type: String }) activityId?: string
|
|
58
63
|
|
|
59
|
-
@state() activity: any
|
|
64
|
+
@state() activity: any = {}
|
|
60
65
|
@state() activityInstance: any = {}
|
|
61
66
|
|
|
62
67
|
render() {
|
|
63
|
-
var {
|
|
64
|
-
|
|
65
|
-
const inputSpec = (model || [])
|
|
66
|
-
.filter(item => item.inout === 'in' || item.inout === 'inout')
|
|
67
|
-
.map(item => {
|
|
68
|
-
return {
|
|
69
|
-
...item,
|
|
70
|
-
label: item.name
|
|
71
|
-
}
|
|
72
|
-
})
|
|
73
|
-
|
|
74
|
-
var {
|
|
75
|
-
id,
|
|
76
|
-
name,
|
|
77
|
-
description,
|
|
78
|
-
input,
|
|
79
|
-
state,
|
|
80
|
-
approvalLine = this.activity?.approvalLine,
|
|
81
|
-
assignees = this.activity?.assignees,
|
|
82
|
-
threadsMin = 0,
|
|
83
|
-
threadsMax = 0
|
|
84
|
-
} = this.activityInstance
|
|
85
|
-
|
|
86
|
-
const draftable = !id
|
|
87
|
-
const postable = id && state === 'draft'
|
|
68
|
+
var { thumbnail, startingType } = this.activity || {}
|
|
69
|
+
var { name, description } = this.activityInstance
|
|
88
70
|
|
|
89
71
|
return html`
|
|
90
72
|
<content>
|
|
91
|
-
<
|
|
92
|
-
<
|
|
73
|
+
<div>
|
|
74
|
+
<span
|
|
75
|
+
>업무의 타이틀과 설명을 작성해서 초안저장을 클릭하시면, 업무 초안이 생성되고 편집할 수 있는 페이지로
|
|
76
|
+
이동합니다.</span
|
|
77
|
+
>
|
|
78
|
+
|
|
79
|
+
<span
|
|
80
|
+
>이렇게 생성된 업무 초안은 '작성중인 업무' 리스트에서 찾아볼 수 있으며,
|
|
81
|
+
'${startingType == 'issue' ? '이슈' : '제출'}' 전까지 언제든지 수정할 수 있습니다.</span
|
|
82
|
+
>
|
|
83
|
+
</div>
|
|
84
|
+
<div>
|
|
85
|
+
<label for="name">${i18next.t('label.title')}</label>
|
|
93
86
|
<input
|
|
94
87
|
id="name"
|
|
95
88
|
.value=${name || this.activity?.name}
|
|
96
89
|
@change=${e => (this.activityInstance.name = e.currentTarget.value)}
|
|
97
90
|
/>
|
|
98
|
-
</
|
|
91
|
+
</div>
|
|
99
92
|
|
|
100
|
-
<
|
|
101
|
-
<label for="description"
|
|
93
|
+
<div>
|
|
94
|
+
<label for="description">${i18next.t('label.description')}</label>
|
|
102
95
|
<textarea
|
|
103
96
|
id="description"
|
|
104
97
|
.value=${description || this.activity?.description}
|
|
@@ -106,87 +99,14 @@ export class ActivityStarterForm extends localize(i18next)(LitElement) {
|
|
|
106
99
|
this.activityInstance.description = e.currentTarget.value
|
|
107
100
|
}}
|
|
108
101
|
></textarea>
|
|
109
|
-
</
|
|
110
|
-
|
|
111
|
-
<section>
|
|
112
|
-
<label for="threads-min">Threads Min</label>
|
|
113
|
-
<input
|
|
114
|
-
id="threadsMin"
|
|
115
|
-
type="number"
|
|
116
|
-
.value=${threadsMin || 0}
|
|
117
|
-
@change=${e => (this.activityInstance.threadsMin = e.currentTarget.valueAsNumber)}
|
|
118
|
-
/>
|
|
119
|
-
|
|
120
|
-
<label for="threads-max">Threads Max</label>
|
|
121
|
-
<input
|
|
122
|
-
id="threads-max"
|
|
123
|
-
type="number"
|
|
124
|
-
.value=${threadsMax || 0}
|
|
125
|
-
@change=${e => (this.activityInstance.threadsMax = e.currentTarget.valueAsNumber)}
|
|
126
|
-
/>
|
|
127
|
-
</section>
|
|
102
|
+
</div>
|
|
128
103
|
|
|
129
|
-
<
|
|
130
|
-
<label>Assignees</label>
|
|
131
|
-
${assignees
|
|
132
|
-
? html`
|
|
133
|
-
<assignees-view
|
|
134
|
-
.value=${assignees}
|
|
135
|
-
@click=${this.onClickAssignees.bind(this)}
|
|
136
|
-
@change=${e => (this.activityInstance.assignees = e.currentTarget.value)}
|
|
137
|
-
></assignees-view>
|
|
138
|
-
`
|
|
139
|
-
: html`<mwc-icon-button icon="group_add" @click=${this.onClickAssignees.bind(this)}></mwc-icon-button>`}
|
|
140
|
-
</section>
|
|
141
|
-
|
|
142
|
-
<section>
|
|
143
|
-
<label>Approval Line</label>
|
|
144
|
-
${approvalLine
|
|
145
|
-
? html`
|
|
146
|
-
<approval-line-view
|
|
147
|
-
.model=${approvalLine}
|
|
148
|
-
@click=${this.onClickApprovalLine.bind(this)}
|
|
149
|
-
@change=${e => (this.activityInstance.approvalLine = e.currentTarget.value)}
|
|
150
|
-
></approval-line-view>
|
|
151
|
-
`
|
|
152
|
-
: html`<mwc-icon-button icon="group_add" @click=${this.onClickApprovalLine.bind(this)}></mwc-icon-button>`}
|
|
153
|
-
</section>
|
|
154
|
-
|
|
155
|
-
<section>
|
|
156
|
-
<img src=${thumbnail} />
|
|
157
|
-
</section>
|
|
158
|
-
|
|
159
|
-
<label>Input</label>
|
|
160
|
-
|
|
161
|
-
${!model
|
|
162
|
-
? html``
|
|
163
|
-
: html`
|
|
164
|
-
<ox-properties-dynamic-view
|
|
165
|
-
.props=${inputSpec}
|
|
166
|
-
.value=${input}
|
|
167
|
-
@property-change=${e => {
|
|
168
|
-
this.activityInstance.input = e.currentTarget.value
|
|
169
|
-
console.log('activity-instance', this.activityInstance.input)
|
|
170
|
-
}}
|
|
171
|
-
></ox-properties-dynamic-view>
|
|
172
|
-
`}
|
|
104
|
+
<img src=${thumbnail} />
|
|
173
105
|
</content>
|
|
174
106
|
|
|
175
107
|
<div class="button-container">
|
|
108
|
+
<mwc-button raised @click=${this.draftActivityInstance.bind(this)}>${i18next.t('button.draft')}</mwc-button>
|
|
176
109
|
<mwc-button raised @click=${e => history.back()}>${i18next.t('button.close')}</mwc-button>
|
|
177
|
-
${when(
|
|
178
|
-
draftable,
|
|
179
|
-
() => html`
|
|
180
|
-
<mwc-button raised @click=${this.draftActivityInstance.bind(this)}>${i18next.t('button.draft')}</mwc-button>
|
|
181
|
-
`
|
|
182
|
-
)}
|
|
183
|
-
${when(
|
|
184
|
-
postable,
|
|
185
|
-
() => html`
|
|
186
|
-
<mwc-button raised @click=${this.updateActivityInstance.bind(this)}>${i18next.t('button.save')}</mwc-button>
|
|
187
|
-
<mwc-button raised @click=${this.postActivityInstance.bind(this)}>${i18next.t('button.post')}</mwc-button>
|
|
188
|
-
`
|
|
189
|
-
)}
|
|
190
110
|
</div>
|
|
191
111
|
`
|
|
192
112
|
}
|
|
@@ -204,6 +124,8 @@ export class ActivityStarterForm extends localize(i18next)(LitElement) {
|
|
|
204
124
|
name
|
|
205
125
|
description
|
|
206
126
|
state
|
|
127
|
+
multiple
|
|
128
|
+
startingType
|
|
207
129
|
assignees {
|
|
208
130
|
type
|
|
209
131
|
value
|
|
@@ -249,157 +171,24 @@ export class ActivityStarterForm extends localize(i18next)(LitElement) {
|
|
|
249
171
|
}
|
|
250
172
|
|
|
251
173
|
async draftActivityInstance() {
|
|
252
|
-
|
|
253
|
-
var { name, description, assignees, approvalLine } =
|
|
254
|
-
|
|
255
|
-
const activityInstance = {
|
|
256
|
-
activityId,
|
|
257
|
-
name,
|
|
258
|
-
description,
|
|
259
|
-
assignees,
|
|
260
|
-
approvalLine,
|
|
261
|
-
...this.activityInstance
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
const response = await client.mutate({
|
|
265
|
-
mutation: gql`
|
|
266
|
-
mutation ($activityInstance: NewActivityInstance!) {
|
|
267
|
-
draftActivityInstance(activityInstance: $activityInstance) {
|
|
268
|
-
id
|
|
269
|
-
name
|
|
270
|
-
description
|
|
271
|
-
input
|
|
272
|
-
state
|
|
273
|
-
assignees {
|
|
274
|
-
type
|
|
275
|
-
value
|
|
276
|
-
assignee {
|
|
277
|
-
id
|
|
278
|
-
name
|
|
279
|
-
description
|
|
280
|
-
controlNo
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
approvalLine {
|
|
284
|
-
type
|
|
285
|
-
value
|
|
286
|
-
approver {
|
|
287
|
-
id
|
|
288
|
-
name
|
|
289
|
-
description
|
|
290
|
-
controlNo
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
threadsMin
|
|
294
|
-
threadsMax
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
`,
|
|
298
|
-
variables: {
|
|
299
|
-
activityInstance
|
|
300
|
-
}
|
|
301
|
-
})
|
|
174
|
+
var { id: activityId } = this.activity
|
|
175
|
+
var { id, name, description, priority, threadsMin, threadsMax, dueAt, input, assignees, approvalLine } =
|
|
176
|
+
this.activityInstance
|
|
302
177
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
x: `${i18next.t('label.activity-instance')} ${i18next.t('text.draft')}`
|
|
308
|
-
})
|
|
309
|
-
})
|
|
310
|
-
}
|
|
311
|
-
}
|
|
178
|
+
name ||= this.activity.name
|
|
179
|
+
description ||= this.activity.description
|
|
180
|
+
assignees ||= this.activity.assignees
|
|
181
|
+
approvalLine ||= this.activity.approvalLine
|
|
312
182
|
|
|
313
|
-
|
|
314
|
-
const {
|
|
183
|
+
var activityInstance = {
|
|
315
184
|
id,
|
|
185
|
+
activityId,
|
|
316
186
|
name,
|
|
317
187
|
description,
|
|
318
|
-
|
|
319
|
-
threadsMin = 0,
|
|
320
|
-
threadsMax = 0,
|
|
321
|
-
assignees,
|
|
322
|
-
approvalLine
|
|
323
|
-
} = this.activityInstance
|
|
324
|
-
|
|
325
|
-
const patch = {
|
|
326
|
-
name: name || this.activity.name,
|
|
327
|
-
description: description || this.activity.description,
|
|
328
|
-
input,
|
|
329
|
-
threadsMin,
|
|
188
|
+
priority,
|
|
330
189
|
threadsMax,
|
|
331
|
-
assignees,
|
|
332
|
-
approvalLine
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
const response = await client.mutate({
|
|
336
|
-
mutation: gql`
|
|
337
|
-
mutation ($id: String!, $patch: ActivityInstancePatch!) {
|
|
338
|
-
updateActivityInstance(id: $id, patch: $patch) {
|
|
339
|
-
id
|
|
340
|
-
name
|
|
341
|
-
description
|
|
342
|
-
input
|
|
343
|
-
state
|
|
344
|
-
assignees {
|
|
345
|
-
type
|
|
346
|
-
value
|
|
347
|
-
assignee {
|
|
348
|
-
id
|
|
349
|
-
name
|
|
350
|
-
description
|
|
351
|
-
controlNo
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
approvalLine {
|
|
355
|
-
type
|
|
356
|
-
value
|
|
357
|
-
approver {
|
|
358
|
-
id
|
|
359
|
-
name
|
|
360
|
-
description
|
|
361
|
-
controlNo
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
threadsMin
|
|
365
|
-
threadsMax
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
`,
|
|
369
|
-
variables: {
|
|
370
|
-
id,
|
|
371
|
-
patch
|
|
372
|
-
}
|
|
373
|
-
})
|
|
374
|
-
|
|
375
|
-
if (!response.errors) {
|
|
376
|
-
this.activityInstance = response.data.updateActivityInstance
|
|
377
|
-
notify({
|
|
378
|
-
message: i18next.t('text.info_x_successfully', {
|
|
379
|
-
x: `${i18next.t('label.activity-instance')} ${i18next.t('text.save')}`
|
|
380
|
-
})
|
|
381
|
-
})
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
async postActivityInstance() {
|
|
386
|
-
const {
|
|
387
|
-
id,
|
|
388
|
-
name,
|
|
389
|
-
description,
|
|
390
|
-
input,
|
|
391
|
-
threadsMin = 0,
|
|
392
|
-
threadsMax = 0,
|
|
393
|
-
assignees,
|
|
394
|
-
approvalLine
|
|
395
|
-
} = this.activityInstance
|
|
396
|
-
|
|
397
|
-
const activityInstance = {
|
|
398
|
-
id,
|
|
399
|
-
name: name || this.activity.name,
|
|
400
|
-
description: description || this.activity.description,
|
|
401
190
|
threadsMin,
|
|
402
|
-
|
|
191
|
+
dueAt,
|
|
403
192
|
input,
|
|
404
193
|
assignees,
|
|
405
194
|
approvalLine
|
|
@@ -407,8 +196,8 @@ export class ActivityStarterForm extends localize(i18next)(LitElement) {
|
|
|
407
196
|
|
|
408
197
|
const response = await client.mutate({
|
|
409
198
|
mutation: gql`
|
|
410
|
-
mutation ($activityInstance:
|
|
411
|
-
|
|
199
|
+
mutation ($activityInstance: ActivityInstanceDraft!) {
|
|
200
|
+
draftActivityInstance(activityInstance: $activityInstance) {
|
|
412
201
|
id
|
|
413
202
|
name
|
|
414
203
|
description
|
|
@@ -445,58 +234,18 @@ export class ActivityStarterForm extends localize(i18next)(LitElement) {
|
|
|
445
234
|
})
|
|
446
235
|
|
|
447
236
|
if (!response.errors) {
|
|
448
|
-
this.activityInstance = response.data.
|
|
237
|
+
this.activityInstance = response.data.draftActivityInstance
|
|
449
238
|
notify({
|
|
450
239
|
message: i18next.t('text.info_x_successfully', {
|
|
451
|
-
x: `${i18next.t('label.activity-instance')} ${i18next.t('text.
|
|
240
|
+
x: `${i18next.t('label.activity-instance')} ${i18next.t('text.draft')}`
|
|
452
241
|
})
|
|
453
242
|
})
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
onClickAssignees() {
|
|
458
|
-
const { assignees } = this.activityInstance || {}
|
|
459
243
|
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
<assignees-editor-popup
|
|
463
|
-
.value=${assignees}
|
|
464
|
-
.confirmCallback=${value => {
|
|
465
|
-
this.activityInstance.assignees = value
|
|
466
|
-
this.requestUpdate()
|
|
467
|
-
}}
|
|
468
|
-
></assignees-editor-popup>
|
|
469
|
-
`,
|
|
470
|
-
{
|
|
471
|
-
backdrop: true,
|
|
472
|
-
help: 'organization/assignees-editor',
|
|
473
|
-
size: 'large',
|
|
474
|
-
title: i18next.t('title.assignee list')
|
|
475
|
-
}
|
|
476
|
-
)
|
|
477
|
-
popup.onclosed = () => {}
|
|
244
|
+
this.openActivityInstanceStart(this.activityInstance)
|
|
245
|
+
}
|
|
478
246
|
}
|
|
479
247
|
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
const popup = openPopup(
|
|
484
|
-
html`
|
|
485
|
-
<approval-line-items-editor-popup
|
|
486
|
-
.value=${approvalLine}
|
|
487
|
-
.confirmCallback=${value => {
|
|
488
|
-
this.activityInstance.approvalLine = value
|
|
489
|
-
this.requestUpdate()
|
|
490
|
-
}}
|
|
491
|
-
></approval-line-items-editor-popup>
|
|
492
|
-
`,
|
|
493
|
-
{
|
|
494
|
-
backdrop: true,
|
|
495
|
-
help: 'organization/approval-line-items-editor',
|
|
496
|
-
size: 'large',
|
|
497
|
-
title: i18next.t('title.approval-line item list')
|
|
498
|
-
}
|
|
499
|
-
)
|
|
500
|
-
popup.onclosed = () => {}
|
|
248
|
+
openActivityInstanceStart(activityInstance) {
|
|
249
|
+
navigate(`activity-instance-start/${activityInstance.id}?title=${activityInstance.name}`)
|
|
501
250
|
}
|
|
502
251
|
}
|
|
@@ -3,7 +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
|
+
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
7
7
|
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
8
8
|
import moment from 'moment-timezone'
|
|
9
9
|
|
|
@@ -13,9 +13,9 @@ import { i18next, localize } from '@operato/i18n'
|
|
|
13
13
|
import { notify, openPopup } from '@operato/layout'
|
|
14
14
|
import { PageView, store } from '@operato/shell'
|
|
15
15
|
import { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
|
16
|
-
import { isMobileDevice } from '@operato/utils'
|
|
16
|
+
import { adjustFilters, isMobileDevice } from '@operato/utils'
|
|
17
17
|
|
|
18
|
-
import { ActivityTypes, ActivityUITypes } from '../../types/types.js'
|
|
18
|
+
import { ActivityStartingTypes, ActivityTypes, ActivityUITypes } from '../../types/types.js'
|
|
19
19
|
|
|
20
20
|
export const ActivityStatus = [
|
|
21
21
|
{ display: '', value: '' },
|
|
@@ -47,7 +47,8 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
47
47
|
@property({ type: String }) mode: 'CARD' | 'GRID' = isMobileDevice() ? 'CARD' : 'GRID'
|
|
48
48
|
|
|
49
49
|
@query('ox-grist') grist!: DataGrist
|
|
50
|
-
|
|
50
|
+
|
|
51
|
+
@state() filters: string[] = ['released']
|
|
51
52
|
|
|
52
53
|
get context() {
|
|
53
54
|
return {
|
|
@@ -81,24 +82,27 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
81
82
|
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
82
83
|
<div slot="headroom">
|
|
83
84
|
<div id="filters">
|
|
84
|
-
<ox-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
85
|
+
<ox-input-select-buttons
|
|
86
|
+
.value=${this.filters}
|
|
87
|
+
.options=${[
|
|
88
|
+
{
|
|
89
|
+
display: i18next.t('label.filter-draft'),
|
|
90
|
+
value: 'draft'
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
display: i18next.t('label.filter-released'),
|
|
94
|
+
value: 'released'
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
display: i18next.t('label.filter-deprecated'),
|
|
98
|
+
value: 'deprecated'
|
|
99
|
+
}
|
|
100
|
+
]}
|
|
101
|
+
@change=${(e: CustomEvent) => {
|
|
102
|
+
this.filters = (e.currentTarget as any)?.value
|
|
103
|
+
this.grist.fetch()
|
|
96
104
|
}}
|
|
97
|
-
|
|
98
|
-
>
|
|
99
|
-
<ox-popup id="sorter-control">
|
|
100
|
-
<ox-sorters-control> </ox-sorters-control>
|
|
101
|
-
</ox-popup>
|
|
105
|
+
></ox-input-select-buttons>
|
|
102
106
|
</div>
|
|
103
107
|
|
|
104
108
|
<div id="modes">
|
|
@@ -207,14 +211,16 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
207
211
|
width: 60
|
|
208
212
|
},
|
|
209
213
|
{
|
|
210
|
-
type: '
|
|
211
|
-
name: '
|
|
214
|
+
type: 'select',
|
|
215
|
+
name: 'startingType',
|
|
212
216
|
label: true,
|
|
213
|
-
header: i18next.t('field.
|
|
217
|
+
header: i18next.t('field.starting-type'),
|
|
214
218
|
record: {
|
|
215
|
-
editable: true
|
|
219
|
+
editable: true,
|
|
220
|
+
options: ActivityStartingTypes
|
|
216
221
|
},
|
|
217
|
-
|
|
222
|
+
sortable: true,
|
|
223
|
+
width: 60
|
|
218
224
|
},
|
|
219
225
|
{
|
|
220
226
|
type: 'select',
|
|
@@ -222,7 +228,11 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
222
228
|
header: i18next.t('field.multiple'),
|
|
223
229
|
record: {
|
|
224
230
|
editable: true,
|
|
225
|
-
options: [
|
|
231
|
+
options: [
|
|
232
|
+
{ display: 'Single', value: '' },
|
|
233
|
+
{ display: 'Parallel', value: 'parallel' },
|
|
234
|
+
{ display: 'Sequential', value: 'sequential' }
|
|
235
|
+
]
|
|
226
236
|
},
|
|
227
237
|
width: 80
|
|
228
238
|
},
|
|
@@ -472,6 +482,12 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
472
482
|
}
|
|
473
483
|
|
|
474
484
|
async fetchHandler({ page, limit, sortings = [], filters = [] }: FetchOption) {
|
|
485
|
+
const status = ['draft', 'released', 'deprecated'].filter(state => this.filters?.includes(state))
|
|
486
|
+
|
|
487
|
+
if (status.length > 0) {
|
|
488
|
+
filters = adjustFilters(filters, [{ name: 'state', operator: 'in', value: status }])
|
|
489
|
+
}
|
|
490
|
+
|
|
475
491
|
const response = await client.query({
|
|
476
492
|
query: gql`
|
|
477
493
|
query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
@@ -540,7 +556,7 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
540
556
|
viewSource
|
|
541
557
|
reportType
|
|
542
558
|
reportSource
|
|
543
|
-
|
|
559
|
+
startingType
|
|
544
560
|
multiple
|
|
545
561
|
schedule
|
|
546
562
|
timezone
|
|
@@ -17,7 +17,7 @@ const formatter = new Intl.DateTimeFormat(navigator.language, { dateStyle: 'full
|
|
|
17
17
|
|
|
18
18
|
export const ActivityInstanceStatus = {
|
|
19
19
|
Draft: 'draft',
|
|
20
|
-
|
|
20
|
+
Issued: 'issued',
|
|
21
21
|
PendingAssignment: 'pending-assignment',
|
|
22
22
|
Assigned: 'assigned',
|
|
23
23
|
Started: 'started',
|
|
@@ -63,7 +63,7 @@ export class ActivityPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
63
63
|
@property({ type: Object }) board: any
|
|
64
64
|
|
|
65
65
|
get context() {
|
|
66
|
-
const startable = [ActivityInstanceStatus.Assigned, ActivityInstanceStatus.
|
|
66
|
+
const startable = [ActivityInstanceStatus.Assigned, ActivityInstanceStatus.Issued].includes(
|
|
67
67
|
this.activityInstance?.state
|
|
68
68
|
)
|
|
69
69
|
|
|
@@ -318,7 +318,7 @@ export class ActivityPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
318
318
|
const response = await client.mutate({
|
|
319
319
|
mutation: gql`
|
|
320
320
|
mutation ($id: String!, $save: ActivityInstanceSave!) {
|
|
321
|
-
|
|
321
|
+
draftActivityInstance(id: $id, save: $save) {
|
|
322
322
|
id
|
|
323
323
|
name
|
|
324
324
|
description
|
|
@@ -45,6 +45,7 @@ export class ActivityView extends localize(i18next)(LitElement) {
|
|
|
45
45
|
model,
|
|
46
46
|
priority,
|
|
47
47
|
startable,
|
|
48
|
+
startingType,
|
|
48
49
|
schedule,
|
|
49
50
|
timzeone,
|
|
50
51
|
standardTime,
|
|
@@ -68,7 +69,7 @@ export class ActivityView extends localize(i18next)(LitElement) {
|
|
|
68
69
|
<div>state: ${state}</div>
|
|
69
70
|
${this.renderSearchKeys(searchKeys!)} ${this.renderModel(model!)}
|
|
70
71
|
<div>priority: ${priority}</div>
|
|
71
|
-
<div>
|
|
72
|
+
<div>startingType: ${startingType}</div>
|
|
72
73
|
`
|
|
73
74
|
}
|
|
74
75
|
|