@things-factory/worklist 6.0.45 → 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-thread/activity-thread-page.ts +1 -1
- package/client/pages/installable-activity/installable-activity-list-page.ts +7 -5
- package/client/pages/todo/approval-pending-list-page.ts +1 -1
- package/client/pages/todo/done-list-page.ts +1 -1
- package/client/pages/todo/draft-list-page.ts +26 -102
- package/client/pages/todo/todo-list-page.ts +1 -1
- package/client/route.ts +2 -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/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-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-pending-list-page.js +1 -1
- package/dist-client/pages/todo/approval-pending-list-page.js.map +1 -1
- package/dist-client/pages/todo/done-list-page.js +1 -1
- 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/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 +2 -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-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-summary/activity-summary-query.js +1 -1
- package/dist-server/service/activity-summary/activity-summary-query.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.md +91 -0
- package/helps/worklist/draft-list.md +5 -1
- package/helps/worklist/starter-list.md +34 -0
- package/package.json +2 -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-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-summary/activity-summary-query.ts +1 -1
- package/server/service/installable-activity/installable-activity.ts +4 -1
- package/things-factory.config.js +1 -1
- package/translations/en.json +13 -0
- package/translations/ko.json +17 -4
- package/translations/ms.json +13 -0
- package/translations/zh.json +13 -0
- package/client/pages/activity-instance/activity-instance-page.ts +0 -445
- package/server/controllers/activity-instance/post.ts +0 -140
|
@@ -6,17 +6,15 @@ 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, FetchOption
|
|
9
|
+
import { DataGrist, FetchOption } from '@operato/data-grist'
|
|
10
10
|
import { client } from '@operato/graphql'
|
|
11
11
|
import { i18next, localize } from '@operato/i18n'
|
|
12
|
-
import {
|
|
13
|
-
import { PageView, store } from '@operato/shell'
|
|
12
|
+
import { navigate, PageView, store } from '@operato/shell'
|
|
14
13
|
import { CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
|
15
14
|
import { isMobileDevice } from '@operato/utils'
|
|
16
15
|
import { OxPopup } from '@operato/popup'
|
|
17
16
|
|
|
18
|
-
import {
|
|
19
|
-
import { Priorities } from '../../types/types.js'
|
|
17
|
+
import { ActivityStartingTypes } from '../../types/types.js'
|
|
20
18
|
|
|
21
19
|
const MIN = 60
|
|
22
20
|
const HOUR = 60 * MIN
|
|
@@ -121,23 +119,7 @@ export class DraftListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
121
119
|
return
|
|
122
120
|
}
|
|
123
121
|
|
|
124
|
-
|
|
125
|
-
html`
|
|
126
|
-
<activity-starter-form
|
|
127
|
-
.activityId=${record.activity?.id}
|
|
128
|
-
.activityInstance=${record}
|
|
129
|
-
></activity-starter-form>
|
|
130
|
-
`,
|
|
131
|
-
{
|
|
132
|
-
backdrop: true,
|
|
133
|
-
help: 'worklist/activity-starter-form',
|
|
134
|
-
size: 'large',
|
|
135
|
-
title: i18next.t('title.activity starter')
|
|
136
|
-
}
|
|
137
|
-
)
|
|
138
|
-
popup.onclosed = () => {
|
|
139
|
-
this.grist?.fetch()
|
|
140
|
-
}
|
|
122
|
+
this.openActivityInstanceStart(record)
|
|
141
123
|
}
|
|
142
124
|
}
|
|
143
125
|
},
|
|
@@ -160,36 +142,19 @@ export class DraftListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
160
142
|
editable: false
|
|
161
143
|
},
|
|
162
144
|
filter: 'search',
|
|
163
|
-
width:
|
|
145
|
+
width: 240
|
|
164
146
|
},
|
|
165
147
|
{
|
|
166
|
-
type: '
|
|
167
|
-
name: '
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
editable: false,
|
|
171
|
-
renderer: function (value, column, record, rowIndex, field) {
|
|
172
|
-
const { uiType, uiSource } = record.activity || {}
|
|
173
|
-
var type = uiType !== 'board' ? 'string' : 'board'
|
|
174
|
-
return getRenderer(type)(uiSource, column, record, rowIndex, field)
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
width: 140,
|
|
178
|
-
hidden: true
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
type: 'number',
|
|
182
|
-
name: 'priority',
|
|
183
|
-
header: i18next.t('field.priority'),
|
|
148
|
+
type: 'select',
|
|
149
|
+
name: 'startingType',
|
|
150
|
+
label: true,
|
|
151
|
+
header: i18next.t('field.starting-type'),
|
|
184
152
|
record: {
|
|
185
153
|
editable: false,
|
|
186
|
-
|
|
187
|
-
const color = ['', 'gray', 'yellow', 'orange', 'red'][value || 0]
|
|
188
|
-
const count = new Array(value > 4 ? 4 : value || 0).fill('')
|
|
189
|
-
return html`${count.map(() => html`<mwc-icon style="color:${color};">star</mwc-icon>`)}`
|
|
190
|
-
}
|
|
154
|
+
options: ActivityStartingTypes
|
|
191
155
|
},
|
|
192
|
-
|
|
156
|
+
sortable: true,
|
|
157
|
+
width: 80
|
|
193
158
|
},
|
|
194
159
|
{
|
|
195
160
|
type: 'select',
|
|
@@ -213,58 +178,8 @@ export class DraftListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
213
178
|
},
|
|
214
179
|
{
|
|
215
180
|
type: 'datetime',
|
|
216
|
-
name: '
|
|
217
|
-
header: i18next.t('field.
|
|
218
|
-
record: {
|
|
219
|
-
editable: false,
|
|
220
|
-
options: {
|
|
221
|
-
year: 'numeric',
|
|
222
|
-
month: 'numeric',
|
|
223
|
-
day: 'numeric'
|
|
224
|
-
}
|
|
225
|
-
},
|
|
226
|
-
sortable: true,
|
|
227
|
-
// filter: {
|
|
228
|
-
// type: 'date',
|
|
229
|
-
// operator: 'between'
|
|
230
|
-
// },
|
|
231
|
-
// filter: {
|
|
232
|
-
// type: 'select',
|
|
233
|
-
// operator: 'between',
|
|
234
|
-
// options: (column, owner) => {
|
|
235
|
-
// const now = Date.now()
|
|
236
|
-
// return [
|
|
237
|
-
// {
|
|
238
|
-
// display: '1일 이내 처리',
|
|
239
|
-
// value: [now, Date.now() + 60 * 60 * 3600 * 1000]
|
|
240
|
-
// },
|
|
241
|
-
// {
|
|
242
|
-
// display: '2일 이내 처리',
|
|
243
|
-
// value: [now, Date.now() + 2 * 60 * 60 * 3600 * 1000]
|
|
244
|
-
// },
|
|
245
|
-
// {
|
|
246
|
-
// display: '3일 이내 처리',
|
|
247
|
-
// value: [now, Date.now() + 3 * 60 * 60 * 3600 * 1000]
|
|
248
|
-
// }
|
|
249
|
-
// ]
|
|
250
|
-
// }
|
|
251
|
-
// },
|
|
252
|
-
width: 100
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
type: 'resource-object',
|
|
256
|
-
name: 'creator',
|
|
257
|
-
header: i18next.t('field.issuer'),
|
|
258
|
-
record: {
|
|
259
|
-
editable: false
|
|
260
|
-
},
|
|
261
|
-
sortable: true,
|
|
262
|
-
width: 120
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
type: 'datetime',
|
|
266
|
-
name: 'createdAt',
|
|
267
|
-
header: i18next.t('field.posted-at'),
|
|
181
|
+
name: 'updatedAt',
|
|
182
|
+
header: i18next.t('field.updated-at'),
|
|
268
183
|
record: {
|
|
269
184
|
editable: false
|
|
270
185
|
},
|
|
@@ -284,8 +199,8 @@ export class DraftListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
284
199
|
},
|
|
285
200
|
sorters: [
|
|
286
201
|
{
|
|
287
|
-
name: '
|
|
288
|
-
desc:
|
|
202
|
+
name: 'updatedAt',
|
|
203
|
+
desc: true
|
|
289
204
|
}
|
|
290
205
|
]
|
|
291
206
|
}
|
|
@@ -313,6 +228,7 @@ export class DraftListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
313
228
|
refBy
|
|
314
229
|
activity {
|
|
315
230
|
id
|
|
231
|
+
startingType
|
|
316
232
|
}
|
|
317
233
|
activityType
|
|
318
234
|
assignees {
|
|
@@ -361,7 +277,15 @@ export class DraftListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
361
277
|
|
|
362
278
|
return {
|
|
363
279
|
total: response.data.responses.total || 0,
|
|
364
|
-
records:
|
|
280
|
+
records:
|
|
281
|
+
response.data.responses.items.map(item => {
|
|
282
|
+
item['startingType'] = item.activity?.startingType
|
|
283
|
+
return item
|
|
284
|
+
}) || []
|
|
365
285
|
}
|
|
366
286
|
}
|
|
287
|
+
|
|
288
|
+
openActivityInstanceStart(activityInstance) {
|
|
289
|
+
navigate(`activity-instance-start/${activityInstance.id}?title=${activityInstance.name}`)
|
|
290
|
+
}
|
|
367
291
|
}
|
|
@@ -243,7 +243,7 @@ export class TodoListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
243
243
|
{
|
|
244
244
|
type: 'datetime',
|
|
245
245
|
name: 'createdAt',
|
|
246
|
-
header: i18next.t('field.
|
|
246
|
+
header: i18next.t('field.issued-at'),
|
|
247
247
|
record: {
|
|
248
248
|
editable: false
|
|
249
249
|
},
|
package/client/route.ts
CHANGED
|
@@ -52,8 +52,8 @@ export default function route(page: string) {
|
|
|
52
52
|
import('./pages/activity/activity-page.js')
|
|
53
53
|
return page
|
|
54
54
|
|
|
55
|
-
case 'activity-instance':
|
|
56
|
-
import('./pages/activity-instance/activity-instance-page.js')
|
|
55
|
+
case 'activity-instance-start':
|
|
56
|
+
import('./pages/activity-instance/activity-instance-start-page.js')
|
|
57
57
|
return page
|
|
58
58
|
|
|
59
59
|
case 'activity-thread':
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import '@material/mwc-icon'
|
|
2
|
+
|
|
3
|
+
import { html, css, LitElement } from 'lit'
|
|
4
|
+
import { customElement, state } from 'lit/decorators.js'
|
|
5
|
+
|
|
6
|
+
import { connect } from 'pwa-helpers/connect-mixin'
|
|
7
|
+
|
|
8
|
+
import { ContextToolbarOverlayStyle } from '@operato/context/ox-context-toolbar-overlay-style.js'
|
|
9
|
+
import { store } from '@operato/shell'
|
|
10
|
+
import { i18next } from '@operato/i18n'
|
|
11
|
+
import { openPopup } from '@operato/layout'
|
|
12
|
+
|
|
13
|
+
import '@things-factory/organization/dist-client/component/approval-line-view.js'
|
|
14
|
+
|
|
15
|
+
const formatter = new Intl.DateTimeFormat(navigator.language, { dateStyle: 'full', timeStyle: 'short' })
|
|
16
|
+
|
|
17
|
+
@customElement('activity-instance-context-template')
|
|
18
|
+
class ActivityInstanceContextTemplate extends connect(store)(LitElement) {
|
|
19
|
+
static styles = [
|
|
20
|
+
ContextToolbarOverlayStyle,
|
|
21
|
+
css`
|
|
22
|
+
:host {
|
|
23
|
+
background-color: white;
|
|
24
|
+
|
|
25
|
+
width: 100%;
|
|
26
|
+
padding: 5px;
|
|
27
|
+
overflow: auto;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
img {
|
|
31
|
+
max-width: 200px;
|
|
32
|
+
}
|
|
33
|
+
`
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
@state() private context
|
|
37
|
+
|
|
38
|
+
render() {
|
|
39
|
+
const activityInstance = this.context.activityInstance || {}
|
|
40
|
+
const {
|
|
41
|
+
name,
|
|
42
|
+
description,
|
|
43
|
+
state,
|
|
44
|
+
thumbnail,
|
|
45
|
+
assignees,
|
|
46
|
+
approvalLine,
|
|
47
|
+
assignedAt,
|
|
48
|
+
startedAt,
|
|
49
|
+
dueAt,
|
|
50
|
+
threadsMin,
|
|
51
|
+
threadsMax
|
|
52
|
+
} = activityInstance || {}
|
|
53
|
+
|
|
54
|
+
const editable = state == 'draft'
|
|
55
|
+
|
|
56
|
+
return html`
|
|
57
|
+
<div>
|
|
58
|
+
<div>name: ${name}</div>
|
|
59
|
+
<div>description: ${description}</div>
|
|
60
|
+
<div>state: ${state}</div>
|
|
61
|
+
<div>assigned at: ${assignedAt && formatter.format(new Date(assignedAt))}</div>
|
|
62
|
+
<div>due at: ${dueAt && formatter.format(new Date(dueAt))}</div>
|
|
63
|
+
<div>started at: ${startedAt && formatter.format(new Date(startedAt))}</div>
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<div>
|
|
67
|
+
<div assignees>
|
|
68
|
+
<label>Assignees</label>
|
|
69
|
+
${assignees
|
|
70
|
+
? html`
|
|
71
|
+
<assignees-view
|
|
72
|
+
.value=${assignees}
|
|
73
|
+
@click=${() => this.onClickAssignees(activityInstance)}
|
|
74
|
+
@change=${e => (activityInstance.assignees = e.currentTarget.value)}
|
|
75
|
+
></assignees-view>
|
|
76
|
+
`
|
|
77
|
+
: html`<mwc-icon-button
|
|
78
|
+
icon="group_add"
|
|
79
|
+
@click=${() => this.onClickAssignees(activityInstance)}
|
|
80
|
+
></mwc-icon-button>`}
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
<div>
|
|
84
|
+
<label>Approval Line</label>
|
|
85
|
+
${approvalLine
|
|
86
|
+
? html`
|
|
87
|
+
<approval-line-view
|
|
88
|
+
.model=${approvalLine}
|
|
89
|
+
@click=${() => this.onClickApprovalLine(activityInstance)}
|
|
90
|
+
@change=${e => (activityInstance.approvalLine = e.currentTarget.value)}
|
|
91
|
+
></approval-line-view>
|
|
92
|
+
`
|
|
93
|
+
: html`<mwc-icon-button
|
|
94
|
+
icon="group_add"
|
|
95
|
+
@click=${() => this.onClickApprovalLine(activityInstance)}
|
|
96
|
+
></mwc-icon-button>`}
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
<section>
|
|
100
|
+
<label for="threads-min">Threads Min</label>
|
|
101
|
+
<input
|
|
102
|
+
id="threadsMin"
|
|
103
|
+
type="number"
|
|
104
|
+
.value=${threadsMin || 0}
|
|
105
|
+
@change=${e => (activityInstance.threadsMin = e.currentTarget.valueAsNumber)}
|
|
106
|
+
/>
|
|
107
|
+
|
|
108
|
+
<label for="threads-max">Threads Max</label>
|
|
109
|
+
<input
|
|
110
|
+
id="threads-max"
|
|
111
|
+
type="number"
|
|
112
|
+
.value=${threadsMax || 0}
|
|
113
|
+
@change=${e => (activityInstance.threadsMax = e.currentTarget.valueAsNumber)}
|
|
114
|
+
/>
|
|
115
|
+
</section>
|
|
116
|
+
|
|
117
|
+
<img src=${thumbnail} />
|
|
118
|
+
</div>
|
|
119
|
+
`
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
stateChanged(state) {
|
|
123
|
+
this.context = state.route.context
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
onClickAssignees(activityInstance) {
|
|
127
|
+
const { assignees } = activityInstance || {}
|
|
128
|
+
|
|
129
|
+
const popup = openPopup(
|
|
130
|
+
html`
|
|
131
|
+
<assignees-editor-popup
|
|
132
|
+
.value=${assignees}
|
|
133
|
+
.confirmCallback=${value => {
|
|
134
|
+
activityInstance.assignees = value
|
|
135
|
+
this.requestUpdate()
|
|
136
|
+
}}
|
|
137
|
+
></assignees-editor-popup>
|
|
138
|
+
`,
|
|
139
|
+
{
|
|
140
|
+
backdrop: true,
|
|
141
|
+
help: 'organization/assignees-editor',
|
|
142
|
+
size: 'large',
|
|
143
|
+
title: i18next.t('title.assignee list')
|
|
144
|
+
}
|
|
145
|
+
)
|
|
146
|
+
popup.onclosed = () => {}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
onClickApprovalLine(activityInstance) {
|
|
150
|
+
const { approvalLine } = activityInstance || {}
|
|
151
|
+
|
|
152
|
+
const popup = openPopup(
|
|
153
|
+
html`
|
|
154
|
+
<approval-line-items-editor-popup
|
|
155
|
+
.value=${approvalLine}
|
|
156
|
+
.confirmCallback=${value => {
|
|
157
|
+
activityInstance.approvalLine = value
|
|
158
|
+
this.requestUpdate()
|
|
159
|
+
}}
|
|
160
|
+
></approval-line-items-editor-popup>
|
|
161
|
+
`,
|
|
162
|
+
{
|
|
163
|
+
backdrop: true,
|
|
164
|
+
help: 'organization/approval-line-items-editor',
|
|
165
|
+
size: 'large',
|
|
166
|
+
title: i18next.t('title.approval-line item list')
|
|
167
|
+
}
|
|
168
|
+
)
|
|
169
|
+
popup.onclosed = () => {}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
@@ -4,7 +4,9 @@ import { ApprovalLineItem } from '@things-factory/organization'
|
|
|
4
4
|
import { ActivityType, ActivityUIType } from './activity'
|
|
5
5
|
import { AssigneeItem, ActivityInstance, ActivityInstanceStatus } from './activity-instance'
|
|
6
6
|
|
|
7
|
-
export class
|
|
7
|
+
export class ActivityInstanceDraft {
|
|
8
|
+
id?: string
|
|
9
|
+
|
|
8
10
|
name?: string
|
|
9
11
|
|
|
10
12
|
activityId?: string
|
|
@@ -42,7 +44,7 @@ export class NewActivityInstance {
|
|
|
42
44
|
approvalLine?: ApprovalLineItem[]
|
|
43
45
|
}
|
|
44
46
|
|
|
45
|
-
export class
|
|
47
|
+
export class ActivityInstanceIssue {
|
|
46
48
|
id?: string
|
|
47
49
|
|
|
48
50
|
name?: string
|
|
@@ -6,7 +6,7 @@ import { Activity, ActivityType, ActivityUIType } from './activity'
|
|
|
6
6
|
|
|
7
7
|
export enum ActivityInstanceStatus {
|
|
8
8
|
Draft = 'draft',
|
|
9
|
-
|
|
9
|
+
Issued = 'issued',
|
|
10
10
|
PendingAssignment = 'pending-assignment',
|
|
11
11
|
Assigned = 'assigned',
|
|
12
12
|
Started = 'started',
|
|
@@ -114,7 +114,7 @@ export class ActivityInstance {
|
|
|
114
114
|
|
|
115
115
|
isDelegatable(): boolean {
|
|
116
116
|
switch (this.state) {
|
|
117
|
-
case ActivityInstanceStatus.
|
|
117
|
+
case ActivityInstanceStatus.Issued:
|
|
118
118
|
case ActivityInstanceStatus.Assigned:
|
|
119
119
|
return true
|
|
120
120
|
default:
|
package/client/types/activity.ts
CHANGED
|
@@ -32,6 +32,11 @@ export enum ActivityUIType {
|
|
|
32
32
|
External = 'external'
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
export enum ActivityStartingType {
|
|
36
|
+
post = 'post',
|
|
37
|
+
issue = 'issue'
|
|
38
|
+
}
|
|
39
|
+
|
|
35
40
|
export class Activity {
|
|
36
41
|
id?: string
|
|
37
42
|
|
|
@@ -55,6 +60,8 @@ export class Activity {
|
|
|
55
60
|
|
|
56
61
|
startable?: boolean
|
|
57
62
|
|
|
63
|
+
startingType?: ActivityStartingType
|
|
64
|
+
|
|
58
65
|
schedule?: string
|
|
59
66
|
|
|
60
67
|
timzeone?: string
|
package/client/types/types.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { i18next } from '@operato/i18n'
|
|
2
|
+
|
|
1
3
|
export const Priorities = [
|
|
2
4
|
{ display: '', value: '' },
|
|
3
5
|
{ display: 'Emergency', value: 3 },
|
|
@@ -29,3 +31,9 @@ export const ActivityTypes = [
|
|
|
29
31
|
{ display: 'Subprocess', value: 'sub-process' },
|
|
30
32
|
{ display: 'Call', value: 'call' }
|
|
31
33
|
]
|
|
34
|
+
|
|
35
|
+
export const ActivityStartingTypes = [
|
|
36
|
+
{ display: '', value: '' },
|
|
37
|
+
{ display: i18next.t('label.activity-starting-type-post'), value: 'post' },
|
|
38
|
+
{ display: i18next.t('label.activity-starting-type-issue'), value: 'issue' }
|
|
39
|
+
]
|
package/dist-client/bootstrap.js
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
|
import { html } from 'lit-html';
|
|
5
6
|
import { store } from '@operato/shell';
|
|
6
7
|
import { openOverlay, TOOL_POSITION } from '@operato/layout';
|
|
@@ -22,6 +23,10 @@ export default function bootstrap() {
|
|
|
22
23
|
{
|
|
23
24
|
template: html ` <activity-thread-context-template></activity-thread-context-template> `,
|
|
24
25
|
context: 'activityThread'
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
template: html ` <activity-instance-context-template></activity-instance-context-template> `,
|
|
29
|
+
context: 'activityInstance'
|
|
25
30
|
}
|
|
26
31
|
].forEach(({ template, context }) => {
|
|
27
32
|
store.dispatch({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../client/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAA;AAC3B,OAAO,mDAAmD,CAAA;AAC1D,OAAO,iDAAiD,CAAA;
|
|
1
|
+
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../client/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAA;AAC3B,OAAO,mDAAmD,CAAA;AAC1D,OAAO,iDAAiD,CAAA;AACxD,OAAO,mDAAmD,CAAA;AAE1D,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACtC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAEhE,OAAO,EAAE,cAAc,IAAI,mBAAmB,EAAE,gBAAgB,IAAI,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AACtH,OAAO,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAA;AACzF,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAA;AAC7F,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAA;AAC7F,OAAO,EAAE,yBAAyB,EAAE,MAAM,uDAAuD,CAAA;AACjG,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAA;AAClG,OAAO,EAAE,+BAA+B,EAAE,MAAM,sDAAsD,CAAA;AAEtG,MAAM,CAAC,OAAO,UAAU,SAAS;IAC/B,CAAC;IAAA;QACC;YACE,QAAQ,EAAE,IAAI,CAAA,6EAA6E;YAC3F,OAAO,EAAE,kBAAkB;SAC5B;QACD;YACE,QAAQ,EAAE,IAAI,CAAA,yEAAyE;YACvF,OAAO,EAAE,gBAAgB;SAC1B;QACD;YACE,QAAQ,EAAE,IAAI,CAAA,6EAA6E;YAC3F,OAAO,EAAE,kBAAkB;SAC5B;KACF,CAAC,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAClC,KAAK,CAAC,QAAQ,CAAC;YACb,IAAI,EAAE,mBAAmB;YACzB,IAAI,EAAE;gBACJ,QAAQ,EAAE,aAAa,CAAC,KAAK;gBAC7B,QAAQ,EAAE,IAAI,CAAA;;qBAED,KAAK,EAAC,CAAC,EAAC,EAAE;oBACjB,WAAW,CAAC,yBAAyB,EAAE;wBACrC,QAAQ;qBACT,CAAC,CAAA;gBACJ,CAAC;;;SAGJ;gBACD,OAAO;aACR;SACF,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,mBAAmB,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAA;IACtD,qBAAqB,CAAC,UAAU,EAAE,uBAAuB,CAAC,CAAA;IAC1D,mBAAmB,CAAC,YAAY,EAAE,uBAAuB,CAAC,CAAA;IAC1D,qBAAqB,CAAC,YAAY,EAAE,yBAAyB,CAAC,CAAA;IAE9D,mBAAmB,CAAC,sBAAsB,EAAE,6BAA6B,CAAC,CAAA;IAC1E,qBAAqB,CAAC,sBAAsB,EAAE,+BAA+B,CAAC,CAAA;AAChF,CAAC","sourcesContent":["import '@material/mwc-icon'\nimport './templates/activity-approval-context-template.js'\nimport './templates/activity-thread-context-template.js'\nimport './templates/activity-instance-context-template.js'\n\nimport { html } from 'lit-html'\nimport { store } from '@operato/shell'\nimport { openOverlay, TOOL_POSITION } from '@operato/layout'\nimport { APPEND_CONTEXT_TOOL } from '@things-factory/context-ui'\n\nimport { registerEditor as registerGristEditor, registerRenderer as registerGristRenderer } from '@operato/data-grist'\nimport { OxGristEditorDuration } from '@operato/grist-editor/ox-grist-editor-duration.js'\nimport { OxGristEditorQuantifier } from '@operato/grist-editor/ox-grist-editor-quantifier.js'\nimport { OxGristRendererDuration } from '@operato/grist-editor/ox-grist-renderer-duration.js'\nimport { OxGristRendererQuantifier } from '@operato/grist-editor/ox-grist-renderer-quantifier.js'\nimport { GristEditorActivitySearchKeys } from './grist-editor/grist-editor-activity-search-key.js'\nimport { GristRendererActivitySearchKeys } from './grist-editor/grist-renderer-activity-search-key.js'\n\nexport default function bootstrap() {\n ;[\n {\n template: html` <activity-approval-context-template></activity-approval-context-template> `,\n context: 'activityApproval'\n },\n {\n template: html` <activity-thread-context-template></activity-thread-context-template> `,\n context: 'activityThread'\n },\n {\n template: html` <activity-instance-context-template></activity-instance-context-template> `,\n context: 'activityInstance'\n }\n ].forEach(({ template, context }) => {\n store.dispatch({\n type: APPEND_CONTEXT_TOOL,\n tool: {\n position: TOOL_POSITION.FRONT,\n template: html`\n <mwc-icon\n @click=${async e => {\n openOverlay('context-toolbar-overlay', {\n template\n })\n }}\n >info</mwc-icon\n >\n `,\n context\n }\n })\n })\n\n registerGristEditor('duration', OxGristEditorDuration)\n registerGristRenderer('duration', OxGristRendererDuration)\n registerGristEditor('quantifier', OxGristEditorQuantifier)\n registerGristRenderer('quantifier', OxGristRendererQuantifier)\n\n registerGristEditor('activity-search-keys', GristEditorActivitySearchKeys)\n registerGristRenderer('activity-search-keys', GristRendererActivitySearchKeys)\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
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
|
import { LitElement } from 'lit';
|
|
6
6
|
declare const ActivityStarterForm_base: (new (...args: any[]) => LitElement) & typeof LitElement;
|
|
@@ -13,9 +13,6 @@ export declare class ActivityStarterForm extends ActivityStarterForm_base {
|
|
|
13
13
|
firstUpdated(): void;
|
|
14
14
|
fetchActivity(id: any): Promise<void>;
|
|
15
15
|
draftActivityInstance(): Promise<void>;
|
|
16
|
-
|
|
17
|
-
postActivityInstance(): Promise<void>;
|
|
18
|
-
onClickAssignees(): void;
|
|
19
|
-
onClickApprovalLine(): void;
|
|
16
|
+
openActivityInstanceStart(activityInstance: any): void;
|
|
20
17
|
}
|
|
21
18
|
export {};
|