@things-factory/worklist 6.1.53 → 6.1.55
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/components/activity-instance-ribon.ts +68 -42
- package/client/pages/activity-instance/activity-instance-start-page.ts +1 -4
- package/client/templates/activity-instance-context-template.ts +132 -26
- package/dist-client/components/activity-instance-ribon.d.ts +0 -1
- package/dist-client/components/activity-instance-ribon.js +54 -42
- package/dist-client/components/activity-instance-ribon.js.map +1 -1
- package/dist-client/pages/activity-instance/activity-instance-start-page.js +1 -4
- package/dist-client/pages/activity-instance/activity-instance-start-page.js.map +1 -1
- package/dist-client/route.d.ts +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/dist-server/middlewares/index.js +8 -0
- package/dist-server/middlewares/index.js.map +1 -0
- package/dist-server/migrations/index.js +12 -0
- package/dist-server/migrations/index.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -14,57 +14,61 @@ export class ActivityInstanceRibon extends localize(i18next)(LitElement) {
|
|
|
14
14
|
css`
|
|
15
15
|
:host {
|
|
16
16
|
display: flex;
|
|
17
|
-
|
|
18
|
-
padding: 0 var(--padding-default);
|
|
19
|
-
|
|
17
|
+
background-color: var(--worklist-status-color);
|
|
20
18
|
color: var(--theme-white-color);
|
|
19
|
+
--fontsize-small: 12px;
|
|
21
20
|
}
|
|
22
21
|
|
|
23
22
|
div {
|
|
24
23
|
border-left: var(--border-dark-color);
|
|
25
24
|
padding: var(--padding-narrow) var(--padding-default);
|
|
25
|
+
align-self: center;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
:host([state='draft']) {
|
|
29
|
-
|
|
29
|
+
--worklist-status-color: #5f7184;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
:host([state='issued']) {
|
|
33
|
-
|
|
33
|
+
--worklist-status-color: #56af45;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
:host([state='pending-assignment']) {
|
|
37
|
-
|
|
37
|
+
--worklist-status-color: #8654b0;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
:host([state='assigned']) {
|
|
41
|
-
|
|
41
|
+
--worklist-status-color: #428df3;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
:host([state='started']) {
|
|
45
|
-
|
|
45
|
+
--worklist-status-color: #595de5;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
:host([state='pending']) {
|
|
49
|
-
|
|
49
|
+
--worklist-status-color: #f27429;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
:host([state='ended']) {
|
|
53
|
-
|
|
53
|
+
--worklist-status-color: #02acae;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
:host([state='aborted']) {
|
|
57
|
-
|
|
57
|
+
--worklist-status-color: #cb3a33;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
mwc-icon {
|
|
61
|
-
padding: var(--padding-default) var(--padding-default) 0 0;
|
|
62
61
|
font-size: 24px;
|
|
63
62
|
}
|
|
64
63
|
|
|
65
|
-
[desc]
|
|
64
|
+
[desc],
|
|
65
|
+
[flow] {
|
|
66
|
+
flex: 2;
|
|
66
67
|
font-size: var(--fontsize-small);
|
|
67
68
|
}
|
|
69
|
+
[desc] * {
|
|
70
|
+
vertical-align: middle;
|
|
71
|
+
}
|
|
68
72
|
|
|
69
73
|
[assignee] {
|
|
70
74
|
text-align: center;
|
|
@@ -88,7 +92,7 @@ export class ActivityInstanceRibon extends localize(i18next)(LitElement) {
|
|
|
88
92
|
[flow] li {
|
|
89
93
|
width: 85px;
|
|
90
94
|
text-align: center;
|
|
91
|
-
|
|
95
|
+
color: rgba(255, 255, 255, 0.7);
|
|
92
96
|
}
|
|
93
97
|
|
|
94
98
|
[flow] span:before {
|
|
@@ -125,6 +129,7 @@ export class ActivityInstanceRibon extends localize(i18next)(LitElement) {
|
|
|
125
129
|
|
|
126
130
|
[flow] [now] {
|
|
127
131
|
font-weight: bold;
|
|
132
|
+
color: var(--theme-white-color);
|
|
128
133
|
}
|
|
129
134
|
|
|
130
135
|
[flow] [past] span:before,
|
|
@@ -135,27 +140,43 @@ export class ActivityInstanceRibon extends localize(i18next)(LitElement) {
|
|
|
135
140
|
[flow] li:first-child span:before {
|
|
136
141
|
display: none;
|
|
137
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
|
+
}
|
|
138
159
|
`
|
|
139
160
|
]
|
|
140
161
|
|
|
141
|
-
@property({ type: Object }) activity: any = {}
|
|
142
162
|
@property({ type: Object }) activityInstance: any = {}
|
|
143
163
|
// @property({ type: Array }) activityThreads: any
|
|
144
164
|
|
|
145
165
|
// @state() picked: boolean = false
|
|
146
166
|
|
|
147
167
|
render() {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
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 || {}
|
|
159
180
|
|
|
160
181
|
// const inputSpec = (model || [])
|
|
161
182
|
// .filter(item => item.inout === 'in' || item.inout === 'inout')
|
|
@@ -169,23 +190,28 @@ export class ActivityInstanceRibon extends localize(i18next)(LitElement) {
|
|
|
169
190
|
// const pickable = !this.picked && this.activityThreads?.length < threadsMax
|
|
170
191
|
|
|
171
192
|
return html`
|
|
172
|
-
<
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
<div assignee>
|
|
186
|
-
assignee
|
|
187
|
-
<span>홍길동</span>
|
|
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}
|
|
188
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``}
|
|
189
215
|
|
|
190
216
|
<div flow>
|
|
191
217
|
<ul>
|
|
@@ -73,10 +73,7 @@ export class ActivityInstanceStartPage extends connect(store)(localize(i18next)(
|
|
|
73
73
|
|
|
74
74
|
render() {
|
|
75
75
|
return html`
|
|
76
|
-
<activity-instance-ribon
|
|
77
|
-
.activity=${this.activity}
|
|
78
|
-
.activityInstance=${this.activityInstance}
|
|
79
|
-
></activity-instance-ribon>
|
|
76
|
+
<activity-instance-ribon .activityInstance=${this.activityInstance}></activity-instance-ribon>
|
|
80
77
|
|
|
81
78
|
${this.activityContent()}
|
|
82
79
|
`
|
|
@@ -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>
|
|
@@ -5,7 +5,6 @@ import { LitElement } from 'lit';
|
|
|
5
5
|
declare const ActivityInstanceRibon_base: (new (...args: any[]) => LitElement) & typeof LitElement;
|
|
6
6
|
export declare class ActivityInstanceRibon extends ActivityInstanceRibon_base {
|
|
7
7
|
static styles: import("lit").CSSResult[];
|
|
8
|
-
activity: any;
|
|
9
8
|
activityInstance: any;
|
|
10
9
|
render(): import("lit-html").TemplateResult<1>;
|
|
11
10
|
updated(changes: any): void;
|
|
@@ -9,23 +9,13 @@ import { toggleOverlay } from '@operato/layout';
|
|
|
9
9
|
let ActivityInstanceRibon = class ActivityInstanceRibon extends localize(i18next)(LitElement) {
|
|
10
10
|
constructor() {
|
|
11
11
|
super(...arguments);
|
|
12
|
-
this.activity = {};
|
|
13
12
|
this.activityInstance = {};
|
|
14
13
|
}
|
|
15
14
|
// @property({ type: Array }) activityThreads: any
|
|
16
15
|
// @state() picked: boolean = false
|
|
17
16
|
render() {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
// name,
|
|
21
|
-
// description,
|
|
22
|
-
// input,
|
|
23
|
-
// state,
|
|
24
|
-
// threadsMin = 0,
|
|
25
|
-
// threadsMax = 0,
|
|
26
|
-
// activity
|
|
27
|
-
// } = this.activityInstance || {}
|
|
28
|
-
// const { model, thumbnail } = activity || {}
|
|
17
|
+
const { id, name, description, input, state, assignee, threadsMin = 0, threadsMax = 0, activity } = this.activityInstance || {};
|
|
18
|
+
const { startingType, model, thumbnail } = activity || {};
|
|
29
19
|
// const inputSpec = (model || [])
|
|
30
20
|
// .filter(item => item.inout === 'in' || item.inout === 'inout')
|
|
31
21
|
// .map(item => {
|
|
@@ -36,23 +26,28 @@ let ActivityInstanceRibon = class ActivityInstanceRibon extends localize(i18next
|
|
|
36
26
|
// })
|
|
37
27
|
// const pickable = !this.picked && this.activityThreads?.length < threadsMax
|
|
38
28
|
return html `
|
|
39
|
-
<
|
|
40
|
-
|
|
29
|
+
<div desc>
|
|
30
|
+
<mwc-icon
|
|
31
|
+
@click=${() => {
|
|
41
32
|
toggleOverlay('activity-info-overlay', {
|
|
42
33
|
template: html `<activity-instance-context-template
|
|
43
|
-
|
|
44
|
-
|
|
34
|
+
.activityInstance=${this.activityInstance}
|
|
35
|
+
state=${state}
|
|
36
|
+
></activity-instance-context-template>`
|
|
45
37
|
});
|
|
46
38
|
}}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
<div desc>assigned, submitted, rejected 스타일 작성해놨음</div>
|
|
51
|
-
|
|
52
|
-
<div assignee>
|
|
53
|
-
assignee
|
|
54
|
-
<span>홍길동</span>
|
|
39
|
+
>description</mwc-icon
|
|
40
|
+
>
|
|
41
|
+
${description}
|
|
55
42
|
</div>
|
|
43
|
+
${startingType == 'issue'
|
|
44
|
+
? html `
|
|
45
|
+
<div assignee>
|
|
46
|
+
${i18next.t('label.assignee')}
|
|
47
|
+
<span>${assignee === null || assignee === void 0 ? void 0 : assignee.name}</span>
|
|
48
|
+
</div>
|
|
49
|
+
`
|
|
50
|
+
: html ``}
|
|
56
51
|
|
|
57
52
|
<div flow>
|
|
58
53
|
<ul>
|
|
@@ -74,57 +69,61 @@ ActivityInstanceRibon.styles = [
|
|
|
74
69
|
css `
|
|
75
70
|
:host {
|
|
76
71
|
display: flex;
|
|
77
|
-
|
|
78
|
-
padding: 0 var(--padding-default);
|
|
79
|
-
|
|
72
|
+
background-color: var(--worklist-status-color);
|
|
80
73
|
color: var(--theme-white-color);
|
|
74
|
+
--fontsize-small: 12px;
|
|
81
75
|
}
|
|
82
76
|
|
|
83
77
|
div {
|
|
84
78
|
border-left: var(--border-dark-color);
|
|
85
79
|
padding: var(--padding-narrow) var(--padding-default);
|
|
80
|
+
align-self: center;
|
|
86
81
|
}
|
|
87
82
|
|
|
88
83
|
:host([state='draft']) {
|
|
89
|
-
|
|
84
|
+
--worklist-status-color: #5f7184;
|
|
90
85
|
}
|
|
91
86
|
|
|
92
87
|
:host([state='issued']) {
|
|
93
|
-
|
|
88
|
+
--worklist-status-color: #56af45;
|
|
94
89
|
}
|
|
95
90
|
|
|
96
91
|
:host([state='pending-assignment']) {
|
|
97
|
-
|
|
92
|
+
--worklist-status-color: #8654b0;
|
|
98
93
|
}
|
|
99
94
|
|
|
100
95
|
:host([state='assigned']) {
|
|
101
|
-
|
|
96
|
+
--worklist-status-color: #428df3;
|
|
102
97
|
}
|
|
103
98
|
|
|
104
99
|
:host([state='started']) {
|
|
105
|
-
|
|
100
|
+
--worklist-status-color: #595de5;
|
|
106
101
|
}
|
|
107
102
|
|
|
108
103
|
:host([state='pending']) {
|
|
109
|
-
|
|
104
|
+
--worklist-status-color: #f27429;
|
|
110
105
|
}
|
|
111
106
|
|
|
112
107
|
:host([state='ended']) {
|
|
113
|
-
|
|
108
|
+
--worklist-status-color: #02acae;
|
|
114
109
|
}
|
|
115
110
|
|
|
116
111
|
:host([state='aborted']) {
|
|
117
|
-
|
|
112
|
+
--worklist-status-color: #cb3a33;
|
|
118
113
|
}
|
|
119
114
|
|
|
120
115
|
mwc-icon {
|
|
121
|
-
padding: var(--padding-default) var(--padding-default) 0 0;
|
|
122
116
|
font-size: 24px;
|
|
123
117
|
}
|
|
124
118
|
|
|
125
|
-
[desc]
|
|
119
|
+
[desc],
|
|
120
|
+
[flow] {
|
|
121
|
+
flex: 2;
|
|
126
122
|
font-size: var(--fontsize-small);
|
|
127
123
|
}
|
|
124
|
+
[desc] * {
|
|
125
|
+
vertical-align: middle;
|
|
126
|
+
}
|
|
128
127
|
|
|
129
128
|
[assignee] {
|
|
130
129
|
text-align: center;
|
|
@@ -148,7 +147,7 @@ ActivityInstanceRibon.styles = [
|
|
|
148
147
|
[flow] li {
|
|
149
148
|
width: 85px;
|
|
150
149
|
text-align: center;
|
|
151
|
-
|
|
150
|
+
color: rgba(255, 255, 255, 0.7);
|
|
152
151
|
}
|
|
153
152
|
|
|
154
153
|
[flow] span:before {
|
|
@@ -185,6 +184,7 @@ ActivityInstanceRibon.styles = [
|
|
|
185
184
|
|
|
186
185
|
[flow] [now] {
|
|
187
186
|
font-weight: bold;
|
|
187
|
+
color: var(--theme-white-color);
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
[flow] [past] span:before,
|
|
@@ -195,12 +195,24 @@ ActivityInstanceRibon.styles = [
|
|
|
195
195
|
[flow] li:first-child span:before {
|
|
196
196
|
display: none;
|
|
197
197
|
}
|
|
198
|
+
|
|
199
|
+
@media only screen and (max-width: 460px) {
|
|
200
|
+
:host {
|
|
201
|
+
flex-direction: column;
|
|
202
|
+
}
|
|
203
|
+
div {
|
|
204
|
+
border-left: none;
|
|
205
|
+
border-bottom: var(--border-dark-color);
|
|
206
|
+
}
|
|
207
|
+
[assignee] {
|
|
208
|
+
display: none;
|
|
209
|
+
}
|
|
210
|
+
mwc-icon {
|
|
211
|
+
padding: 0;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
198
214
|
`
|
|
199
215
|
];
|
|
200
|
-
__decorate([
|
|
201
|
-
property({ type: Object }),
|
|
202
|
-
__metadata("design:type", Object)
|
|
203
|
-
], ActivityInstanceRibon.prototype, "activity", void 0);
|
|
204
216
|
__decorate([
|
|
205
217
|
property({ type: Object }),
|
|
206
218
|
__metadata("design:type", Object)
|
|
@@ -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/D,OAAO,oDAAoD,CAAA;AAE3D,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAS,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAGxC,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IAAjE;;
|
|
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/D,OAAO,oDAAoD,CAAA;AAE3D,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAS,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAGxC,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IAAjE;;QAsJuB,qBAAgB,GAAQ,EAAE,CAAA;IAuExD,CAAC;IAtEC,kDAAkD;IAElD,mCAAmC;IAEnC,MAAM;QACJ,MAAM,EACJ,EAAE,EACF,IAAI,EACJ,WAAW,EACX,KAAK,EACL,KAAK,EACL,QAAQ,EACR,UAAU,GAAG,CAAC,EACd,UAAU,GAAG,CAAC,EACd,QAAQ,EACT,GAAG,IAAI,CAAC,gBAAgB,IAAI,EAAE,CAAA;QAC/B,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,QAAQ,IAAI,EAAE,CAAA;QAEzD,kCAAkC;QAClC,mEAAmE;QACnE,mBAAmB;QACnB,eAAe;QACf,iBAAiB;QACjB,yBAAyB;QACzB,QAAQ;QACR,OAAO;QAEP,6EAA6E;QAE7E,OAAO,IAAI,CAAA;;;mBAGI,GAAG,EAAE;YACZ,aAAa,CAAC,uBAAuB,EAAE;gBACrC,QAAQ,EAAE,IAAI,CAAA;oCACQ,IAAI,CAAC,gBAAgB;wBACjC,KAAK;qDACwB;aACxC,CAAC,CAAA;QACJ,CAAC;;;UAGD,WAAW;;QAEb,YAAY,IAAI,OAAO;YACvB,CAAC,CAAC,IAAI,CAAA;;gBAEE,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC;sBACrB,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI;;WAEzB;YACH,CAAC,CAAC,IAAI,CAAA,EAAE;;;;;;;;;KASX,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;;AA3NM,4BAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiJF;CACF,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;+DAA2B;AAtJ3C,qBAAqB;IADjC,aAAa,CAAC,yBAAyB,CAAC;GAC5B,qBAAqB,CA6NjC;SA7NY,qBAAqB","sourcesContent":["import '@material/mwc-button'\nimport '@operato/property-editor/ox-properties-dynamic-view.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 --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 [flow] {\n flex: 2;\n font-size: var(--fontsize-small);\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 [flow] ul {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n }\n\n [flow] li {\n width: 85px;\n text-align: center;\n color: rgba(255, 255, 255, 0.7);\n }\n\n [flow] span:before {\n content: '';\n height: 2px;\n width: 70px;\n display: block;\n position: absolute;\n margin-left: -70px;\n margin-top: 6px;\n background-color: rgba(0, 0, 0, 0.4);\n }\n\n [flow] span {\n display: block;\n width: 15px;\n height: 15px;\n margin: auto;\n background-color: rgba(0, 0, 0, 0.4);\n border-radius: 50%;\n color: var(--theme-white-color);\n line-height: 1.2;\n }\n\n [flow] [past] span {\n background-color: rgba(255, 255, 255, 0.9);\n color: var(--primary-text-color);\n }\n\n [flow] [now] span {\n background-color: #84d600;\n color: var(--theme-white-color);\n }\n\n [flow] [now] {\n font-weight: bold;\n color: var(--theme-white-color);\n }\n\n [flow] [past] span:before,\n [flow] [now] span:before {\n background-color: rgba(255, 255, 255, 0.9);\n }\n\n [flow] li:first-child span:before {\n display: none;\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 // @property({ type: Array }) activityThreads: any\n\n // @state() picked: boolean = false\n\n render() {\n const {\n id,\n name,\n description,\n input,\n state,\n assignee,\n threadsMin = 0,\n threadsMax = 0,\n activity\n } = this.activityInstance || {}\n const { startingType, model, thumbnail } = 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 // const pickable = !this.picked && this.activityThreads?.length < threadsMax\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'\n ? html`\n <div assignee>\n ${i18next.t('label.assignee')}\n <span>${assignee?.name}</span>\n </div>\n `\n : html``}\n\n <div flow>\n <ul>\n <li past><span>1</span>myself</li>\n <li now><span>2</span>경리실장</li>\n <li><span>3</span>사장님</li>\n </ul>\n </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"]}
|
|
@@ -38,10 +38,7 @@ let ActivityInstanceStartPage = class ActivityInstanceStartPage extends connect(
|
|
|
38
38
|
}
|
|
39
39
|
render() {
|
|
40
40
|
return html `
|
|
41
|
-
<activity-instance-ribon
|
|
42
|
-
.activity=${this.activity}
|
|
43
|
-
.activityInstance=${this.activityInstance}
|
|
44
|
-
></activity-instance-ribon>
|
|
41
|
+
<activity-instance-ribon .activityInstance=${this.activityInstance}></activity-instance-ribon>
|
|
45
42
|
|
|
46
43
|
${this.activityContent()}
|
|
47
44
|
`;
|