@things-factory/worklist 6.1.52 → 6.1.54
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 +11 -1
- package/client/components/activity-instance-ribon.ts +233 -0
- package/client/pages/activity-instance/activity-instance-start-page.ts +9 -108
- package/client/templates/activity-instance-context-template.ts +132 -26
- package/dist-client/bootstrap.js +11 -2
- package/dist-client/bootstrap.js.map +1 -1
- package/dist-client/components/activity-instance-ribon.d.ts +12 -0
- package/dist-client/components/activity-instance-ribon.js +224 -0
- package/dist-client/components/activity-instance-ribon.js.map +1 -0
- package/dist-client/pages/activity-instance/activity-instance-start-page.d.ts +4 -3
- package/dist-client/pages/activity-instance/activity-instance-start-page.js +5 -103
- package/dist-client/pages/activity-instance/activity-instance-start-page.js.map +1 -1
- package/dist-client/templates/activity-instance-context-template.js +132 -26
- package/dist-client/templates/activity-instance-context-template.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
package/client/bootstrap.ts
CHANGED
|
@@ -5,7 +5,7 @@ import './templates/activity-instance-context-template.js'
|
|
|
5
5
|
|
|
6
6
|
import { html } from 'lit-html'
|
|
7
7
|
import { store } from '@operato/shell'
|
|
8
|
-
import { openOverlay, TOOL_POSITION } from '@operato/layout'
|
|
8
|
+
import { appendViewpart, openOverlay, TOOL_POSITION, VIEWPART_POSITION } from '@operato/layout'
|
|
9
9
|
import { APPEND_CONTEXT_TOOL } from '@things-factory/context-ui'
|
|
10
10
|
|
|
11
11
|
import { registerEditor as registerGristEditor, registerRenderer as registerGristRenderer } from '@operato/data-grist'
|
|
@@ -17,6 +17,16 @@ import { GristEditorActivitySearchKeys } from './grist-editor/grist-editor-activ
|
|
|
17
17
|
import { GristRendererActivitySearchKeys } from './grist-editor/grist-renderer-activity-search-key.js'
|
|
18
18
|
|
|
19
19
|
export default function bootstrap() {
|
|
20
|
+
appendViewpart({
|
|
21
|
+
name: 'activity-info-overlay',
|
|
22
|
+
viewpart: {
|
|
23
|
+
show: false,
|
|
24
|
+
hovering: 'edge',
|
|
25
|
+
backdrop: true,
|
|
26
|
+
template: html``
|
|
27
|
+
},
|
|
28
|
+
position: VIEWPART_POSITION.ASIDEBAR
|
|
29
|
+
})
|
|
20
30
|
;[
|
|
21
31
|
{
|
|
22
32
|
template: html` <activity-approval-context-template></activity-approval-context-template> `,
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import '@material/mwc-button'
|
|
2
|
+
import '@operato/property-editor/ox-properties-dynamic-view.js'
|
|
3
|
+
import '../templates/activity-instance-context-template.js'
|
|
4
|
+
|
|
5
|
+
import { css, html, LitElement } from 'lit'
|
|
6
|
+
import { customElement, property, state } from 'lit/decorators.js'
|
|
7
|
+
|
|
8
|
+
import { i18next, localize } from '@operato/i18n'
|
|
9
|
+
import { toggleOverlay } from '@operato/layout'
|
|
10
|
+
|
|
11
|
+
@customElement('activity-instance-ribon')
|
|
12
|
+
export class ActivityInstanceRibon extends localize(i18next)(LitElement) {
|
|
13
|
+
static styles = [
|
|
14
|
+
css`
|
|
15
|
+
:host {
|
|
16
|
+
display: flex;
|
|
17
|
+
background-color: var(--worklist-status-color);
|
|
18
|
+
color: var(--theme-white-color);
|
|
19
|
+
--fontsize-small: 12px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
div {
|
|
23
|
+
border-left: var(--border-dark-color);
|
|
24
|
+
padding: var(--padding-narrow) var(--padding-default);
|
|
25
|
+
align-self: center;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:host([state='draft']) {
|
|
29
|
+
--worklist-status-color: #5f7184;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:host([state='issued']) {
|
|
33
|
+
--worklist-status-color: #56af45;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:host([state='pending-assignment']) {
|
|
37
|
+
--worklist-status-color: #8654b0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:host([state='assigned']) {
|
|
41
|
+
--worklist-status-color: #428df3;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:host([state='started']) {
|
|
45
|
+
--worklist-status-color: #595de5;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:host([state='pending']) {
|
|
49
|
+
--worklist-status-color: #f27429;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:host([state='ended']) {
|
|
53
|
+
--worklist-status-color: #02acae;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:host([state='aborted']) {
|
|
57
|
+
--worklist-status-color: #cb3a33;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
mwc-icon {
|
|
61
|
+
font-size: 24px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
[desc],
|
|
65
|
+
[flow] {
|
|
66
|
+
flex: 2;
|
|
67
|
+
font-size: var(--fontsize-small);
|
|
68
|
+
}
|
|
69
|
+
[desc] * {
|
|
70
|
+
vertical-align: middle;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
[assignee] {
|
|
74
|
+
text-align: center;
|
|
75
|
+
font-size: var(--fontsize-small);
|
|
76
|
+
line-height: 1.3;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
[assignee] span {
|
|
80
|
+
display: block;
|
|
81
|
+
font-size: var(--fontsize-large);
|
|
82
|
+
font-weight: bold;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
[flow] ul {
|
|
86
|
+
list-style: none;
|
|
87
|
+
margin: 0;
|
|
88
|
+
padding: 0;
|
|
89
|
+
display: flex;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
[flow] li {
|
|
93
|
+
width: 85px;
|
|
94
|
+
text-align: center;
|
|
95
|
+
color: rgba(255, 255, 255, 0.7);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
[flow] span:before {
|
|
99
|
+
content: '';
|
|
100
|
+
height: 2px;
|
|
101
|
+
width: 70px;
|
|
102
|
+
display: block;
|
|
103
|
+
position: absolute;
|
|
104
|
+
margin-left: -70px;
|
|
105
|
+
margin-top: 6px;
|
|
106
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
[flow] span {
|
|
110
|
+
display: block;
|
|
111
|
+
width: 15px;
|
|
112
|
+
height: 15px;
|
|
113
|
+
margin: auto;
|
|
114
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
115
|
+
border-radius: 50%;
|
|
116
|
+
color: var(--theme-white-color);
|
|
117
|
+
line-height: 1.2;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
[flow] [past] span {
|
|
121
|
+
background-color: rgba(255, 255, 255, 0.9);
|
|
122
|
+
color: var(--primary-text-color);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
[flow] [now] span {
|
|
126
|
+
background-color: #84d600;
|
|
127
|
+
color: var(--theme-white-color);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
[flow] [now] {
|
|
131
|
+
font-weight: bold;
|
|
132
|
+
color: var(--theme-white-color);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
[flow] [past] span:before,
|
|
136
|
+
[flow] [now] span:before {
|
|
137
|
+
background-color: rgba(255, 255, 255, 0.9);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
[flow] li:first-child span:before {
|
|
141
|
+
display: none;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
@media only screen and (max-width: 460px) {
|
|
145
|
+
:host {
|
|
146
|
+
flex-direction: column;
|
|
147
|
+
}
|
|
148
|
+
div {
|
|
149
|
+
border-left: none;
|
|
150
|
+
border-bottom: var(--border-dark-color);
|
|
151
|
+
}
|
|
152
|
+
[assignee] {
|
|
153
|
+
display: none;
|
|
154
|
+
}
|
|
155
|
+
mwc-icon {
|
|
156
|
+
padding: 0;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
`
|
|
160
|
+
]
|
|
161
|
+
|
|
162
|
+
@property({ type: Object }) activityInstance: any = {}
|
|
163
|
+
// @property({ type: Array }) activityThreads: any
|
|
164
|
+
|
|
165
|
+
// @state() picked: boolean = false
|
|
166
|
+
|
|
167
|
+
render() {
|
|
168
|
+
const {
|
|
169
|
+
id,
|
|
170
|
+
name,
|
|
171
|
+
description,
|
|
172
|
+
input,
|
|
173
|
+
state,
|
|
174
|
+
assignee,
|
|
175
|
+
threadsMin = 0,
|
|
176
|
+
threadsMax = 0,
|
|
177
|
+
activity
|
|
178
|
+
} = this.activityInstance || {}
|
|
179
|
+
const { startingType, model, thumbnail } = activity || {}
|
|
180
|
+
|
|
181
|
+
// const inputSpec = (model || [])
|
|
182
|
+
// .filter(item => item.inout === 'in' || item.inout === 'inout')
|
|
183
|
+
// .map(item => {
|
|
184
|
+
// return {
|
|
185
|
+
// ...item,
|
|
186
|
+
// label: item.name
|
|
187
|
+
// }
|
|
188
|
+
// })
|
|
189
|
+
|
|
190
|
+
// const pickable = !this.picked && this.activityThreads?.length < threadsMax
|
|
191
|
+
|
|
192
|
+
return html`
|
|
193
|
+
<div desc>
|
|
194
|
+
<mwc-icon
|
|
195
|
+
@click=${() => {
|
|
196
|
+
toggleOverlay('activity-info-overlay', {
|
|
197
|
+
template: html`<activity-instance-context-template
|
|
198
|
+
.activityInstance=${this.activityInstance}
|
|
199
|
+
state=${state}
|
|
200
|
+
></activity-instance-context-template>`
|
|
201
|
+
})
|
|
202
|
+
}}
|
|
203
|
+
>description</mwc-icon
|
|
204
|
+
>
|
|
205
|
+
${description}
|
|
206
|
+
</div>
|
|
207
|
+
${startingType == 'issue'
|
|
208
|
+
? html`
|
|
209
|
+
<div assignee>
|
|
210
|
+
${i18next.t('label.assignee')}
|
|
211
|
+
<span>${assignee?.name}</span>
|
|
212
|
+
</div>
|
|
213
|
+
`
|
|
214
|
+
: html``}
|
|
215
|
+
|
|
216
|
+
<div flow>
|
|
217
|
+
<ul>
|
|
218
|
+
<li past><span>1</span>myself</li>
|
|
219
|
+
<li now><span>2</span>경리실장</li>
|
|
220
|
+
<li><span>3</span>사장님</li>
|
|
221
|
+
</ul>
|
|
222
|
+
</div>
|
|
223
|
+
`
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
updated(changes) {
|
|
227
|
+
if (changes.has('activityInstance')) {
|
|
228
|
+
const { state } = this.activityInstance
|
|
229
|
+
|
|
230
|
+
this.setAttribute('state', state)
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import '@operato/property-editor/ox-properties-dynamic-view.js'
|
|
2
2
|
import '@operato/board/ox-board-viewer.js'
|
|
3
3
|
import '@things-factory/organization'
|
|
4
|
+
import '../../components/activity-instance-ribon.js'
|
|
4
5
|
|
|
5
6
|
import gql from 'graphql-tag'
|
|
6
7
|
import { css, html } from 'lit'
|
|
@@ -35,88 +36,6 @@ export class ActivityInstanceStartPage extends connect(store)(localize(i18next)(
|
|
|
35
36
|
#custom-content {
|
|
36
37
|
flex: 1;
|
|
37
38
|
}
|
|
38
|
-
[worklist-summary]{
|
|
39
|
-
display:flex;
|
|
40
|
-
padding:0 var(--padding-default);
|
|
41
|
-
color:var(--theme-white-color)
|
|
42
|
-
}
|
|
43
|
-
[worklist-summary] div{
|
|
44
|
-
border-left:var(--border-dark-color);
|
|
45
|
-
padding:var(--padding-narrow) var(--padding-default)
|
|
46
|
-
}
|
|
47
|
-
[assigned]{
|
|
48
|
-
background-color:#599B4D;
|
|
49
|
-
}
|
|
50
|
-
[submitted]{
|
|
51
|
-
background-color:#4B8BE1;
|
|
52
|
-
}
|
|
53
|
-
[rejected]{
|
|
54
|
-
background-color:#CB3A33;
|
|
55
|
-
}
|
|
56
|
-
[worklist-summary] mwc-icon{
|
|
57
|
-
padding:var(--padding-default) var(--padding-default) 0 0;
|
|
58
|
-
font-size: 24px;
|
|
59
|
-
}
|
|
60
|
-
[worklist-summary] [desc]{
|
|
61
|
-
font-size:var(--fontsize-small)
|
|
62
|
-
}
|
|
63
|
-
[worklist-summary] [assignee]{
|
|
64
|
-
text-align:center;
|
|
65
|
-
font-size:var(--fontsize-small);
|
|
66
|
-
line-height:1.3;
|
|
67
|
-
}
|
|
68
|
-
[assignee] span{
|
|
69
|
-
display:block;
|
|
70
|
-
font-size:var(--fontsize-large);
|
|
71
|
-
font-weight:bold
|
|
72
|
-
}
|
|
73
|
-
[flow] ul{
|
|
74
|
-
list-style:none;
|
|
75
|
-
margin:0;padding:0;
|
|
76
|
-
display:flex;
|
|
77
|
-
}
|
|
78
|
-
[flow] li{
|
|
79
|
-
width:85px;
|
|
80
|
-
text-align:center;
|
|
81
|
-
font-size:var(--fontsize-small);
|
|
82
|
-
}
|
|
83
|
-
[flow] span:before{
|
|
84
|
-
content: "";
|
|
85
|
-
height: 2px;
|
|
86
|
-
width: 70px;
|
|
87
|
-
display: block;
|
|
88
|
-
position: absolute;
|
|
89
|
-
margin-left: -70px;
|
|
90
|
-
margin-top: 6px;
|
|
91
|
-
background-color: rgba(0, 0, 0,.4);
|
|
92
|
-
}
|
|
93
|
-
[flow] span{
|
|
94
|
-
display:block;
|
|
95
|
-
width: 15px;
|
|
96
|
-
height: 15px;
|
|
97
|
-
margin:auto;
|
|
98
|
-
background-color: rgba(0, 0, 0,.4);
|
|
99
|
-
border-radius: 50%;
|
|
100
|
-
color:var(--theme-white-color);
|
|
101
|
-
line-height:1.2
|
|
102
|
-
}
|
|
103
|
-
[flow] [past] span{
|
|
104
|
-
background-color: rgba(255, 255, 255,.9);
|
|
105
|
-
color:var(--primary-text-color)
|
|
106
|
-
}
|
|
107
|
-
[flow] [now] span{
|
|
108
|
-
background-color: #84D600;
|
|
109
|
-
color:var(--theme-white-color);
|
|
110
|
-
}
|
|
111
|
-
[flow] [now]{
|
|
112
|
-
font-weight:bold
|
|
113
|
-
}
|
|
114
|
-
[flow] [past] span:before,[flow] [now] span:before{
|
|
115
|
-
background-color: rgba(255, 255, 255,.9);
|
|
116
|
-
}
|
|
117
|
-
[flow] li:first-child span:before{
|
|
118
|
-
display:none
|
|
119
|
-
}
|
|
120
39
|
`
|
|
121
40
|
]
|
|
122
41
|
|
|
@@ -153,28 +72,11 @@ export class ActivityInstanceStartPage extends connect(store)(localize(i18next)(
|
|
|
153
72
|
}
|
|
154
73
|
|
|
155
74
|
render() {
|
|
156
|
-
return html`
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
assigned, submitted, rejected 스타일 작성해놨음
|
|
162
|
-
</div>
|
|
163
|
-
|
|
164
|
-
<div assignee>
|
|
165
|
-
assignee
|
|
166
|
-
<span>홍길동</span>
|
|
167
|
-
</div>
|
|
168
|
-
|
|
169
|
-
<div flow>
|
|
170
|
-
<ul>
|
|
171
|
-
<li past><span>1</span>myself</li>
|
|
172
|
-
<li now><span>2</span>경리실장</li>
|
|
173
|
-
<li><span>3</span>사장님</li>
|
|
174
|
-
</ul>
|
|
175
|
-
</div>
|
|
176
|
-
</div>
|
|
177
|
-
${this.activityContent()}`
|
|
75
|
+
return html`
|
|
76
|
+
<activity-instance-ribon .activityInstance=${this.activityInstance}></activity-instance-ribon>
|
|
77
|
+
|
|
78
|
+
${this.activityContent()}
|
|
79
|
+
`
|
|
178
80
|
}
|
|
179
81
|
|
|
180
82
|
activityContent() {
|
|
@@ -300,7 +202,7 @@ export class ActivityInstanceStartPage extends connect(store)(localize(i18next)(
|
|
|
300
202
|
customElementContent() {
|
|
301
203
|
const { uiSource: tagName, input, output } = this.activityInstance
|
|
302
204
|
|
|
303
|
-
if(!this.customHtmlElement){
|
|
205
|
+
if (!this.customHtmlElement) {
|
|
304
206
|
const element = document.createElement(tagName)
|
|
305
207
|
element.id = 'custom-content'
|
|
306
208
|
element.activityId = this.activityInstance.activity.id
|
|
@@ -313,7 +215,7 @@ export class ActivityInstanceStartPage extends connect(store)(localize(i18next)(
|
|
|
313
215
|
element.addEventListener('change-output', (e: CustomEvent) => {
|
|
314
216
|
this.activityInstance.output = e.detail
|
|
315
217
|
})
|
|
316
|
-
|
|
218
|
+
|
|
317
219
|
/* DEPRECATED 일반적으로 output만 수정될 가능성이 높기때문에, change 이벤트는 output을 수정하는 것으로 한다. */
|
|
318
220
|
element.addEventListener('change', (e: CustomEvent) => {
|
|
319
221
|
this.activityInstance.output = e.detail
|
|
@@ -322,7 +224,6 @@ export class ActivityInstanceStartPage extends connect(store)(localize(i18next)(
|
|
|
322
224
|
this.customHtmlElement = element
|
|
323
225
|
}
|
|
324
226
|
|
|
325
|
-
|
|
326
227
|
return this.customHtmlElement
|
|
327
228
|
}
|
|
328
229
|
|
|
@@ -354,7 +255,7 @@ export class ActivityInstanceStartPage extends connect(store)(localize(i18next)(
|
|
|
354
255
|
if (this.active) {
|
|
355
256
|
this.fetchActivityInstance(lifecycle.resourceId)
|
|
356
257
|
} else {
|
|
357
|
-
this.customHtmlElement = undefined
|
|
258
|
+
this.customHtmlElement = undefined
|
|
358
259
|
}
|
|
359
260
|
}
|
|
360
261
|
|
|
@@ -20,15 +20,120 @@ class ActivityInstanceContextTemplate extends connect(store)(LitElement) {
|
|
|
20
20
|
ContextToolbarOverlayStyle,
|
|
21
21
|
css`
|
|
22
22
|
:host {
|
|
23
|
-
background-color: white;
|
|
24
|
-
|
|
23
|
+
background-color: var(--theme-white-color);
|
|
25
24
|
width: 100%;
|
|
26
|
-
|
|
25
|
+
min-width:450px;
|
|
27
26
|
overflow: auto;
|
|
27
|
+
--context-ui-padding:0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:host([state='draft']) {
|
|
31
|
+
--worklist-status-color: #5f7184;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:host([state='issued']) {
|
|
35
|
+
--worklist-status-color: #56af45;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:host([state='pending-assignment']) {
|
|
39
|
+
--worklist-status-color: #8654b0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:host([state='assigned']) {
|
|
43
|
+
--worklist-status-color: #428df3;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:host([state='started']) {
|
|
47
|
+
--worklist-status-color: #595de5;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:host([state='pending']) {
|
|
51
|
+
--worklist-status-color: #f27429;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:host([state='ended']) {
|
|
55
|
+
--worklist-status-color: #02acae;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:host([state='aborted']) {
|
|
59
|
+
--worklist-status-color: #cb3a33;
|
|
60
|
+
}
|
|
61
|
+
[info], [assignees]{
|
|
62
|
+
padding:var(--padding-default);
|
|
63
|
+
border-bottom:var(--border-dark-color);
|
|
64
|
+
color:var(--secondary-color)
|
|
65
|
+
}
|
|
66
|
+
[info] div{
|
|
67
|
+
padding:var(--padding-narrow);
|
|
68
|
+
border-radius:var(--border-radius);
|
|
69
|
+
text-align:right;
|
|
70
|
+
clear:both;
|
|
71
|
+
overflow: hidden;
|
|
72
|
+
}
|
|
73
|
+
[info] div *{
|
|
74
|
+
vertical-align:middle;
|
|
75
|
+
}
|
|
76
|
+
[info] div:nth-child(odd){
|
|
77
|
+
background-color:var(--main-section-background-color);
|
|
78
|
+
}
|
|
79
|
+
[info] label{
|
|
80
|
+
display:inline-block;
|
|
81
|
+
width:25%;
|
|
82
|
+
float:left;
|
|
83
|
+
text-align:left;
|
|
84
|
+
}
|
|
85
|
+
[info] span{
|
|
86
|
+
width:15px;
|
|
87
|
+
height:15px;
|
|
88
|
+
background-color:var(--worklist-status-color, tomato);
|
|
89
|
+
display:inline-block;
|
|
90
|
+
border-radius:50%;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
:host:before {
|
|
94
|
+
content: '';
|
|
95
|
+
position: absolute;
|
|
96
|
+
width: 0;
|
|
97
|
+
height: 0;
|
|
98
|
+
border: 22px solid transparent;
|
|
99
|
+
border-left-color: var(--worklist-status-color);
|
|
100
|
+
border-right: 0;
|
|
101
|
+
}
|
|
102
|
+
section{
|
|
103
|
+
padding:var(--padding-default);
|
|
104
|
+
color:var(--secondary-color)
|
|
105
|
+
}
|
|
106
|
+
section label{
|
|
107
|
+
display:inline-block;
|
|
108
|
+
width:25%;
|
|
109
|
+
margin-top:var(--margin-default);
|
|
110
|
+
}
|
|
111
|
+
[assignees]{
|
|
112
|
+
text-align:right;
|
|
113
|
+
clear:both;
|
|
114
|
+
overflow: hidden;
|
|
115
|
+
}
|
|
116
|
+
[assignees] label{
|
|
117
|
+
display:inline-block;
|
|
118
|
+
padding-left: var(--padding-narrow);
|
|
119
|
+
width:25%;
|
|
120
|
+
float:left;
|
|
121
|
+
text-align:left;
|
|
122
|
+
}
|
|
123
|
+
[assignees] mwc-icon-button{
|
|
124
|
+
float:right
|
|
125
|
+
}
|
|
126
|
+
section input{
|
|
127
|
+
display:inline-block;
|
|
128
|
+
width:70%;
|
|
129
|
+
border:var(--border-dark-color);
|
|
130
|
+
border-width:0 0 1px 0;
|
|
131
|
+
margin-top:var(--margin-default);
|
|
132
|
+
font-size:var(--fontsize-large);
|
|
28
133
|
}
|
|
29
134
|
|
|
30
135
|
img {
|
|
31
|
-
max-width:
|
|
136
|
+
max-width: 85%;
|
|
32
137
|
}
|
|
33
138
|
`
|
|
34
139
|
]
|
|
@@ -54,13 +159,28 @@ class ActivityInstanceContextTemplate extends connect(store)(LitElement) {
|
|
|
54
159
|
const editable = state == 'draft'
|
|
55
160
|
|
|
56
161
|
return html`
|
|
57
|
-
<div>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
162
|
+
<div flow>
|
|
163
|
+
${approvalLine
|
|
164
|
+
? html`
|
|
165
|
+
<approval-line-view
|
|
166
|
+
.model=${approvalLine}
|
|
167
|
+
@click=${() => this.onClickApprovalLine(activityInstance)}
|
|
168
|
+
@change=${e => (activityInstance.approvalLine = e.currentTarget.value)}
|
|
169
|
+
></approval-line-view>
|
|
170
|
+
`
|
|
171
|
+
: html`<mwc-icon-button
|
|
172
|
+
icon="group_add"
|
|
173
|
+
@click=${() => this.onClickApprovalLine(activityInstance)}
|
|
174
|
+
></mwc-icon-button>`}
|
|
175
|
+
</div>
|
|
176
|
+
|
|
177
|
+
<div info>
|
|
178
|
+
<div><label>name</label> <strong>${name}</strong></div>
|
|
179
|
+
<div><label>description</label> ${description}</div>
|
|
180
|
+
<div><label>state</label> <span></span> <strong>${state}</strong></div>
|
|
181
|
+
<div><label>assigned at</label> ${assignedAt && formatter.format(new Date(assignedAt))}</div>
|
|
182
|
+
<div><label>due at</label> ${dueAt && formatter.format(new Date(dueAt))}</div>
|
|
183
|
+
<div><label>started at</label> ${startedAt && formatter.format(new Date(startedAt))}</div>
|
|
64
184
|
</div>
|
|
65
185
|
|
|
66
186
|
<div>
|
|
@@ -80,21 +200,7 @@ class ActivityInstanceContextTemplate extends connect(store)(LitElement) {
|
|
|
80
200
|
></mwc-icon-button>`}
|
|
81
201
|
</div>
|
|
82
202
|
|
|
83
|
-
|
|
84
|
-
<label>Approval Line</label>
|
|
85
|
-
${approvalLine
|
|
86
|
-
? html`
|
|
87
|
-
<approval-line-view
|
|
88
|
-
.model=${approvalLine}
|
|
89
|
-
@click=${() => this.onClickApprovalLine(activityInstance)}
|
|
90
|
-
@change=${e => (activityInstance.approvalLine = e.currentTarget.value)}
|
|
91
|
-
></approval-line-view>
|
|
92
|
-
`
|
|
93
|
-
: html`<mwc-icon-button
|
|
94
|
-
icon="group_add"
|
|
95
|
-
@click=${() => this.onClickApprovalLine(activityInstance)}
|
|
96
|
-
></mwc-icon-button>`}
|
|
97
|
-
</div>
|
|
203
|
+
|
|
98
204
|
|
|
99
205
|
<section>
|
|
100
206
|
<label for="threads-min">Threads Min</label>
|
package/dist-client/bootstrap.js
CHANGED
|
@@ -4,7 +4,7 @@ import './templates/activity-thread-context-template.js';
|
|
|
4
4
|
import './templates/activity-instance-context-template.js';
|
|
5
5
|
import { html } from 'lit-html';
|
|
6
6
|
import { store } from '@operato/shell';
|
|
7
|
-
import { openOverlay, TOOL_POSITION } from '@operato/layout';
|
|
7
|
+
import { appendViewpart, openOverlay, TOOL_POSITION, VIEWPART_POSITION } from '@operato/layout';
|
|
8
8
|
import { APPEND_CONTEXT_TOOL } from '@things-factory/context-ui';
|
|
9
9
|
import { registerEditor as registerGristEditor, registerRenderer as registerGristRenderer } from '@operato/data-grist';
|
|
10
10
|
import { OxGristEditorDuration } from '@operato/grist-editor/ox-grist-editor-duration.js';
|
|
@@ -14,7 +14,16 @@ import { OxGristRendererQuantifier } from '@operato/grist-editor/ox-grist-render
|
|
|
14
14
|
import { GristEditorActivitySearchKeys } from './grist-editor/grist-editor-activity-search-key.js';
|
|
15
15
|
import { GristRendererActivitySearchKeys } from './grist-editor/grist-renderer-activity-search-key.js';
|
|
16
16
|
export default function bootstrap() {
|
|
17
|
-
|
|
17
|
+
appendViewpart({
|
|
18
|
+
name: 'activity-info-overlay',
|
|
19
|
+
viewpart: {
|
|
20
|
+
show: false,
|
|
21
|
+
hovering: 'edge',
|
|
22
|
+
backdrop: true,
|
|
23
|
+
template: html ``
|
|
24
|
+
},
|
|
25
|
+
position: VIEWPART_POSITION.ASIDEBAR
|
|
26
|
+
});
|
|
18
27
|
[
|
|
19
28
|
{
|
|
20
29
|
template: html ` <activity-approval-context-template></activity-approval-context-template> `,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../client/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAA;AAC3B,OAAO,mDAAmD,CAAA;AAC1D,OAAO,iDAAiD,CAAA;AACxD,OAAO,mDAAmD,CAAA;AAE1D,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACtC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../client/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAA;AAC3B,OAAO,mDAAmD,CAAA;AAC1D,OAAO,iDAAiD,CAAA;AACxD,OAAO,mDAAmD,CAAA;AAE1D,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACtC,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAC/F,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAEhE,OAAO,EAAE,cAAc,IAAI,mBAAmB,EAAE,gBAAgB,IAAI,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AACtH,OAAO,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAA;AACzF,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAA;AAC7F,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAA;AAC7F,OAAO,EAAE,yBAAyB,EAAE,MAAM,uDAAuD,CAAA;AACjG,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAA;AAClG,OAAO,EAAE,+BAA+B,EAAE,MAAM,sDAAsD,CAAA;AAEtG,MAAM,CAAC,OAAO,UAAU,SAAS;IAC/B,cAAc,CAAC;QACb,IAAI,EAAE,uBAAuB;QAC7B,QAAQ,EAAE;YACR,IAAI,EAAE,KAAK;YACX,QAAQ,EAAE,MAAM;YAChB,QAAQ,EAAE,IAAI;YACd,QAAQ,EAAE,IAAI,CAAA,EAAE;SACjB;QACD,QAAQ,EAAE,iBAAiB,CAAC,QAAQ;KACrC,CAAC,CACD;IAAA;QACC;YACE,QAAQ,EAAE,IAAI,CAAA,6EAA6E;YAC3F,OAAO,EAAE,kBAAkB;SAC5B;QACD;YACE,QAAQ,EAAE,IAAI,CAAA,yEAAyE;YACvF,OAAO,EAAE,gBAAgB;SAC1B;QACD;YACE,QAAQ,EAAE,IAAI,CAAA,6EAA6E;YAC3F,OAAO,EAAE,kBAAkB;SAC5B;KACF,CAAC,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAClC,KAAK,CAAC,QAAQ,CAAC;YACb,IAAI,EAAE,mBAAmB;YACzB,IAAI,EAAE;gBACJ,QAAQ,EAAE,aAAa,CAAC,KAAK;gBAC7B,QAAQ,EAAE,IAAI,CAAA;;qBAED,KAAK,EAAC,CAAC,EAAC,EAAE;oBACjB,WAAW,CAAC,yBAAyB,EAAE;wBACrC,QAAQ;qBACT,CAAC,CAAA;gBACJ,CAAC;;;SAGJ;gBACD,OAAO;aACR;SACF,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,mBAAmB,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAA;IACtD,qBAAqB,CAAC,UAAU,EAAE,uBAAuB,CAAC,CAAA;IAC1D,mBAAmB,CAAC,YAAY,EAAE,uBAAuB,CAAC,CAAA;IAC1D,qBAAqB,CAAC,YAAY,EAAE,yBAAyB,CAAC,CAAA;IAE9D,mBAAmB,CAAC,sBAAsB,EAAE,6BAA6B,CAAC,CAAA;IAC1E,qBAAqB,CAAC,sBAAsB,EAAE,+BAA+B,CAAC,CAAA;AAChF,CAAC","sourcesContent":["import '@material/mwc-icon'\nimport './templates/activity-approval-context-template.js'\nimport './templates/activity-thread-context-template.js'\nimport './templates/activity-instance-context-template.js'\n\nimport { html } from 'lit-html'\nimport { store } from '@operato/shell'\nimport { appendViewpart, openOverlay, TOOL_POSITION, VIEWPART_POSITION } from '@operato/layout'\nimport { APPEND_CONTEXT_TOOL } from '@things-factory/context-ui'\n\nimport { registerEditor as registerGristEditor, registerRenderer as registerGristRenderer } from '@operato/data-grist'\nimport { OxGristEditorDuration } from '@operato/grist-editor/ox-grist-editor-duration.js'\nimport { OxGristEditorQuantifier } from '@operato/grist-editor/ox-grist-editor-quantifier.js'\nimport { OxGristRendererDuration } from '@operato/grist-editor/ox-grist-renderer-duration.js'\nimport { OxGristRendererQuantifier } from '@operato/grist-editor/ox-grist-renderer-quantifier.js'\nimport { GristEditorActivitySearchKeys } from './grist-editor/grist-editor-activity-search-key.js'\nimport { GristRendererActivitySearchKeys } from './grist-editor/grist-renderer-activity-search-key.js'\n\nexport default function bootstrap() {\n appendViewpart({\n name: 'activity-info-overlay',\n viewpart: {\n show: false,\n hovering: 'edge',\n backdrop: true,\n template: html``\n },\n position: VIEWPART_POSITION.ASIDEBAR\n })\n ;[\n {\n template: html` <activity-approval-context-template></activity-approval-context-template> `,\n context: 'activityApproval'\n },\n {\n template: html` <activity-thread-context-template></activity-thread-context-template> `,\n context: 'activityThread'\n },\n {\n template: html` <activity-instance-context-template></activity-instance-context-template> `,\n context: 'activityInstance'\n }\n ].forEach(({ template, context }) => {\n store.dispatch({\n type: APPEND_CONTEXT_TOOL,\n tool: {\n position: TOOL_POSITION.FRONT,\n template: html`\n <mwc-icon\n @click=${async e => {\n openOverlay('context-toolbar-overlay', {\n template\n })\n }}\n >info</mwc-icon\n >\n `,\n context\n }\n })\n })\n\n registerGristEditor('duration', OxGristEditorDuration)\n registerGristRenderer('duration', OxGristRendererDuration)\n registerGristEditor('quantifier', OxGristEditorQuantifier)\n registerGristRenderer('quantifier', OxGristRendererQuantifier)\n\n registerGristEditor('activity-search-keys', GristEditorActivitySearchKeys)\n registerGristRenderer('activity-search-keys', GristRendererActivitySearchKeys)\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import '@material/mwc-button';
|
|
2
|
+
import '@operato/property-editor/ox-properties-dynamic-view.js';
|
|
3
|
+
import '../templates/activity-instance-context-template.js';
|
|
4
|
+
import { LitElement } from 'lit';
|
|
5
|
+
declare const ActivityInstanceRibon_base: (new (...args: any[]) => LitElement) & typeof LitElement;
|
|
6
|
+
export declare class ActivityInstanceRibon extends ActivityInstanceRibon_base {
|
|
7
|
+
static styles: import("lit").CSSResult[];
|
|
8
|
+
activityInstance: any;
|
|
9
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
10
|
+
updated(changes: any): void;
|
|
11
|
+
}
|
|
12
|
+
export {};
|