@things-factory/worklist 6.1.59 → 6.1.63

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.
Files changed (36) hide show
  1. package/client/components/activity-instance-ribon.ts +2 -2
  2. package/client/components/activity-starter-form.ts +17 -4
  3. package/client/pages/activity-instance/activity-instance-view.ts +281 -34
  4. package/client/pages/todo/done-list-calendar-page.ts +1 -1
  5. package/client/pages/todo/done-list-page.ts +1 -1
  6. package/dist-client/components/activity-instance-ribon.js +2 -2
  7. package/dist-client/components/activity-instance-ribon.js.map +1 -1
  8. package/dist-client/components/activity-starter-form.js +17 -4
  9. package/dist-client/components/activity-starter-form.js.map +1 -1
  10. package/dist-client/pages/activity-instance/activity-instance-view.d.ts +1 -0
  11. package/dist-client/pages/activity-instance/activity-instance-view.js +264 -30
  12. package/dist-client/pages/activity-instance/activity-instance-view.js.map +1 -1
  13. package/dist-client/pages/todo/done-list-calendar-page.js +1 -1
  14. package/dist-client/pages/todo/done-list-calendar-page.js.map +1 -1
  15. package/dist-client/pages/todo/done-list-page.js +1 -1
  16. package/dist-client/pages/todo/done-list-page.js.map +1 -1
  17. package/dist-client/tsconfig.tsbuildinfo +1 -1
  18. package/dist-server/service/activity-approval/activity-approval-query.js +4 -4
  19. package/dist-server/service/activity-approval/activity-approval-query.js.map +1 -1
  20. package/dist-server/service/activity-instance/activity-instance-query.js +2 -2
  21. package/dist-server/service/activity-instance/activity-instance-query.js.map +1 -1
  22. package/dist-server/service/activity-template/activity-template-query.js +2 -2
  23. package/dist-server/service/activity-template/activity-template-query.js.map +1 -1
  24. package/dist-server/service/activity-thread/activity-thread-query.js +3 -3
  25. package/dist-server/service/activity-thread/activity-thread-query.js.map +1 -1
  26. package/dist-server/tsconfig.tsbuildinfo +1 -1
  27. package/package.json +3 -3
  28. package/server/service/activity-approval/activity-approval-query.ts +4 -4
  29. package/server/service/activity-instance/activity-instance-query.ts +2 -2
  30. package/server/service/activity-template/activity-template-query.ts +2 -2
  31. package/server/service/activity-thread/activity-thread-query.ts +3 -3
  32. package/translations/en.json +2 -0
  33. package/translations/ja.json +2 -0
  34. package/translations/ko.json +2 -0
  35. package/translations/ms.json +2 -0
  36. package/translations/zh.json +2 -0
@@ -94,6 +94,7 @@ export class ActivityInstanceRibon extends localize(i18next)(LitElement) {
94
94
  [state] {
95
95
  text-align: right;
96
96
  font-size: var(--fontsize-small);
97
+ font-weight:bold;
97
98
  }
98
99
 
99
100
  @media only screen and (max-width: 460px) {
@@ -131,8 +132,7 @@ export class ActivityInstanceRibon extends localize(i18next)(LitElement) {
131
132
  ></activity-instance-context-template>`
132
133
  })
133
134
  }}
134
- >description</mwc-icon
135
- >
135
+ >description</mwc-icon>
136
136
  ${description}
137
137
  </div>
138
138
  ${startingType == 'issue' && assignee
@@ -22,7 +22,7 @@ export class ActivityStarterForm extends localize(i18next)(LitElement) {
22
22
  display: flex;
23
23
  flex-direction: column;
24
24
 
25
- background-color: #fff;
25
+ background-color: var(--main-section-background-color);
26
26
  }
27
27
 
28
28
  content {
@@ -37,10 +37,23 @@ export class ActivityStarterForm extends localize(i18next)(LitElement) {
37
37
  content > div {
38
38
  display: flex;
39
39
  flex-direction: column;
40
+ color: var(--secondary-color);
40
41
  }
41
42
 
42
- content span {
43
- color: navy;
43
+ content label{
44
+ font:var(--label-font)
45
+ }
46
+ content input, content textarea{
47
+ border-radius:var(--border-radius);
48
+ border:var(--border-dark-color);
49
+ padding:var(--input-padding);
50
+ margin:var(--input-margin);
51
+ font:var(--input-font);
52
+ }
53
+
54
+ content [desc]{
55
+ color: var(--secondary-text-color);
56
+ font-size:0.9em
44
57
  }
45
58
 
46
59
  #description {
@@ -70,7 +83,7 @@ export class ActivityStarterForm extends localize(i18next)(LitElement) {
70
83
 
71
84
  return html`
72
85
  <content>
73
- <div>
86
+ <div desc>
74
87
  <span
75
88
  >업무의 타이틀과 설명을 작성해서 초안저장을 클릭하시면, 업무 초안이 생성되고 편집할 수 있는 페이지로
76
89
  이동합니다.</span
@@ -1,3 +1,5 @@
1
+ import '@things-factory/organization/dist-client/component/approval-line-view.js'
2
+
1
3
  import gql from 'graphql-tag'
2
4
  import { css, html, LitElement } from 'lit'
3
5
  import { customElement, property, query, state } from 'lit/decorators.js'
@@ -10,7 +12,7 @@ import { ActivityInstance } from '../../types/activity-instance'
10
12
  import { ActivityThread } from '../../types/activity-thread'
11
13
  import { ActivityApproval } from '../../types/activity-approval'
12
14
 
13
- const formatter = new Intl.DateTimeFormat(navigator.language, { dateStyle: 'full', timeStyle: 'short' })
15
+ const formatter = new Intl.DateTimeFormat(navigator.language, { dateStyle: 'short', timeStyle: 'short' })
14
16
 
15
17
  @customElement('activity-instance-view')
16
18
  export class ActivityInstanceView extends localize(i18next)(LitElement) {
@@ -18,9 +20,188 @@ export class ActivityInstanceView extends localize(i18next)(LitElement) {
18
20
  ScrollbarStyles,
19
21
  css`
20
22
  :host {
21
- display: block;
22
- background-color: #fff;
23
+ display: flex;
23
24
  overflow: auto;
25
+ font-size: var(--fontsize-default);
26
+ }
27
+ :host([state='assigned']) {
28
+ --worklist-status-color: #5f7184;
29
+ }
30
+
31
+ :host([state='started']) {
32
+ --worklist-status-color: #56af45;
33
+ }
34
+
35
+ :host([state='delegated']) {
36
+ --worklist-status-color: #8654b0;
37
+ }
38
+
39
+ :host([state='submitted']) {
40
+ --worklist-status-color: #428df3;
41
+ }
42
+
43
+ :host([state='escalated']) {
44
+ --worklist-status-color: #595de5;
45
+ }
46
+
47
+ :host([state='rejected']) {
48
+ --worklist-status-color: #f27429;
49
+ }
50
+
51
+ :host([state='ended']) {
52
+ --worklist-status-color: #02acae;
53
+ }
54
+
55
+ :host([state='aborted']) {
56
+ --worklist-status-color: #cb3a33;
57
+ }
58
+ [instance-container] {
59
+ flex: 1;
60
+ background-color: var(--main-section-background-color);
61
+ border-right: var(--border-dark-color);
62
+ padding: var(--padding-wide);
63
+ color: var(--primary-text-color);
64
+ }
65
+ [thread-container] {
66
+ flex: 2;
67
+ padding: var(--padding-wide);
68
+ }
69
+ [instance-container] div {
70
+ margin-bottom: var(--margin-default);
71
+ padding-bottom: var(--padding-default);
72
+ border-bottom: var(--border-dark-color);
73
+ }
74
+ [header] mwc-icon {
75
+ background-color: var(--worklist-status-color, tomato);
76
+ float: left;
77
+ margin-right: var(--margin-default);
78
+ padding: var(--padding-default);
79
+ border-radius: 50%;
80
+ float: left;
81
+ font-size: 1.8em;
82
+ color: var(--theme-white-color);
83
+ }
84
+ [header] strong {
85
+ display: block;
86
+ font: bold 22px / 1.1 var(--theme-font);
87
+ }
88
+ [header] {
89
+ overflow: hidden;
90
+ font-size: var(--fontsize-small);
91
+ }
92
+ [instance-container] div label {
93
+ display: inline-block;
94
+ margin-right: var(--margin-default);
95
+ }
96
+ span[status] {
97
+ width: 15px;
98
+ height: 15px;
99
+ background-color: var(--worklist-status-color, tomato);
100
+ display: inline-block;
101
+ margin-right: var(--margin-narrow);
102
+ border-radius: 50%;
103
+ }
104
+ [thread-container] table {
105
+ width: 100%;
106
+ border-collapse: collapse;
107
+ }
108
+ [thread-container] th {
109
+ background-color: rgba(var(--primary-color-rgb), 0.05);
110
+ border-top: var(--grid-header-top-border);
111
+ border-bottom: var(--grid-header-bottom-border);
112
+ padding: var(--grid-header-padding);
113
+ text-overflow: ellipsis;
114
+ font: var(--grid-header-font);
115
+ color: var(--grid-header-color);
116
+ }
117
+ [thread-container] td {
118
+ padding: var(--padding-narrow);
119
+ border-bottom: var(--grid-record-border-bottom);
120
+ }
121
+ [assignee] * {
122
+ vertical-align: middle;
123
+ }
124
+ [assignee] mwc-icon {
125
+ opacity: 0.5;
126
+ }
127
+ [subtitle] {
128
+ display: block;
129
+ margin: var(--margin-wide) 0 var(--margin-narrow) 0;
130
+ font: bold 16px var(--theme-font);
131
+ color: var(--secondary-text-color);
132
+ }
133
+ [timeline] ol {
134
+ list-style: none;
135
+ margin: 0;
136
+ padding: 0;
137
+ }
138
+ [timeline] li {
139
+ display: flex;
140
+ }
141
+ [timeline] [info] {
142
+ flex: 1;
143
+ }
144
+ [timeline] [date] {
145
+ opacity: 0.7;
146
+ width: 120px;
147
+ font-size: var(--fontsize-small);
148
+ }
149
+ [timeline] [info] strong {
150
+ float: right;
151
+ }
152
+ [timeline] [status] {
153
+ margin: 0 var(--margin-narrow);
154
+ display: block;
155
+ border-radius: 50%;
156
+ width: 12px;
157
+ height: 12px;
158
+ position: relative;
159
+ top: 3px;
160
+ border: 2px solid #fff;
161
+ background-color: var(--worklist-status-color, tomato);
162
+ }
163
+ [timeline] [status]::before {
164
+ content: '';
165
+ height: 60px;
166
+ width: 2px;
167
+ display: block;
168
+ position: relative;
169
+ margin-left: 5px;
170
+ background-color: var(--worklist-status-color, tomato);
171
+ opacity: 0.2;
172
+ }
173
+ [timeline] [info] mwc-icon {
174
+ position: relative;
175
+ top: 3px;
176
+ font-size: var(--fontsize-large);
177
+ }
178
+ [timeline] [info] p {
179
+ background-color: #f4f4f4;
180
+ margin: var(--margin-narrow) 0 var(--margin-default) 0;
181
+ padding: var(--padding-narrow) var(--padding-default);
182
+ border-radius: var(--border-radius);
183
+ font-size: var(--fontsize-small);
184
+ text-align: justify;
185
+ }
186
+ [timeline] [info] p::before {
187
+ content: '';
188
+ float: right;
189
+ margin-top: -10px;
190
+ margin-right: 20px;
191
+ border: 7px solid transparent;
192
+ border-bottom-color: #f4f4f4;
193
+ border-top: 0;
194
+ }
195
+ [etc] div {
196
+ border-bottom: var(--border-dark-color);
197
+ padding: var(--padding-narrow);
198
+ text-align: right;
199
+ overflow: hidden;
200
+ }
201
+ [etc] div label {
202
+ float: left;
203
+ width: 25%;
204
+ text-align: left;
24
205
  }
25
206
  `
26
207
  ]
@@ -37,22 +218,48 @@ export class ActivityInstanceView extends localize(i18next)(LitElement) {
37
218
  if (!this.activityInstance) {
38
219
  return html`<div>no activity instance info.</div>`
39
220
  }
40
- const { id, name, description, input, output, assignedAt, startedAt, activityThreads, terminatedAt, updatedAt } =
41
- this.activityInstance
221
+
222
+ const {
223
+ id,
224
+ name,
225
+ description,
226
+ input,
227
+ output,
228
+ state,
229
+ assignedAt,
230
+ startedAt,
231
+ approvalLine,
232
+ activityThreads,
233
+ terminatedAt,
234
+ updatedAt
235
+ } = this.activityInstance
42
236
  const instance = this.activityInstance
43
237
 
44
238
  return html`
45
- <div>${i18next.t('field.name')}: ${name}</div>
46
- <div>${i18next.t('field.description')}: ${description}</div>
47
- <div>${i18next.t('field.search-keys')}: ${this.renderSearchKeys()}</div>
48
- <div>${i18next.t('field.assigned-at')}: ${assignedAt && formatter.format(new Date(assignedAt))}</div>
49
- <div>${i18next.t('field.started-at')}: ${startedAt && formatter.format(new Date(startedAt))}</div>
50
- <div>${i18next.t('field.terminated-at')}: ${terminatedAt && formatter.format(new Date(terminatedAt))}</div>
51
- <div>${i18next.t('field.updated-at')}: ${updatedAt && formatter.format(new Date(updatedAt))}</div>
52
-
53
- ${this.renderInOut({ ...input, ...output })}
54
- <div>실행 이력</div>
55
- ${activityThreads?.map(activityThread => this.renderActivityThread(activityThread))}
239
+ <div instance-container>
240
+ <div header>
241
+ <mwc-icon>description</mwc-icon>
242
+ <strong>${name}</strong>
243
+ ${description}
244
+ </div>
245
+ ${approvalLine ? html`<approval-line-view .model=${approvalLine}></approval-line-view>` : html``}
246
+
247
+ <div>
248
+ <label>${i18next.t('label.status')}</label>
249
+ <span status></span>
250
+ <strong>${i18next.t('label.activity-state-' + state)}</strong>
251
+ </div>
252
+
253
+ <div>
254
+ <label>${i18next.t('field.assigned-at')}</label>${assignedAt && formatter.format(new Date(assignedAt))}
255
+ </div>
256
+ <div><label>${i18next.t('field.started-at')}</label>${startedAt && formatter.format(new Date(startedAt))}</div>
257
+ <div><label>${i18next.t('field.updated-at')}</label>${updatedAt && formatter.format(new Date(updatedAt))}</div>
258
+ <div>
259
+ <label>${i18next.t('field.terminated-at')}</label>${terminatedAt && formatter.format(new Date(terminatedAt))}
260
+ </div>
261
+ </div>
262
+ <div thread-container>${activityThreads?.map(activityThread => this.renderActivityThread(activityThread))}</div>
56
263
  `
57
264
  }
58
265
 
@@ -70,16 +277,40 @@ export class ActivityInstanceView extends localize(i18next)(LitElement) {
70
277
  const { name, email } = assignee || {}
71
278
 
72
279
  return html`
73
- <div>${i18next.t('field.assignee')}: ${name}</div>
74
- <div>${i18next.t('field.round')}: ${round}</div>
75
- <div>${i18next.t('field.output')}: ${this.renderInOut(output)}</div>
76
- <div>${i18next.t('field.assigned-at')}: ${assignedAt && formatter.format(new Date(assignedAt))}</div>
77
- <div>${i18next.t('field.started-at')}: ${startedAt && formatter.format(new Date(startedAt))}</div>
78
- <div>${i18next.t('field.terminated-at')}: ${terminatedAt && formatter.format(new Date(terminatedAt))}</div>
79
-
80
- ${activityApprovals
81
- .sort((a, b) => (a.round > b.round ? 1 : a.round < b.round ? -1 : a.order! > b.order! ? 1 : -1))
82
- .map(approval => this.renderActivityApproval(approval))}
280
+ <div assignee>
281
+ <mwc-icon>account_circle</mwc-icon>
282
+ <strong>${name}</strong>
283
+ </div>
284
+
285
+ <div etc>
286
+ <span subtitle>${i18next.t('label.information')}</span>
287
+ <div>
288
+ <label>${i18next.t('label.status')}</label>
289
+ <span status></span>
290
+ <strong>${i18next.t('label.activity-state-' + state)}</strong>
291
+ </div>
292
+ <div>
293
+ <label>${i18next.t('field.assigned-at')}</label> ${assignedAt && formatter.format(new Date(assignedAt))}
294
+ </div>
295
+ <div><label>${i18next.t('field.started-at')}</label> ${startedAt && formatter.format(new Date(startedAt))}</div>
296
+ <div>
297
+ <label>${i18next.t('field.terminated-at')}</label> ${terminatedAt && formatter.format(new Date(terminatedAt))}
298
+ </div>
299
+ <div><label>${i18next.t('field.round')}</label> ${round}</div>
300
+ </div>
301
+
302
+ <div>
303
+ <span subtitle>${i18next.t('field.output')}</span>
304
+ ${this.renderInOut(output || {})}
305
+ </div>
306
+ <div timeline>
307
+ <span subtitle>승인 검토 이력</span>
308
+ <ol>
309
+ ${activityApprovals
310
+ .sort((a, b) => (a.round < b.round ? 1 : a.round > b.round ? -1 : a.order! < b.order! ? 1 : -1))
311
+ .map(approval => this.renderActivityApproval(approval))}
312
+ </ol>
313
+ </div>
83
314
  `
84
315
  }
85
316
 
@@ -88,13 +319,15 @@ export class ActivityInstanceView extends localize(i18next)(LitElement) {
88
319
  const { name, email } = approver || {}
89
320
 
90
321
  return html`
91
- <div>${i18next.t('field.approver')}: ${name}</div>
92
- <div>${i18next.t('field.judgment')}: ${judgment}</div>
93
- <div>${i18next.t('field.comment')}: ${comment}</div>
94
- <div>${i18next.t('field.round')}: ${round}</div>
95
- <div>${i18next.t('field.order')}: ${order}</div>
96
- <div>${i18next.t('field.started-at')}: ${createdAt && formatter.format(new Date(createdAt))}</div>
97
- <div>${i18next.t('field.terminated-at')}: ${terminatedAt && formatter.format(new Date(terminatedAt))}</div>
322
+ <li>
323
+ <span date>${formatter.format(new Date(terminatedAt || createdAt!))}</span>
324
+ <span status></span>
325
+ <span info>
326
+ ${i18next.t('label.activity-state-' + (judgment || 'started'))}
327
+ <strong><mwc-icon>account_circle</mwc-icon>${name}</strong>
328
+ <p>${comment}</p>
329
+ </span>
330
+ </li>
98
331
  `
99
332
  }
100
333
 
@@ -122,7 +355,7 @@ export class ActivityInstanceView extends localize(i18next)(LitElement) {
122
355
  }
123
356
 
124
357
  renderInOut(data) {
125
- const { input, output, activity } = this.activityInstance!
358
+ const { activity } = this.activityInstance!
126
359
  const { model } = activity || {}
127
360
 
128
361
  return html`
@@ -159,6 +392,7 @@ export class ActivityInstanceView extends localize(i18next)(LitElement) {
159
392
  id
160
393
  name
161
394
  description
395
+ state
162
396
  key01
163
397
  key02
164
398
  key03
@@ -189,6 +423,16 @@ export class ActivityInstanceView extends localize(i18next)(LitElement) {
189
423
  spec
190
424
  }
191
425
  }
426
+ approvalLine {
427
+ type
428
+ value
429
+ approver {
430
+ id
431
+ name
432
+ description
433
+ controlNo
434
+ }
435
+ }
192
436
  activityThreads {
193
437
  state
194
438
  transaction
@@ -208,6 +452,8 @@ export class ActivityInstanceView extends localize(i18next)(LitElement) {
208
452
  }
209
453
  judgment
210
454
  comment
455
+ createdAt
456
+ terminatedAt
211
457
  }
212
458
  assignedAt
213
459
  startedAt
@@ -230,5 +476,6 @@ export class ActivityInstanceView extends localize(i18next)(LitElement) {
230
476
  })
231
477
 
232
478
  this.activityInstance = response.data.activityInstance
479
+ this.setAttribute('state', this.activityInstance?.state || '')
233
480
  }
234
481
  }
@@ -80,7 +80,7 @@ export class DoneListCalendarPage extends connect(store)(PageView) {
80
80
  const color = ['black', 'darkgray', 'orange', 'red'][priority || 0]
81
81
  const href =
82
82
  type == 'activity-thread'
83
- ? `activity-thread-view/${id}?title=${name}`
83
+ ? `activity-thread/${id}?title=${name}`
84
84
  : `activity-approval/${id}?title=${name}`
85
85
  const at = new Date(date).toLocaleTimeString([], {
86
86
  hourCycle: 'h23',
@@ -354,6 +354,6 @@ export class DoneListPage extends connect(store)(localize(i18next)(PageView)) {
354
354
  }
355
355
 
356
356
  openActivityThreadViewPage(activityThread) {
357
- navigate(`activity-thread-view/${activityThread.id}?title=${activityThread.name}`)
357
+ navigate(`activity-thread/${activityThread.id}?title=${activityThread.name}`)
358
358
  }
359
359
  }
@@ -26,8 +26,7 @@ let ActivityInstanceRibon = class ActivityInstanceRibon extends localize(i18next
26
26
  ></activity-instance-context-template>`
27
27
  });
28
28
  }}
29
- >description</mwc-icon
30
- >
29
+ >description</mwc-icon>
31
30
  ${description}
32
31
  </div>
33
32
  ${startingType == 'issue' && assignee
@@ -133,6 +132,7 @@ ActivityInstanceRibon.styles = [
133
132
  [state] {
134
133
  text-align: right;
135
134
  font-size: var(--fontsize-small);
135
+ font-weight:bold;
136
136
  }
137
137
 
138
138
  @media only screen and (max-width: 460px) {
@@ -1 +1 @@
1
- {"version":3,"file":"activity-instance-ribon.js","sourceRoot":"","sources":["../../client/components/activity-instance-ribon.ts"],"names":[],"mappings":";AAAA,OAAO,sBAAsB,CAAA;AAC7B,OAAO,wDAAwD,CAAA;AAC/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xD,CAAA;IACH,CAAC;IAED,OAAO,CAAC,OAAO;QACb,IAAI,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,EAAE;YACnC,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,gBAAgB,CAAA;YAEvC,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;SAClC;IACH,CAAC;;AAhJM,4BAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAmGF;CACF,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;+DAA2B;AAxG3C,qBAAqB;IADjC,aAAa,CAAC,yBAAyB,CAAC;GAC5B,qBAAqB,CAkJjC;SAlJY,qBAAqB","sourcesContent":["import '@material/mwc-button'\nimport '@operato/property-editor/ox-properties-dynamic-view.js'\nimport '@things-factory/organization/dist-client/component/approval-line-brief.js'\nimport '../templates/activity-instance-context-template.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { toggleOverlay } from '@operato/layout'\n\n@customElement('activity-instance-ribon')\nexport class ActivityInstanceRibon extends localize(i18next)(LitElement) {\n static styles = [\n css`\n :host {\n display: flex;\n background-color: var(--worklist-status-color);\n color: var(--theme-white-color);\n align-items: center;\n min-height: 44px;\n --fontsize-small: 12px;\n }\n\n div {\n border-left: var(--border-dark-color);\n padding: var(--padding-narrow) var(--padding-default);\n align-self: center;\n }\n\n :host([state='draft']) {\n --worklist-status-color: #5f7184;\n }\n\n :host([state='issued']) {\n --worklist-status-color: #56af45;\n }\n\n :host([state='pending-assignment']) {\n --worklist-status-color: #8654b0;\n }\n\n :host([state='assigned']) {\n --worklist-status-color: #428df3;\n }\n\n :host([state='started']) {\n --worklist-status-color: #595de5;\n }\n\n :host([state='pending']) {\n --worklist-status-color: #f27429;\n }\n\n :host([state='ended']) {\n --worklist-status-color: #02acae;\n }\n\n :host([state='aborted']) {\n --worklist-status-color: #cb3a33;\n }\n\n mwc-icon {\n font-size: 24px;\n }\n\n [desc] {\n flex: 2;\n font-size: var(--fontsize-small);\n }\n\n [desc] * {\n vertical-align: middle;\n }\n\n [assignee] {\n text-align: center;\n font-size: var(--fontsize-small);\n line-height: 1.3;\n }\n\n [assignee] span {\n display: block;\n font-size: var(--fontsize-large);\n font-weight: bold;\n }\n\n approval-line-brief {\n background-color: var(--worklist-status-color);\n flex: 2;\n font-size: var(--fontsize-small);\n }\n\n [state] {\n text-align: right;\n font-size: var(--fontsize-small);\n }\n\n @media only screen and (max-width: 460px) {\n :host {\n flex-direction: column;\n }\n div {\n border-left: none;\n border-bottom: var(--border-dark-color);\n }\n [assignee] {\n display: none;\n }\n mwc-icon {\n padding: 0;\n }\n }\n `\n ]\n\n @property({ type: Object }) activityInstance: any = {}\n\n render() {\n const { description, state, assignee, approvalLine, activity } = this.activityInstance || {}\n const { startingType } = activity || {}\n\n return html`\n <div desc>\n <mwc-icon\n @click=${() => {\n toggleOverlay('activity-info-overlay', {\n template: html`<activity-instance-context-template\n .activityInstance=${this.activityInstance}\n state=${state}\n ></activity-instance-context-template>`\n })\n }}\n >description</mwc-icon\n >\n ${description}\n </div>\n ${startingType == 'issue' && assignee\n ? html`\n <div assignee>\n ${i18next.t('field.assignee')}\n <span>${assignee?.name}&nbsp;</span>\n </div>\n `\n : html``}\n ${approvalLine ? html`<approval-line-brief .model=${approvalLine}></approval-line-brief>` : html``}\n\n <div state>${i18next.t('label.activity-state-' + state)}</div>\n `\n }\n\n updated(changes) {\n if (changes.has('activityInstance')) {\n const { state } = this.activityInstance\n\n this.setAttribute('state', state)\n }\n }\n}\n"]}
1
+ {"version":3,"file":"activity-instance-ribon.js","sourceRoot":"","sources":["../../client/components/activity-instance-ribon.ts"],"names":[],"mappings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BAErF,OAAO,CAAC,CAAC,CAAC,uBAAuB,GAAG,KAAK,CAAC;KACxD,CAAA;IACH,CAAC;IAED,OAAO,CAAC,OAAO;QACb,IAAI,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,EAAE;YACnC,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,gBAAgB,CAAA;YAEvC,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;SAClC;IACH,CAAC;;AAhJM,4BAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoGF;CACF,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;+DAA2B;AAzG3C,qBAAqB;IADjC,aAAa,CAAC,yBAAyB,CAAC;GAC5B,qBAAqB,CAkJjC;SAlJY,qBAAqB","sourcesContent":["import '@material/mwc-button'\nimport '@operato/property-editor/ox-properties-dynamic-view.js'\nimport '@things-factory/organization/dist-client/component/approval-line-brief.js'\nimport '../templates/activity-instance-context-template.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { toggleOverlay } from '@operato/layout'\n\n@customElement('activity-instance-ribon')\nexport class ActivityInstanceRibon extends localize(i18next)(LitElement) {\n static styles = [\n css`\n :host {\n display: flex;\n background-color: var(--worklist-status-color);\n color: var(--theme-white-color);\n align-items: center;\n min-height: 44px;\n --fontsize-small: 12px;\n }\n\n div {\n border-left: var(--border-dark-color);\n padding: var(--padding-narrow) var(--padding-default);\n align-self: center;\n }\n\n :host([state='draft']) {\n --worklist-status-color: #5f7184;\n }\n\n :host([state='issued']) {\n --worklist-status-color: #56af45;\n }\n\n :host([state='pending-assignment']) {\n --worklist-status-color: #8654b0;\n }\n\n :host([state='assigned']) {\n --worklist-status-color: #428df3;\n }\n\n :host([state='started']) {\n --worklist-status-color: #595de5;\n }\n\n :host([state='pending']) {\n --worklist-status-color: #f27429;\n }\n\n :host([state='ended']) {\n --worklist-status-color: #02acae;\n }\n\n :host([state='aborted']) {\n --worklist-status-color: #cb3a33;\n }\n\n mwc-icon {\n font-size: 24px;\n }\n\n [desc] {\n flex: 2;\n font-size: var(--fontsize-small);\n }\n\n [desc] * {\n vertical-align: middle;\n }\n\n [assignee] {\n text-align: center;\n font-size: var(--fontsize-small);\n line-height: 1.3;\n }\n\n [assignee] span {\n display: block;\n font-size: var(--fontsize-large);\n font-weight: bold;\n }\n\n approval-line-brief {\n background-color: var(--worklist-status-color);\n flex: 2;\n font-size: var(--fontsize-small);\n }\n\n [state] {\n text-align: right;\n font-size: var(--fontsize-small);\n font-weight:bold;\n }\n\n @media only screen and (max-width: 460px) {\n :host {\n flex-direction: column;\n }\n div {\n border-left: none;\n border-bottom: var(--border-dark-color);\n }\n [assignee] {\n display: none;\n }\n mwc-icon {\n padding: 0;\n }\n }\n `\n ]\n\n @property({ type: Object }) activityInstance: any = {}\n\n render() {\n const { description, state, assignee, approvalLine, activity } = this.activityInstance || {}\n const { startingType } = activity || {}\n\n return html`\n <div desc>\n <mwc-icon\n @click=${() => {\n toggleOverlay('activity-info-overlay', {\n template: html`<activity-instance-context-template\n .activityInstance=${this.activityInstance}\n state=${state}\n ></activity-instance-context-template>`\n })\n }}\n >description</mwc-icon>\n ${description}\n </div>\n ${startingType == 'issue' && assignee\n ? html`\n <div assignee>\n ${i18next.t('field.assignee')}\n <span>${assignee?.name}&nbsp;</span>\n </div>\n `\n : html``}\n ${approvalLine ? html`<approval-line-brief .model=${approvalLine}></approval-line-brief>` : html``}\n\n <div state>${i18next.t('label.activity-state-' + state)}</div>\n `\n }\n\n updated(changes) {\n if (changes.has('activityInstance')) {\n const { state } = this.activityInstance\n\n this.setAttribute('state', state)\n }\n }\n}\n"]}
@@ -23,7 +23,7 @@ let ActivityStarterForm = class ActivityStarterForm extends localize(i18next)(Li
23
23
  var { name, description } = this.activityInstance;
24
24
  return html `
25
25
  <content>
26
- <div>
26
+ <div desc>
27
27
  <span
28
28
  >업무의 타이틀과 설명을 작성해서 초안저장을 클릭하시면, 업무 초안이 생성되고 편집할 수 있는 페이지로
29
29
  이동합니다.</span
@@ -199,7 +199,7 @@ ActivityStarterForm.styles = [
199
199
  display: flex;
200
200
  flex-direction: column;
201
201
 
202
- background-color: #fff;
202
+ background-color: var(--main-section-background-color);
203
203
  }
204
204
 
205
205
  content {
@@ -214,10 +214,23 @@ ActivityStarterForm.styles = [
214
214
  content > div {
215
215
  display: flex;
216
216
  flex-direction: column;
217
+ color: var(--secondary-color);
218
+ }
219
+
220
+ content label{
221
+ font:var(--label-font)
222
+ }
223
+ content input, content textarea{
224
+ border-radius:var(--border-radius);
225
+ border:var(--border-dark-color);
226
+ padding:var(--input-padding);
227
+ margin:var(--input-margin);
228
+ font:var(--input-font);
217
229
  }
218
230
 
219
- content span {
220
- color: navy;
231
+ content [desc]{
232
+ color: var(--secondary-text-color);
233
+ font-size:0.9em
221
234
  }
222
235
 
223
236
  #description {
@@ -1 +1 @@
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,EA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C,MAAM,CAAC;YACnC,QAAQ,EAAE,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCZ;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;;AAzOM,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,CA2O/B;SA3OY,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 output\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"]}
1
+ {"version":3,"file":"activity-starter-form.js","sourceRoot":"","sources":["../../client/components/activity-starter-form.ts"],"names":[],"mappings":";AAAA,OAAO,2BAA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AAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uDAAoB;AAE/C;IAAC,KAAK,EAAE;;qDAAmB;AAC3B;IAAC,KAAK,EAAE;;6DAA2B;AA7DxB,mBAAmB;IAD/B,aAAa,CAAC,uBAAuB,CAAC;GAC1B,mBAAmB,CAwP/B;SAxPY,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: var(--main-section-background-color);\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 color: var(--secondary-color);\n }\n\n content label{\n font:var(--label-font)\n }\n content input, content textarea{\n border-radius:var(--border-radius);\n border:var(--border-dark-color);\n padding:var(--input-padding);\n margin:var(--input-margin);\n font:var(--input-font);\n }\n\n content [desc]{\n color: var(--secondary-text-color);\n font-size:0.9em\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 desc>\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 output\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"]}
@@ -1,3 +1,4 @@
1
+ import '@things-factory/organization/dist-client/component/approval-line-view.js';
1
2
  import { LitElement } from 'lit';
2
3
  import { ActivityInstance } from '../../types/activity-instance';
3
4
  import { ActivityThread } from '../../types/activity-thread';