@things-factory/worklist 10.1.256 → 10.1.258
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/activity-state-counts.d.ts +3 -3
- package/dist-client/activity-state-counts.js +6 -5
- package/dist-client/activity-state-counts.js.map +1 -1
- package/dist-client/chip-counts.d.ts +1 -1
- package/dist-client/chip-counts.js +1 -1
- package/dist-client/chip-counts.js.map +1 -1
- package/dist-client/chip-filters.d.ts +3 -2
- package/dist-client/chip-filters.js +5 -3
- package/dist-client/chip-filters.js.map +1 -1
- package/dist-client/components/activity-/bowner-view.js +26 -40
- package/dist-client/components/activity-/bowner-view.js.map +1 -1
- package/dist-client/components/activity-instance-preview.js +37 -49
- package/dist-client/components/activity-instance-preview.js.map +1 -1
- package/dist-client/components/activity-intro-view.js +26 -40
- package/dist-client/components/activity-intro-view.js.map +1 -1
- package/dist-client/components/activity-reporter-view.js +26 -40
- package/dist-client/components/activity-reporter-view.js.map +1 -1
- package/dist-client/components/activity-starter-form.d.ts +2 -3
- package/dist-client/components/activity-starter-form.js +52 -64
- package/dist-client/components/activity-starter-form.js.map +1 -1
- package/dist-client/components/mutation-outcome.d.ts +6 -0
- package/dist-client/components/mutation-outcome.js +9 -0
- package/dist-client/components/mutation-outcome.js.map +1 -1
- package/dist-client/components/say-outcome.d.ts +3 -0
- package/dist-client/components/say-outcome.js +3 -0
- package/dist-client/components/say-outcome.js.map +1 -1
- package/dist-client/entity360/person-open-work-section.d.ts +2 -3
- package/dist-client/entity360/person-open-work-section.js +17 -31
- package/dist-client/entity360/person-open-work-section.js.map +1 -1
- package/dist-client/pages/activity/activity-list-page.d.ts +4 -2
- package/dist-client/pages/activity/activity-list-page.js +6 -11
- package/dist-client/pages/activity/activity-list-page.js.map +1 -1
- package/dist-client/pages/activity/activity-page.d.ts +13 -7
- package/dist-client/pages/activity/activity-page.js +111 -167
- package/dist-client/pages/activity/activity-page.js.map +1 -1
- package/dist-client/pages/activity-approval/activity-approval-page.d.ts +14 -8
- package/dist-client/pages/activity-approval/activity-approval-page.js +107 -123
- package/dist-client/pages/activity-approval/activity-approval-page.js.map +1 -1
- package/dist-client/pages/activity-catalog/activity-catalog-page.d.ts +10 -9
- package/dist-client/pages/activity-catalog/activity-catalog-page.js +38 -70
- package/dist-client/pages/activity-catalog/activity-catalog-page.js.map +1 -1
- package/dist-client/pages/activity-catalog/activity-detail-page.d.ts +6 -6
- package/dist-client/pages/activity-catalog/activity-detail-page.js +30 -57
- package/dist-client/pages/activity-catalog/activity-detail-page.js.map +1 -1
- package/dist-client/pages/activity-instance/activity-instance-list-page.js +2 -2
- 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 +6 -3
- package/dist-client/pages/activity-instance/activity-instance-search-page.js +27 -29
- 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 +15 -8
- package/dist-client/pages/activity-instance/activity-instance-start-page.js +130 -239
- package/dist-client/pages/activity-instance/activity-instance-start-page.js.map +1 -1
- package/dist-client/pages/activity-instance/activity-instance-view.d.ts +2 -2
- package/dist-client/pages/activity-instance/activity-instance-view.js +109 -118
- package/dist-client/pages/activity-instance/activity-instance-view.js.map +1 -1
- package/dist-client/pages/activity-thread/activity-thread-page.d.ts +15 -6
- package/dist-client/pages/activity-thread/activity-thread-page.js +128 -131
- 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 +6 -6
- package/dist-client/pages/activity-thread/activity-thread-view-page.js +28 -53
- package/dist-client/pages/activity-thread/activity-thread-view-page.js.map +1 -1
- package/dist-client/pages/todo/approval-done-list-page.d.ts +3 -3
- package/dist-client/pages/todo/approval-done-list-page.js +5 -14
- package/dist-client/pages/todo/approval-done-list-page.js.map +1 -1
- package/dist-client/pages/todo/approval-pending-list-page.d.ts +19 -9
- package/dist-client/pages/todo/approval-pending-list-page.js +46 -59
- package/dist-client/pages/todo/approval-pending-list-page.js.map +1 -1
- package/dist-client/pages/todo/draft-list-page.d.ts +8 -2
- package/dist-client/pages/todo/draft-list-page.js +24 -23
- package/dist-client/pages/todo/draft-list-page.js.map +1 -1
- package/dist-client/pages/todo/pickable-list-page.d.ts +3 -3
- package/dist-client/pages/todo/pickable-list-page.js +5 -14
- package/dist-client/pages/todo/pickable-list-page.js.map +1 -1
- package/dist-client/pages/todo/todo-list-page.d.ts +11 -5
- package/dist-client/pages/todo/todo-list-page.js +33 -36
- package/dist-client/pages/todo/todo-list-page.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/package.json +16 -14
|
@@ -9,14 +9,21 @@ import { PageView } from '@operato/shell';
|
|
|
9
9
|
declare const ActivityInstanceStartPage_base: (new (...args: any[]) => import("lit").LitElement) & typeof PageView;
|
|
10
10
|
export declare class ActivityInstanceStartPage extends ActivityInstanceStartPage_base {
|
|
11
11
|
static styles: import("lit").CSSResult[];
|
|
12
|
-
activity: any;
|
|
13
|
-
activityInstance: any;
|
|
14
12
|
board: any;
|
|
15
13
|
customHtmlElement: any;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/** The
|
|
19
|
-
private
|
|
14
|
+
/** The task read the custom element was made for: another answer makes it again. */
|
|
15
|
+
private customFor?;
|
|
16
|
+
/** The draft task the address names. */
|
|
17
|
+
private instanceId;
|
|
18
|
+
private record;
|
|
19
|
+
private draft;
|
|
20
|
+
private saveDraft;
|
|
21
|
+
private issue;
|
|
22
|
+
get activityInstance(): any;
|
|
23
|
+
get activity(): any;
|
|
24
|
+
get loaded(): boolean;
|
|
25
|
+
/** Why the task could not be read - ox-page-state says it, with retry (ADR-0060 decision 8). */
|
|
26
|
+
get loadError(): unknown;
|
|
20
27
|
viewer: any;
|
|
21
28
|
get context(): {
|
|
22
29
|
title: any;
|
|
@@ -44,9 +51,9 @@ export declare class ActivityInstanceStartPage extends ActivityInstanceStartPage
|
|
|
44
51
|
boardContent(): DirectiveResult;
|
|
45
52
|
customElementContent(): any;
|
|
46
53
|
getInOutFromBoard(): any[];
|
|
47
|
-
updated(changes: any): void;
|
|
48
54
|
pageUpdated(changes: any, lifecycle: any, changedBefore: any): Promise<void>;
|
|
49
|
-
|
|
55
|
+
/** What this task takes and gives: the board's values, or what was written over the task read. */
|
|
56
|
+
private inOutToSend;
|
|
50
57
|
discardDraft(): Promise<void>;
|
|
51
58
|
draftActivityInstance(): Promise<void>;
|
|
52
59
|
issueActivityInstance(): Promise<void>;
|
|
@@ -9,11 +9,12 @@ import { css, html } from 'lit';
|
|
|
9
9
|
import { unsafeHTML } from 'lit-html/directives/unsafe-html.js';
|
|
10
10
|
import { customElement, query, state } from 'lit/decorators.js';
|
|
11
11
|
import { keyed } from 'lit/directives/keyed.js';
|
|
12
|
-
import { client } from '@operato/graphql';
|
|
12
|
+
import { client, MutationController, QueryController } from '@operato/graphql';
|
|
13
13
|
import { i18next, localize } from '@operato/i18n';
|
|
14
|
-
import {
|
|
14
|
+
import { mutationOutcome } from '../../components/mutation-outcome.js';
|
|
15
|
+
import { ranMutation, sayFailure } from '../../components/say-outcome.js';
|
|
15
16
|
import { offersDiscard } from './discard-offer.js';
|
|
16
|
-
import { navigate, PageView } from '@operato/shell';
|
|
17
|
+
import { navigate, PageView, DraftController } from '@operato/shell';
|
|
17
18
|
import { OxPrompt } from '@operato/popup';
|
|
18
19
|
import { CommonButtonStyles, ScrollbarStyles, WorkSurfacePageStyles } from '@operato/styles';
|
|
19
20
|
import { provider } from '@operato/board/board-provider.js';
|
|
@@ -21,10 +22,77 @@ import { notify } from '@operato/layout';
|
|
|
21
22
|
let ActivityInstanceStartPage = class ActivityInstanceStartPage extends localize(i18next)(PageView) {
|
|
22
23
|
constructor() {
|
|
23
24
|
super(...arguments);
|
|
24
|
-
|
|
25
|
-
this.
|
|
26
|
-
|
|
27
|
-
this.
|
|
25
|
+
/** The draft task the address names. */
|
|
26
|
+
this.instanceId = '';
|
|
27
|
+
/* The draft task shown, read for the id the address names (ADR-0190). */
|
|
28
|
+
this.record = new QueryController(this, gql `
|
|
29
|
+
query activityInstance($id: String!) {
|
|
30
|
+
activityInstance(id: $id) {
|
|
31
|
+
id
|
|
32
|
+
name
|
|
33
|
+
description
|
|
34
|
+
state
|
|
35
|
+
activity {
|
|
36
|
+
id
|
|
37
|
+
startingType
|
|
38
|
+
model {
|
|
39
|
+
name
|
|
40
|
+
description
|
|
41
|
+
active
|
|
42
|
+
tag
|
|
43
|
+
inout
|
|
44
|
+
type
|
|
45
|
+
unit
|
|
46
|
+
options
|
|
47
|
+
quantifier
|
|
48
|
+
spec
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
thumbnail
|
|
52
|
+
input
|
|
53
|
+
output
|
|
54
|
+
uiType
|
|
55
|
+
uiSource
|
|
56
|
+
approvalLine {
|
|
57
|
+
type
|
|
58
|
+
value
|
|
59
|
+
participation
|
|
60
|
+
notifyAfter
|
|
61
|
+
approver {
|
|
62
|
+
id
|
|
63
|
+
name
|
|
64
|
+
description
|
|
65
|
+
controlNo
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
dueAt
|
|
69
|
+
createdAt
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
`, { variables: () => (this.instanceId ? { id: this.instanceId } : undefined) });
|
|
73
|
+
/* What is written here over the task read; another task drops it (ADR-0190 decision 2). */
|
|
74
|
+
this.draft = new DraftController(this, {
|
|
75
|
+
read: () => this.activityInstance,
|
|
76
|
+
key: () => this.instanceId
|
|
77
|
+
});
|
|
78
|
+
/*
|
|
79
|
+
* The changes made here: each reads what it changed again once done. This screen says its own failure
|
|
80
|
+
* (sayFailure), so the GraphQL link stays quiet about it (ADR-0190).
|
|
81
|
+
*/
|
|
82
|
+
this.saveDraft = new MutationController(this, gql `
|
|
83
|
+
mutation ($activityInstance: ActivityInstanceDraft!) {
|
|
84
|
+
draftActivityInstance(activityInstance: $activityInstance) {
|
|
85
|
+
id
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
`, { refetch: () => [this.record], showsError: true });
|
|
89
|
+
this.issue = new MutationController(this, gql `
|
|
90
|
+
mutation ($activityInstance: ActivityInstanceIssue!) {
|
|
91
|
+
issueActivityInstance(activityInstance: $activityInstance) {
|
|
92
|
+
id
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
`, { refetch: () => [this.record], showsError: true });
|
|
28
96
|
}
|
|
29
97
|
static { this.styles = [
|
|
30
98
|
/*
|
|
@@ -45,6 +113,22 @@ let ActivityInstanceStartPage = class ActivityInstanceStartPage extends localize
|
|
|
45
113
|
}
|
|
46
114
|
`
|
|
47
115
|
]; }
|
|
116
|
+
get activityInstance() {
|
|
117
|
+
return this.record.data?.activityInstance ?? {};
|
|
118
|
+
}
|
|
119
|
+
get activity() {
|
|
120
|
+
return this.activityInstance.activity ?? {};
|
|
121
|
+
}
|
|
122
|
+
get loaded() {
|
|
123
|
+
return this.record.data !== undefined;
|
|
124
|
+
}
|
|
125
|
+
/** Why the task could not be read - ox-page-state says it, with retry (ADR-0060 decision 8). */
|
|
126
|
+
get loadError() {
|
|
127
|
+
return (this.record.error ??
|
|
128
|
+
(this.loaded && !this.record.data?.activityInstance
|
|
129
|
+
? new Error(i18next.t('error.activity-instance not found', { activityInstance: this.instanceId }))
|
|
130
|
+
: null));
|
|
131
|
+
}
|
|
48
132
|
get context() {
|
|
49
133
|
const { startingType } = this.activity;
|
|
50
134
|
const { state } = this.activityInstance;
|
|
@@ -87,7 +171,7 @@ let ActivityInstanceStartPage = class ActivityInstanceStartPage extends localize
|
|
|
87
171
|
return html `<ox-page-state
|
|
88
172
|
.loading=${!this.loaded && !this.loadError}
|
|
89
173
|
.error=${this.loadError}
|
|
90
|
-
@retry=${() => this.
|
|
174
|
+
@retry=${() => this.record.refetch()}
|
|
91
175
|
>${this.renderActivity()}</ox-page-state
|
|
92
176
|
>`;
|
|
93
177
|
}
|
|
@@ -141,7 +225,8 @@ let ActivityInstanceStartPage = class ActivityInstanceStartPage extends localize
|
|
|
141
225
|
if (!this.activityInstance) {
|
|
142
226
|
return html ``;
|
|
143
227
|
}
|
|
144
|
-
var
|
|
228
|
+
var input = this.draft.value('input');
|
|
229
|
+
var output = this.draft.value('output');
|
|
145
230
|
const inputSpec = this.getInputSpec();
|
|
146
231
|
const outputSpec = this.getOutputSpec();
|
|
147
232
|
if (!output) {
|
|
@@ -159,7 +244,7 @@ let ActivityInstanceStartPage = class ActivityInstanceStartPage extends localize
|
|
|
159
244
|
data-name="input"
|
|
160
245
|
.props=${inputSpec}
|
|
161
246
|
.value=${input}
|
|
162
|
-
@property-change=${e =>
|
|
247
|
+
@property-change=${e => this.draft.set('input', e.currentTarget.value)}
|
|
163
248
|
></ox-properties-dynamic-view>
|
|
164
249
|
</fieldset>
|
|
165
250
|
|
|
@@ -169,7 +254,7 @@ let ActivityInstanceStartPage = class ActivityInstanceStartPage extends localize
|
|
|
169
254
|
data-name="output"
|
|
170
255
|
.props=${outputSpec}
|
|
171
256
|
.value=${output}
|
|
172
|
-
@property-change=${e =>
|
|
257
|
+
@property-change=${e => this.draft.set('output', e.currentTarget.value)}
|
|
173
258
|
></ox-properties-dynamic-view>
|
|
174
259
|
</fieldset>
|
|
175
260
|
`);
|
|
@@ -178,7 +263,9 @@ let ActivityInstanceStartPage = class ActivityInstanceStartPage extends localize
|
|
|
178
263
|
if (!this.activityInstance) {
|
|
179
264
|
return html ``;
|
|
180
265
|
}
|
|
181
|
-
const { uiSource: boardId
|
|
266
|
+
const { uiSource: boardId } = this.activityInstance;
|
|
267
|
+
const input = this.draft.value('input');
|
|
268
|
+
const output = this.draft.value('output');
|
|
182
269
|
if (!this.board || this.board.id !== boardId) {
|
|
183
270
|
this.board = { id: boardId };
|
|
184
271
|
}
|
|
@@ -202,24 +289,19 @@ let ActivityInstanceStartPage = class ActivityInstanceStartPage extends localize
|
|
|
202
289
|
if (!this.activityInstance) {
|
|
203
290
|
return html ``;
|
|
204
291
|
}
|
|
205
|
-
const { uiSource: tagName
|
|
206
|
-
if (!this.customHtmlElement) {
|
|
292
|
+
const { uiSource: tagName } = this.activityInstance;
|
|
293
|
+
if (!this.customHtmlElement || this.customFor !== this.activityInstance) {
|
|
207
294
|
const element = document.createElement(tagName);
|
|
208
295
|
element.id = 'custom-content';
|
|
209
296
|
element.activityId = this.activityInstance.activity.id;
|
|
210
|
-
element.input = input;
|
|
211
|
-
element.output = output;
|
|
212
|
-
element.addEventListener('change-input', (e) =>
|
|
213
|
-
|
|
214
|
-
});
|
|
215
|
-
element.addEventListener('change-output', (e) => {
|
|
216
|
-
this.activityInstance.output = e.detail;
|
|
217
|
-
});
|
|
297
|
+
element.input = this.draft.value('input');
|
|
298
|
+
element.output = this.draft.value('output');
|
|
299
|
+
element.addEventListener('change-input', (e) => this.draft.set('input', e.detail));
|
|
300
|
+
element.addEventListener('change-output', (e) => this.draft.set('output', e.detail));
|
|
218
301
|
/* DEPRECATED 일반적으로 output만 수정될 가능성이 높기때문에, change 이벤트는 output을 수정하는 것으로 한다. */
|
|
219
|
-
element.addEventListener('change', (e) =>
|
|
220
|
-
this.activityInstance.output = e.detail;
|
|
221
|
-
});
|
|
302
|
+
element.addEventListener('change', (e) => this.draft.set('output', e.detail));
|
|
222
303
|
this.customHtmlElement = element;
|
|
304
|
+
this.customFor = this.activityInstance;
|
|
223
305
|
}
|
|
224
306
|
return this.customHtmlElement;
|
|
225
307
|
}
|
|
@@ -237,82 +319,19 @@ let ActivityInstanceStartPage = class ActivityInstanceStartPage extends localize
|
|
|
237
319
|
}, {});
|
|
238
320
|
return [input, output];
|
|
239
321
|
}
|
|
240
|
-
updated(changes) {
|
|
241
|
-
if (changes.has('activityInstance')) {
|
|
242
|
-
this.updateContext();
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
322
|
async pageUpdated(changes, lifecycle, changedBefore) {
|
|
246
323
|
if (this.active && lifecycle.resourceId) {
|
|
247
|
-
this.
|
|
324
|
+
this.instanceId = lifecycle.resourceId;
|
|
248
325
|
}
|
|
249
326
|
else {
|
|
250
327
|
this.customHtmlElement = undefined;
|
|
251
328
|
}
|
|
252
329
|
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
this.
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
query: gql `
|
|
259
|
-
query activityInstance($id: String!) {
|
|
260
|
-
activityInstance(id: $id) {
|
|
261
|
-
id
|
|
262
|
-
name
|
|
263
|
-
description
|
|
264
|
-
state
|
|
265
|
-
activity {
|
|
266
|
-
id
|
|
267
|
-
startingType
|
|
268
|
-
model {
|
|
269
|
-
name
|
|
270
|
-
description
|
|
271
|
-
active
|
|
272
|
-
tag
|
|
273
|
-
inout
|
|
274
|
-
type
|
|
275
|
-
unit
|
|
276
|
-
options
|
|
277
|
-
quantifier
|
|
278
|
-
spec
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
thumbnail
|
|
282
|
-
input
|
|
283
|
-
output
|
|
284
|
-
uiType
|
|
285
|
-
uiSource
|
|
286
|
-
approvalLine {
|
|
287
|
-
type
|
|
288
|
-
value
|
|
289
|
-
participation
|
|
290
|
-
notifyAfter
|
|
291
|
-
approver {
|
|
292
|
-
id
|
|
293
|
-
name
|
|
294
|
-
description
|
|
295
|
-
controlNo
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
dueAt
|
|
299
|
-
createdAt
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
`,
|
|
303
|
-
variables: { id }
|
|
304
|
-
});
|
|
305
|
-
if (response.errors?.length || !response.data?.activityInstance) {
|
|
306
|
-
throw (response.errors?.[0] || new Error(i18next.t('error.activity-instance not found', { activityInstance: id })));
|
|
307
|
-
}
|
|
308
|
-
this.customHtmlElement = undefined;
|
|
309
|
-
this.activityInstance = response.data.activityInstance;
|
|
310
|
-
this.activity = this.activityInstance.activity;
|
|
311
|
-
this.loaded = true;
|
|
312
|
-
}
|
|
313
|
-
catch (error) {
|
|
314
|
-
this.loadError = error;
|
|
315
|
-
}
|
|
330
|
+
/** What this task takes and gives: the board's values, or what was written over the task read. */
|
|
331
|
+
inOutToSend() {
|
|
332
|
+
return this.activityInstance.uiType === 'board'
|
|
333
|
+
? this.getInOutFromBoard()
|
|
334
|
+
: [this.draft.value('input'), this.draft.value('output')];
|
|
316
335
|
}
|
|
317
336
|
/* Asked once, since a discarded draft cannot come back; then back to the list it was opened from. */
|
|
318
337
|
async discardDraft() {
|
|
@@ -335,17 +354,20 @@ let ActivityInstanceStartPage = class ActivityInstanceStartPage extends localize
|
|
|
335
354
|
variables: { id }
|
|
336
355
|
}));
|
|
337
356
|
if (outcome.ok) {
|
|
357
|
+
/* The draft is gone, and what was written on it with it: leaving asks about nothing. */
|
|
358
|
+
this.draft.reset();
|
|
338
359
|
notify({ message: i18next.t('text.draft-discarded') });
|
|
339
360
|
navigate('draft-list');
|
|
340
361
|
}
|
|
341
362
|
}
|
|
363
|
+
/*
|
|
364
|
+
* Each change sends what is written now and reads the task again once it went through; its answer is not kept
|
|
365
|
+
* (ADR-0190 decision 2). The edits sent are cleared then, and a failure keeps them.
|
|
366
|
+
*/
|
|
342
367
|
async draftActivityInstance() {
|
|
343
368
|
var { id: activityId } = this.activity;
|
|
344
|
-
var { id, name, description, priority, threadsMin, threadsMax, dueAt,
|
|
345
|
-
|
|
346
|
-
;
|
|
347
|
-
[input, output] = this.getInOutFromBoard();
|
|
348
|
-
}
|
|
369
|
+
var { id, name, description, priority, threadsMin, threadsMax, dueAt, reason, assignees, approvalLine } = this.activityInstance;
|
|
370
|
+
const [input, output] = this.inOutToSend();
|
|
349
371
|
name ||= this.activity.name;
|
|
350
372
|
description ||= this.activity.description;
|
|
351
373
|
assignees ||= this.activity.assignees;
|
|
@@ -365,69 +387,11 @@ let ActivityInstanceStartPage = class ActivityInstanceStartPage extends localize
|
|
|
365
387
|
assignees,
|
|
366
388
|
approvalLine
|
|
367
389
|
};
|
|
368
|
-
const
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
draftActivityInstance(activityInstance: $activityInstance) {
|
|
372
|
-
id
|
|
373
|
-
name
|
|
374
|
-
description
|
|
375
|
-
input
|
|
376
|
-
output
|
|
377
|
-
state
|
|
378
|
-
activity {
|
|
379
|
-
id
|
|
380
|
-
startingType
|
|
381
|
-
model {
|
|
382
|
-
name
|
|
383
|
-
description
|
|
384
|
-
active
|
|
385
|
-
tag
|
|
386
|
-
inout
|
|
387
|
-
type
|
|
388
|
-
unit
|
|
389
|
-
options
|
|
390
|
-
quantifier
|
|
391
|
-
spec
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
assignees {
|
|
395
|
-
type
|
|
396
|
-
value
|
|
397
|
-
assignee {
|
|
398
|
-
id
|
|
399
|
-
name
|
|
400
|
-
description
|
|
401
|
-
controlNo
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
approvalLine {
|
|
405
|
-
type
|
|
406
|
-
value
|
|
407
|
-
participation
|
|
408
|
-
notifyAfter
|
|
409
|
-
approver {
|
|
410
|
-
id
|
|
411
|
-
name
|
|
412
|
-
description
|
|
413
|
-
controlNo
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
uiType
|
|
417
|
-
uiSource
|
|
418
|
-
threadsMin
|
|
419
|
-
threadsMax
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
`,
|
|
423
|
-
variables: { activityInstance }
|
|
424
|
-
}));
|
|
425
|
-
if (!outcome.ok) {
|
|
390
|
+
const drafted = await this.draft.submit(() => this.saveDraft.run({ activityInstance }));
|
|
391
|
+
if (!drafted) {
|
|
392
|
+
sayFailure(mutationOutcome(this.saveDraft.error));
|
|
426
393
|
return;
|
|
427
394
|
}
|
|
428
|
-
this.customHtmlElement = undefined;
|
|
429
|
-
this.activityInstance = outcome.data.draftActivityInstance;
|
|
430
|
-
this.activity = this.activityInstance.activity;
|
|
431
395
|
notify({
|
|
432
396
|
message: i18next.t('text.info_x_successfully', {
|
|
433
397
|
x: `${i18next.t('label.activity-instance')} ${i18next.t('text.draft')}`
|
|
@@ -435,11 +399,8 @@ let ActivityInstanceStartPage = class ActivityInstanceStartPage extends localize
|
|
|
435
399
|
});
|
|
436
400
|
}
|
|
437
401
|
async issueActivityInstance() {
|
|
438
|
-
var { id, name, description,
|
|
439
|
-
|
|
440
|
-
;
|
|
441
|
-
[input, output] = this.getInOutFromBoard();
|
|
442
|
-
}
|
|
402
|
+
var { id, name, description, reason, threadsMin = 0, threadsMax = 0, assignees, approvalLine } = this.activityInstance;
|
|
403
|
+
const [input, output] = this.inOutToSend();
|
|
443
404
|
const activityInstance = {
|
|
444
405
|
id,
|
|
445
406
|
name: name || this.activity.name,
|
|
@@ -452,69 +413,11 @@ let ActivityInstanceStartPage = class ActivityInstanceStartPage extends localize
|
|
|
452
413
|
assignees,
|
|
453
414
|
approvalLine
|
|
454
415
|
};
|
|
455
|
-
const
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
issueActivityInstance(activityInstance: $activityInstance) {
|
|
459
|
-
id
|
|
460
|
-
name
|
|
461
|
-
description
|
|
462
|
-
input
|
|
463
|
-
output
|
|
464
|
-
state
|
|
465
|
-
activity {
|
|
466
|
-
id
|
|
467
|
-
startingType
|
|
468
|
-
model {
|
|
469
|
-
name
|
|
470
|
-
description
|
|
471
|
-
active
|
|
472
|
-
tag
|
|
473
|
-
inout
|
|
474
|
-
type
|
|
475
|
-
unit
|
|
476
|
-
options
|
|
477
|
-
quantifier
|
|
478
|
-
spec
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
assignees {
|
|
482
|
-
type
|
|
483
|
-
value
|
|
484
|
-
assignee {
|
|
485
|
-
id
|
|
486
|
-
name
|
|
487
|
-
description
|
|
488
|
-
controlNo
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
approvalLine {
|
|
492
|
-
type
|
|
493
|
-
value
|
|
494
|
-
participation
|
|
495
|
-
notifyAfter
|
|
496
|
-
approver {
|
|
497
|
-
id
|
|
498
|
-
name
|
|
499
|
-
description
|
|
500
|
-
controlNo
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
uiType
|
|
504
|
-
uiSource
|
|
505
|
-
threadsMin
|
|
506
|
-
threadsMax
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
`,
|
|
510
|
-
variables: { activityInstance }
|
|
511
|
-
}));
|
|
512
|
-
if (!outcome.ok) {
|
|
416
|
+
const issued = await this.draft.submit(() => this.issue.run({ activityInstance }));
|
|
417
|
+
if (!issued) {
|
|
418
|
+
sayFailure(mutationOutcome(this.issue.error));
|
|
513
419
|
return;
|
|
514
420
|
}
|
|
515
|
-
this.customHtmlElement = undefined;
|
|
516
|
-
this.activityInstance = outcome.data.issueActivityInstance;
|
|
517
|
-
this.activity = this.activityInstance.activity;
|
|
518
421
|
notify({
|
|
519
422
|
message: i18next.t('text.info_x_successfully', {
|
|
520
423
|
x: `${i18next.t('label.activity-instance')} ${i18next.t('text.assign')}`
|
|
@@ -522,14 +425,6 @@ let ActivityInstanceStartPage = class ActivityInstanceStartPage extends localize
|
|
|
522
425
|
});
|
|
523
426
|
}
|
|
524
427
|
};
|
|
525
|
-
__decorate([
|
|
526
|
-
state(),
|
|
527
|
-
__metadata("design:type", Object)
|
|
528
|
-
], ActivityInstanceStartPage.prototype, "activity", void 0);
|
|
529
|
-
__decorate([
|
|
530
|
-
state(),
|
|
531
|
-
__metadata("design:type", Object)
|
|
532
|
-
], ActivityInstanceStartPage.prototype, "activityInstance", void 0);
|
|
533
428
|
__decorate([
|
|
534
429
|
state(),
|
|
535
430
|
__metadata("design:type", Object)
|
|
@@ -541,11 +436,7 @@ __decorate([
|
|
|
541
436
|
__decorate([
|
|
542
437
|
state(),
|
|
543
438
|
__metadata("design:type", Object)
|
|
544
|
-
], ActivityInstanceStartPage.prototype, "
|
|
545
|
-
__decorate([
|
|
546
|
-
state(),
|
|
547
|
-
__metadata("design:type", Object)
|
|
548
|
-
], ActivityInstanceStartPage.prototype, "loadError", void 0);
|
|
439
|
+
], ActivityInstanceStartPage.prototype, "instanceId", void 0);
|
|
549
440
|
__decorate([
|
|
550
441
|
query('ox-board-viewer'),
|
|
551
442
|
__metadata("design:type", Object)
|