@things-factory/worklist 6.0.37 → 6.0.39
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 +3 -6
- package/client/grist-editor/grist-editor-activity-search-key.ts +3 -2
- package/client/grist-editor/grist-renderer-activity-search-key.ts +25 -0
- package/client/pages/activity/activity-list-page.ts +25 -52
- package/client/pages/activity/activity-partial-view.ts +0 -3
- package/client/pages/activity-instance/activity-instance-list-page.ts +8 -3
- package/client/pages/activity-thread/activity-thread-page.ts +4 -11
- package/client/pages/installable-activity/installable-activity-list-page.ts +4 -26
- package/client/pages/todo/approval-waiting-list-page.ts +9 -14
- package/client/pages/todo/done-list-page.ts +19 -17
- package/client/pages/todo/draft-list-page.ts +16 -14
- package/client/pages/todo/todo-list-page.ts +26 -16
- package/client/types/activity.ts +0 -6
- package/dist-client/bootstrap.js +3 -2
- package/dist-client/bootstrap.js.map +1 -1
- package/dist-client/grist-editor/grist-editor-activity-search-key.js +3 -2
- package/dist-client/grist-editor/grist-editor-activity-search-key.js.map +1 -1
- package/dist-client/grist-editor/grist-renderer-activity-search-key.d.ts +3 -0
- package/dist-client/grist-editor/grist-renderer-activity-search-key.js +22 -0
- package/dist-client/grist-editor/grist-renderer-activity-search-key.js.map +1 -0
- package/dist-client/pages/activity/activity-list-page.js +25 -52
- package/dist-client/pages/activity/activity-list-page.js.map +1 -1
- package/dist-client/pages/activity/activity-partial-view.js +1 -1
- package/dist-client/pages/activity/activity-partial-view.js.map +1 -1
- package/dist-client/pages/activity-instance/activity-instance-list-page.js +8 -3
- package/dist-client/pages/activity-instance/activity-instance-list-page.js.map +1 -1
- package/dist-client/pages/activity-thread/activity-thread-page.js +4 -6
- package/dist-client/pages/activity-thread/activity-thread-page.js.map +1 -1
- package/dist-client/pages/installable-activity/installable-activity-list-page.d.ts +0 -1
- package/dist-client/pages/installable-activity/installable-activity-list-page.js +2 -24
- package/dist-client/pages/installable-activity/installable-activity-list-page.js.map +1 -1
- package/dist-client/pages/todo/approval-waiting-list-page.js +9 -15
- package/dist-client/pages/todo/approval-waiting-list-page.js.map +1 -1
- package/dist-client/pages/todo/done-list-page.js +19 -17
- package/dist-client/pages/todo/done-list-page.js.map +1 -1
- package/dist-client/pages/todo/draft-list-page.js +16 -15
- package/dist-client/pages/todo/draft-list-page.js.map +1 -1
- package/dist-client/pages/todo/todo-list-page.js +26 -17
- package/dist-client/pages/todo/todo-list-page.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/types/activity.d.ts +0 -3
- package/dist-client/types/activity.js.map +1 -1
- package/dist-server/controllers/activity-thread/save.js +2 -2
- package/dist-server/controllers/activity-thread/save.js.map +1 -1
- package/dist-server/service/activity/activity-history.js +0 -15
- package/dist-server/service/activity/activity-history.js.map +1 -1
- package/dist-server/service/activity/activity-type.js +0 -24
- package/dist-server/service/activity/activity-type.js.map +1 -1
- package/dist-server/service/activity/activity.js +7 -22
- package/dist-server/service/activity/activity.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/server/controllers/activity-thread/save.ts +2 -1
- package/server/service/activity/activity-history.ts +0 -12
- package/server/service/activity/activity-type.ts +0 -18
- package/server/service/activity/activity.ts +7 -19
- package/translations/en.json +21 -1
- package/translations/ko.json +21 -1
- package/translations/ms.json +64 -44
- package/translations/zh.json +63 -43
package/client/bootstrap.ts
CHANGED
|
@@ -7,16 +7,13 @@ import { store } from '@operato/shell'
|
|
|
7
7
|
import { openOverlay, TOOL_POSITION } from '@operato/layout'
|
|
8
8
|
import { APPEND_CONTEXT_TOOL } from '@things-factory/context-ui'
|
|
9
9
|
|
|
10
|
-
import {
|
|
11
|
-
OxGristRendererJson5,
|
|
12
|
-
registerEditor as registerGristEditor,
|
|
13
|
-
registerRenderer as registerGristRenderer
|
|
14
|
-
} from '@operato/data-grist'
|
|
10
|
+
import { registerEditor as registerGristEditor, registerRenderer as registerGristRenderer } from '@operato/data-grist'
|
|
15
11
|
import { OxGristEditorDuration } from '@operato/grist-editor/ox-grist-editor-duration.js'
|
|
16
12
|
import { OxGristEditorQuantifier } from '@operato/grist-editor/ox-grist-editor-quantifier.js'
|
|
17
13
|
import { OxGristRendererDuration } from '@operato/grist-editor/ox-grist-renderer-duration.js'
|
|
18
14
|
import { OxGristRendererQuantifier } from '@operato/grist-editor/ox-grist-renderer-quantifier.js'
|
|
19
15
|
import { GristEditorActivitySearchKeys } from './grist-editor/grist-editor-activity-search-key.js'
|
|
16
|
+
import { GristRendererActivitySearchKeys } from './grist-editor/grist-renderer-activity-search-key.js'
|
|
20
17
|
|
|
21
18
|
export default function bootstrap() {
|
|
22
19
|
;[
|
|
@@ -54,5 +51,5 @@ export default function bootstrap() {
|
|
|
54
51
|
registerGristRenderer('quantifier', OxGristRendererQuantifier)
|
|
55
52
|
|
|
56
53
|
registerGristEditor('activity-search-keys', GristEditorActivitySearchKeys)
|
|
57
|
-
registerGristRenderer('activity-search-keys',
|
|
54
|
+
registerGristRenderer('activity-search-keys', GristRendererActivitySearchKeys)
|
|
58
55
|
}
|
|
@@ -16,8 +16,9 @@ export class GristEditorActivitySearchKeys extends OxGristEditor {
|
|
|
16
16
|
private popup?: PopupHandle
|
|
17
17
|
|
|
18
18
|
get editorTemplate() {
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
return this.value && this.value instanceof Array && this.value.length > 0
|
|
20
|
+
? html`<mwc-icon style="--mdc-icon-size:1.3em">key</mwc-icon>`
|
|
21
|
+
: html``
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
_onclick(e: Event): void {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import '@material/mwc-icon'
|
|
2
|
+
import { html } from 'lit'
|
|
3
|
+
import { FieldRenderer } from '@operato/data-grist'
|
|
4
|
+
|
|
5
|
+
function onmouseover(e: MouseEvent, value: any[]) {
|
|
6
|
+
const element = e.target as HTMLPreElement
|
|
7
|
+
const tooltip = value.map(key => key.name).join(',')
|
|
8
|
+
element.setAttribute('data-tooltip', tooltip)
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function onmouseout(e: MouseEvent) {
|
|
12
|
+
const element = e.target as HTMLPreElement
|
|
13
|
+
element.removeAttribute('data-tooltip')
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const GristRendererActivitySearchKeys: FieldRenderer = (value, column, record, rowIndex, field) => {
|
|
17
|
+
return value && value instanceof Array && value.length > 0
|
|
18
|
+
? html`<mwc-icon
|
|
19
|
+
style="--mdc-icon-size:1.3em"
|
|
20
|
+
@mouseover=${(e: MouseEvent) => onmouseover(e, value)}
|
|
21
|
+
@mouseout=${onmouseout}
|
|
22
|
+
>key</mwc-icon
|
|
23
|
+
>`
|
|
24
|
+
: html``
|
|
25
|
+
}
|
|
@@ -19,9 +19,9 @@ import { ActivityTypes, ActivityUITypes } from '../../types/types.js'
|
|
|
19
19
|
|
|
20
20
|
export const ActivityStatus = [
|
|
21
21
|
{ display: '', value: '' },
|
|
22
|
-
{ display: '
|
|
23
|
-
{ display: '
|
|
24
|
-
{ display: '
|
|
22
|
+
{ display: i18next.t('label.activity-state-draft'), value: 'draft' },
|
|
23
|
+
{ display: i18next.t('label.activity-state-released'), value: 'released' },
|
|
24
|
+
{ display: i18next.t('label.activity-state-deprecated'), value: 'deprecated' }
|
|
25
25
|
]
|
|
26
26
|
const DEFAULT_TZ = Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
27
27
|
const TIMEZONE_OPTIONS = ['', DEFAULT_TZ, ...moment.tz.names().filter(tz => tz !== DEFAULT_TZ)]
|
|
@@ -123,6 +123,7 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
123
123
|
{
|
|
124
124
|
type: 'gutter',
|
|
125
125
|
gutterName: 'button',
|
|
126
|
+
title: i18next.t('title.activity schedule (un)register'),
|
|
126
127
|
icon: record => (!record || !record.name ? '' : record.scheduleId ? 'pause' : 'play_arrow'),
|
|
127
128
|
handlers: {
|
|
128
129
|
click: (columns, data, column, record, rowIndex) => {
|
|
@@ -141,6 +142,7 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
141
142
|
{
|
|
142
143
|
type: 'gutter',
|
|
143
144
|
gutterName: 'button',
|
|
145
|
+
title: i18next.t('title.activity model item list'),
|
|
144
146
|
icon: 'reorder',
|
|
145
147
|
handlers: {
|
|
146
148
|
click: (columns, data, column, record, rowIndex) => {
|
|
@@ -202,9 +204,18 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
202
204
|
options: ActivityTypes
|
|
203
205
|
},
|
|
204
206
|
sortable: true,
|
|
205
|
-
// filter: true,
|
|
206
207
|
width: 60
|
|
207
208
|
},
|
|
209
|
+
{
|
|
210
|
+
type: 'boolean',
|
|
211
|
+
name: 'startable',
|
|
212
|
+
label: true,
|
|
213
|
+
header: i18next.t('field.startable'),
|
|
214
|
+
record: {
|
|
215
|
+
editable: true
|
|
216
|
+
},
|
|
217
|
+
width: 50
|
|
218
|
+
},
|
|
208
219
|
{
|
|
209
220
|
type: 'activity-search-keys',
|
|
210
221
|
name: 'searchKeys',
|
|
@@ -213,26 +224,21 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
213
224
|
record: {
|
|
214
225
|
editable: true
|
|
215
226
|
},
|
|
216
|
-
width:
|
|
227
|
+
width: 50
|
|
217
228
|
},
|
|
218
229
|
{
|
|
219
230
|
type: 'number',
|
|
220
231
|
name: 'priority',
|
|
221
232
|
header: i18next.t('field.priority'),
|
|
222
233
|
record: {
|
|
223
|
-
editable: true
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
name: 'startable',
|
|
230
|
-
label: true,
|
|
231
|
-
header: i18next.t('field.startable'),
|
|
232
|
-
record: {
|
|
233
|
-
editable: true
|
|
234
|
+
editable: true,
|
|
235
|
+
renderer: function (value, column, record, rowIndex, field) {
|
|
236
|
+
const color = ['', 'gray', 'yellow', 'orange', 'red'][value || 0]
|
|
237
|
+
const count = new Array(value > 4 ? 4 : value || 0).fill('')
|
|
238
|
+
return html`${count.map(() => html`<mwc-icon style="color:${color};">star</mwc-icon>`)}`
|
|
239
|
+
}
|
|
234
240
|
},
|
|
235
|
-
width:
|
|
241
|
+
width: 60
|
|
236
242
|
},
|
|
237
243
|
{
|
|
238
244
|
type: 'crontab',
|
|
@@ -319,7 +325,7 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
319
325
|
record: {
|
|
320
326
|
editable: true
|
|
321
327
|
},
|
|
322
|
-
width:
|
|
328
|
+
width: 50
|
|
323
329
|
},
|
|
324
330
|
{
|
|
325
331
|
type: 'approval-line',
|
|
@@ -328,7 +334,7 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
328
334
|
record: {
|
|
329
335
|
editable: true
|
|
330
336
|
},
|
|
331
|
-
width:
|
|
337
|
+
width: 50
|
|
332
338
|
},
|
|
333
339
|
{
|
|
334
340
|
type: 'select',
|
|
@@ -424,36 +430,6 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
424
430
|
sortable: true,
|
|
425
431
|
width: 80
|
|
426
432
|
},
|
|
427
|
-
{
|
|
428
|
-
type: 'duration',
|
|
429
|
-
name: 'cycleTime',
|
|
430
|
-
header: i18next.t('field.cycle-time'),
|
|
431
|
-
record: {
|
|
432
|
-
editable: true
|
|
433
|
-
},
|
|
434
|
-
sortable: true,
|
|
435
|
-
width: 80
|
|
436
|
-
},
|
|
437
|
-
{
|
|
438
|
-
type: 'duration',
|
|
439
|
-
name: 'tactTime',
|
|
440
|
-
header: i18next.t('field.tact-time'),
|
|
441
|
-
record: {
|
|
442
|
-
editable: true
|
|
443
|
-
},
|
|
444
|
-
sortable: true,
|
|
445
|
-
width: 80
|
|
446
|
-
},
|
|
447
|
-
{
|
|
448
|
-
type: 'duration',
|
|
449
|
-
name: 'leadTime',
|
|
450
|
-
header: i18next.t('field.lead-time'),
|
|
451
|
-
record: {
|
|
452
|
-
editable: true
|
|
453
|
-
},
|
|
454
|
-
sortable: true,
|
|
455
|
-
width: 80
|
|
456
|
-
},
|
|
457
433
|
{
|
|
458
434
|
type: 'resource-object',
|
|
459
435
|
name: 'updater',
|
|
@@ -565,9 +541,6 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
565
541
|
timezone
|
|
566
542
|
scheduleId
|
|
567
543
|
standardTime
|
|
568
|
-
leadTime
|
|
569
|
-
cycleTime
|
|
570
|
-
tactTime
|
|
571
544
|
updater {
|
|
572
545
|
id
|
|
573
546
|
name
|
|
@@ -127,9 +127,14 @@ export class ActivityInstanceListPage extends connect(store)(localize(i18next)(P
|
|
|
127
127
|
name: 'priority',
|
|
128
128
|
header: i18next.t('field.priority'),
|
|
129
129
|
record: {
|
|
130
|
-
editable: false
|
|
130
|
+
editable: false,
|
|
131
|
+
renderer: function (value, column, record, rowIndex, field) {
|
|
132
|
+
const color = ['', 'gray', 'yellow', 'orange', 'red'][value || 0]
|
|
133
|
+
const count = new Array(value > 4 ? 4 : value || 0).fill('')
|
|
134
|
+
return html`${count.map(() => html`<mwc-icon style="color:${color};">star</mwc-icon>`)}`
|
|
135
|
+
}
|
|
131
136
|
},
|
|
132
|
-
width:
|
|
137
|
+
width: 60
|
|
133
138
|
},
|
|
134
139
|
{
|
|
135
140
|
type: 'string',
|
|
@@ -138,7 +143,7 @@ export class ActivityInstanceListPage extends connect(store)(localize(i18next)(P
|
|
|
138
143
|
record: {
|
|
139
144
|
editable: false
|
|
140
145
|
},
|
|
141
|
-
width:
|
|
146
|
+
width: 80
|
|
142
147
|
},
|
|
143
148
|
{
|
|
144
149
|
type: 'resource-object',
|
|
@@ -106,23 +106,16 @@ export class ActivityThreadPage extends connect(store)(localize(i18next)(PageVie
|
|
|
106
106
|
get context() {
|
|
107
107
|
const state = this.activityThread?.state
|
|
108
108
|
|
|
109
|
-
const startable = [ActivityThreadStatus.Assigned].includes(state)
|
|
110
|
-
const endable = [ActivityThreadStatus.Started].includes(state)
|
|
111
|
-
const savable = endable
|
|
112
109
|
const restartable = [ActivityThreadStatus.Rejected].includes(state)
|
|
113
|
-
const
|
|
114
|
-
const
|
|
110
|
+
const savable = !restartable
|
|
111
|
+
const endable = !restartable
|
|
112
|
+
const delegatable = !restartable
|
|
113
|
+
const abortable = !restartable
|
|
115
114
|
|
|
116
115
|
return {
|
|
117
116
|
title: this.lifecycle?.params?.['title'] || i18next.t('title.activity'),
|
|
118
117
|
help: 'worklist/activity',
|
|
119
118
|
actions: [
|
|
120
|
-
startable && {
|
|
121
|
-
title: i18next.t('button.start'),
|
|
122
|
-
action: this._startActivityThread.bind(this),
|
|
123
|
-
...CommonButtonStyles.play
|
|
124
|
-
},
|
|
125
|
-
|
|
126
119
|
savable && {
|
|
127
120
|
title: i18next.t('button.save'),
|
|
128
121
|
action: this._saveActivityThread.bind(this),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '@operato/data-grist'
|
|
2
2
|
import './installable-activity-model-item-list.js'
|
|
3
|
+
|
|
3
4
|
import gql from 'graphql-tag'
|
|
4
5
|
import { css, html } from 'lit'
|
|
5
6
|
import { customElement, property, query } from 'lit/decorators.js'
|
|
@@ -10,7 +11,7 @@ import { client } from '@operato/graphql'
|
|
|
10
11
|
import { i18next, localize } from '@operato/i18n'
|
|
11
12
|
import { notify, openPopup } from '@operato/layout'
|
|
12
13
|
import { PageView, store } from '@operato/shell'
|
|
13
|
-
import {
|
|
14
|
+
import { CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
|
14
15
|
import { isMobileDevice } from '@operato/utils'
|
|
15
16
|
|
|
16
17
|
import { ActivityTypes, ActivityUITypes } from '../../types/types.js'
|
|
@@ -172,7 +173,7 @@ export class ActivityTemplateListPage extends connect(store)(localize(i18next)(P
|
|
|
172
173
|
},
|
|
173
174
|
filter: 'search',
|
|
174
175
|
sortable: true,
|
|
175
|
-
width:
|
|
176
|
+
width: 80
|
|
176
177
|
},
|
|
177
178
|
{
|
|
178
179
|
type: 'string',
|
|
@@ -183,7 +184,7 @@ export class ActivityTemplateListPage extends connect(store)(localize(i18next)(P
|
|
|
183
184
|
},
|
|
184
185
|
filter: 'search',
|
|
185
186
|
sortable: true,
|
|
186
|
-
width:
|
|
187
|
+
width: 120
|
|
187
188
|
},
|
|
188
189
|
{
|
|
189
190
|
type: 'select',
|
|
@@ -195,7 +196,6 @@ export class ActivityTemplateListPage extends connect(store)(localize(i18next)(P
|
|
|
195
196
|
options: ActivityTypes
|
|
196
197
|
},
|
|
197
198
|
sortable: true,
|
|
198
|
-
// filter: true,
|
|
199
199
|
width: 60
|
|
200
200
|
},
|
|
201
201
|
{
|
|
@@ -293,23 +293,6 @@ export class ActivityTemplateListPage extends connect(store)(localize(i18next)(P
|
|
|
293
293
|
record: {
|
|
294
294
|
editable: false
|
|
295
295
|
},
|
|
296
|
-
// filter: true,
|
|
297
|
-
sortable: true,
|
|
298
|
-
width: 60
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
type: 'checkbox',
|
|
302
|
-
name: 'active',
|
|
303
|
-
label: true,
|
|
304
|
-
header: i18next.t('field.active'),
|
|
305
|
-
record: {
|
|
306
|
-
editable: false,
|
|
307
|
-
renderer: function (value, column, record, rowIndex, field) {
|
|
308
|
-
var type = record.reportType !== 'board' ? 'script' : 'board'
|
|
309
|
-
return getRenderer(type)(value, column, record, rowIndex, field)
|
|
310
|
-
}
|
|
311
|
-
},
|
|
312
|
-
// filter: true,
|
|
313
296
|
sortable: true,
|
|
314
297
|
width: 60
|
|
315
298
|
}
|
|
@@ -326,11 +309,6 @@ export class ActivityTemplateListPage extends connect(store)(localize(i18next)(P
|
|
|
326
309
|
}
|
|
327
310
|
}
|
|
328
311
|
|
|
329
|
-
async pageUpdated(changes, lifecycle) {
|
|
330
|
-
if (this.active) {
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
|
|
334
312
|
async fetchHandler({ page, limit, sortings = [], filters = [] }: FetchOption) {
|
|
335
313
|
const response = await client.query({
|
|
336
314
|
query: gql`
|
|
@@ -167,14 +167,17 @@ export class ApprovalWaitingListPage extends connect(store)(localize(i18next)(Pa
|
|
|
167
167
|
hidden: true
|
|
168
168
|
},
|
|
169
169
|
{
|
|
170
|
-
type: '
|
|
170
|
+
type: 'number',
|
|
171
171
|
name: 'priority',
|
|
172
172
|
header: i18next.t('field.priority'),
|
|
173
173
|
record: {
|
|
174
174
|
editable: false,
|
|
175
|
-
|
|
175
|
+
renderer: function (value, column, record, rowIndex, field) {
|
|
176
|
+
const color = ['', 'gray', 'yellow', 'orange', 'red'][value || 0]
|
|
177
|
+
const count = new Array(value > 4 ? 4 : value || 0).fill('')
|
|
178
|
+
return html`${count.map(() => html`<mwc-icon style="color:${color};">star</mwc-icon>`)}`
|
|
179
|
+
}
|
|
176
180
|
},
|
|
177
|
-
// filter: true,
|
|
178
181
|
width: 60
|
|
179
182
|
},
|
|
180
183
|
{
|
|
@@ -184,19 +187,11 @@ export class ApprovalWaitingListPage extends connect(store)(localize(i18next)(Pa
|
|
|
184
187
|
record: {
|
|
185
188
|
editable: false,
|
|
186
189
|
options: [
|
|
187
|
-
{ display: '
|
|
188
|
-
{ display: '
|
|
189
|
-
{ display: 'WaitingAssignment', value: 'waiting-assignment' },
|
|
190
|
-
{ display: 'Assigned', value: 'assigned' },
|
|
191
|
-
{ display: 'Started', value: 'started' },
|
|
192
|
-
{ display: 'Pending', value: 'pending' },
|
|
193
|
-
{ display: 'Escalated', value: 'escalated' },
|
|
194
|
-
{ display: 'Ended', value: 'ended' },
|
|
195
|
-
{ display: 'Aborted', value: 'aborted' }
|
|
190
|
+
{ display: i18next.t('label.activity-state-submitted'), value: 'submitted' },
|
|
191
|
+
{ display: i18next.t('label.activity-state-escalated'), value: 'escalated' }
|
|
196
192
|
]
|
|
197
193
|
},
|
|
198
|
-
|
|
199
|
-
width: 60
|
|
194
|
+
width: 80
|
|
200
195
|
},
|
|
201
196
|
{
|
|
202
197
|
type: 'datetime',
|
|
@@ -14,7 +14,6 @@ import { CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
|
|
14
14
|
import { adjustFilters, isMobileDevice } from '@operato/utils'
|
|
15
15
|
|
|
16
16
|
import { ActivityThreadStatus } from '../../types/activity-thread'
|
|
17
|
-
import { Priorities } from '../../types/types.js'
|
|
18
17
|
|
|
19
18
|
@customElement('done-list-page')
|
|
20
19
|
export class DoneListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
@@ -116,8 +115,9 @@ export class DoneListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
116
115
|
{
|
|
117
116
|
type: 'gutter',
|
|
118
117
|
gutterName: 'button',
|
|
119
|
-
name: '
|
|
120
|
-
icon: '
|
|
118
|
+
name: 'view',
|
|
119
|
+
icon: 'pageview',
|
|
120
|
+
title: i18next.t('title.view page'),
|
|
121
121
|
handlers: {
|
|
122
122
|
click: (columns, data, column, record, rowIndex) => {
|
|
123
123
|
const { id } = record
|
|
@@ -162,14 +162,17 @@ export class DoneListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
162
162
|
hidden: true
|
|
163
163
|
},
|
|
164
164
|
{
|
|
165
|
-
type: '
|
|
165
|
+
type: 'number',
|
|
166
166
|
name: 'priority',
|
|
167
167
|
header: i18next.t('field.priority'),
|
|
168
168
|
record: {
|
|
169
169
|
editable: false,
|
|
170
|
-
|
|
170
|
+
renderer: function (value, column, record, rowIndex, field) {
|
|
171
|
+
const color = ['', 'gray', 'yellow', 'orange', 'red'][value || 0]
|
|
172
|
+
const count = new Array(value > 4 ? 4 : value || 0).fill('')
|
|
173
|
+
return html`${count.map(() => html`<mwc-icon style="color:${color};">star</mwc-icon>`)}`
|
|
174
|
+
}
|
|
171
175
|
},
|
|
172
|
-
// filter: true,
|
|
173
176
|
width: 60
|
|
174
177
|
},
|
|
175
178
|
{
|
|
@@ -179,19 +182,18 @@ export class DoneListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
179
182
|
record: {
|
|
180
183
|
editable: false,
|
|
181
184
|
options: [
|
|
182
|
-
{ display: '
|
|
183
|
-
{ display: '
|
|
184
|
-
{ display: '
|
|
185
|
-
{ display: '
|
|
186
|
-
{ display: '
|
|
187
|
-
{ display: '
|
|
188
|
-
{ display: '
|
|
189
|
-
{ display: '
|
|
190
|
-
{ display: '
|
|
185
|
+
{ display: i18next.t('label.activity-state-draft'), value: 'draft' },
|
|
186
|
+
{ display: i18next.t('label.activity-state-posted'), value: 'posted' },
|
|
187
|
+
{ display: i18next.t('label.activity-state-waiting-assignment'), value: 'waiting-assignment' },
|
|
188
|
+
{ display: i18next.t('label.activity-state-assigned'), value: 'assigned' },
|
|
189
|
+
{ display: i18next.t('label.activity-state-started'), value: 'started' },
|
|
190
|
+
{ display: i18next.t('label.activity-state-pending'), value: 'pending' },
|
|
191
|
+
{ display: i18next.t('label.activity-state-escalated'), value: 'escalated' },
|
|
192
|
+
{ display: i18next.t('label.activity-state-ended'), value: 'ended' },
|
|
193
|
+
{ display: i18next.t('label.activity-state-aborted'), value: 'aborted' }
|
|
191
194
|
]
|
|
192
195
|
},
|
|
193
|
-
|
|
194
|
-
width: 60
|
|
196
|
+
width: 80
|
|
195
197
|
},
|
|
196
198
|
{
|
|
197
199
|
type: 'datetime',
|
|
@@ -178,14 +178,17 @@ export class DraftListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
178
178
|
hidden: true
|
|
179
179
|
},
|
|
180
180
|
{
|
|
181
|
-
type: '
|
|
181
|
+
type: 'number',
|
|
182
182
|
name: 'priority',
|
|
183
183
|
header: i18next.t('field.priority'),
|
|
184
184
|
record: {
|
|
185
185
|
editable: false,
|
|
186
|
-
|
|
186
|
+
renderer: function (value, column, record, rowIndex, field) {
|
|
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
|
+
}
|
|
187
191
|
},
|
|
188
|
-
// filter: true,
|
|
189
192
|
width: 60
|
|
190
193
|
},
|
|
191
194
|
{
|
|
@@ -195,19 +198,18 @@ export class DraftListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
195
198
|
record: {
|
|
196
199
|
editable: false,
|
|
197
200
|
options: [
|
|
198
|
-
{ display: '
|
|
199
|
-
{ display: '
|
|
200
|
-
{ display: '
|
|
201
|
-
{ display: '
|
|
202
|
-
{ display: '
|
|
203
|
-
{ display: '
|
|
204
|
-
{ display: '
|
|
205
|
-
{ display: '
|
|
206
|
-
{ display: '
|
|
201
|
+
{ display: i18next.t('label.activity-state-draft'), value: 'draft' },
|
|
202
|
+
{ display: i18next.t('label.activity-state-posted'), value: 'posted' },
|
|
203
|
+
{ display: i18next.t('label.activity-state-waiting-assignment'), value: 'waiting-assignment' },
|
|
204
|
+
{ display: i18next.t('label.activity-state-assigned'), value: 'assigned' },
|
|
205
|
+
{ display: i18next.t('label.activity-state-started'), value: 'started' },
|
|
206
|
+
{ display: i18next.t('label.activity-state-pending'), value: 'pending' },
|
|
207
|
+
{ display: i18next.t('label.activity-state-escalated'), value: 'escalated' },
|
|
208
|
+
{ display: i18next.t('label.activity-state-ended'), value: 'ended' },
|
|
209
|
+
{ display: i18next.t('label.activity-state-aborted'), value: 'aborted' }
|
|
207
210
|
]
|
|
208
211
|
},
|
|
209
|
-
|
|
210
|
-
width: 60
|
|
212
|
+
width: 80
|
|
211
213
|
},
|
|
212
214
|
{
|
|
213
215
|
type: 'datetime',
|
|
@@ -15,7 +15,6 @@ import { CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
|
|
15
15
|
import { adjustFilters, isMobileDevice, sleep } from '@operato/utils'
|
|
16
16
|
|
|
17
17
|
import { ActivityThreadStatus } from '../../types/activity-thread'
|
|
18
|
-
import { Priorities } from '../../types/types.js'
|
|
19
18
|
|
|
20
19
|
const MIN = 60
|
|
21
20
|
const HOUR = 60 * MIN
|
|
@@ -89,6 +88,10 @@ export class TodoListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
89
88
|
{
|
|
90
89
|
display: i18next.t('label.filter-rejected'),
|
|
91
90
|
value: 'rejected'
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
display: i18next.t('label.filter-proceeding'),
|
|
94
|
+
value: 'proceeding'
|
|
92
95
|
}
|
|
93
96
|
]}
|
|
94
97
|
@change=${(e: CustomEvent) => {
|
|
@@ -167,14 +170,17 @@ export class TodoListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
167
170
|
hidden: true
|
|
168
171
|
},
|
|
169
172
|
{
|
|
170
|
-
type: '
|
|
173
|
+
type: 'number',
|
|
171
174
|
name: 'priority',
|
|
172
175
|
header: i18next.t('field.priority'),
|
|
173
176
|
record: {
|
|
174
177
|
editable: false,
|
|
175
|
-
|
|
178
|
+
renderer: function (value, column, record, rowIndex, field) {
|
|
179
|
+
const color = ['', 'gray', 'yellow', 'orange', 'red'][value || 0]
|
|
180
|
+
const count = new Array(value > 4 ? 4 : value || 0).fill('')
|
|
181
|
+
return html`${count.map(() => html`<mwc-icon style="color:${color};">star</mwc-icon>`)}`
|
|
182
|
+
}
|
|
176
183
|
},
|
|
177
|
-
// filter: true,
|
|
178
184
|
width: 60
|
|
179
185
|
},
|
|
180
186
|
{
|
|
@@ -184,18 +190,17 @@ export class TodoListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
184
190
|
record: {
|
|
185
191
|
editable: false,
|
|
186
192
|
options: [
|
|
187
|
-
{ display: '
|
|
188
|
-
{ display: '
|
|
189
|
-
{ display: '
|
|
190
|
-
{ display: '
|
|
191
|
-
{ display: '
|
|
192
|
-
{ display: '
|
|
193
|
-
{ display: '
|
|
194
|
-
{ display: '
|
|
193
|
+
{ display: i18next.t('label.activity-state-assigned'), value: 'assigned' },
|
|
194
|
+
{ display: i18next.t('label.activity-state-started'), value: 'started' },
|
|
195
|
+
{ display: i18next.t('label.activity-state-delegated'), value: 'delegated' },
|
|
196
|
+
{ display: i18next.t('label.activity-state-submitted'), value: 'submitted' },
|
|
197
|
+
{ display: i18next.t('label.activity-state-escalated'), value: 'escalated' },
|
|
198
|
+
{ display: i18next.t('label.activity-state-rejected'), value: 'rejected' },
|
|
199
|
+
{ display: i18next.t('label.activity-state-ended'), value: 'ended' },
|
|
200
|
+
{ display: i18next.t('label.activity-state-aborted'), value: 'aborted' }
|
|
195
201
|
]
|
|
196
202
|
},
|
|
197
|
-
|
|
198
|
-
width: 60
|
|
203
|
+
width: 80
|
|
199
204
|
},
|
|
200
205
|
{
|
|
201
206
|
type: 'datetime',
|
|
@@ -283,8 +288,13 @@ export class TodoListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
283
288
|
filters = adjustFilters(filters, [{ name: 'dueAt', operator: 'lte', value: tomorrow }])
|
|
284
289
|
}
|
|
285
290
|
|
|
286
|
-
|
|
287
|
-
filters
|
|
291
|
+
const status = [
|
|
292
|
+
this.filters?.includes('rejected') && ActivityThreadStatus.Rejected,
|
|
293
|
+
this.filters?.includes('proceeding') && ActivityThreadStatus.Started
|
|
294
|
+
].filter(Boolean)
|
|
295
|
+
|
|
296
|
+
if (status.length > 0) {
|
|
297
|
+
filters = adjustFilters(filters, [{ name: 'state', operator: 'in', value: status }])
|
|
288
298
|
}
|
|
289
299
|
|
|
290
300
|
const response = await client.query({
|
package/client/types/activity.ts
CHANGED
package/dist-client/bootstrap.js
CHANGED
|
@@ -5,12 +5,13 @@ import { html } from 'lit-html';
|
|
|
5
5
|
import { store } from '@operato/shell';
|
|
6
6
|
import { openOverlay, TOOL_POSITION } from '@operato/layout';
|
|
7
7
|
import { APPEND_CONTEXT_TOOL } from '@things-factory/context-ui';
|
|
8
|
-
import {
|
|
8
|
+
import { registerEditor as registerGristEditor, registerRenderer as registerGristRenderer } from '@operato/data-grist';
|
|
9
9
|
import { OxGristEditorDuration } from '@operato/grist-editor/ox-grist-editor-duration.js';
|
|
10
10
|
import { OxGristEditorQuantifier } from '@operato/grist-editor/ox-grist-editor-quantifier.js';
|
|
11
11
|
import { OxGristRendererDuration } from '@operato/grist-editor/ox-grist-renderer-duration.js';
|
|
12
12
|
import { OxGristRendererQuantifier } from '@operato/grist-editor/ox-grist-renderer-quantifier.js';
|
|
13
13
|
import { GristEditorActivitySearchKeys } from './grist-editor/grist-editor-activity-search-key.js';
|
|
14
|
+
import { GristRendererActivitySearchKeys } from './grist-editor/grist-renderer-activity-search-key.js';
|
|
14
15
|
export default function bootstrap() {
|
|
15
16
|
;
|
|
16
17
|
[
|
|
@@ -46,6 +47,6 @@ export default function bootstrap() {
|
|
|
46
47
|
registerGristEditor('quantifier', OxGristEditorQuantifier);
|
|
47
48
|
registerGristRenderer('quantifier', OxGristRendererQuantifier);
|
|
48
49
|
registerGristEditor('activity-search-keys', GristEditorActivitySearchKeys);
|
|
49
|
-
registerGristRenderer('activity-search-keys',
|
|
50
|
+
registerGristRenderer('activity-search-keys', GristRendererActivitySearchKeys);
|
|
50
51
|
}
|
|
51
52
|
//# sourceMappingURL=bootstrap.js.map
|