@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
|
@@ -1,127 +1,65 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import '@material/mwc-button';
|
|
3
2
|
import '@material/mwc-icon-button';
|
|
4
3
|
import '@operato/property-editor/ox-properties-dynamic-view.js';
|
|
4
|
+
import '@material/mwc-button';
|
|
5
5
|
import '@things-factory/organization';
|
|
6
6
|
import gql from 'graphql-tag';
|
|
7
7
|
import { css, html, LitElement } from 'lit';
|
|
8
8
|
import { customElement, property, state } from 'lit/decorators.js';
|
|
9
|
-
import {
|
|
9
|
+
import { navigate } from '@operato/shell';
|
|
10
10
|
import { client } from '@operato/graphql';
|
|
11
11
|
import { i18next, localize } from '@operato/i18n';
|
|
12
|
-
import { notify
|
|
12
|
+
import { notify } from '@operato/layout';
|
|
13
13
|
import { ScrollbarStyles } from '@operato/styles';
|
|
14
14
|
let ActivityStarterForm = class ActivityStarterForm extends localize(i18next)(LitElement) {
|
|
15
15
|
constructor() {
|
|
16
16
|
super(...arguments);
|
|
17
|
+
this.activity = {};
|
|
17
18
|
this.activityInstance = {};
|
|
18
19
|
}
|
|
19
20
|
render() {
|
|
20
|
-
var _a, _b
|
|
21
|
-
var {
|
|
22
|
-
|
|
23
|
-
.filter(item => item.inout === 'in' || item.inout === 'inout')
|
|
24
|
-
.map(item => {
|
|
25
|
-
return Object.assign(Object.assign({}, item), { label: item.name });
|
|
26
|
-
});
|
|
27
|
-
var { id, name, description, input, state, approvalLine = (_a = this.activity) === null || _a === void 0 ? void 0 : _a.approvalLine, assignees = (_b = this.activity) === null || _b === void 0 ? void 0 : _b.assignees, threadsMin = 0, threadsMax = 0 } = this.activityInstance;
|
|
28
|
-
const draftable = !id;
|
|
29
|
-
const postable = id && state === 'draft';
|
|
21
|
+
var _a, _b;
|
|
22
|
+
var { thumbnail, startingType } = this.activity || {};
|
|
23
|
+
var { name, description } = this.activityInstance;
|
|
30
24
|
return html `
|
|
31
25
|
<content>
|
|
32
|
-
<
|
|
33
|
-
<
|
|
26
|
+
<div>
|
|
27
|
+
<span
|
|
28
|
+
>업무의 타이틀과 설명을 작성해서 초안저장을 클릭하시면, 업무 초안이 생성되고 편집할 수 있는 페이지로
|
|
29
|
+
이동합니다.</span
|
|
30
|
+
>
|
|
31
|
+
|
|
32
|
+
<span
|
|
33
|
+
>이렇게 생성된 업무 초안은 '작성중인 업무' 리스트에서 찾아볼 수 있으며,
|
|
34
|
+
'${startingType == 'issue' ? '이슈' : '제출'}' 전까지 언제든지 수정할 수 있습니다.</span
|
|
35
|
+
>
|
|
36
|
+
</div>
|
|
37
|
+
<div>
|
|
38
|
+
<label for="name">${i18next.t('label.title')}</label>
|
|
34
39
|
<input
|
|
35
40
|
id="name"
|
|
36
|
-
.value=${name || ((
|
|
41
|
+
.value=${name || ((_a = this.activity) === null || _a === void 0 ? void 0 : _a.name)}
|
|
37
42
|
@change=${e => (this.activityInstance.name = e.currentTarget.value)}
|
|
38
43
|
/>
|
|
39
|
-
</
|
|
44
|
+
</div>
|
|
40
45
|
|
|
41
|
-
<
|
|
42
|
-
<label for="description"
|
|
46
|
+
<div>
|
|
47
|
+
<label for="description">${i18next.t('label.description')}</label>
|
|
43
48
|
<textarea
|
|
44
49
|
id="description"
|
|
45
|
-
.value=${description || ((
|
|
50
|
+
.value=${description || ((_b = this.activity) === null || _b === void 0 ? void 0 : _b.description)}
|
|
46
51
|
@change=${e => {
|
|
47
52
|
this.activityInstance.description = e.currentTarget.value;
|
|
48
53
|
}}
|
|
49
54
|
></textarea>
|
|
50
|
-
</
|
|
51
|
-
|
|
52
|
-
<section>
|
|
53
|
-
<label for="threads-min">Threads Min</label>
|
|
54
|
-
<input
|
|
55
|
-
id="threadsMin"
|
|
56
|
-
type="number"
|
|
57
|
-
.value=${threadsMin || 0}
|
|
58
|
-
@change=${e => (this.activityInstance.threadsMin = e.currentTarget.valueAsNumber)}
|
|
59
|
-
/>
|
|
60
|
-
|
|
61
|
-
<label for="threads-max">Threads Max</label>
|
|
62
|
-
<input
|
|
63
|
-
id="threads-max"
|
|
64
|
-
type="number"
|
|
65
|
-
.value=${threadsMax || 0}
|
|
66
|
-
@change=${e => (this.activityInstance.threadsMax = e.currentTarget.valueAsNumber)}
|
|
67
|
-
/>
|
|
68
|
-
</section>
|
|
69
|
-
|
|
70
|
-
<section>
|
|
71
|
-
<label>Assignees</label>
|
|
72
|
-
${assignees
|
|
73
|
-
? html `
|
|
74
|
-
<assignees-view
|
|
75
|
-
.value=${assignees}
|
|
76
|
-
@click=${this.onClickAssignees.bind(this)}
|
|
77
|
-
@change=${e => (this.activityInstance.assignees = e.currentTarget.value)}
|
|
78
|
-
></assignees-view>
|
|
79
|
-
`
|
|
80
|
-
: html `<mwc-icon-button icon="group_add" @click=${this.onClickAssignees.bind(this)}></mwc-icon-button>`}
|
|
81
|
-
</section>
|
|
82
|
-
|
|
83
|
-
<section>
|
|
84
|
-
<label>Approval Line</label>
|
|
85
|
-
${approvalLine
|
|
86
|
-
? html `
|
|
87
|
-
<approval-line-view
|
|
88
|
-
.model=${approvalLine}
|
|
89
|
-
@click=${this.onClickApprovalLine.bind(this)}
|
|
90
|
-
@change=${e => (this.activityInstance.approvalLine = e.currentTarget.value)}
|
|
91
|
-
></approval-line-view>
|
|
92
|
-
`
|
|
93
|
-
: html `<mwc-icon-button icon="group_add" @click=${this.onClickApprovalLine.bind(this)}></mwc-icon-button>`}
|
|
94
|
-
</section>
|
|
55
|
+
</div>
|
|
95
56
|
|
|
96
|
-
<
|
|
97
|
-
<img src=${thumbnail} />
|
|
98
|
-
</section>
|
|
99
|
-
|
|
100
|
-
<label>Input</label>
|
|
101
|
-
|
|
102
|
-
${!model
|
|
103
|
-
? html ``
|
|
104
|
-
: html `
|
|
105
|
-
<ox-properties-dynamic-view
|
|
106
|
-
.props=${inputSpec}
|
|
107
|
-
.value=${input}
|
|
108
|
-
@property-change=${e => {
|
|
109
|
-
this.activityInstance.input = e.currentTarget.value;
|
|
110
|
-
console.log('activity-instance', this.activityInstance.input);
|
|
111
|
-
}}
|
|
112
|
-
></ox-properties-dynamic-view>
|
|
113
|
-
`}
|
|
57
|
+
<img src=${thumbnail} />
|
|
114
58
|
</content>
|
|
115
59
|
|
|
116
60
|
<div class="button-container">
|
|
61
|
+
<mwc-button raised @click=${this.draftActivityInstance.bind(this)}>${i18next.t('button.draft')}</mwc-button>
|
|
117
62
|
<mwc-button raised @click=${e => history.back()}>${i18next.t('button.close')}</mwc-button>
|
|
118
|
-
${when(draftable, () => html `
|
|
119
|
-
<mwc-button raised @click=${this.draftActivityInstance.bind(this)}>${i18next.t('button.draft')}</mwc-button>
|
|
120
|
-
`)}
|
|
121
|
-
${when(postable, () => html `
|
|
122
|
-
<mwc-button raised @click=${this.updateActivityInstance.bind(this)}>${i18next.t('button.save')}</mwc-button>
|
|
123
|
-
<mwc-button raised @click=${this.postActivityInstance.bind(this)}>${i18next.t('button.post')}</mwc-button>
|
|
124
|
-
`)}
|
|
125
63
|
</div>
|
|
126
64
|
`;
|
|
127
65
|
}
|
|
@@ -137,6 +75,8 @@ let ActivityStarterForm = class ActivityStarterForm extends localize(i18next)(Li
|
|
|
137
75
|
name
|
|
138
76
|
description
|
|
139
77
|
state
|
|
78
|
+
multiple
|
|
79
|
+
startingType
|
|
140
80
|
assignees {
|
|
141
81
|
type
|
|
142
82
|
value
|
|
@@ -180,135 +120,29 @@ let ActivityStarterForm = class ActivityStarterForm extends localize(i18next)(Li
|
|
|
180
120
|
this.activity = response.data.activity;
|
|
181
121
|
}
|
|
182
122
|
async draftActivityInstance() {
|
|
183
|
-
|
|
184
|
-
var { name, description, assignees, approvalLine } = this.
|
|
185
|
-
|
|
123
|
+
var { id: activityId } = this.activity;
|
|
124
|
+
var { id, name, description, priority, threadsMin, threadsMax, dueAt, input, assignees, approvalLine } = this.activityInstance;
|
|
125
|
+
name || (name = this.activity.name);
|
|
126
|
+
description || (description = this.activity.description);
|
|
127
|
+
assignees || (assignees = this.activity.assignees);
|
|
128
|
+
approvalLine || (approvalLine = this.activity.approvalLine);
|
|
129
|
+
var activityInstance = {
|
|
130
|
+
id,
|
|
131
|
+
activityId,
|
|
186
132
|
name,
|
|
187
133
|
description,
|
|
188
|
-
|
|
189
|
-
approvalLine }, this.activityInstance);
|
|
190
|
-
const response = await client.mutate({
|
|
191
|
-
mutation: gql `
|
|
192
|
-
mutation ($activityInstance: NewActivityInstance!) {
|
|
193
|
-
draftActivityInstance(activityInstance: $activityInstance) {
|
|
194
|
-
id
|
|
195
|
-
name
|
|
196
|
-
description
|
|
197
|
-
input
|
|
198
|
-
state
|
|
199
|
-
assignees {
|
|
200
|
-
type
|
|
201
|
-
value
|
|
202
|
-
assignee {
|
|
203
|
-
id
|
|
204
|
-
name
|
|
205
|
-
description
|
|
206
|
-
controlNo
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
approvalLine {
|
|
210
|
-
type
|
|
211
|
-
value
|
|
212
|
-
approver {
|
|
213
|
-
id
|
|
214
|
-
name
|
|
215
|
-
description
|
|
216
|
-
controlNo
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
threadsMin
|
|
220
|
-
threadsMax
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
`,
|
|
224
|
-
variables: {
|
|
225
|
-
activityInstance
|
|
226
|
-
}
|
|
227
|
-
});
|
|
228
|
-
if (!response.errors) {
|
|
229
|
-
this.activityInstance = response.data.draftActivityInstance;
|
|
230
|
-
notify({
|
|
231
|
-
message: i18next.t('text.info_x_successfully', {
|
|
232
|
-
x: `${i18next.t('label.activity-instance')} ${i18next.t('text.draft')}`
|
|
233
|
-
})
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
async updateActivityInstance() {
|
|
238
|
-
const { id, name, description, input, threadsMin = 0, threadsMax = 0, assignees, approvalLine } = this.activityInstance;
|
|
239
|
-
const patch = {
|
|
240
|
-
name: name || this.activity.name,
|
|
241
|
-
description: description || this.activity.description,
|
|
242
|
-
input,
|
|
243
|
-
threadsMin,
|
|
134
|
+
priority,
|
|
244
135
|
threadsMax,
|
|
245
|
-
assignees,
|
|
246
|
-
approvalLine
|
|
247
|
-
};
|
|
248
|
-
const response = await client.mutate({
|
|
249
|
-
mutation: gql `
|
|
250
|
-
mutation ($id: String!, $patch: ActivityInstancePatch!) {
|
|
251
|
-
updateActivityInstance(id: $id, patch: $patch) {
|
|
252
|
-
id
|
|
253
|
-
name
|
|
254
|
-
description
|
|
255
|
-
input
|
|
256
|
-
state
|
|
257
|
-
assignees {
|
|
258
|
-
type
|
|
259
|
-
value
|
|
260
|
-
assignee {
|
|
261
|
-
id
|
|
262
|
-
name
|
|
263
|
-
description
|
|
264
|
-
controlNo
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
approvalLine {
|
|
268
|
-
type
|
|
269
|
-
value
|
|
270
|
-
approver {
|
|
271
|
-
id
|
|
272
|
-
name
|
|
273
|
-
description
|
|
274
|
-
controlNo
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
threadsMin
|
|
278
|
-
threadsMax
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
`,
|
|
282
|
-
variables: {
|
|
283
|
-
id,
|
|
284
|
-
patch
|
|
285
|
-
}
|
|
286
|
-
});
|
|
287
|
-
if (!response.errors) {
|
|
288
|
-
this.activityInstance = response.data.updateActivityInstance;
|
|
289
|
-
notify({
|
|
290
|
-
message: i18next.t('text.info_x_successfully', {
|
|
291
|
-
x: `${i18next.t('label.activity-instance')} ${i18next.t('text.save')}`
|
|
292
|
-
})
|
|
293
|
-
});
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
async postActivityInstance() {
|
|
297
|
-
const { id, name, description, input, threadsMin = 0, threadsMax = 0, assignees, approvalLine } = this.activityInstance;
|
|
298
|
-
const activityInstance = {
|
|
299
|
-
id,
|
|
300
|
-
name: name || this.activity.name,
|
|
301
|
-
description: description || this.activity.description,
|
|
302
136
|
threadsMin,
|
|
303
|
-
|
|
137
|
+
dueAt,
|
|
304
138
|
input,
|
|
305
139
|
assignees,
|
|
306
140
|
approvalLine
|
|
307
141
|
};
|
|
308
142
|
const response = await client.mutate({
|
|
309
143
|
mutation: gql `
|
|
310
|
-
mutation ($activityInstance:
|
|
311
|
-
|
|
144
|
+
mutation ($activityInstance: ActivityInstanceDraft!) {
|
|
145
|
+
draftActivityInstance(activityInstance: $activityInstance) {
|
|
312
146
|
id
|
|
313
147
|
name
|
|
314
148
|
description
|
|
@@ -344,49 +178,17 @@ let ActivityStarterForm = class ActivityStarterForm extends localize(i18next)(Li
|
|
|
344
178
|
}
|
|
345
179
|
});
|
|
346
180
|
if (!response.errors) {
|
|
347
|
-
this.activityInstance = response.data.
|
|
181
|
+
this.activityInstance = response.data.draftActivityInstance;
|
|
348
182
|
notify({
|
|
349
183
|
message: i18next.t('text.info_x_successfully', {
|
|
350
|
-
x: `${i18next.t('label.activity-instance')} ${i18next.t('text.
|
|
184
|
+
x: `${i18next.t('label.activity-instance')} ${i18next.t('text.draft')}`
|
|
351
185
|
})
|
|
352
186
|
});
|
|
187
|
+
this.openActivityInstanceStart(this.activityInstance);
|
|
353
188
|
}
|
|
354
189
|
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
const popup = openPopup(html `
|
|
358
|
-
<assignees-editor-popup
|
|
359
|
-
.value=${assignees}
|
|
360
|
-
.confirmCallback=${value => {
|
|
361
|
-
this.activityInstance.assignees = value;
|
|
362
|
-
this.requestUpdate();
|
|
363
|
-
}}
|
|
364
|
-
></assignees-editor-popup>
|
|
365
|
-
`, {
|
|
366
|
-
backdrop: true,
|
|
367
|
-
help: 'organization/assignees-editor',
|
|
368
|
-
size: 'large',
|
|
369
|
-
title: i18next.t('title.assignee list')
|
|
370
|
-
});
|
|
371
|
-
popup.onclosed = () => { };
|
|
372
|
-
}
|
|
373
|
-
onClickApprovalLine() {
|
|
374
|
-
const { approvalLine } = this.activityInstance || {};
|
|
375
|
-
const popup = openPopup(html `
|
|
376
|
-
<approval-line-items-editor-popup
|
|
377
|
-
.value=${approvalLine}
|
|
378
|
-
.confirmCallback=${value => {
|
|
379
|
-
this.activityInstance.approvalLine = value;
|
|
380
|
-
this.requestUpdate();
|
|
381
|
-
}}
|
|
382
|
-
></approval-line-items-editor-popup>
|
|
383
|
-
`, {
|
|
384
|
-
backdrop: true,
|
|
385
|
-
help: 'organization/approval-line-items-editor',
|
|
386
|
-
size: 'large',
|
|
387
|
-
title: i18next.t('title.approval-line item list')
|
|
388
|
-
});
|
|
389
|
-
popup.onclosed = () => { };
|
|
190
|
+
openActivityInstanceStart(activityInstance) {
|
|
191
|
+
navigate(`activity-instance-start/${activityInstance.id}?title=${activityInstance.name}`);
|
|
390
192
|
}
|
|
391
193
|
};
|
|
392
194
|
ActivityStarterForm.styles = [
|
|
@@ -404,14 +206,19 @@ ActivityStarterForm.styles = [
|
|
|
404
206
|
display: flex;
|
|
405
207
|
flex-direction: column;
|
|
406
208
|
padding: var(--padding-default);
|
|
209
|
+
gap: 10px;
|
|
407
210
|
overflow: auto;
|
|
408
211
|
}
|
|
409
212
|
|
|
410
|
-
|
|
213
|
+
content > div {
|
|
411
214
|
display: flex;
|
|
412
215
|
flex-direction: column;
|
|
413
216
|
}
|
|
414
217
|
|
|
218
|
+
content span {
|
|
219
|
+
color: navy;
|
|
220
|
+
}
|
|
221
|
+
|
|
415
222
|
#description {
|
|
416
223
|
height: 60px;
|
|
417
224
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-starter-form.js","sourceRoot":"","sources":["../../client/components/activity-starter-form.ts"],"names":[],"mappings":";AAAA,OAAO,sBAAsB,CAAA;AAC7B,OAAO,2BAA2B,CAAA;AAClC,OAAO,wDAAwD,CAAA;AAC/D,OAAO,8BAA8B,CAAA;AAErC,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC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;YAC1C,IAAI,CAAC,aAAa,EAAE,CAAA;QACtB,CAAC;;OAEJ,EACD;YACE,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,yCAAyC;YAC/C,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,+BAA+B,CAAC;SAClD,CACF,CAAA;QACD,KAAK,CAAC,QAAQ,GAAG,GAAG,EAAE,GAAE,CAAC,CAAA;IAC3B,CAAC;;AAneM,0BAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkCF;CACF,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uDAAoB;AAE/C;IAAC,KAAK,EAAE;;qDAAc;AACtB;IAAC,KAAK,EAAE;;6DAA2B;AA3CxB,mBAAmB;IAD/B,aAAa,CAAC,uBAAuB,CAAC;GAC1B,mBAAmB,CAqe/B;SAreY,mBAAmB","sourcesContent":["import '@material/mwc-button'\nimport '@material/mwc-icon-button'\nimport '@operato/property-editor/ox-properties-dynamic-view.js'\nimport '@things-factory/organization'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { when } from 'lit/directives/when.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { notify, openPopup } from '@operato/layout'\nimport { ScrollbarStyles } from '@operato/styles'\n\n@customElement('activity-starter-form')\nexport class ActivityStarterForm extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n }\n\n content {\n flex: 1;\n display: flex;\n flex-direction: column;\n padding: var(--padding-default);\n overflow: auto;\n }\n\n section {\n display: flex;\n flex-direction: column;\n }\n\n #description {\n height: 60px;\n }\n\n .button-container {\n display: flex;\n margin-left: auto;\n padding: var(--padding-default);\n }\n\n mwc-button {\n margin-left: var(--margin-default);\n }\n `\n ]\n\n @property({ type: String }) activityId?: string\n\n @state() activity: any\n @state() activityInstance: any = {}\n\n render() {\n var { model, thumbnail } = this.activity || {}\n\n const inputSpec = (model || [])\n .filter(item => item.inout === 'in' || item.inout === 'inout')\n .map(item => {\n return {\n ...item,\n label: item.name\n }\n })\n\n var {\n id,\n name,\n description,\n input,\n state,\n approvalLine = this.activity?.approvalLine,\n assignees = this.activity?.assignees,\n threadsMin = 0,\n threadsMax = 0\n } = this.activityInstance\n\n const draftable = !id\n const postable = id && state === 'draft'\n\n return html`\n <content>\n <section>\n <label for=\"name\">title</label>\n <input\n id=\"name\"\n .value=${name || this.activity?.name}\n @change=${e => (this.activityInstance.name = e.currentTarget.value)}\n />\n </section>\n\n <section>\n <label for=\"description\">description</label>\n <textarea\n id=\"description\"\n .value=${description || this.activity?.description}\n @change=${e => {\n this.activityInstance.description = e.currentTarget.value\n }}\n ></textarea>\n </section>\n\n <section>\n <label for=\"threads-min\">Threads Min</label>\n <input\n id=\"threadsMin\"\n type=\"number\"\n .value=${threadsMin || 0}\n @change=${e => (this.activityInstance.threadsMin = e.currentTarget.valueAsNumber)}\n />\n\n <label for=\"threads-max\">Threads Max</label>\n <input\n id=\"threads-max\"\n type=\"number\"\n .value=${threadsMax || 0}\n @change=${e => (this.activityInstance.threadsMax = e.currentTarget.valueAsNumber)}\n />\n </section>\n\n <section>\n <label>Assignees</label>\n ${assignees\n ? html`\n <assignees-view\n .value=${assignees}\n @click=${this.onClickAssignees.bind(this)}\n @change=${e => (this.activityInstance.assignees = e.currentTarget.value)}\n ></assignees-view>\n `\n : html`<mwc-icon-button icon=\"group_add\" @click=${this.onClickAssignees.bind(this)}></mwc-icon-button>`}\n </section>\n\n <section>\n <label>Approval Line</label>\n ${approvalLine\n ? html`\n <approval-line-view\n .model=${approvalLine}\n @click=${this.onClickApprovalLine.bind(this)}\n @change=${e => (this.activityInstance.approvalLine = e.currentTarget.value)}\n ></approval-line-view>\n `\n : html`<mwc-icon-button icon=\"group_add\" @click=${this.onClickApprovalLine.bind(this)}></mwc-icon-button>`}\n </section>\n\n <section>\n <img src=${thumbnail} />\n </section>\n\n <label>Input</label>\n\n ${!model\n ? html``\n : html`\n <ox-properties-dynamic-view\n .props=${inputSpec}\n .value=${input}\n @property-change=${e => {\n this.activityInstance.input = e.currentTarget.value\n console.log('activity-instance', this.activityInstance.input)\n }}\n ></ox-properties-dynamic-view>\n `}\n </content>\n\n <div class=\"button-container\">\n <mwc-button raised @click=${e => history.back()}>${i18next.t('button.close')}</mwc-button>\n ${when(\n draftable,\n () => html`\n <mwc-button raised @click=${this.draftActivityInstance.bind(this)}>${i18next.t('button.draft')}</mwc-button>\n `\n )}\n ${when(\n postable,\n () => html`\n <mwc-button raised @click=${this.updateActivityInstance.bind(this)}>${i18next.t('button.save')}</mwc-button>\n <mwc-button raised @click=${this.postActivityInstance.bind(this)}>${i18next.t('button.post')}</mwc-button>\n `\n )}\n </div>\n `\n }\n\n firstUpdated() {\n this.fetchActivity(this.activityId)\n }\n\n async fetchActivity(id) {\n const response = await client.query({\n query: gql`\n query activity($id: String!) {\n activity(id: $id) {\n id\n name\n description\n state\n assignees {\n type\n value\n assignee {\n id\n name\n description\n controlNo\n }\n }\n approvalLine {\n type\n value\n approver {\n id\n name\n description\n controlNo\n }\n }\n thumbnail\n model {\n name\n description\n active\n tag\n inout\n type\n unit\n options\n quantifier\n spec\n }\n }\n }\n `,\n variables: {\n id\n }\n })\n\n this.activity = response.data.activity\n }\n\n async draftActivityInstance() {\n const { activityId } = this\n var { name, description, assignees, approvalLine } = this.activity\n\n const activityInstance = {\n activityId,\n name,\n description,\n assignees,\n approvalLine,\n ...this.activityInstance\n }\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($activityInstance: NewActivityInstance!) {\n draftActivityInstance(activityInstance: $activityInstance) {\n id\n name\n description\n input\n state\n assignees {\n type\n value\n assignee {\n id\n name\n description\n controlNo\n }\n }\n approvalLine {\n type\n value\n approver {\n id\n name\n description\n controlNo\n }\n }\n threadsMin\n threadsMax\n }\n }\n `,\n variables: {\n activityInstance\n }\n })\n\n if (!response.errors) {\n this.activityInstance = response.data.draftActivityInstance\n notify({\n message: i18next.t('text.info_x_successfully', {\n x: `${i18next.t('label.activity-instance')} ${i18next.t('text.draft')}`\n })\n })\n }\n }\n\n async updateActivityInstance() {\n const {\n id,\n name,\n description,\n input,\n threadsMin = 0,\n threadsMax = 0,\n assignees,\n approvalLine\n } = this.activityInstance\n\n const patch = {\n name: name || this.activity.name,\n description: description || this.activity.description,\n input,\n threadsMin,\n threadsMax,\n assignees,\n approvalLine\n }\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($id: String!, $patch: ActivityInstancePatch!) {\n updateActivityInstance(id: $id, patch: $patch) {\n id\n name\n description\n input\n state\n assignees {\n type\n value\n assignee {\n id\n name\n description\n controlNo\n }\n }\n approvalLine {\n type\n value\n approver {\n id\n name\n description\n controlNo\n }\n }\n threadsMin\n threadsMax\n }\n }\n `,\n variables: {\n id,\n patch\n }\n })\n\n if (!response.errors) {\n this.activityInstance = response.data.updateActivityInstance\n notify({\n message: i18next.t('text.info_x_successfully', {\n x: `${i18next.t('label.activity-instance')} ${i18next.t('text.save')}`\n })\n })\n }\n }\n\n async postActivityInstance() {\n const {\n id,\n name,\n description,\n input,\n threadsMin = 0,\n threadsMax = 0,\n assignees,\n approvalLine\n } = this.activityInstance\n\n const activityInstance = {\n id,\n name: name || this.activity.name,\n description: description || this.activity.description,\n threadsMin,\n threadsMax,\n input,\n assignees,\n approvalLine\n }\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($activityInstance: ActivityInstancePost!) {\n postActivityInstance(activityInstance: $activityInstance) {\n id\n name\n description\n input\n state\n assignees {\n type\n value\n assignee {\n id\n name\n description\n controlNo\n }\n }\n approvalLine {\n type\n value\n approver {\n id\n name\n description\n controlNo\n }\n }\n threadsMin\n threadsMax\n }\n }\n `,\n variables: {\n activityInstance\n }\n })\n\n if (!response.errors) {\n this.activityInstance = response.data.postActivityInstance\n notify({\n message: i18next.t('text.info_x_successfully', {\n x: `${i18next.t('label.activity-instance')} ${i18next.t('text.assign')}`\n })\n })\n }\n }\n\n onClickAssignees() {\n const { assignees } = this.activityInstance || {}\n\n const popup = openPopup(\n html`\n <assignees-editor-popup\n .value=${assignees}\n .confirmCallback=${value => {\n this.activityInstance.assignees = value\n this.requestUpdate()\n }}\n ></assignees-editor-popup>\n `,\n {\n backdrop: true,\n help: 'organization/assignees-editor',\n size: 'large',\n title: i18next.t('title.assignee list')\n }\n )\n popup.onclosed = () => {}\n }\n\n onClickApprovalLine() {\n const { approvalLine } = this.activityInstance || {}\n\n const popup = openPopup(\n html`\n <approval-line-items-editor-popup\n .value=${approvalLine}\n .confirmCallback=${value => {\n this.activityInstance.approvalLine = value\n this.requestUpdate()\n }}\n ></approval-line-items-editor-popup>\n `,\n {\n backdrop: true,\n help: 'organization/approval-line-items-editor',\n size: 'large',\n title: i18next.t('title.approval-line item list')\n }\n )\n popup.onclosed = () => {}\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"activity-starter-form.js","sourceRoot":"","sources":["../../client/components/activity-starter-form.ts"],"names":[],"mappings":";AAAA,OAAO,2BAA2B,CAAA;AAClC,OAAO,wDAAwD,CAAA;AAC/D,OAAO,sBAAsB,CAAA;AAC7B,OAAO,8BAA8B,CAAA;AAErC,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,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OAgCZ;YACD,SAAS,EAAE;gBACT,gBAAgB;aACjB;SACF,CAAC,CAAA;QAEF,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;YACpB,IAAI,CAAC,gBAAgB,GAAG,QAAQ,CAAC,IAAI,CAAC,qBAAqB,CAAA;YAC3D,MAAM,CAAC;gBACL,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,0BAA0B,EAAE;oBAC7C,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,yBAAyB,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE;iBACxE,CAAC;aACH,CAAC,CAAA;YAEF,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;SACtD;IACH,CAAC;IAED,yBAAyB,CAAC,gBAAgB;QACxC,QAAQ,CAAC,2BAA2B,gBAAgB,CAAC,EAAE,UAAU,gBAAgB,CAAC,IAAI,EAAE,CAAC,CAAA;IAC3F,CAAC;;AAxOM,0BAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAuCF;CACF,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uDAAoB;AAE/C;IAAC,KAAK,EAAE;;qDAAmB;AAC3B;IAAC,KAAK,EAAE;;6DAA2B;AAhDxB,mBAAmB;IAD/B,aAAa,CAAC,uBAAuB,CAAC;GAC1B,mBAAmB,CA0O/B;SA1OY,mBAAmB","sourcesContent":["import '@material/mwc-icon-button'\nimport '@operato/property-editor/ox-properties-dynamic-view.js'\nimport '@material/mwc-button'\nimport '@things-factory/organization'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\n\nimport { navigate } from '@operato/shell'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { notify } from '@operato/layout'\nimport { ScrollbarStyles } from '@operato/styles'\n\n@customElement('activity-starter-form')\nexport class ActivityStarterForm extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n }\n\n content {\n flex: 1;\n display: flex;\n flex-direction: column;\n padding: var(--padding-default);\n gap: 10px;\n overflow: auto;\n }\n\n content > div {\n display: flex;\n flex-direction: column;\n }\n\n content span {\n color: navy;\n }\n\n #description {\n height: 60px;\n }\n\n .button-container {\n display: flex;\n margin-left: auto;\n padding: var(--padding-default);\n }\n\n mwc-button {\n margin-left: var(--margin-default);\n }\n `\n ]\n\n @property({ type: String }) activityId?: string\n\n @state() activity: any = {}\n @state() activityInstance: any = {}\n\n render() {\n var { thumbnail, startingType } = this.activity || {}\n var { name, description } = this.activityInstance\n\n return html`\n <content>\n <div>\n <span\n >업무의 타이틀과 설명을 작성해서 초안저장을 클릭하시면, 업무 초안이 생성되고 편집할 수 있는 페이지로\n 이동합니다.</span\n >\n\n <span\n >이렇게 생성된 업무 초안은 '작성중인 업무' 리스트에서 찾아볼 수 있으며,\n '${startingType == 'issue' ? '이슈' : '제출'}' 전까지 언제든지 수정할 수 있습니다.</span\n >\n </div>\n <div>\n <label for=\"name\">${i18next.t('label.title')}</label>\n <input\n id=\"name\"\n .value=${name || this.activity?.name}\n @change=${e => (this.activityInstance.name = e.currentTarget.value)}\n />\n </div>\n\n <div>\n <label for=\"description\">${i18next.t('label.description')}</label>\n <textarea\n id=\"description\"\n .value=${description || this.activity?.description}\n @change=${e => {\n this.activityInstance.description = e.currentTarget.value\n }}\n ></textarea>\n </div>\n\n <img src=${thumbnail} />\n </content>\n\n <div class=\"button-container\">\n <mwc-button raised @click=${this.draftActivityInstance.bind(this)}>${i18next.t('button.draft')}</mwc-button>\n <mwc-button raised @click=${e => history.back()}>${i18next.t('button.close')}</mwc-button>\n </div>\n `\n }\n\n firstUpdated() {\n this.fetchActivity(this.activityId)\n }\n\n async fetchActivity(id) {\n const response = await client.query({\n query: gql`\n query activity($id: String!) {\n activity(id: $id) {\n id\n name\n description\n state\n multiple\n startingType\n assignees {\n type\n value\n assignee {\n id\n name\n description\n controlNo\n }\n }\n approvalLine {\n type\n value\n approver {\n id\n name\n description\n controlNo\n }\n }\n thumbnail\n model {\n name\n description\n active\n tag\n inout\n type\n unit\n options\n quantifier\n spec\n }\n }\n }\n `,\n variables: {\n id\n }\n })\n\n this.activity = response.data.activity\n }\n\n async draftActivityInstance() {\n var { id: activityId } = this.activity\n var { id, name, description, priority, threadsMin, threadsMax, dueAt, input, assignees, approvalLine } =\n this.activityInstance\n\n name ||= this.activity.name\n description ||= this.activity.description\n assignees ||= this.activity.assignees\n approvalLine ||= this.activity.approvalLine\n\n var activityInstance = {\n id,\n activityId,\n name,\n description,\n priority,\n threadsMax,\n threadsMin,\n dueAt,\n input,\n assignees,\n approvalLine\n }\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($activityInstance: ActivityInstanceDraft!) {\n draftActivityInstance(activityInstance: $activityInstance) {\n id\n name\n description\n input\n state\n assignees {\n type\n value\n assignee {\n id\n name\n description\n controlNo\n }\n }\n approvalLine {\n type\n value\n approver {\n id\n name\n description\n controlNo\n }\n }\n threadsMin\n threadsMax\n }\n }\n `,\n variables: {\n activityInstance\n }\n })\n\n if (!response.errors) {\n this.activityInstance = response.data.draftActivityInstance\n notify({\n message: i18next.t('text.info_x_successfully', {\n x: `${i18next.t('label.activity-instance')} ${i18next.t('text.draft')}`\n })\n })\n\n this.openActivityInstanceStart(this.activityInstance)\n }\n }\n\n openActivityInstanceStart(activityInstance) {\n navigate(`activity-instance-start/${activityInstance.id}?title=${activityInstance.name}`)\n }\n}\n"]}
|
|
@@ -3,7 +3,7 @@ import '@operato/data-grist';
|
|
|
3
3
|
import './activity-model-item-list.js';
|
|
4
4
|
import gql from 'graphql-tag';
|
|
5
5
|
import { css, html } from 'lit';
|
|
6
|
-
import { customElement, property, query } from 'lit/decorators.js';
|
|
6
|
+
import { customElement, property, query, state } from 'lit/decorators.js';
|
|
7
7
|
import { connect } from 'pwa-helpers/connect-mixin.js';
|
|
8
8
|
import moment from 'moment-timezone';
|
|
9
9
|
import { DataGrist, getEditor, getRenderer } from '@operato/data-grist';
|
|
@@ -12,8 +12,8 @@ import { i18next, localize } from '@operato/i18n';
|
|
|
12
12
|
import { notify, openPopup } from '@operato/layout';
|
|
13
13
|
import { PageView, store } from '@operato/shell';
|
|
14
14
|
import { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles';
|
|
15
|
-
import { isMobileDevice } from '@operato/utils';
|
|
16
|
-
import { ActivityTypes, ActivityUITypes } from '../../types/types.js';
|
|
15
|
+
import { adjustFilters, isMobileDevice } from '@operato/utils';
|
|
16
|
+
import { ActivityStartingTypes, ActivityTypes, ActivityUITypes } from '../../types/types.js';
|
|
17
17
|
export const ActivityStatus = [
|
|
18
18
|
{ display: '', value: '' },
|
|
19
19
|
{ display: i18next.t('label.activity-state-draft'), value: 'draft' },
|
|
@@ -26,6 +26,7 @@ let ActivityListPage = class ActivityListPage extends connect(store)(localize(i1
|
|
|
26
26
|
constructor() {
|
|
27
27
|
super(...arguments);
|
|
28
28
|
this.mode = isMobileDevice() ? 'CARD' : 'GRID';
|
|
29
|
+
this.filters = ['released'];
|
|
29
30
|
}
|
|
30
31
|
get context() {
|
|
31
32
|
return {
|
|
@@ -53,24 +54,28 @@ let ActivityListPage = class ActivityListPage extends connect(store)(localize(i1
|
|
|
53
54
|
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
54
55
|
<div slot="headroom">
|
|
55
56
|
<div id="filters">
|
|
56
|
-
<ox-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
57
|
+
<ox-input-select-buttons
|
|
58
|
+
.value=${this.filters}
|
|
59
|
+
.options=${[
|
|
60
|
+
{
|
|
61
|
+
display: i18next.t('label.filter-draft'),
|
|
62
|
+
value: 'draft'
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
display: i18next.t('label.filter-released'),
|
|
66
|
+
value: 'released'
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
display: i18next.t('label.filter-deprecated'),
|
|
70
|
+
value: 'deprecated'
|
|
71
|
+
}
|
|
72
|
+
]}
|
|
73
|
+
@change=${(e) => {
|
|
74
|
+
var _a;
|
|
75
|
+
this.filters = (_a = e.currentTarget) === null || _a === void 0 ? void 0 : _a.value;
|
|
76
|
+
this.grist.fetch();
|
|
68
77
|
}}
|
|
69
|
-
|
|
70
|
-
>
|
|
71
|
-
<ox-popup id="sorter-control">
|
|
72
|
-
<ox-sorters-control> </ox-sorters-control>
|
|
73
|
-
</ox-popup>
|
|
78
|
+
></ox-input-select-buttons>
|
|
74
79
|
</div>
|
|
75
80
|
|
|
76
81
|
<div id="modes">
|
|
@@ -178,14 +183,16 @@ let ActivityListPage = class ActivityListPage extends connect(store)(localize(i1
|
|
|
178
183
|
width: 60
|
|
179
184
|
},
|
|
180
185
|
{
|
|
181
|
-
type: '
|
|
182
|
-
name: '
|
|
186
|
+
type: 'select',
|
|
187
|
+
name: 'startingType',
|
|
183
188
|
label: true,
|
|
184
|
-
header: i18next.t('field.
|
|
189
|
+
header: i18next.t('field.starting-type'),
|
|
185
190
|
record: {
|
|
186
|
-
editable: true
|
|
191
|
+
editable: true,
|
|
192
|
+
options: ActivityStartingTypes
|
|
187
193
|
},
|
|
188
|
-
|
|
194
|
+
sortable: true,
|
|
195
|
+
width: 60
|
|
189
196
|
},
|
|
190
197
|
{
|
|
191
198
|
type: 'select',
|
|
@@ -193,7 +200,11 @@ let ActivityListPage = class ActivityListPage extends connect(store)(localize(i1
|
|
|
193
200
|
header: i18next.t('field.multiple'),
|
|
194
201
|
record: {
|
|
195
202
|
editable: true,
|
|
196
|
-
options: [
|
|
203
|
+
options: [
|
|
204
|
+
{ display: 'Single', value: '' },
|
|
205
|
+
{ display: 'Parallel', value: 'parallel' },
|
|
206
|
+
{ display: 'Sequential', value: 'sequential' }
|
|
207
|
+
]
|
|
197
208
|
},
|
|
198
209
|
width: 80
|
|
199
210
|
},
|
|
@@ -442,6 +453,10 @@ let ActivityListPage = class ActivityListPage extends connect(store)(localize(i1
|
|
|
442
453
|
};
|
|
443
454
|
}
|
|
444
455
|
async fetchHandler({ page, limit, sortings = [], filters = [] }) {
|
|
456
|
+
const status = ['draft', 'released', 'deprecated'].filter(state => { var _a; return (_a = this.filters) === null || _a === void 0 ? void 0 : _a.includes(state); });
|
|
457
|
+
if (status.length > 0) {
|
|
458
|
+
filters = adjustFilters(filters, [{ name: 'state', operator: 'in', value: status }]);
|
|
459
|
+
}
|
|
445
460
|
const response = await client.query({
|
|
446
461
|
query: gql `
|
|
447
462
|
query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
@@ -510,7 +525,7 @@ let ActivityListPage = class ActivityListPage extends connect(store)(localize(i1
|
|
|
510
525
|
viewSource
|
|
511
526
|
reportType
|
|
512
527
|
reportSource
|
|
513
|
-
|
|
528
|
+
startingType
|
|
514
529
|
multiple
|
|
515
530
|
schedule
|
|
516
531
|
timezone
|
|
@@ -646,9 +661,9 @@ __decorate([
|
|
|
646
661
|
__metadata("design:type", DataGrist)
|
|
647
662
|
], ActivityListPage.prototype, "grist", void 0);
|
|
648
663
|
__decorate([
|
|
649
|
-
|
|
650
|
-
__metadata("design:type",
|
|
651
|
-
], ActivityListPage.prototype, "
|
|
664
|
+
state(),
|
|
665
|
+
__metadata("design:type", Array)
|
|
666
|
+
], ActivityListPage.prototype, "filters", void 0);
|
|
652
667
|
ActivityListPage = __decorate([
|
|
653
668
|
customElement('activity-list-page')
|
|
654
669
|
], ActivityListPage);
|