@things-factory/worklist 6.2.96 → 6.2.97
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-approval-timeline.ts +149 -0
- package/client/pages/activity-approval/activity-approval-page.ts +37 -134
- package/client/pages/activity-thread/activity-thread-page.ts +11 -3
- package/client/pages/activity-thread/activity-thread-view-page.ts +15 -8
- package/client/pages/activity-thread/activity-thread-view.ts +6 -114
- package/client/templates/activity-approval-context-template.ts +8 -13
- package/client/templates/activity-instance-context-template.ts +16 -18
- package/client/templates/activity-thread-context-template.ts +47 -157
- package/dist-client/components/activity-approval-timeline.d.ts +18 -0
- package/dist-client/components/activity-approval-timeline.js +145 -0
- package/dist-client/components/activity-approval-timeline.js.map +1 -0
- package/dist-client/pages/activity-approval/activity-approval-page.d.ts +1 -2
- package/dist-client/pages/activity-approval/activity-approval-page.js +36 -129
- package/dist-client/pages/activity-approval/activity-approval-page.js.map +1 -1
- package/dist-client/pages/activity-thread/activity-thread-page.js +10 -3
- package/dist-client/pages/activity-thread/activity-thread-page.js.map +1 -1
- package/dist-client/pages/activity-thread/activity-thread-view-page.d.ts +1 -0
- package/dist-client/pages/activity-thread/activity-thread-view-page.js +13 -4
- package/dist-client/pages/activity-thread/activity-thread-view-page.js.map +1 -1
- package/dist-client/pages/activity-thread/activity-thread-view.d.ts +0 -2
- package/dist-client/pages/activity-thread/activity-thread-view.js +6 -101
- package/dist-client/pages/activity-thread/activity-thread-view.js.map +1 -1
- package/dist-client/templates/activity-approval-context-template.d.ts +1 -0
- package/dist-client/templates/activity-approval-context-template.js +8 -13
- package/dist-client/templates/activity-approval-context-template.js.map +1 -1
- package/dist-client/templates/activity-instance-context-template.js +15 -16
- package/dist-client/templates/activity-instance-context-template.js.map +1 -1
- package/dist-client/templates/activity-thread-context-template.d.ts +1 -0
- package/dist-client/templates/activity-thread-context-template.js +46 -151
- package/dist-client/templates/activity-thread-context-template.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -23,6 +23,7 @@ class ActivityInstanceContextTemplate extends connect(store)(LitElement) {
|
|
|
23
23
|
background-color: var(--theme-white-color);
|
|
24
24
|
width: 100%;
|
|
25
25
|
min-width: 450px;
|
|
26
|
+
max-height: 100%;
|
|
26
27
|
overflow: auto;
|
|
27
28
|
--context-ui-padding: 0;
|
|
28
29
|
}
|
|
@@ -59,6 +60,16 @@ class ActivityInstanceContextTemplate extends connect(store)(LitElement) {
|
|
|
59
60
|
--worklist-status-color: #cb3a33;
|
|
60
61
|
}
|
|
61
62
|
|
|
63
|
+
:host:before {
|
|
64
|
+
content: '';
|
|
65
|
+
position: absolute;
|
|
66
|
+
width: 0;
|
|
67
|
+
height: 0;
|
|
68
|
+
border: 22px solid transparent;
|
|
69
|
+
border-left-color: var(--worklist-status-color);
|
|
70
|
+
border-right: 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
62
73
|
[info],
|
|
63
74
|
[assignees] {
|
|
64
75
|
padding: var(--padding-default);
|
|
@@ -162,8 +173,7 @@ class ActivityInstanceContextTemplate extends connect(store)(LitElement) {
|
|
|
162
173
|
|
|
163
174
|
render() {
|
|
164
175
|
const activityInstance = this.context.activityInstance || this.activityInstance || {}
|
|
165
|
-
const { activity, name, description, state, assignees, approvalLine, assignedAt, startedAt, dueAt, thumbnail } =
|
|
166
|
-
activityInstance || {}
|
|
176
|
+
const { activity, name, description, state, assignees, approvalLine, assignedAt, startedAt, dueAt, thumbnail } = activityInstance || {}
|
|
167
177
|
const { startingType } = activity || {}
|
|
168
178
|
|
|
169
179
|
// const editable = state == 'draft'
|
|
@@ -178,23 +188,14 @@ class ActivityInstanceContextTemplate extends connect(store)(LitElement) {
|
|
|
178
188
|
@change=${e => (activityInstance.approvalLine = e.currentTarget.value)}
|
|
179
189
|
></approval-line-view>
|
|
180
190
|
`
|
|
181
|
-
: html`<mwc-icon-button
|
|
182
|
-
icon="group_add"
|
|
183
|
-
@click=${() => this.onClickApprovalLine(activityInstance)}
|
|
184
|
-
></mwc-icon-button>`}
|
|
191
|
+
: html`<mwc-icon-button icon="group_add" @click=${() => this.onClickApprovalLine(activityInstance)}></mwc-icon-button>`}
|
|
185
192
|
</div>
|
|
186
193
|
|
|
187
194
|
<div info>
|
|
188
195
|
<div><label>${i18next.t('field.name')}</label> <strong>${name}</strong></div>
|
|
189
196
|
<div><label>${i18next.t('field.description')}</label> ${description}</div>
|
|
190
|
-
<div>
|
|
191
|
-
|
|
192
|
-
>${i18next.t('label.activity-state-' + state)}</strong
|
|
193
|
-
>
|
|
194
|
-
</div>
|
|
195
|
-
<div>
|
|
196
|
-
<label>${i18next.t('field.assigned-at')}</label> ${assignedAt && formatter.format(new Date(assignedAt))}
|
|
197
|
-
</div>
|
|
197
|
+
<div><label>${i18next.t('field.status')}</label> <span></span> <strong>${i18next.t('label.activity-state-' + state)}</strong></div>
|
|
198
|
+
<div><label>${i18next.t('field.assigned-at')}</label> ${assignedAt && formatter.format(new Date(assignedAt))}</div>
|
|
198
199
|
<div><label>${i18next.t('field.due-at')}</label> ${dueAt && formatter.format(new Date(dueAt))}</div>
|
|
199
200
|
<div><label>${i18next.t('field.started-at')}</label> ${startedAt && formatter.format(new Date(startedAt))}</div>
|
|
200
201
|
</div>
|
|
@@ -211,10 +212,7 @@ class ActivityInstanceContextTemplate extends connect(store)(LitElement) {
|
|
|
211
212
|
@change=${e => (activityInstance.assignees = e.currentTarget.value)}
|
|
212
213
|
></assignees-view>
|
|
213
214
|
`
|
|
214
|
-
: html`<mwc-icon-button
|
|
215
|
-
icon="group_add"
|
|
216
|
-
@click=${() => this.onClickAssignees(activityInstance)}
|
|
217
|
-
></mwc-icon-button>`}
|
|
215
|
+
: html`<mwc-icon-button icon="group_add" @click=${() => this.onClickAssignees(activityInstance)}></mwc-icon-button>`}
|
|
218
216
|
</div>
|
|
219
217
|
</div>`
|
|
220
218
|
: html``}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '@material/mwc-icon'
|
|
2
2
|
import '@things-factory/organization/dist-client/component/approval-line-view.js'
|
|
3
|
+
import '../components/activity-approval-timeline'
|
|
3
4
|
|
|
4
5
|
import { html, css, LitElement, nothing } from 'lit'
|
|
5
6
|
import { customElement, property, state } from 'lit/decorators.js'
|
|
@@ -10,8 +11,6 @@ import { ContextToolbarOverlayStyle } from '@operato/context/ox-context-toolbar-
|
|
|
10
11
|
import { store } from '@operato/shell'
|
|
11
12
|
import { i18next } from '@operato/i18n'
|
|
12
13
|
|
|
13
|
-
import { ActivityApproval } from '../types/activity-approval'
|
|
14
|
-
|
|
15
14
|
const formatter = new Intl.DateTimeFormat(navigator.language, { dateStyle: 'full', timeStyle: 'short' })
|
|
16
15
|
|
|
17
16
|
@customElement('activity-thread-context-template')
|
|
@@ -23,6 +22,7 @@ class ActivityThreadContextTemplate extends connect(store)(LitElement) {
|
|
|
23
22
|
background-color: var(--theme-white-color);
|
|
24
23
|
width: 100%;
|
|
25
24
|
min-width: 450px;
|
|
25
|
+
max-height: 100%;
|
|
26
26
|
overflow: auto;
|
|
27
27
|
--context-ui-padding: 0;
|
|
28
28
|
}
|
|
@@ -59,121 +59,49 @@ class ActivityThreadContextTemplate extends connect(store)(LitElement) {
|
|
|
59
59
|
--worklist-status-color: #cb3a33;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
:host:before {
|
|
63
|
+
content: '';
|
|
64
|
+
position: absolute;
|
|
65
|
+
width: 0;
|
|
66
|
+
height: 0;
|
|
67
|
+
border: 22px solid transparent;
|
|
68
|
+
border-left-color: var(--worklist-status-color);
|
|
69
|
+
border-right: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
div[info] {
|
|
64
73
|
padding: var(--padding-default);
|
|
65
74
|
border-bottom: var(--border-dark-color);
|
|
66
75
|
color: var(--secondary-color);
|
|
67
|
-
}
|
|
68
76
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
div[timeline] {
|
|
99
|
-
margin-bottom: var(--margin-default);
|
|
100
|
-
padding: var(--padding-default);
|
|
101
|
-
}
|
|
102
|
-
div[timeline] [subtitle] {
|
|
103
|
-
padding: var(--padding-narrow) var(--padding-default);
|
|
104
|
-
background-color: var(--theme-white-color);
|
|
105
|
-
border: 2px solid var(--secondary-text-color);
|
|
106
|
-
border-radius: 15px;
|
|
107
|
-
box-shadow: var(--box-shadow);
|
|
108
|
-
color: var(--secondary-text-color);
|
|
109
|
-
font-weight: bold;
|
|
110
|
-
}
|
|
111
|
-
div[timeline] ol {
|
|
112
|
-
list-style: none;
|
|
113
|
-
margin: var(--margin-default) 0 0 var(--margin-narrow);
|
|
114
|
-
padding: 0;
|
|
115
|
-
}
|
|
116
|
-
[timeline] li {
|
|
117
|
-
display: flex;
|
|
118
|
-
border: none;
|
|
119
|
-
}
|
|
120
|
-
[timeline] [info] {
|
|
121
|
-
flex: 1;
|
|
122
|
-
color: initial;
|
|
123
|
-
}
|
|
124
|
-
[timeline] [date] {
|
|
125
|
-
opacity: 0.7;
|
|
126
|
-
flex: initial;
|
|
127
|
-
width: 130px;
|
|
128
|
-
font-size: var(--fontsize-small);
|
|
129
|
-
color: var(--primary-text-color);
|
|
130
|
-
}
|
|
131
|
-
[timeline] [info] strong {
|
|
132
|
-
float: right;
|
|
133
|
-
}
|
|
134
|
-
[timeline] [status] {
|
|
135
|
-
margin: 0 var(--margin-narrow);
|
|
136
|
-
display: block;
|
|
137
|
-
border-radius: 50%;
|
|
138
|
-
flex: initial;
|
|
139
|
-
width: 12px;
|
|
140
|
-
height: 12px;
|
|
141
|
-
position: relative;
|
|
142
|
-
top: 3px;
|
|
143
|
-
border: 2px solid #fff;
|
|
144
|
-
background-color: var(--worklist-status-color, tomato);
|
|
145
|
-
color: var(--primary-text-color);
|
|
146
|
-
}
|
|
147
|
-
[timeline] [status]::before {
|
|
148
|
-
content: '';
|
|
149
|
-
height: 60px;
|
|
150
|
-
width: 2px;
|
|
151
|
-
display: block;
|
|
152
|
-
position: relative;
|
|
153
|
-
margin-left: 5px;
|
|
154
|
-
background-color: var(--worklist-status-color, tomato);
|
|
155
|
-
opacity: 0.2;
|
|
156
|
-
}
|
|
157
|
-
[timeline] [info] mwc-icon {
|
|
158
|
-
position: relative;
|
|
159
|
-
top: 3px;
|
|
160
|
-
font-size: var(--fontsize-large);
|
|
161
|
-
}
|
|
162
|
-
[timeline] [info] p {
|
|
163
|
-
background-color: #f4f4f4;
|
|
164
|
-
margin: var(--margin-narrow) 0 var(--margin-default) 0;
|
|
165
|
-
padding: var(--padding-narrow) var(--padding-default);
|
|
166
|
-
font-size: var(--fontsize-small);
|
|
167
|
-
text-align: justify;
|
|
168
|
-
}
|
|
169
|
-
[timeline] [info] p::before {
|
|
170
|
-
content: '';
|
|
171
|
-
float: right;
|
|
172
|
-
margin-top: -10px;
|
|
173
|
-
margin-right: 20px;
|
|
174
|
-
border: 7px solid transparent;
|
|
175
|
-
border-bottom-color: #f4f4f4;
|
|
176
|
-
border-top: 0;
|
|
77
|
+
div {
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
padding: var(--padding-narrow);
|
|
81
|
+
border-radius: var(--border-radius);
|
|
82
|
+
text-align: right;
|
|
83
|
+
clear: both;
|
|
84
|
+
overflow: hidden;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
div:nth-child(odd) {
|
|
88
|
+
background-color: var(--main-section-background-color);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
label {
|
|
92
|
+
display: inline-block;
|
|
93
|
+
width: 25%;
|
|
94
|
+
text-align: right;
|
|
95
|
+
margin-right: 20px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
span {
|
|
99
|
+
width: 15px;
|
|
100
|
+
height: 15px;
|
|
101
|
+
background-color: var(--worklist-status-color, tomato);
|
|
102
|
+
display: inline-block;
|
|
103
|
+
border-radius: 50%;
|
|
104
|
+
}
|
|
177
105
|
}
|
|
178
106
|
|
|
179
107
|
[thumbnail] {
|
|
@@ -197,47 +125,26 @@ class ActivityThreadContextTemplate extends connect(store)(LitElement) {
|
|
|
197
125
|
render() {
|
|
198
126
|
const activityThread = this.context.activityThread || this.activityThread || {}
|
|
199
127
|
|
|
200
|
-
const { state, round, dueAt, assignedAt, terminatedAt, assignee, activityInstance, activityApprovals } =
|
|
201
|
-
activityThread || {}
|
|
128
|
+
const { state, round, dueAt, assignedAt, terminatedAt, assignee, activityInstance, activityApprovals } = activityThread || {}
|
|
202
129
|
const { name, description, thumbnail, approvalLine } = activityInstance || {}
|
|
203
130
|
|
|
204
131
|
return html`
|
|
205
132
|
<div flow>
|
|
206
|
-
<div approval-line>
|
|
207
|
-
${approvalLine ? html` <approval-line-view .model=${approvalLine}></approval-line-view> ` : html``}
|
|
208
|
-
</div>
|
|
133
|
+
<div approval-line>${approvalLine ? html` <approval-line-view .model=${approvalLine}></approval-line-view> ` : html``}</div>
|
|
209
134
|
</div>
|
|
210
135
|
|
|
211
136
|
<div info>
|
|
212
137
|
<div><label>${i18next.t('field.name')}</label> <strong>${name}</strong></div>
|
|
213
138
|
<div><label>${i18next.t('field.description')}</label> ${description}</div>
|
|
214
|
-
<div>
|
|
215
|
-
<label>${i18next.t('field.status')}</label> <span></span> <strong
|
|
216
|
-
>${i18next.t('label.activity-state-' + state)}</strong
|
|
217
|
-
>
|
|
218
|
-
</div>
|
|
139
|
+
<div><label>${i18next.t('field.status')}</label> <span></span> <strong>${i18next.t('label.activity-state-' + state)}</strong></div>
|
|
219
140
|
<div><label>${i18next.t('field.round')}</label> <strong>${round}</strong></div>
|
|
220
141
|
<div><label>${i18next.t('field.assignee')}</label> <strong>${assignee?.name}</strong></div>
|
|
221
|
-
<div>
|
|
222
|
-
<label>${i18next.t('field.assigned-at')}</label> ${assignedAt && formatter.format(new Date(assignedAt))}
|
|
223
|
-
</div>
|
|
142
|
+
<div><label>${i18next.t('field.assigned-at')}</label> ${assignedAt && formatter.format(new Date(assignedAt))}</div>
|
|
224
143
|
<div><label>${i18next.t('field.due-at')}</label> ${dueAt && formatter.format(new Date(dueAt))}</div>
|
|
225
|
-
<div>
|
|
226
|
-
<label>${i18next.t('field.terminated-at')}</label> ${terminatedAt && formatter.format(new Date(terminatedAt))}
|
|
227
|
-
</div>
|
|
144
|
+
<div><label>${i18next.t('field.terminated-at')}</label> ${terminatedAt && formatter.format(new Date(terminatedAt))}</div>
|
|
228
145
|
</div>
|
|
229
146
|
|
|
230
|
-
${activityApprovals && activityApprovals.length > 0
|
|
231
|
-
? html`
|
|
232
|
-
<div timeline>
|
|
233
|
-
<span subtitle>${i18next.t('label.review-and-approval')}</span>
|
|
234
|
-
|
|
235
|
-
<ol>
|
|
236
|
-
${activityApprovals.map(approval => this.renderActivityApproval(approval))}
|
|
237
|
-
</ol>
|
|
238
|
-
</div>
|
|
239
|
-
`
|
|
240
|
-
: nothing}
|
|
147
|
+
${activityApprovals && activityApprovals.length > 0 ? html` <activity-approval-timeline .activityThread=${activityThread}></activity-approval-timeline> ` : nothing}
|
|
241
148
|
${thumbnail
|
|
242
149
|
? html` <div thumbnail>
|
|
243
150
|
<img src=${thumbnail} />
|
|
@@ -246,23 +153,6 @@ class ActivityThreadContextTemplate extends connect(store)(LitElement) {
|
|
|
246
153
|
`
|
|
247
154
|
}
|
|
248
155
|
|
|
249
|
-
renderActivityApproval(activityApproval: ActivityApproval) {
|
|
250
|
-
const { judgment, approver, comment, round, order, createdAt, terminatedAt } = activityApproval
|
|
251
|
-
const { name, email } = approver || {}
|
|
252
|
-
|
|
253
|
-
return html`
|
|
254
|
-
<li>
|
|
255
|
-
<span date>${formatter.format(new Date(terminatedAt || createdAt!))}</span>
|
|
256
|
-
<span status></span>
|
|
257
|
-
<span info>
|
|
258
|
-
${i18next.t('label.activity-state-' + (judgment || 'started'))}
|
|
259
|
-
<strong><mwc-icon>account_circle</mwc-icon>${name}</strong>
|
|
260
|
-
<p>${comment}</p>
|
|
261
|
-
</span>
|
|
262
|
-
</li>
|
|
263
|
-
`
|
|
264
|
-
}
|
|
265
|
-
|
|
266
156
|
stateChanged(state) {
|
|
267
157
|
this.context = state.route.context
|
|
268
158
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import '@material/mwc-icon';
|
|
2
|
+
import '@things-factory/organization/dist-client/component/approval-line-view.js';
|
|
3
|
+
import { LitElement } from 'lit';
|
|
4
|
+
import { ActivityApproval } from '../types/activity-approval';
|
|
5
|
+
declare const ActivityApprovalTimeline_base: (new (...args: any[]) => {
|
|
6
|
+
_storeUnsubscribe: import("redux").Unsubscribe;
|
|
7
|
+
connectedCallback(): void;
|
|
8
|
+
disconnectedCallback(): void;
|
|
9
|
+
stateChanged(_state: unknown): void;
|
|
10
|
+
readonly isConnected: boolean;
|
|
11
|
+
}) & typeof LitElement;
|
|
12
|
+
export declare class ActivityApprovalTimeline extends ActivityApprovalTimeline_base {
|
|
13
|
+
static styles: import("lit").CSSResult[];
|
|
14
|
+
private activityThread;
|
|
15
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
16
|
+
renderActivityApproval(activityApproval: ActivityApproval): import("lit-html").TemplateResult<1>;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import '@material/mwc-icon';
|
|
3
|
+
import '@things-factory/organization/dist-client/component/approval-line-view.js';
|
|
4
|
+
import { html, css, LitElement, nothing } from 'lit';
|
|
5
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
6
|
+
import { connect } from 'pwa-helpers/connect-mixin';
|
|
7
|
+
import { store } from '@operato/shell';
|
|
8
|
+
import { i18next } from '@operato/i18n';
|
|
9
|
+
const formatter = new Intl.DateTimeFormat(navigator.language, { dateStyle: 'full', timeStyle: 'short' });
|
|
10
|
+
let ActivityApprovalTimeline = class ActivityApprovalTimeline extends connect(store)(LitElement) {
|
|
11
|
+
render() {
|
|
12
|
+
const { activityApprovals = [] } = this.activityThread || {};
|
|
13
|
+
return html ` ${activityApprovals.length > 0
|
|
14
|
+
? html `
|
|
15
|
+
<span subtitle>${i18next.t('label.review-and-approval')}</span>
|
|
16
|
+
|
|
17
|
+
<ol>
|
|
18
|
+
${activityApprovals.map(approval => this.renderActivityApproval(approval))}
|
|
19
|
+
</ol>
|
|
20
|
+
`
|
|
21
|
+
: nothing}`;
|
|
22
|
+
}
|
|
23
|
+
renderActivityApproval(activityApproval) {
|
|
24
|
+
const { judgment, approver, comment, createdAt, terminatedAt } = activityApproval;
|
|
25
|
+
const { name } = approver || {};
|
|
26
|
+
return html `
|
|
27
|
+
<li>
|
|
28
|
+
<span date>${formatter.format(new Date(terminatedAt || createdAt))}</span>
|
|
29
|
+
<span status></span>
|
|
30
|
+
<span info>
|
|
31
|
+
${i18next.t('label.activity-state-' + (judgment || 'started'))}
|
|
32
|
+
<strong><mwc-icon>account_circle</mwc-icon>${name}</strong>
|
|
33
|
+
<p>${comment}</p>
|
|
34
|
+
</span>
|
|
35
|
+
</li>
|
|
36
|
+
`;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
ActivityApprovalTimeline.styles = [
|
|
40
|
+
css `
|
|
41
|
+
:host {
|
|
42
|
+
display: block;
|
|
43
|
+
margin-bottom: var(--margin-default);
|
|
44
|
+
padding: var(--padding-default);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
[subtitle] {
|
|
48
|
+
padding: var(--padding-narrow) var(--padding-default);
|
|
49
|
+
background-color: var(--theme-white-color);
|
|
50
|
+
border: 2px solid var(--secondary-text-color);
|
|
51
|
+
border-radius: 15px;
|
|
52
|
+
box-shadow: var(--box-shadow);
|
|
53
|
+
color: var(--secondary-text-color);
|
|
54
|
+
font-weight: bold;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
ol {
|
|
58
|
+
list-style: none;
|
|
59
|
+
margin: var(--margin-default) 0 0 var(--margin-narrow);
|
|
60
|
+
padding: 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
li {
|
|
64
|
+
display: flex;
|
|
65
|
+
border: none;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
[info] {
|
|
69
|
+
flex: 1;
|
|
70
|
+
color: var(--secondary-color);
|
|
71
|
+
|
|
72
|
+
strong {
|
|
73
|
+
float: right;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
mwc-icon {
|
|
77
|
+
position: relative;
|
|
78
|
+
top: 3px;
|
|
79
|
+
font-size: var(--fontsize-large);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
p {
|
|
83
|
+
background-color: #f4f4f4;
|
|
84
|
+
margin: var(--margin-narrow) 0 var(--margin-default) 0;
|
|
85
|
+
padding: var(--padding-narrow) var(--padding-default);
|
|
86
|
+
font-size: var(--fontsize-small);
|
|
87
|
+
text-align: justify;
|
|
88
|
+
min-height: 20px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
p::before {
|
|
92
|
+
content: '';
|
|
93
|
+
float: right;
|
|
94
|
+
margin-top: -10px;
|
|
95
|
+
margin-right: 20px;
|
|
96
|
+
border: 7px solid transparent;
|
|
97
|
+
border-bottom-color: #f4f4f4;
|
|
98
|
+
border-top: 0;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
[date] {
|
|
103
|
+
opacity: 0.7;
|
|
104
|
+
flex: initial;
|
|
105
|
+
width: 200px;
|
|
106
|
+
max-width: 30%;
|
|
107
|
+
font-size: var(--fontsize-small);
|
|
108
|
+
color: var(--primary-text-color);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
[status] {
|
|
112
|
+
margin: 0 var(--margin-narrow);
|
|
113
|
+
display: block;
|
|
114
|
+
border-radius: 50%;
|
|
115
|
+
flex: initial;
|
|
116
|
+
width: 12px;
|
|
117
|
+
height: 12px;
|
|
118
|
+
position: relative;
|
|
119
|
+
top: 3px;
|
|
120
|
+
border: 2px solid #fff;
|
|
121
|
+
background-color: var(--worklist-status-color, tomato);
|
|
122
|
+
color: var(--primary-text-color);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
[status]::before {
|
|
126
|
+
content: '';
|
|
127
|
+
height: 60px;
|
|
128
|
+
width: 2px;
|
|
129
|
+
display: block;
|
|
130
|
+
position: relative;
|
|
131
|
+
margin-left: 5px;
|
|
132
|
+
background-color: var(--worklist-status-color, tomato);
|
|
133
|
+
opacity: 0.2;
|
|
134
|
+
}
|
|
135
|
+
`
|
|
136
|
+
];
|
|
137
|
+
__decorate([
|
|
138
|
+
property({ type: Object }),
|
|
139
|
+
__metadata("design:type", Object)
|
|
140
|
+
], ActivityApprovalTimeline.prototype, "activityThread", void 0);
|
|
141
|
+
ActivityApprovalTimeline = __decorate([
|
|
142
|
+
customElement('activity-approval-timeline')
|
|
143
|
+
], ActivityApprovalTimeline);
|
|
144
|
+
export { ActivityApprovalTimeline };
|
|
145
|
+
//# sourceMappingURL=activity-approval-timeline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity-approval-timeline.js","sourceRoot":"","sources":["../../client/components/activity-approval-timeline.ts"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,CAAA;AAC3B,OAAO,0EAA0E,CAAA;AAEjF,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAEnD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAIvC,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAA;AAGjG,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,OAAO,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC;IAsGtE,MAAM;QACJ,MAAM,EAAE,iBAAiB,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC,cAAc,IAAI,EAAE,CAAA;QAE5D,OAAO,IAAI,CAAA,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC;YACzC,CAAC,CAAC,IAAI,CAAA;2BACe,OAAO,CAAC,CAAC,CAAC,2BAA2B,CAAC;;;cAGnD,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,sBAAsB,CAAC,QAAQ,CAAC,CAAC;;SAE7E;YACH,CAAC,CAAC,OAAO,EAAE,CAAA;IACf,CAAC;IAED,sBAAsB,CAAC,gBAAkC;QACvD,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,gBAAgB,CAAA;QACjF,MAAM,EAAE,IAAI,EAAE,GAAG,QAAQ,IAAI,EAAE,CAAA;QAE/B,OAAO,IAAI,CAAA;;qBAEM,SAAS,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,YAAY,IAAI,SAAU,CAAC,CAAC;;;YAG/D,OAAO,CAAC,CAAC,CAAC,uBAAuB,GAAG,CAAC,QAAQ,IAAI,SAAS,CAAC,CAAC;uDACjB,IAAI;eAC5C,OAAO;;;KAGjB,CAAA;IACH,CAAC;;AAlIM,+BAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+FF;CACF,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gEAAuB;AApGvC,wBAAwB;IADpC,aAAa,CAAC,4BAA4B,CAAC;GAC/B,wBAAwB,CAoIpC;SApIY,wBAAwB","sourcesContent":["import '@material/mwc-icon'\nimport '@things-factory/organization/dist-client/component/approval-line-view.js'\n\nimport { html, css, LitElement, nothing } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { connect } from 'pwa-helpers/connect-mixin'\n\nimport { store } from '@operato/shell'\nimport { i18next } from '@operato/i18n'\n\nimport { ActivityApproval } from '../types/activity-approval'\n\nconst formatter = new Intl.DateTimeFormat(navigator.language, { dateStyle: 'full', timeStyle: 'short' })\n\n@customElement('activity-approval-timeline')\nexport class ActivityApprovalTimeline extends connect(store)(LitElement) {\n static styles = [\n css`\n :host {\n display: block;\n margin-bottom: var(--margin-default);\n padding: var(--padding-default);\n }\n\n [subtitle] {\n padding: var(--padding-narrow) var(--padding-default);\n background-color: var(--theme-white-color);\n border: 2px solid var(--secondary-text-color);\n border-radius: 15px;\n box-shadow: var(--box-shadow);\n color: var(--secondary-text-color);\n font-weight: bold;\n }\n\n ol {\n list-style: none;\n margin: var(--margin-default) 0 0 var(--margin-narrow);\n padding: 0;\n }\n\n li {\n display: flex;\n border: none;\n }\n\n [info] {\n flex: 1;\n color: var(--secondary-color);\n\n strong {\n float: right;\n }\n\n mwc-icon {\n position: relative;\n top: 3px;\n font-size: var(--fontsize-large);\n }\n\n p {\n background-color: #f4f4f4;\n margin: var(--margin-narrow) 0 var(--margin-default) 0;\n padding: var(--padding-narrow) var(--padding-default);\n font-size: var(--fontsize-small);\n text-align: justify;\n min-height: 20px;\n }\n\n p::before {\n content: '';\n float: right;\n margin-top: -10px;\n margin-right: 20px;\n border: 7px solid transparent;\n border-bottom-color: #f4f4f4;\n border-top: 0;\n }\n }\n\n [date] {\n opacity: 0.7;\n flex: initial;\n width: 200px;\n max-width: 30%;\n font-size: var(--fontsize-small);\n color: var(--primary-text-color);\n }\n\n [status] {\n margin: 0 var(--margin-narrow);\n display: block;\n border-radius: 50%;\n flex: initial;\n width: 12px;\n height: 12px;\n position: relative;\n top: 3px;\n border: 2px solid #fff;\n background-color: var(--worklist-status-color, tomato);\n color: var(--primary-text-color);\n }\n\n [status]::before {\n content: '';\n height: 60px;\n width: 2px;\n display: block;\n position: relative;\n margin-left: 5px;\n background-color: var(--worklist-status-color, tomato);\n opacity: 0.2;\n }\n `\n ]\n\n @property({ type: Object }) private activityThread\n\n render() {\n const { activityApprovals = [] } = this.activityThread || {}\n\n return html` ${activityApprovals.length > 0\n ? html`\n <span subtitle>${i18next.t('label.review-and-approval')}</span>\n\n <ol>\n ${activityApprovals.map(approval => this.renderActivityApproval(approval))}\n </ol>\n `\n : nothing}`\n }\n\n renderActivityApproval(activityApproval: ActivityApproval) {\n const { judgment, approver, comment, createdAt, terminatedAt } = activityApproval\n const { name } = approver || {}\n\n return html`\n <li>\n <span date>${formatter.format(new Date(terminatedAt || createdAt!))}</span>\n <span status></span>\n <span info>\n ${i18next.t('label.activity-state-' + (judgment || 'started'))}\n <strong><mwc-icon>account_circle</mwc-icon>${name}</strong>\n <p>${comment}</p>\n </span>\n </li>\n `\n }\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '@operato/property-editor/ox-properties-dynamic-view.js';
|
|
2
2
|
import '@operato/board/ox-board-viewer.js';
|
|
3
3
|
import '../../components/activity-approval-ribon.js';
|
|
4
|
+
import '../../components/activity-approval-timeline.js';
|
|
4
5
|
import { PageView } from '@operato/shell';
|
|
5
|
-
import { ActivityApproval } from '../../types/activity-approval.js';
|
|
6
6
|
export declare const ActivityThreadStatus: {
|
|
7
7
|
Assigned: string;
|
|
8
8
|
Started: string;
|
|
@@ -39,7 +39,6 @@ export declare class ActivityApprovalPage extends ActivityApprovalPage_base {
|
|
|
39
39
|
}[];
|
|
40
40
|
};
|
|
41
41
|
render(): import("lit-html").TemplateResult<1>;
|
|
42
|
-
renderActivityApproval(activityApproval: ActivityApproval): import("lit-html").TemplateResult<1>;
|
|
43
42
|
activityContent(): any;
|
|
44
43
|
templateContent(): import("lit-html/directive.js").DirectiveResult<typeof import("lit-html/directives/unsafe-html.js").UnsafeHTMLDirective>;
|
|
45
44
|
getInputSpec(): any;
|