@things-factory/worklist 9.1.19 → 10.0.0-beta.2
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/dist-client/components/activity-thread-timeline.d.ts +1 -9
- package/dist-client/components/activity-thread-timeline.js +1 -3
- package/dist-client/components/activity-thread-timeline.js.map +1 -1
- package/dist-client/pages/activity/activity-list-page.d.ts +1 -7
- package/dist-client/pages/activity/activity-list-page.js +125 -234
- package/dist-client/pages/activity/activity-list-page.js.map +1 -1
- package/dist-client/pages/activity/activity-page.d.ts +1 -7
- package/dist-client/pages/activity/activity-page.js +51 -93
- package/dist-client/pages/activity/activity-page.js.map +1 -1
- package/dist-client/pages/activity/starter-list-page.d.ts +1 -7
- package/dist-client/pages/activity/starter-list-page.js +33 -62
- package/dist-client/pages/activity/starter-list-page.js.map +1 -1
- package/dist-client/pages/activity-approval/activity-approval-list-page.d.ts +1 -7
- package/dist-client/pages/activity-approval/activity-approval-list-page.js +50 -95
- package/dist-client/pages/activity-approval/activity-approval-list-page.js.map +1 -1
- package/dist-client/pages/activity-approval/activity-approval-page.d.ts +1 -7
- package/dist-client/pages/activity-approval/activity-approval-page.js +73 -119
- package/dist-client/pages/activity-approval/activity-approval-page.js.map +1 -1
- package/dist-client/pages/activity-instance/activity-instance-list-page.d.ts +0 -6
- package/dist-client/pages/activity-instance/activity-instance-list-page.js +63 -120
- package/dist-client/pages/activity-instance/activity-instance-list-page.js.map +1 -1
- package/dist-client/pages/activity-instance/activity-instance-search-page.d.ts +1 -7
- package/dist-client/pages/activity-instance/activity-instance-search-page.js +55 -101
- 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 +1 -7
- package/dist-client/pages/activity-instance/activity-instance-start-page.js +65 -109
- package/dist-client/pages/activity-instance/activity-instance-start-page.js.map +1 -1
- package/dist-client/pages/activity-stats/activity-stats-list-page.d.ts +1 -7
- package/dist-client/pages/activity-stats/activity-stats-list-page.js +50 -95
- package/dist-client/pages/activity-stats/activity-stats-list-page.js.map +1 -1
- package/dist-client/pages/activity-store/activity-store-page.d.ts +1 -7
- package/dist-client/pages/activity-store/activity-store-page.js +2 -3
- package/dist-client/pages/activity-store/activity-store-page.js.map +1 -1
- package/dist-client/pages/activity-supervisor/reporter-list-page.d.ts +1 -7
- package/dist-client/pages/activity-supervisor/reporter-list-page.js +36 -66
- package/dist-client/pages/activity-supervisor/reporter-list-page.js.map +1 -1
- package/dist-client/pages/activity-template/activity-template-list-page.d.ts +1 -7
- package/dist-client/pages/activity-template/activity-template-list-page.js +70 -134
- package/dist-client/pages/activity-template/activity-template-list-page.js.map +1 -1
- package/dist-client/pages/activity-thread/activity-thread-list-page.d.ts +1 -7
- package/dist-client/pages/activity-thread/activity-thread-list-page.js +49 -93
- package/dist-client/pages/activity-thread/activity-thread-list-page.js.map +1 -1
- package/dist-client/pages/activity-thread/activity-thread-page.d.ts +1 -7
- package/dist-client/pages/activity-thread/activity-thread-page.js +80 -135
- package/dist-client/pages/activity-thread/activity-thread-page.js.map +1 -1
- package/dist-client/pages/activity-thread/activity-thread-view-page.d.ts +1 -7
- package/dist-client/pages/activity-thread/activity-thread-view-page.js +54 -80
- package/dist-client/pages/activity-thread/activity-thread-view-page.js.map +1 -1
- package/dist-client/pages/activity-thread/activity-thread-view.js +4 -0
- package/dist-client/pages/activity-thread/activity-thread-view.js.map +1 -1
- package/dist-client/pages/dashboard/dashboard-home.js +3 -5
- package/dist-client/pages/dashboard/dashboard-home.js.map +1 -1
- package/dist-client/pages/installable-activity/installable-activity-list-page.d.ts +0 -6
- package/dist-client/pages/installable-activity/installable-activity-list-page.js +68 -130
- 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 +1 -7
- package/dist-client/pages/todo/approval-done-list-page.js +53 -100
- package/dist-client/pages/todo/approval-done-list-page.js.map +1 -1
- package/dist-client/pages/todo/approval-pending-list-page.d.ts +0 -6
- package/dist-client/pages/todo/approval-pending-list-page.js +63 -119
- package/dist-client/pages/todo/approval-pending-list-page.js.map +1 -1
- package/dist-client/pages/todo/done-list-calendar-page.d.ts +1 -7
- package/dist-client/pages/todo/done-list-calendar-page.js +2 -3
- package/dist-client/pages/todo/done-list-calendar-page.js.map +1 -1
- package/dist-client/pages/todo/done-list-page.d.ts +1 -7
- package/dist-client/pages/todo/done-list-page.js +56 -106
- package/dist-client/pages/todo/done-list-page.js.map +1 -1
- package/dist-client/pages/todo/draft-list-page.d.ts +1 -7
- package/dist-client/pages/todo/draft-list-page.js +49 -88
- package/dist-client/pages/todo/draft-list-page.js.map +1 -1
- package/dist-client/pages/todo/pickable-list-page.d.ts +1 -7
- package/dist-client/pages/todo/pickable-list-page.js +48 -91
- package/dist-client/pages/todo/pickable-list-page.js.map +1 -1
- package/dist-client/pages/todo/todo-list-page.d.ts +0 -6
- package/dist-client/pages/todo/todo-list-page.js +56 -106
- package/dist-client/pages/todo/todo-list-page.js.map +1 -1
- package/dist-client/pages/worklist-home.js +2 -3
- package/dist-client/pages/worklist-home.js.map +1 -1
- package/dist-client/route.d.ts +1 -1
- package/dist-client/templates/activity-approval-context-template.js +8 -12
- package/dist-client/templates/activity-approval-context-template.js.map +1 -1
- package/dist-client/templates/activity-instance-context-template.js +8 -12
- package/dist-client/templates/activity-instance-context-template.js.map +1 -1
- package/dist-client/templates/activity-thread-context-template.js +8 -12
- package/dist-client/templates/activity-thread-context-template.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/controllers/activity-approval/approve.js +2 -2
- package/dist-server/controllers/activity-approval/approve.js.map +1 -1
- package/dist-server/controllers/activity-thread/submit.js +2 -2
- package/dist-server/controllers/activity-thread/submit.js.map +1 -1
- package/dist-server/service/index.d.ts +2 -2
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +16 -16
- package/spec/integration/approval-mixed-types.spec.ts +491 -0
- package/spec/integration/approval-role-based.spec.ts +389 -0
- package/spec/integration/instance-lifecycle.spec.ts +406 -0
- package/spec/integration/role-approval-edge-cases.spec.ts +581 -0
- package/spec/unit/controllers/activity-instance-issue.spec.ts +360 -0
- package/spec/unit/controllers/activity-thread-submit.spec.ts +384 -0
- package/spec/unit/role-approval-escalate-logic.spec.ts +499 -0
- package/spec/unit/role-approval-submit-logic.spec.ts +481 -0
- package/spec/unit/thread-state-helpers.spec.ts +253 -0
- package/translations/en.json +1 -1
|
@@ -5,12 +5,11 @@ import './activity-model-item-list.js';
|
|
|
5
5
|
import gql from 'graphql-tag';
|
|
6
6
|
import { css, html } from 'lit';
|
|
7
7
|
import { customElement, property, query, state } from 'lit/decorators.js';
|
|
8
|
-
import { connect } from 'pwa-helpers/connect-mixin.js';
|
|
9
8
|
import { DataGrist, getEditor, getRenderer } from '@operato/data-grist';
|
|
10
9
|
import { client } from '@operato/graphql';
|
|
11
10
|
import { i18next, localize } from '@operato/i18n';
|
|
12
11
|
import { notify, openPopup } from '@operato/layout';
|
|
13
|
-
import { PageView
|
|
12
|
+
import { PageView } from '@operato/shell';
|
|
14
13
|
import { CommonButtonStyles, CommonHeaderStyles, ScrollbarStyles } from '@operato/styles';
|
|
15
14
|
import { adjustFilters, isMobileDevice } from '@operato/utils';
|
|
16
15
|
import { ActivityStartingTypes, ActivityTypes, ActivityUITypes } from '../../types/types.js';
|
|
@@ -20,7 +19,7 @@ export const ActivityStatus = [
|
|
|
20
19
|
{ display: i18next.t('label.activity-state-released'), value: 'released' },
|
|
21
20
|
{ display: i18next.t('label.activity-state-deprecated'), value: 'deprecated' }
|
|
22
21
|
];
|
|
23
|
-
let ActivityListPage = class ActivityListPage extends
|
|
22
|
+
let ActivityListPage = class ActivityListPage extends localize(i18next)(PageView) {
|
|
24
23
|
constructor() {
|
|
25
24
|
super(...arguments);
|
|
26
25
|
this.mode = isMobileDevice() ? 'CARD' : 'GRID';
|
|
@@ -30,49 +29,40 @@ let ActivityListPage = class ActivityListPage extends connect(store)(localize(i1
|
|
|
30
29
|
ScrollbarStyles,
|
|
31
30
|
CommonHeaderStyles,
|
|
32
31
|
css `
|
|
33
|
-
:host {
|
|
34
|
-
display: flex;
|
|
32
|
+
:host { display: flex;
|
|
35
33
|
|
|
36
34
|
width: 100%;
|
|
37
35
|
|
|
38
36
|
--grid-record-emphasized-background-color: #8b0000;
|
|
39
37
|
--grid-record-emphasized-color: #ff6b6b;
|
|
40
|
-
|
|
38
|
+
}
|
|
41
39
|
|
|
42
|
-
ox-grist {
|
|
43
|
-
overflow-y: auto;
|
|
40
|
+
ox-grist { overflow-y: auto;
|
|
44
41
|
flex: 1;
|
|
45
|
-
|
|
42
|
+
}
|
|
46
43
|
|
|
47
|
-
.header {
|
|
48
|
-
|
|
49
|
-
}
|
|
44
|
+
.header { grid-template-areas: 'filters actions';
|
|
45
|
+
}
|
|
50
46
|
`
|
|
51
47
|
]; }
|
|
52
48
|
get context() {
|
|
53
|
-
return {
|
|
54
|
-
|
|
55
|
-
search: {
|
|
56
|
-
handler: (search) => {
|
|
49
|
+
return { title: i18next.t('title.activity list'),
|
|
50
|
+
search: { handler: (search) => {
|
|
57
51
|
this.grist.searchText = search;
|
|
58
52
|
},
|
|
59
|
-
value: this.grist?.searchText || ''
|
|
60
|
-
|
|
61
|
-
filter: {
|
|
62
|
-
handler: () => {
|
|
53
|
+
value: this.grist?.searchText || '' },
|
|
54
|
+
filter: { handler: () => {
|
|
63
55
|
this.grist.toggleHeadroom();
|
|
64
56
|
}
|
|
65
57
|
},
|
|
66
58
|
help: 'worklist/activity',
|
|
67
59
|
actions: [
|
|
68
|
-
{
|
|
69
|
-
title: i18next.t('button.save'),
|
|
60
|
+
{ title: i18next.t('button.save'),
|
|
70
61
|
action: this.updateActivity.bind(this),
|
|
71
62
|
...CommonButtonStyles.save
|
|
72
63
|
}
|
|
73
64
|
],
|
|
74
|
-
toolbar: false
|
|
75
|
-
};
|
|
65
|
+
toolbar: false };
|
|
76
66
|
}
|
|
77
67
|
render() {
|
|
78
68
|
const mode = this.mode;
|
|
@@ -83,16 +73,13 @@ let ActivityListPage = class ActivityListPage extends connect(store)(localize(i1
|
|
|
83
73
|
<ox-input-select-buttons
|
|
84
74
|
.value=${this.filters}
|
|
85
75
|
.options=${[
|
|
86
|
-
{
|
|
87
|
-
display: i18next.t('label.filter-draft'),
|
|
76
|
+
{ display: i18next.t('label.filter-draft'),
|
|
88
77
|
value: 'draft'
|
|
89
78
|
},
|
|
90
|
-
{
|
|
91
|
-
display: i18next.t('label.filter-released'),
|
|
79
|
+
{ display: i18next.t('label.filter-released'),
|
|
92
80
|
value: 'released'
|
|
93
81
|
},
|
|
94
|
-
{
|
|
95
|
-
display: i18next.t('label.filter-deprecated'),
|
|
82
|
+
{ display: i18next.t('label.filter-deprecated'),
|
|
96
83
|
value: 'deprecated'
|
|
97
84
|
}
|
|
98
85
|
]}
|
|
@@ -109,22 +96,18 @@ let ActivityListPage = class ActivityListPage extends connect(store)(localize(i1
|
|
|
109
96
|
`;
|
|
110
97
|
}
|
|
111
98
|
async pageInitialized(lifecycle) {
|
|
112
|
-
this.gristConfig = {
|
|
113
|
-
list: {
|
|
114
|
-
thumbnail: 'thumbnail',
|
|
99
|
+
this.gristConfig = { list: { thumbnail: 'thumbnail',
|
|
115
100
|
fields: ['name', 'description'],
|
|
116
101
|
details: ['updatedAt']
|
|
117
102
|
},
|
|
118
103
|
columns: [
|
|
119
104
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
120
105
|
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
121
|
-
{
|
|
122
|
-
type: 'gutter',
|
|
106
|
+
{ type: 'gutter',
|
|
123
107
|
gutterName: 'button',
|
|
124
108
|
icon: record => (!record ? 'calendar_add_on' : !record.id || !record.scheduleId ? '' : 'event_available'),
|
|
125
109
|
title: i18next.t('button.schedule-task'),
|
|
126
|
-
handlers: {
|
|
127
|
-
click: (columns, data, column, record, rowIndex) => {
|
|
110
|
+
handlers: { click: (columns, data, column, record, rowIndex) => {
|
|
128
111
|
if (!record || !record.id || (!record.scheduleId && !record.schedule)) {
|
|
129
112
|
return;
|
|
130
113
|
}
|
|
@@ -137,19 +120,16 @@ let ActivityListPage = class ActivityListPage extends connect(store)(localize(i1
|
|
|
137
120
|
}
|
|
138
121
|
}
|
|
139
122
|
},
|
|
140
|
-
{
|
|
141
|
-
type: 'gutter',
|
|
123
|
+
{ type: 'gutter',
|
|
142
124
|
gutterName: 'button',
|
|
143
125
|
icon: record => (!record ? 'reorder' : record.id ? 'reorder' : ''),
|
|
144
126
|
iconOnly: false,
|
|
145
127
|
title: record => (!record ? i18next.t('button.detail') : record.id ? i18next.t('button.detail') : ''),
|
|
146
128
|
width: 72,
|
|
147
|
-
handlers: {
|
|
148
|
-
click: (columns, data, column, record, rowIndex) => {
|
|
129
|
+
handlers: { click: (columns, data, column, record, rowIndex) => {
|
|
149
130
|
if (!record.id)
|
|
150
131
|
return;
|
|
151
|
-
const popup = openPopup(html ` <activity-model-item-list .activity=${record}></activity-model-item-list> `, {
|
|
152
|
-
backdrop: true,
|
|
132
|
+
const popup = openPopup(html ` <activity-model-item-list .activity=${record}></activity-model-item-list> `, { backdrop: true,
|
|
153
133
|
help: 'worklist/activity/activity-model-item-list',
|
|
154
134
|
size: 'large',
|
|
155
135
|
title: i18next.t('title.activity model item list')
|
|
@@ -160,78 +140,64 @@ let ActivityListPage = class ActivityListPage extends connect(store)(localize(i1
|
|
|
160
140
|
}
|
|
161
141
|
}
|
|
162
142
|
},
|
|
163
|
-
{
|
|
164
|
-
type: 'string',
|
|
143
|
+
{ type: 'string',
|
|
165
144
|
name: 'name',
|
|
166
145
|
header: i18next.t('field.name'),
|
|
167
|
-
record: {
|
|
168
|
-
editable: true
|
|
146
|
+
record: { editable: true
|
|
169
147
|
},
|
|
170
148
|
filter: 'search',
|
|
171
149
|
sortable: true,
|
|
172
150
|
width: 175
|
|
173
151
|
},
|
|
174
|
-
{
|
|
175
|
-
type: 'string',
|
|
152
|
+
{ type: 'string',
|
|
176
153
|
name: 'description',
|
|
177
154
|
header: i18next.t('field.description'),
|
|
178
|
-
record: {
|
|
179
|
-
editable: true
|
|
155
|
+
record: { editable: true
|
|
180
156
|
},
|
|
181
157
|
filter: 'search',
|
|
182
158
|
width: 225
|
|
183
159
|
},
|
|
184
|
-
{
|
|
185
|
-
type: 'approval-line',
|
|
160
|
+
{ type: 'approval-line',
|
|
186
161
|
name: 'approvalLine',
|
|
187
162
|
header: i18next.t('field.approval-line'),
|
|
188
|
-
record: {
|
|
189
|
-
editable: true,
|
|
163
|
+
record: { editable: true,
|
|
190
164
|
align: 'center'
|
|
191
165
|
},
|
|
192
166
|
width: 60
|
|
193
167
|
},
|
|
194
|
-
{
|
|
195
|
-
type: 'select',
|
|
168
|
+
{ type: 'select',
|
|
196
169
|
name: 'state',
|
|
197
170
|
header: i18next.t('field.status'),
|
|
198
|
-
record: {
|
|
199
|
-
editable: true,
|
|
171
|
+
record: { editable: true,
|
|
200
172
|
options: ActivityStatus
|
|
201
173
|
},
|
|
202
174
|
filter: true,
|
|
203
175
|
width: 75
|
|
204
176
|
},
|
|
205
|
-
{
|
|
206
|
-
type: 'select',
|
|
177
|
+
{ type: 'select',
|
|
207
178
|
name: 'activityType',
|
|
208
179
|
label: true,
|
|
209
180
|
header: i18next.t('field.activity-type'),
|
|
210
|
-
record: {
|
|
211
|
-
editable: true,
|
|
181
|
+
record: { editable: true,
|
|
212
182
|
options: ActivityTypes
|
|
213
183
|
},
|
|
214
184
|
sortable: true,
|
|
215
185
|
width: 75
|
|
216
186
|
},
|
|
217
|
-
{
|
|
218
|
-
type: 'select',
|
|
187
|
+
{ type: 'select',
|
|
219
188
|
name: 'startingType',
|
|
220
189
|
label: true,
|
|
221
190
|
header: i18next.t('field.starting-type'),
|
|
222
|
-
record: {
|
|
223
|
-
editable: true,
|
|
191
|
+
record: { editable: true,
|
|
224
192
|
options: ActivityStartingTypes
|
|
225
193
|
},
|
|
226
194
|
sortable: true,
|
|
227
195
|
width: 75
|
|
228
196
|
},
|
|
229
|
-
{
|
|
230
|
-
type: 'select',
|
|
197
|
+
{ type: 'select',
|
|
231
198
|
name: 'multiple',
|
|
232
199
|
header: i18next.t('field.multiple'),
|
|
233
|
-
record: {
|
|
234
|
-
editable: true,
|
|
200
|
+
record: { editable: true,
|
|
235
201
|
options: [
|
|
236
202
|
{ display: '', value: '' },
|
|
237
203
|
{ display: 'Single', value: 'single' },
|
|
@@ -241,22 +207,18 @@ let ActivityListPage = class ActivityListPage extends connect(store)(localize(i1
|
|
|
241
207
|
},
|
|
242
208
|
width: 90
|
|
243
209
|
},
|
|
244
|
-
{
|
|
245
|
-
type: 'activity-search-keys',
|
|
210
|
+
{ type: 'activity-search-keys',
|
|
246
211
|
name: 'searchKeys',
|
|
247
212
|
label: true,
|
|
248
213
|
header: i18next.t('field.search-keys'),
|
|
249
|
-
record: {
|
|
250
|
-
editable: true
|
|
214
|
+
record: { editable: true
|
|
251
215
|
},
|
|
252
216
|
width: 60
|
|
253
217
|
},
|
|
254
|
-
{
|
|
255
|
-
type: 'number',
|
|
218
|
+
{ type: 'number',
|
|
256
219
|
name: 'priority',
|
|
257
220
|
header: i18next.t('field.priority'),
|
|
258
|
-
record: {
|
|
259
|
-
editable: true,
|
|
221
|
+
record: { editable: true,
|
|
260
222
|
align: 'center',
|
|
261
223
|
renderer: function (value, column, record, rowIndex, field) {
|
|
262
224
|
const color = ['', '#98FB98', '#87CEEB', '#FF6B6B', '#8B0000'][value || 0];
|
|
@@ -266,103 +228,82 @@ let ActivityListPage = class ActivityListPage extends connect(store)(localize(i1
|
|
|
266
228
|
},
|
|
267
229
|
width: 75
|
|
268
230
|
},
|
|
269
|
-
{
|
|
270
|
-
type: 'crontab',
|
|
231
|
+
{ type: 'crontab',
|
|
271
232
|
name: 'schedule',
|
|
272
233
|
label: true,
|
|
273
234
|
header: i18next.t('field.schedule'),
|
|
274
|
-
record: {
|
|
275
|
-
|
|
276
|
-
options: {
|
|
277
|
-
objectified: true
|
|
235
|
+
record: { editable: true,
|
|
236
|
+
options: { objectified: true
|
|
278
237
|
}
|
|
279
238
|
},
|
|
280
239
|
width: 80
|
|
281
240
|
},
|
|
282
|
-
{
|
|
283
|
-
type: 'timezone',
|
|
241
|
+
{ type: 'timezone',
|
|
284
242
|
name: 'timezone',
|
|
285
243
|
header: i18next.t('field.timezone'),
|
|
286
|
-
record: {
|
|
287
|
-
editable: true
|
|
244
|
+
record: { editable: true
|
|
288
245
|
},
|
|
289
246
|
width: 120
|
|
290
247
|
},
|
|
291
|
-
{
|
|
292
|
-
type: 'image',
|
|
248
|
+
{ type: 'image',
|
|
293
249
|
name: 'thumbnail',
|
|
294
250
|
header: i18next.t('field.thumbnail'),
|
|
295
251
|
record: { editable: true },
|
|
296
252
|
width: 120
|
|
297
253
|
},
|
|
298
|
-
{
|
|
299
|
-
type: 'resource-object',
|
|
254
|
+
{ type: 'resource-object',
|
|
300
255
|
name: 'issuerRole',
|
|
301
256
|
header: i18next.t('field.issuer-role'),
|
|
302
|
-
record: {
|
|
303
|
-
|
|
304
|
-
options: {
|
|
305
|
-
title: i18next.t('title.lookup role'),
|
|
257
|
+
record: { editable: true,
|
|
258
|
+
options: { title: i18next.t('title.lookup role'),
|
|
306
259
|
queryName: 'roles'
|
|
307
260
|
}
|
|
308
261
|
},
|
|
309
262
|
filter: 'search',
|
|
310
263
|
width: 85
|
|
311
264
|
},
|
|
312
|
-
{
|
|
313
|
-
type: 'resource-object',
|
|
265
|
+
{ type: 'resource-object',
|
|
314
266
|
name: 'assigneeRole',
|
|
315
267
|
header: i18next.t('field.assignee-role'),
|
|
316
|
-
record: {
|
|
317
|
-
|
|
318
|
-
options: {
|
|
319
|
-
title: i18next.t('title.lookup role'),
|
|
268
|
+
record: { editable: true,
|
|
269
|
+
options: { title: i18next.t('title.lookup role'),
|
|
320
270
|
queryName: 'roles'
|
|
321
271
|
}
|
|
322
272
|
},
|
|
323
273
|
filter: 'search',
|
|
324
274
|
width: 85
|
|
325
275
|
},
|
|
326
|
-
{
|
|
327
|
-
type: 'resource-object',
|
|
276
|
+
{ type: 'resource-object',
|
|
328
277
|
name: 'supervisoryRole',
|
|
329
278
|
header: i18next.t('field.supervisory-role'),
|
|
330
|
-
record: {
|
|
331
|
-
|
|
332
|
-
options: {
|
|
333
|
-
title: i18next.t('title.lookup role'),
|
|
279
|
+
record: { editable: true,
|
|
280
|
+
options: { title: i18next.t('title.lookup role'),
|
|
334
281
|
queryName: 'roles'
|
|
335
282
|
}
|
|
336
283
|
},
|
|
337
284
|
filter: 'search',
|
|
338
285
|
width: 85
|
|
339
286
|
},
|
|
340
|
-
{
|
|
341
|
-
type: 'assignees',
|
|
287
|
+
{ type: 'assignees',
|
|
342
288
|
name: 'assignees',
|
|
343
289
|
header: i18next.t('field.assignees'),
|
|
344
|
-
record: {
|
|
345
|
-
editable: true
|
|
290
|
+
record: { editable: true
|
|
346
291
|
},
|
|
347
292
|
width: 80
|
|
348
293
|
},
|
|
349
|
-
{
|
|
350
|
-
type: 'select',
|
|
294
|
+
{ type: 'select',
|
|
351
295
|
name: 'uiType',
|
|
352
296
|
label: true,
|
|
353
297
|
header: i18next.t('field.ui-type'),
|
|
354
|
-
record: {
|
|
355
|
-
editable: true,
|
|
298
|
+
record: { editable: true,
|
|
356
299
|
options: ActivityUITypes
|
|
357
300
|
},
|
|
358
301
|
width: 80
|
|
359
302
|
},
|
|
360
|
-
{
|
|
361
|
-
type: 'string',
|
|
303
|
+
{ type: 'string',
|
|
362
304
|
name: 'uiSource',
|
|
363
305
|
header: i18next.t('field.ui-source'),
|
|
364
|
-
record: {
|
|
365
|
-
editable: true,
|
|
306
|
+
record: { editable: true,
|
|
366
307
|
editor: function (value, column, record, rowIndex, field) {
|
|
367
308
|
var type = record.uiType !== 'board' ? 'script' : 'board';
|
|
368
309
|
return getEditor(type)(value, column, record, rowIndex, field);
|
|
@@ -374,23 +315,19 @@ let ActivityListPage = class ActivityListPage extends connect(store)(localize(i1
|
|
|
374
315
|
},
|
|
375
316
|
width: 140
|
|
376
317
|
},
|
|
377
|
-
{
|
|
378
|
-
type: 'select',
|
|
318
|
+
{ type: 'select',
|
|
379
319
|
name: 'viewType',
|
|
380
320
|
label: true,
|
|
381
321
|
header: i18next.t('field.view-type'),
|
|
382
|
-
record: {
|
|
383
|
-
editable: true,
|
|
322
|
+
record: { editable: true,
|
|
384
323
|
options: ActivityUITypes
|
|
385
324
|
},
|
|
386
325
|
width: 80
|
|
387
326
|
},
|
|
388
|
-
{
|
|
389
|
-
type: 'string',
|
|
327
|
+
{ type: 'string',
|
|
390
328
|
name: 'viewSource',
|
|
391
329
|
header: i18next.t('field.view-source'),
|
|
392
|
-
record: {
|
|
393
|
-
editable: true,
|
|
330
|
+
record: { editable: true,
|
|
394
331
|
editor: function (value, column, record, rowIndex, field) {
|
|
395
332
|
var type = record.viewType !== 'board' ? 'script' : 'board';
|
|
396
333
|
return getEditor(type)(value, column, record, rowIndex, field);
|
|
@@ -402,23 +339,19 @@ let ActivityListPage = class ActivityListPage extends connect(store)(localize(i1
|
|
|
402
339
|
},
|
|
403
340
|
width: 140
|
|
404
341
|
},
|
|
405
|
-
{
|
|
406
|
-
type: 'select',
|
|
342
|
+
{ type: 'select',
|
|
407
343
|
name: 'reportType',
|
|
408
344
|
label: true,
|
|
409
345
|
header: i18next.t('field.report-type'),
|
|
410
|
-
record: {
|
|
411
|
-
editable: true,
|
|
346
|
+
record: { editable: true,
|
|
412
347
|
options: ActivityUITypes
|
|
413
348
|
},
|
|
414
349
|
width: 80
|
|
415
350
|
},
|
|
416
|
-
{
|
|
417
|
-
type: 'string',
|
|
351
|
+
{ type: 'string',
|
|
418
352
|
name: 'reportSource',
|
|
419
353
|
header: i18next.t('field.report-source'),
|
|
420
|
-
record: {
|
|
421
|
-
editable: true,
|
|
354
|
+
record: { editable: true,
|
|
422
355
|
editor: function (value, column, record, rowIndex, field) {
|
|
423
356
|
var type = record.reportType !== 'board' ? 'script' : 'board';
|
|
424
357
|
return getEditor(type)(value, column, record, rowIndex, field);
|
|
@@ -430,48 +363,38 @@ let ActivityListPage = class ActivityListPage extends connect(store)(localize(i1
|
|
|
430
363
|
},
|
|
431
364
|
width: 140
|
|
432
365
|
},
|
|
433
|
-
{
|
|
434
|
-
type: 'duration',
|
|
366
|
+
{ type: 'duration',
|
|
435
367
|
name: 'standardTime',
|
|
436
368
|
header: i18next.t('field.standard-time'),
|
|
437
|
-
record: {
|
|
438
|
-
editable: true
|
|
369
|
+
record: { editable: true
|
|
439
370
|
},
|
|
440
371
|
sortable: true,
|
|
441
372
|
width: 105
|
|
442
373
|
},
|
|
443
|
-
{
|
|
444
|
-
type: 'resource-object',
|
|
374
|
+
{ type: 'resource-object',
|
|
445
375
|
name: 'updater',
|
|
446
376
|
header: i18next.t('field.updater'),
|
|
447
|
-
record: {
|
|
448
|
-
editable: false
|
|
377
|
+
record: { editable: false
|
|
449
378
|
},
|
|
450
379
|
sortable: true,
|
|
451
380
|
width: 85
|
|
452
381
|
},
|
|
453
|
-
{
|
|
454
|
-
type: 'datetime',
|
|
382
|
+
{ type: 'datetime',
|
|
455
383
|
name: 'updatedAt',
|
|
456
384
|
header: i18next.t('field.updated_at'),
|
|
457
|
-
record: {
|
|
458
|
-
editable: false
|
|
385
|
+
record: { editable: false
|
|
459
386
|
},
|
|
460
387
|
sortable: true,
|
|
461
388
|
width: 180
|
|
462
389
|
}
|
|
463
390
|
],
|
|
464
|
-
rows: {
|
|
465
|
-
selectable: {
|
|
466
|
-
multiple: true
|
|
391
|
+
rows: { selectable: { multiple: true
|
|
467
392
|
},
|
|
468
|
-
handlers: {
|
|
469
|
-
click: 'select-row-toggle'
|
|
393
|
+
handlers: { click: 'select-row-toggle'
|
|
470
394
|
}
|
|
471
395
|
},
|
|
472
396
|
sorters: [
|
|
473
|
-
{
|
|
474
|
-
name: 'name'
|
|
397
|
+
{ name: 'name'
|
|
475
398
|
}
|
|
476
399
|
]
|
|
477
400
|
};
|
|
@@ -481,24 +404,18 @@ let ActivityListPage = class ActivityListPage extends connect(store)(localize(i1
|
|
|
481
404
|
if (status.length > 0) {
|
|
482
405
|
filters = adjustFilters(filters, [{ name: 'state', operator: 'in', value: status }]);
|
|
483
406
|
}
|
|
484
|
-
const response = await client.query({
|
|
485
|
-
|
|
486
|
-
query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
487
|
-
responses: activities(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
488
|
-
items {
|
|
489
|
-
id
|
|
407
|
+
const response = await client.query({ query: gql `
|
|
408
|
+
query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) { responses: activities(filters: $filters, pagination: $pagination, sortings: $sortings) { items { id
|
|
490
409
|
name
|
|
491
410
|
description
|
|
492
411
|
activityType
|
|
493
|
-
searchKeys {
|
|
494
|
-
name
|
|
412
|
+
searchKeys { name
|
|
495
413
|
description
|
|
496
414
|
inputKey
|
|
497
415
|
tKey
|
|
498
|
-
|
|
416
|
+
}
|
|
499
417
|
state
|
|
500
|
-
model {
|
|
501
|
-
name
|
|
418
|
+
model { name
|
|
502
419
|
description
|
|
503
420
|
active
|
|
504
421
|
tag
|
|
@@ -508,41 +425,34 @@ let ActivityListPage = class ActivityListPage extends connect(store)(localize(i1
|
|
|
508
425
|
options
|
|
509
426
|
quantifier
|
|
510
427
|
spec
|
|
511
|
-
|
|
428
|
+
}
|
|
512
429
|
thumbnail
|
|
513
430
|
priority
|
|
514
|
-
issuerRole {
|
|
515
|
-
id
|
|
431
|
+
issuerRole { id
|
|
516
432
|
name
|
|
517
|
-
|
|
518
|
-
assigneeRole {
|
|
519
|
-
id
|
|
433
|
+
}
|
|
434
|
+
assigneeRole { id
|
|
520
435
|
name
|
|
521
|
-
|
|
522
|
-
supervisoryRole {
|
|
523
|
-
id
|
|
436
|
+
}
|
|
437
|
+
supervisoryRole { id
|
|
524
438
|
name
|
|
525
|
-
|
|
526
|
-
assignees {
|
|
527
|
-
type
|
|
439
|
+
}
|
|
440
|
+
assignees { type
|
|
528
441
|
value
|
|
529
|
-
assignee {
|
|
530
|
-
id
|
|
442
|
+
assignee { id
|
|
531
443
|
name
|
|
532
444
|
description
|
|
533
445
|
controlNo
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
approvalLine {
|
|
537
|
-
type
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
approvalLine { type
|
|
538
449
|
value
|
|
539
|
-
approver {
|
|
540
|
-
id
|
|
450
|
+
approver { id
|
|
541
451
|
name
|
|
542
452
|
description
|
|
543
453
|
controlNo
|
|
544
|
-
|
|
545
|
-
|
|
454
|
+
}
|
|
455
|
+
}
|
|
546
456
|
uiType
|
|
547
457
|
uiSource
|
|
548
458
|
viewType
|
|
@@ -555,24 +465,21 @@ let ActivityListPage = class ActivityListPage extends connect(store)(localize(i1
|
|
|
555
465
|
timezone
|
|
556
466
|
scheduleId
|
|
557
467
|
standardTime
|
|
558
|
-
updater {
|
|
559
|
-
id
|
|
468
|
+
updater { id
|
|
560
469
|
name
|
|
561
|
-
|
|
470
|
+
}
|
|
562
471
|
updatedAt
|
|
563
|
-
|
|
472
|
+
}
|
|
564
473
|
total
|
|
565
|
-
|
|
566
|
-
|
|
474
|
+
}
|
|
475
|
+
}
|
|
567
476
|
`,
|
|
568
|
-
variables: {
|
|
569
|
-
filters,
|
|
477
|
+
variables: { filters,
|
|
570
478
|
pagination: { page, limit },
|
|
571
479
|
sortings
|
|
572
480
|
}
|
|
573
481
|
});
|
|
574
|
-
return {
|
|
575
|
-
total: response.data.responses.total || 0,
|
|
482
|
+
return { total: response.data.responses.total || 0,
|
|
576
483
|
records: response.data.responses.items || []
|
|
577
484
|
};
|
|
578
485
|
}
|
|
@@ -588,19 +495,14 @@ let ActivityListPage = class ActivityListPage extends connect(store)(localize(i1
|
|
|
588
495
|
patchField.cuFlag = patch.__dirty__;
|
|
589
496
|
return patchField;
|
|
590
497
|
});
|
|
591
|
-
const response = await client.mutate({
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
name
|
|
596
|
-
}
|
|
597
|
-
}
|
|
498
|
+
const response = await client.mutate({ mutation: gql `
|
|
499
|
+
mutation ($patches: [ActivityPatch!]!) { updateMultipleActivity(patches: $patches) { name
|
|
500
|
+
}
|
|
501
|
+
}
|
|
598
502
|
`,
|
|
599
|
-
variables: {
|
|
600
|
-
patches
|
|
503
|
+
variables: { patches
|
|
601
504
|
},
|
|
602
|
-
context: {
|
|
603
|
-
hasUpload: true
|
|
505
|
+
context: { hasUpload: true
|
|
604
506
|
}
|
|
605
507
|
});
|
|
606
508
|
if (!response.errors) {
|
|
@@ -609,48 +511,37 @@ let ActivityListPage = class ActivityListPage extends connect(store)(localize(i1
|
|
|
609
511
|
}
|
|
610
512
|
}
|
|
611
513
|
async startActivitySchedule(record) {
|
|
612
|
-
var response = await client.mutate({
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
scheduleId
|
|
617
|
-
}
|
|
618
|
-
}
|
|
514
|
+
var response = await client.mutate({ mutation: gql `
|
|
515
|
+
mutation ($activityId: String!) { startActivitySchedule(activityId: $activityId) { scheduleId
|
|
516
|
+
}
|
|
517
|
+
}
|
|
619
518
|
`,
|
|
620
|
-
variables: {
|
|
621
|
-
activityId: record.id
|
|
519
|
+
variables: { activityId: record.id
|
|
622
520
|
}
|
|
623
521
|
});
|
|
624
522
|
const scheduleId = response.data.startActivitySchedule.scheduleId;
|
|
625
523
|
record.scheduleId = scheduleId;
|
|
626
|
-
notify({
|
|
627
|
-
level: 'info',
|
|
524
|
+
notify({ level: 'info',
|
|
628
525
|
message: `${record.scheduleId ? 'success' : 'fail'} to start activity schedule : ${record.name}`
|
|
629
526
|
});
|
|
630
527
|
this.grist.fetch();
|
|
631
528
|
}
|
|
632
529
|
async stopActivitySchedule(record) {
|
|
633
|
-
var response = await client.mutate({
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
scheduleId
|
|
638
|
-
}
|
|
639
|
-
}
|
|
530
|
+
var response = await client.mutate({ mutation: gql `
|
|
531
|
+
mutation ($activityId: String!) { stopActivitySchedule(activityId: $activityId) { scheduleId
|
|
532
|
+
}
|
|
533
|
+
}
|
|
640
534
|
`,
|
|
641
|
-
variables: {
|
|
642
|
-
activityId: record.id
|
|
535
|
+
variables: { activityId: record.id
|
|
643
536
|
}
|
|
644
537
|
});
|
|
645
538
|
if (!response.errors) {
|
|
646
|
-
notify({
|
|
647
|
-
level: 'info',
|
|
539
|
+
notify({ level: 'info',
|
|
648
540
|
message: `success to stop activity schedule : ${record.name}`
|
|
649
541
|
});
|
|
650
542
|
}
|
|
651
543
|
else {
|
|
652
|
-
notify({
|
|
653
|
-
level: 'error',
|
|
544
|
+
notify({ level: 'error',
|
|
654
545
|
message: `${response.errors.map(error => error.message).join('\n')}`
|
|
655
546
|
});
|
|
656
547
|
}
|