@things-factory/worklist 6.1.68 → 6.1.70
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-ribon.ts +5 -5
- package/client/components/activity-instance-ribon.ts +7 -7
- package/client/components/activity-thread-ribon.ts +4 -5
- package/client/pages/activity/starter-list-page.ts +3 -24
- package/client/pages/activity-approval/activity-approval-list-page.ts +6 -22
- package/client/pages/activity-approval/activity-approval-page.ts +18 -2
- package/client/pages/activity-instance/activity-instance-search-page.ts +26 -2
- package/client/pages/activity-instance/activity-instance-start-page.ts +17 -1
- package/client/pages/activity-thread/activity-thread-list-page.ts +2 -2
- package/client/pages/activity-thread/activity-thread-page.ts +18 -2
- package/client/pages/activity-thread/activity-thread-view-page.ts +16 -0
- package/dist-client/components/activity-approval-ribon.js +5 -5
- package/dist-client/components/activity-approval-ribon.js.map +1 -1
- package/dist-client/components/activity-instance-ribon.js +7 -7
- package/dist-client/components/activity-instance-ribon.js.map +1 -1
- package/dist-client/components/activity-thread-ribon.js +4 -5
- package/dist-client/components/activity-thread-ribon.js.map +1 -1
- package/dist-client/pages/activity/starter-list-page.d.ts +1 -2
- package/dist-client/pages/activity/starter-list-page.js +1 -30
- package/dist-client/pages/activity/starter-list-page.js.map +1 -1
- package/dist-client/pages/activity-approval/activity-approval-list-page.js +4 -13
- package/dist-client/pages/activity-approval/activity-approval-list-page.js.map +1 -1
- package/dist-client/pages/activity-approval/activity-approval-page.js +14 -2
- package/dist-client/pages/activity-approval/activity-approval-page.js.map +1 -1
- package/dist-client/pages/activity-instance/activity-instance-search-page.js +26 -2
- package/dist-client/pages/activity-instance/activity-instance-search-page.js.map +1 -1
- package/dist-client/pages/activity-instance/activity-instance-start-page.js +13 -1
- package/dist-client/pages/activity-instance/activity-instance-start-page.js.map +1 -1
- package/dist-client/pages/activity-thread/activity-thread-list-page.js +2 -2
- package/dist-client/pages/activity-thread/activity-thread-list-page.js.map +1 -1
- package/dist-client/pages/activity-thread/activity-thread-page.js +15 -2
- package/dist-client/pages/activity-thread/activity-thread-page.js.map +1 -1
- package/dist-client/pages/activity-thread/activity-thread-view-page.js +12 -0
- package/dist-client/pages/activity-thread/activity-thread-view-page.js.map +1 -1
- package/dist-client/route.d.ts +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/translations/en.json +4 -0
- package/translations/ja.json +4 -0
- package/translations/ko.json +4 -0
- package/translations/ms.json +4 -0
- package/translations/zh.json +28 -24
|
@@ -97,19 +97,19 @@ export class ActivityApprovalRibon extends localize(i18next)(LitElement) {
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
@media only screen and (max-width: 460px) {
|
|
100
|
-
:host {
|
|
101
|
-
flex-direction: column;
|
|
102
|
-
}
|
|
103
100
|
div {
|
|
104
101
|
border-left: none;
|
|
105
|
-
border-bottom: var(--border-dark-color);
|
|
106
102
|
}
|
|
103
|
+
|
|
107
104
|
[assignee] {
|
|
108
105
|
display: none;
|
|
109
106
|
}
|
|
110
107
|
mwc-icon {
|
|
111
108
|
padding: 0;
|
|
112
109
|
}
|
|
110
|
+
approval-line-brief {
|
|
111
|
+
display: none;
|
|
112
|
+
}
|
|
113
113
|
}
|
|
114
114
|
`
|
|
115
115
|
]
|
|
@@ -156,7 +156,7 @@ export class ActivityApprovalRibon extends localize(i18next)(LitElement) {
|
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
updated(changes) {
|
|
159
|
-
if (changes.has('activityApproval')) {
|
|
159
|
+
if (changes.has('activityApproval') && this.activityApproval) {
|
|
160
160
|
const { state } = this.activityApproval.activityThread
|
|
161
161
|
|
|
162
162
|
this.setAttribute('state', state)
|
|
@@ -94,16 +94,12 @@ 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
|
+
font-weight: bold;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
@media only screen and (max-width: 460px) {
|
|
101
|
-
:host {
|
|
102
|
-
flex-direction: column;
|
|
103
|
-
}
|
|
104
101
|
div {
|
|
105
102
|
border-left: none;
|
|
106
|
-
border-bottom: var(--border-dark-color);
|
|
107
103
|
}
|
|
108
104
|
[assignee] {
|
|
109
105
|
display: none;
|
|
@@ -111,6 +107,9 @@ export class ActivityInstanceRibon extends localize(i18next)(LitElement) {
|
|
|
111
107
|
mwc-icon {
|
|
112
108
|
padding: 0;
|
|
113
109
|
}
|
|
110
|
+
approval-line-brief {
|
|
111
|
+
display: none;
|
|
112
|
+
}
|
|
114
113
|
}
|
|
115
114
|
`
|
|
116
115
|
]
|
|
@@ -132,7 +131,8 @@ export class ActivityInstanceRibon extends localize(i18next)(LitElement) {
|
|
|
132
131
|
></activity-instance-context-template>`
|
|
133
132
|
})
|
|
134
133
|
}}
|
|
135
|
-
>description</mwc-icon
|
|
134
|
+
>description</mwc-icon
|
|
135
|
+
>
|
|
136
136
|
${description}
|
|
137
137
|
</div>
|
|
138
138
|
${startingType == 'issue' && assignee
|
|
@@ -150,7 +150,7 @@ export class ActivityInstanceRibon extends localize(i18next)(LitElement) {
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
updated(changes) {
|
|
153
|
-
if (changes.has('activityInstance')) {
|
|
153
|
+
if (changes.has('activityInstance') && this.activityInstance) {
|
|
154
154
|
const { state } = this.activityInstance
|
|
155
155
|
|
|
156
156
|
this.setAttribute('state', state)
|
|
@@ -97,12 +97,8 @@ export class ActivityThreadRibon extends localize(i18next)(LitElement) {
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
@media only screen and (max-width: 460px) {
|
|
100
|
-
:host {
|
|
101
|
-
flex-direction: column;
|
|
102
|
-
}
|
|
103
100
|
div {
|
|
104
101
|
border-left: none;
|
|
105
|
-
border-bottom: var(--border-dark-color);
|
|
106
102
|
}
|
|
107
103
|
[assignee] {
|
|
108
104
|
display: none;
|
|
@@ -110,6 +106,9 @@ export class ActivityThreadRibon extends localize(i18next)(LitElement) {
|
|
|
110
106
|
mwc-icon {
|
|
111
107
|
padding: 0;
|
|
112
108
|
}
|
|
109
|
+
approval-line-brief {
|
|
110
|
+
display: none;
|
|
111
|
+
}
|
|
113
112
|
}
|
|
114
113
|
`
|
|
115
114
|
]
|
|
@@ -151,7 +150,7 @@ export class ActivityThreadRibon extends localize(i18next)(LitElement) {
|
|
|
151
150
|
}
|
|
152
151
|
|
|
153
152
|
updated(changes) {
|
|
154
|
-
if (changes.has('activityThread')) {
|
|
153
|
+
if (changes.has('activityThread') && this.activityThread) {
|
|
155
154
|
const { state } = this.activityThread
|
|
156
155
|
|
|
157
156
|
this.setAttribute('state', state)
|
|
@@ -52,9 +52,6 @@ export class StarterListPage extends connect(store)(localize(i18next)(PageView))
|
|
|
52
52
|
`
|
|
53
53
|
]
|
|
54
54
|
|
|
55
|
-
@property({ type: Object }) gristConfig?: any
|
|
56
|
-
@property({ type: String }) mode: 'GRID' | 'LIST' | 'CARD' = isMobileDevice() ? 'CARD' : 'GRID'
|
|
57
|
-
|
|
58
55
|
get context() {
|
|
59
56
|
return {
|
|
60
57
|
search: {
|
|
@@ -73,34 +70,16 @@ export class StarterListPage extends connect(store)(localize(i18next)(PageView))
|
|
|
73
70
|
}
|
|
74
71
|
}
|
|
75
72
|
|
|
73
|
+
@property({ type: Object }) gristConfig?: any
|
|
74
|
+
|
|
76
75
|
@query('#sorter-control') sorterControl?: any
|
|
77
76
|
@query('ox-grist') grist!: DataGrist
|
|
78
77
|
|
|
79
78
|
@state() filters?: string[]
|
|
80
79
|
|
|
81
80
|
render() {
|
|
82
|
-
const mode = this.mode
|
|
83
|
-
|
|
84
81
|
return html`
|
|
85
|
-
<ox-grist .mode=${
|
|
86
|
-
<div slot="headroom">
|
|
87
|
-
<div id="filters">
|
|
88
|
-
<!-- <ox-input-select-buttons
|
|
89
|
-
.value=${this.filters}
|
|
90
|
-
.options=${FILTERS}
|
|
91
|
-
@change=${(e: CustomEvent) => {
|
|
92
|
-
this.filters = (e.currentTarget as any)?.value
|
|
93
|
-
}}
|
|
94
|
-
></ox-input-select-buttons> -->
|
|
95
|
-
</div>
|
|
96
|
-
|
|
97
|
-
<div id="modes">
|
|
98
|
-
<mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>
|
|
99
|
-
<mwc-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</mwc-icon>
|
|
100
|
-
<mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
</ox-grist>
|
|
82
|
+
<ox-grist .mode=${'CARD'} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}> </ox-grist>
|
|
104
83
|
`
|
|
105
84
|
}
|
|
106
85
|
|
|
@@ -5,12 +5,7 @@ import { PageView, store } from '@operato/shell'
|
|
|
5
5
|
import { css, html } from 'lit'
|
|
6
6
|
import { customElement, property, query } from 'lit/decorators.js'
|
|
7
7
|
import { ScopedElementsMixin } from '@open-wc/scoped-elements'
|
|
8
|
-
import {
|
|
9
|
-
ColumnConfig,
|
|
10
|
-
DataGrist,
|
|
11
|
-
FetchOption,
|
|
12
|
-
SortersControl
|
|
13
|
-
} from '@operato/data-grist'
|
|
8
|
+
import { ColumnConfig, DataGrist, FetchOption, SortersControl } from '@operato/data-grist'
|
|
14
9
|
import { client } from '@operato/graphql'
|
|
15
10
|
import { i18next, localize } from '@operato/i18n'
|
|
16
11
|
import { notify, openPopup } from '@operato/layout'
|
|
@@ -24,7 +19,6 @@ import { ActivityApprovalImporter } from './activity-approval-importer'
|
|
|
24
19
|
|
|
25
20
|
@customElement('activity-approval-list-page')
|
|
26
21
|
export class ActivityApprovalListPage extends connect(store)(localize(i18next)(ScopedElementsMixin(PageView))) {
|
|
27
|
-
|
|
28
22
|
static styles = [
|
|
29
23
|
ScrollbarStyles,
|
|
30
24
|
CommonGristStyles,
|
|
@@ -58,7 +52,7 @@ export class ActivityApprovalListPage extends connect(store)(localize(i18next)(S
|
|
|
58
52
|
handler: (search: string) => {
|
|
59
53
|
this.grist.searchText = search
|
|
60
54
|
},
|
|
61
|
-
placeholder: i18next.t('title.activity
|
|
55
|
+
placeholder: i18next.t('title.activity approval list'),
|
|
62
56
|
value: this.grist.searchText
|
|
63
57
|
},
|
|
64
58
|
filter: {
|
|
@@ -80,7 +74,7 @@ export class ActivityApprovalListPage extends connect(store)(localize(i18next)(S
|
|
|
80
74
|
}
|
|
81
75
|
],
|
|
82
76
|
exportable: {
|
|
83
|
-
name: i18next.t('title.activity
|
|
77
|
+
name: i18next.t('title.activity approval list'),
|
|
84
78
|
data: this.exportHandler.bind(this)
|
|
85
79
|
},
|
|
86
80
|
importable: {
|
|
@@ -93,11 +87,7 @@ export class ActivityApprovalListPage extends connect(store)(localize(i18next)(S
|
|
|
93
87
|
const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID')
|
|
94
88
|
|
|
95
89
|
return html`
|
|
96
|
-
<ox-grist
|
|
97
|
-
.mode=${mode}
|
|
98
|
-
.config=${this.gristConfig}
|
|
99
|
-
.fetchHandler=${this.fetchHandler.bind(this)}
|
|
100
|
-
>
|
|
90
|
+
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
101
91
|
<div slot="headroom">
|
|
102
92
|
<div id="filters">
|
|
103
93
|
<ox-filters-form autofocus></ox-filters-form>
|
|
@@ -305,12 +295,7 @@ export class ActivityApprovalListPage extends connect(store)(localize(i18next)(S
|
|
|
305
295
|
|
|
306
296
|
async exportHandler() {
|
|
307
297
|
const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records
|
|
308
|
-
const targetFieldSet = new Set([
|
|
309
|
-
'id',
|
|
310
|
-
'name',
|
|
311
|
-
'description',
|
|
312
|
-
'active'
|
|
313
|
-
])
|
|
298
|
+
const targetFieldSet = new Set(['id', 'name', 'description', 'active'])
|
|
314
299
|
|
|
315
300
|
return exportTargets.map(activityApproval => {
|
|
316
301
|
let tempObj = {}
|
|
@@ -339,10 +324,9 @@ export class ActivityApprovalListPage extends connect(store)(localize(i18next)(S
|
|
|
339
324
|
title: i18next.t('title.import activity-approval')
|
|
340
325
|
}
|
|
341
326
|
)
|
|
342
|
-
|
|
327
|
+
|
|
343
328
|
popup.onclosed = () => {
|
|
344
329
|
this.grist.fetch()
|
|
345
330
|
}
|
|
346
331
|
}
|
|
347
332
|
}
|
|
348
|
-
|
|
@@ -142,7 +142,7 @@ export class ActivityApprovalPage extends connect(store)(localize(i18next)(PageV
|
|
|
142
142
|
const judgment = this.activityApproval?.judgment
|
|
143
143
|
|
|
144
144
|
return {
|
|
145
|
-
title: this.lifecycle?.params?.['title'] || i18next.t('title.activity
|
|
145
|
+
title: this.lifecycle?.params?.['title'] || i18next.t('title.activity approval'),
|
|
146
146
|
help: 'worklist/activity-approval',
|
|
147
147
|
actions: judgment
|
|
148
148
|
? []
|
|
@@ -204,6 +204,10 @@ export class ActivityApprovalPage extends connect(store)(localize(i18next)(PageV
|
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
templateContent() {
|
|
207
|
+
if (!this.activityApproval) {
|
|
208
|
+
return html``
|
|
209
|
+
}
|
|
210
|
+
|
|
207
211
|
const { viewSource: template } = this.activityThread?.activityInstance
|
|
208
212
|
return unsafeHTML(template)
|
|
209
213
|
}
|
|
@@ -239,6 +243,10 @@ export class ActivityApprovalPage extends connect(store)(localize(i18next)(PageV
|
|
|
239
243
|
}
|
|
240
244
|
|
|
241
245
|
generatedContent() {
|
|
246
|
+
if (!this.activityApproval) {
|
|
247
|
+
return html``
|
|
248
|
+
}
|
|
249
|
+
|
|
242
250
|
var { output, activityInstance } = this.activityThread || {}
|
|
243
251
|
var { input } = activityInstance || {}
|
|
244
252
|
|
|
@@ -280,6 +288,10 @@ export class ActivityApprovalPage extends connect(store)(localize(i18next)(PageV
|
|
|
280
288
|
}
|
|
281
289
|
|
|
282
290
|
boardContent() {
|
|
291
|
+
if (!this.activityApproval) {
|
|
292
|
+
return html``
|
|
293
|
+
}
|
|
294
|
+
|
|
283
295
|
const { output, activityInstance } = this.activityThread
|
|
284
296
|
const { viewSource: boardId, input } = activityInstance || {}
|
|
285
297
|
|
|
@@ -305,6 +317,10 @@ export class ActivityApprovalPage extends connect(store)(localize(i18next)(PageV
|
|
|
305
317
|
}
|
|
306
318
|
|
|
307
319
|
customElementContent() {
|
|
320
|
+
if (!this.activityApproval) {
|
|
321
|
+
return html``
|
|
322
|
+
}
|
|
323
|
+
|
|
308
324
|
const { output, activityInstance } = this.activityThread
|
|
309
325
|
const { viewSource: tagName, input } = activityInstance || {}
|
|
310
326
|
|
|
@@ -336,7 +352,7 @@ export class ActivityApprovalPage extends connect(store)(localize(i18next)(PageV
|
|
|
336
352
|
}
|
|
337
353
|
|
|
338
354
|
async pageUpdated(changes, lifecycle, changedBefore) {
|
|
339
|
-
if (this.active) {
|
|
355
|
+
if (this.active && lifecycle.resourceId) {
|
|
340
356
|
this.fetchActivityApproval(lifecycle.resourceId)
|
|
341
357
|
}
|
|
342
358
|
}
|
|
@@ -165,7 +165,7 @@ export class ActivityInstanceSearchPage extends connect(store)(localize(i18next)
|
|
|
165
165
|
this.gristConfig = {
|
|
166
166
|
list: {
|
|
167
167
|
fields: ['name', 'description'],
|
|
168
|
-
details: ['
|
|
168
|
+
details: ['updatedAt', 'updater', 'createdAt', 'creator']
|
|
169
169
|
},
|
|
170
170
|
columns: [
|
|
171
171
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
@@ -208,7 +208,6 @@ export class ActivityInstanceSearchPage extends connect(store)(localize(i18next)
|
|
|
208
208
|
{
|
|
209
209
|
type: 'string',
|
|
210
210
|
name: 'description',
|
|
211
|
-
label: true,
|
|
212
211
|
header: i18next.t('field.description'),
|
|
213
212
|
record: {
|
|
214
213
|
editable: false
|
|
@@ -238,11 +237,30 @@ export class ActivityInstanceSearchPage extends connect(store)(localize(i18next)
|
|
|
238
237
|
hidden: true,
|
|
239
238
|
imex: true
|
|
240
239
|
},
|
|
240
|
+
{
|
|
241
|
+
type: 'resource-object',
|
|
242
|
+
name: 'creator',
|
|
243
|
+
header: i18next.t('field.creator'),
|
|
244
|
+
sortable: true,
|
|
245
|
+
label: true,
|
|
246
|
+
width: 100,
|
|
247
|
+
imex: true
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
type: 'datetime',
|
|
251
|
+
name: 'createdAt',
|
|
252
|
+
header: i18next.t('field.created_at'),
|
|
253
|
+
sortable: true,
|
|
254
|
+
label: true,
|
|
255
|
+
width: 180,
|
|
256
|
+
imex: true
|
|
257
|
+
},
|
|
241
258
|
{
|
|
242
259
|
type: 'resource-object',
|
|
243
260
|
name: 'updater',
|
|
244
261
|
header: i18next.t('field.updater'),
|
|
245
262
|
sortable: true,
|
|
263
|
+
label: true,
|
|
246
264
|
width: 100,
|
|
247
265
|
imex: true
|
|
248
266
|
},
|
|
@@ -251,6 +269,7 @@ export class ActivityInstanceSearchPage extends connect(store)(localize(i18next)
|
|
|
251
269
|
name: 'updatedAt',
|
|
252
270
|
header: i18next.t('field.updated_at'),
|
|
253
271
|
sortable: true,
|
|
272
|
+
label: true,
|
|
254
273
|
width: 180,
|
|
255
274
|
imex: true
|
|
256
275
|
}
|
|
@@ -300,6 +319,11 @@ export class ActivityInstanceSearchPage extends connect(store)(localize(i18next)
|
|
|
300
319
|
name
|
|
301
320
|
}
|
|
302
321
|
updatedAt
|
|
322
|
+
creator {
|
|
323
|
+
id
|
|
324
|
+
name
|
|
325
|
+
}
|
|
326
|
+
createdAt
|
|
303
327
|
}
|
|
304
328
|
total
|
|
305
329
|
}
|
|
@@ -97,6 +97,10 @@ export class ActivityInstanceStartPage extends connect(store)(localize(i18next)(
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
templateContent() {
|
|
100
|
+
if (!this.activityInstance) {
|
|
101
|
+
return html``
|
|
102
|
+
}
|
|
103
|
+
|
|
100
104
|
const { uiSource: template } = this.activityInstance
|
|
101
105
|
return unsafeHTML(template)
|
|
102
106
|
}
|
|
@@ -132,6 +136,10 @@ export class ActivityInstanceStartPage extends connect(store)(localize(i18next)(
|
|
|
132
136
|
}
|
|
133
137
|
|
|
134
138
|
generatedContent() {
|
|
139
|
+
if (!this.activityInstance) {
|
|
140
|
+
return html``
|
|
141
|
+
}
|
|
142
|
+
|
|
135
143
|
var { input, output } = this.activityInstance || {}
|
|
136
144
|
|
|
137
145
|
const inputSpec = this.getInputSpec()
|
|
@@ -173,6 +181,10 @@ export class ActivityInstanceStartPage extends connect(store)(localize(i18next)(
|
|
|
173
181
|
}
|
|
174
182
|
|
|
175
183
|
boardContent() {
|
|
184
|
+
if (!this.activityInstance) {
|
|
185
|
+
return html``
|
|
186
|
+
}
|
|
187
|
+
|
|
176
188
|
const { uiSource: boardId, input, output } = this.activityInstance
|
|
177
189
|
|
|
178
190
|
if (!this.board || this.board.id !== boardId) {
|
|
@@ -202,6 +214,10 @@ export class ActivityInstanceStartPage extends connect(store)(localize(i18next)(
|
|
|
202
214
|
}
|
|
203
215
|
|
|
204
216
|
customElementContent() {
|
|
217
|
+
if (!this.activityInstance) {
|
|
218
|
+
return html``
|
|
219
|
+
}
|
|
220
|
+
|
|
205
221
|
const { uiSource: tagName, input, output } = this.activityInstance
|
|
206
222
|
|
|
207
223
|
if (!this.customHtmlElement) {
|
|
@@ -254,7 +270,7 @@ export class ActivityInstanceStartPage extends connect(store)(localize(i18next)(
|
|
|
254
270
|
}
|
|
255
271
|
|
|
256
272
|
async pageUpdated(changes, lifecycle, changedBefore) {
|
|
257
|
-
if (this.active) {
|
|
273
|
+
if (this.active && lifecycle.resourceId) {
|
|
258
274
|
this.fetchActivityInstance(lifecycle.resourceId)
|
|
259
275
|
} else {
|
|
260
276
|
this.customHtmlElement = undefined
|
|
@@ -40,7 +40,7 @@ export class ActivityThreadListPage extends connect(store)(localize(i18next)(Pag
|
|
|
40
40
|
handler: (search: string) => {
|
|
41
41
|
this.grist.searchText = search
|
|
42
42
|
},
|
|
43
|
-
placeholder: i18next.t('title.activity
|
|
43
|
+
placeholder: i18next.t('title.activity thread list'),
|
|
44
44
|
value: this.grist.searchText
|
|
45
45
|
},
|
|
46
46
|
filter: {
|
|
@@ -62,7 +62,7 @@ export class ActivityThreadListPage extends connect(store)(localize(i18next)(Pag
|
|
|
62
62
|
}
|
|
63
63
|
],
|
|
64
64
|
exportable: {
|
|
65
|
-
name: i18next.t('title.activity
|
|
65
|
+
name: i18next.t('title.activity thread list'),
|
|
66
66
|
data: this.exportHandler.bind(this)
|
|
67
67
|
},
|
|
68
68
|
importable: {
|
|
@@ -179,6 +179,10 @@ export class ActivityThreadPage extends connect(store)(localize(i18next)(PageVie
|
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
templateContent() {
|
|
182
|
+
if (!this.activityThread) {
|
|
183
|
+
return html``
|
|
184
|
+
}
|
|
185
|
+
|
|
182
186
|
const { uiSource: template } = this.activityThread?.activityInstance
|
|
183
187
|
return unsafeHTML(template)
|
|
184
188
|
}
|
|
@@ -214,6 +218,10 @@ export class ActivityThreadPage extends connect(store)(localize(i18next)(PageVie
|
|
|
214
218
|
}
|
|
215
219
|
|
|
216
220
|
generatedContent() {
|
|
221
|
+
if (!this.activityThread) {
|
|
222
|
+
return html``
|
|
223
|
+
}
|
|
224
|
+
|
|
217
225
|
var { output, activityInstance } = this.activityThread || {}
|
|
218
226
|
var { input } = activityInstance || {}
|
|
219
227
|
|
|
@@ -230,7 +238,7 @@ export class ActivityThreadPage extends connect(store)(localize(i18next)(PageVie
|
|
|
230
238
|
}
|
|
231
239
|
|
|
232
240
|
return keyed(
|
|
233
|
-
this.activityThread
|
|
241
|
+
this.activityThread?.id,
|
|
234
242
|
html`
|
|
235
243
|
<fieldset>
|
|
236
244
|
<legend>Input</legend>
|
|
@@ -255,6 +263,10 @@ export class ActivityThreadPage extends connect(store)(localize(i18next)(PageVie
|
|
|
255
263
|
}
|
|
256
264
|
|
|
257
265
|
boardContent() {
|
|
266
|
+
if (!this.activityThread) {
|
|
267
|
+
return html``
|
|
268
|
+
}
|
|
269
|
+
|
|
258
270
|
const { output, activityInstance } = this.activityThread
|
|
259
271
|
const { uiSource: boardId, input } = activityInstance || {}
|
|
260
272
|
|
|
@@ -285,6 +297,10 @@ export class ActivityThreadPage extends connect(store)(localize(i18next)(PageVie
|
|
|
285
297
|
}
|
|
286
298
|
|
|
287
299
|
customElementContent() {
|
|
300
|
+
if (!this.activityThread) {
|
|
301
|
+
return html``
|
|
302
|
+
}
|
|
303
|
+
|
|
288
304
|
const { output, activityInstance } = this.activityThread
|
|
289
305
|
const { uiSource: tagName, input } = activityInstance || {}
|
|
290
306
|
|
|
@@ -319,7 +335,7 @@ export class ActivityThreadPage extends connect(store)(localize(i18next)(PageVie
|
|
|
319
335
|
}
|
|
320
336
|
|
|
321
337
|
async pageUpdated(changes, lifecycle, changedBefore) {
|
|
322
|
-
if (this.active) {
|
|
338
|
+
if (this.active && lifecycle.resourceId) {
|
|
323
339
|
this.fetchActivityThread(lifecycle.resourceId)
|
|
324
340
|
}
|
|
325
341
|
}
|
|
@@ -145,6 +145,10 @@ export class ActivityThreadViewPage extends connect(store)(localize(i18next)(Pag
|
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
templateContent() {
|
|
148
|
+
if (!this.activityThread) {
|
|
149
|
+
return html``
|
|
150
|
+
}
|
|
151
|
+
|
|
148
152
|
const { viewSource: template } = this.activityThread?.activityInstance
|
|
149
153
|
return unsafeHTML(template)
|
|
150
154
|
}
|
|
@@ -180,6 +184,10 @@ export class ActivityThreadViewPage extends connect(store)(localize(i18next)(Pag
|
|
|
180
184
|
}
|
|
181
185
|
|
|
182
186
|
generatedContent() {
|
|
187
|
+
if (!this.activityThread) {
|
|
188
|
+
return html``
|
|
189
|
+
}
|
|
190
|
+
|
|
183
191
|
return keyed(
|
|
184
192
|
this.activityThread.id,
|
|
185
193
|
html` <activity-thread-view .activityThreadId=${this.activityThread.id}></activity-thread-view> `
|
|
@@ -187,6 +195,10 @@ export class ActivityThreadViewPage extends connect(store)(localize(i18next)(Pag
|
|
|
187
195
|
}
|
|
188
196
|
|
|
189
197
|
boardContent() {
|
|
198
|
+
if (!this.activityThread) {
|
|
199
|
+
return html``
|
|
200
|
+
}
|
|
201
|
+
|
|
190
202
|
const { output, activityInstance } = this.activityThread
|
|
191
203
|
const { viewSource: boardId, input } = activityInstance || {}
|
|
192
204
|
|
|
@@ -217,6 +229,10 @@ export class ActivityThreadViewPage extends connect(store)(localize(i18next)(Pag
|
|
|
217
229
|
}
|
|
218
230
|
|
|
219
231
|
customElementContent() {
|
|
232
|
+
if (!this.activityThread) {
|
|
233
|
+
return html``
|
|
234
|
+
}
|
|
235
|
+
|
|
220
236
|
const { output, activityInstance } = this.activityThread
|
|
221
237
|
const { viewSource: tagName, input } = activityInstance || {}
|
|
222
238
|
|
|
@@ -47,7 +47,7 @@ let ActivityApprovalRibon = class ActivityApprovalRibon extends localize(i18next
|
|
|
47
47
|
`;
|
|
48
48
|
}
|
|
49
49
|
updated(changes) {
|
|
50
|
-
if (changes.has('activityApproval')) {
|
|
50
|
+
if (changes.has('activityApproval') && this.activityApproval) {
|
|
51
51
|
const { state } = this.activityApproval.activityThread;
|
|
52
52
|
this.setAttribute('state', state);
|
|
53
53
|
}
|
|
@@ -139,19 +139,19 @@ ActivityApprovalRibon.styles = [
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
@media only screen and (max-width: 460px) {
|
|
142
|
-
:host {
|
|
143
|
-
flex-direction: column;
|
|
144
|
-
}
|
|
145
142
|
div {
|
|
146
143
|
border-left: none;
|
|
147
|
-
border-bottom: var(--border-dark-color);
|
|
148
144
|
}
|
|
145
|
+
|
|
149
146
|
[assignee] {
|
|
150
147
|
display: none;
|
|
151
148
|
}
|
|
152
149
|
mwc-icon {
|
|
153
150
|
padding: 0;
|
|
154
151
|
}
|
|
152
|
+
approval-line-brief {
|
|
153
|
+
display: none;
|
|
154
|
+
}
|
|
155
155
|
}
|
|
156
156
|
`
|
|
157
157
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-approval-ribon.js","sourceRoot":"","sources":["../../client/components/activity-approval-ribon.ts"],"names":[],"mappings":";AAAA,OAAO,sBAAsB,CAAA;AAC7B,OAAO,wDAAwD,CAAA;AAC/D,OAAO,2EAA2E,CAAA;AAClF,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;IA0GtE,MAAM;;QACJ,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,GAAG,CAAA,MAAA,IAAI,CAAC,gBAAgB,0CAAE,cAAc,KAAI,EAAE,CAAA;QAC/E,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,GAAG,gBAAgB,IAAI,EAAE,CAAA;QAChF,MAAM,EAAE,YAAY,EAAE,GAAG,QAAQ,IAAI,EAAE,CAAA;QAEvC,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,O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;AAxGtC,qBAAqB;IADjC,aAAa,CAAC,yBAAyB,CAAC;GAC5B,qBAAqB,CAwJjC;SAxJY,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-approval-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-approval-ribon')\nexport class ActivityApprovalRibon 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='assigned']) {\n --worklist-status-color: #5f7184;\n }\n\n :host([state='started']) {\n --worklist-status-color: #56af45;\n }\n\n :host([state='delegated']) {\n --worklist-status-color: #8654b0;\n }\n\n :host([state='submitted']) {\n --worklist-status-color: #428df3;\n }\n\n :host([state='escalated']) {\n --worklist-status-color: #595de5;\n }\n\n :host([state='rejected']) {\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 div {\n border-left: none;\n }\n\n [assignee] {\n display: none;\n }\n mwc-icon {\n padding: 0;\n }\n approval-line-brief {\n display: none;\n }\n }\n `\n ]\n\n @property({ type: Object }) activityApproval: any\n\n render() {\n const { activityInstance, state } = this.activityApproval?.activityThread || {}\n const { description, assignee, approvalLine, activity } = 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-approval-context-template\n .activityApproval=${this.activityApproval}\n state=${state}\n ></activity-approval-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} </span>\n </div>\n `\n : html``}\n ${approvalLine\n ? html`<approval-line-brief\n .model=${approvalLine}\n .current=${this.activityApproval.order}\n ></approval-line-brief>`\n : html``}\n\n <div state>${i18next.t('label.activity-state-' + state)}</div>\n `\n }\n\n updated(changes) {\n if (changes.has('activityApproval') && this.activityApproval) {\n const { state } = this.activityApproval.activityThread\n\n this.setAttribute('state', state)\n }\n }\n}\n"]}
|
|
@@ -26,7 +26,8 @@ let ActivityInstanceRibon = class ActivityInstanceRibon extends localize(i18next
|
|
|
26
26
|
></activity-instance-context-template>`
|
|
27
27
|
});
|
|
28
28
|
}}
|
|
29
|
-
>description</mwc-icon
|
|
29
|
+
>description</mwc-icon
|
|
30
|
+
>
|
|
30
31
|
${description}
|
|
31
32
|
</div>
|
|
32
33
|
${startingType == 'issue' && assignee
|
|
@@ -43,7 +44,7 @@ let ActivityInstanceRibon = class ActivityInstanceRibon extends localize(i18next
|
|
|
43
44
|
`;
|
|
44
45
|
}
|
|
45
46
|
updated(changes) {
|
|
46
|
-
if (changes.has('activityInstance')) {
|
|
47
|
+
if (changes.has('activityInstance') && this.activityInstance) {
|
|
47
48
|
const { state } = this.activityInstance;
|
|
48
49
|
this.setAttribute('state', state);
|
|
49
50
|
}
|
|
@@ -132,16 +133,12 @@ ActivityInstanceRibon.styles = [
|
|
|
132
133
|
[state] {
|
|
133
134
|
text-align: right;
|
|
134
135
|
font-size: var(--fontsize-small);
|
|
135
|
-
font-weight:bold;
|
|
136
|
+
font-weight: bold;
|
|
136
137
|
}
|
|
137
138
|
|
|
138
139
|
@media only screen and (max-width: 460px) {
|
|
139
|
-
:host {
|
|
140
|
-
flex-direction: column;
|
|
141
|
-
}
|
|
142
140
|
div {
|
|
143
141
|
border-left: none;
|
|
144
|
-
border-bottom: var(--border-dark-color);
|
|
145
142
|
}
|
|
146
143
|
[assignee] {
|
|
147
144
|
display: none;
|
|
@@ -149,6 +146,9 @@ ActivityInstanceRibon.styles = [
|
|
|
149
146
|
mwc-icon {
|
|
150
147
|
padding: 0;
|
|
151
148
|
}
|
|
149
|
+
approval-line-brief {
|
|
150
|
+
display: none;
|
|
151
|
+
}
|
|
152
152
|
}
|
|
153
153
|
`
|
|
154
154
|
];
|