@things-factory/worklist 6.0.43 → 6.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/client/bootstrap.ts +5 -0
  2. package/client/components/activity-starter-form.ts +52 -303
  3. package/client/pages/activity/activity-list-page.ts +44 -28
  4. package/client/pages/activity/activity-page.ts +3 -3
  5. package/client/pages/activity/activity-partial-view.ts +2 -1
  6. package/client/pages/activity/starter-list-page.ts +16 -11
  7. package/client/pages/activity-instance/activity-instance-search-page.ts +2 -19
  8. package/client/pages/activity-instance/activity-instance-start-page.ts +514 -0
  9. package/client/pages/activity-stats/activity-stats-importer.ts +97 -0
  10. package/client/pages/activity-stats/activity-stats-list-page.ts +348 -0
  11. package/client/pages/activity-thread/activity-thread-page.ts +1 -1
  12. package/client/pages/installable-activity/installable-activity-list-page.ts +7 -5
  13. package/client/pages/todo/approval-done-list-page.ts +340 -0
  14. package/client/pages/todo/approval-pending-list-page.ts +2 -2
  15. package/client/pages/todo/done-list-calendar-page.ts +115 -0
  16. package/client/pages/todo/done-list-page.ts +2 -3
  17. package/client/pages/todo/draft-list-page.ts +26 -102
  18. package/client/pages/todo/pickable-list-page.ts +2 -1
  19. package/client/pages/todo/todo-list-page.ts +1 -1
  20. package/client/route.ts +14 -2
  21. package/client/templates/activity-approval-context-template.ts +4 -0
  22. package/client/templates/activity-instance-context-template.ts +171 -0
  23. package/client/templates/activity-thread-context-template.ts +4 -0
  24. package/client/themes/calendar-theme.css +54 -0
  25. package/client/types/activity-instance-type.ts +4 -2
  26. package/client/types/activity-instance.ts +2 -2
  27. package/client/types/activity.ts +7 -0
  28. package/client/types/types.ts +8 -0
  29. package/dist-client/bootstrap.d.ts +1 -0
  30. package/dist-client/bootstrap.js +5 -0
  31. package/dist-client/bootstrap.js.map +1 -1
  32. package/dist-client/components/activity-starter-form.d.ts +2 -5
  33. package/dist-client/components/activity-starter-form.js +54 -247
  34. package/dist-client/components/activity-starter-form.js.map +1 -1
  35. package/dist-client/pages/activity/activity-list-page.d.ts +1 -1
  36. package/dist-client/pages/activity/activity-list-page.js +45 -30
  37. package/dist-client/pages/activity/activity-list-page.js.map +1 -1
  38. package/dist-client/pages/activity/activity-page.d.ts +1 -1
  39. package/dist-client/pages/activity/activity-page.js +3 -3
  40. package/dist-client/pages/activity/activity-page.js.map +1 -1
  41. package/dist-client/pages/activity/activity-partial-view.js +2 -2
  42. package/dist-client/pages/activity/activity-partial-view.js.map +1 -1
  43. package/dist-client/pages/activity/starter-list-page.d.ts +1 -0
  44. package/dist-client/pages/activity/starter-list-page.js +14 -11
  45. package/dist-client/pages/activity/starter-list-page.js.map +1 -1
  46. package/dist-client/pages/activity-instance/activity-instance-page.d.ts +2 -2
  47. package/dist-client/pages/activity-instance/activity-instance-page.js +19 -10
  48. package/dist-client/pages/activity-instance/activity-instance-page.js.map +1 -1
  49. package/dist-client/pages/activity-instance/activity-instance-search-page.js +1 -8
  50. package/dist-client/pages/activity-instance/activity-instance-search-page.js.map +1 -1
  51. package/dist-client/pages/activity-instance/activity-instance-start-page.d.ts +49 -0
  52. package/dist-client/pages/activity-instance/activity-instance-start-page.js +450 -0
  53. package/dist-client/pages/activity-instance/activity-instance-start-page.js.map +1 -0
  54. package/dist-client/pages/activity-stats/activity-stats-importer.d.ts +22 -0
  55. package/dist-client/pages/activity-stats/activity-stats-importer.js +100 -0
  56. package/dist-client/pages/activity-stats/activity-stats-importer.js.map +1 -0
  57. package/dist-client/pages/activity-stats/activity-stats-list-page.d.ts +62 -0
  58. package/dist-client/pages/activity-stats/activity-stats-list-page.js +326 -0
  59. package/dist-client/pages/activity-stats/activity-stats-list-page.js.map +1 -0
  60. package/dist-client/pages/activity-thread/activity-thread-page.js +1 -1
  61. package/dist-client/pages/activity-thread/activity-thread-page.js.map +1 -1
  62. package/dist-client/pages/installable-activity/installable-activity-list-page.js +7 -5
  63. package/dist-client/pages/installable-activity/installable-activity-list-page.js.map +1 -1
  64. package/dist-client/pages/todo/approval-done-list-page.d.ts +39 -0
  65. package/dist-client/pages/todo/approval-done-list-page.js +338 -0
  66. package/dist-client/pages/todo/approval-done-list-page.js.map +1 -0
  67. package/dist-client/pages/todo/approval-pending-list-page.js +2 -2
  68. package/dist-client/pages/todo/approval-pending-list-page.js.map +1 -1
  69. package/dist-client/pages/todo/done-list-calendar-page.d.ts +24 -0
  70. package/dist-client/pages/todo/done-list-calendar-page.js +107 -0
  71. package/dist-client/pages/todo/done-list-calendar-page.js.map +1 -0
  72. package/dist-client/pages/todo/done-list-page.js +2 -3
  73. package/dist-client/pages/todo/done-list-page.js.map +1 -1
  74. package/dist-client/pages/todo/draft-list-page.d.ts +1 -0
  75. package/dist-client/pages/todo/draft-list-page.js +25 -99
  76. package/dist-client/pages/todo/draft-list-page.js.map +1 -1
  77. package/dist-client/pages/todo/pickable-list-page.d.ts +1 -0
  78. package/dist-client/pages/todo/pickable-list-page.js +2 -1
  79. package/dist-client/pages/todo/pickable-list-page.js.map +1 -1
  80. package/dist-client/pages/todo/todo-list-page.js +1 -1
  81. package/dist-client/pages/todo/todo-list-page.js.map +1 -1
  82. package/dist-client/route.d.ts +1 -1
  83. package/dist-client/route.js +11 -2
  84. package/dist-client/route.js.map +1 -1
  85. package/dist-client/templates/activity-approval-context-template.js +4 -0
  86. package/dist-client/templates/activity-approval-context-template.js.map +1 -1
  87. package/dist-client/templates/activity-instance-context-template.d.ts +2 -0
  88. package/dist-client/templates/activity-instance-context-template.js +145 -0
  89. package/dist-client/templates/activity-instance-context-template.js.map +1 -0
  90. package/dist-client/templates/activity-thread-context-template.js +4 -0
  91. package/dist-client/templates/activity-thread-context-template.js.map +1 -1
  92. package/dist-client/tsconfig.tsbuildinfo +1 -1
  93. package/dist-client/types/activity-instance-type.d.ts +3 -2
  94. package/dist-client/types/activity-instance-type.js +2 -2
  95. package/dist-client/types/activity-instance-type.js.map +1 -1
  96. package/dist-client/types/activity-instance.d.ts +1 -1
  97. package/dist-client/types/activity-instance.js +2 -2
  98. package/dist-client/types/activity-instance.js.map +1 -1
  99. package/dist-client/types/activity.d.ts +5 -0
  100. package/dist-client/types/activity.js +5 -0
  101. package/dist-client/types/activity.js.map +1 -1
  102. package/dist-client/types/types.d.ts +4 -0
  103. package/dist-client/types/types.js +6 -0
  104. package/dist-client/types/types.js.map +1 -1
  105. package/dist-server/controllers/activity-instance/assign.js +1 -1
  106. package/dist-server/controllers/activity-instance/assign.js.map +1 -1
  107. package/dist-server/controllers/activity-instance/draft.js +24 -6
  108. package/dist-server/controllers/activity-instance/draft.js.map +1 -1
  109. package/dist-server/controllers/activity-instance/index.js +1 -1
  110. package/dist-server/controllers/activity-instance/index.js.map +1 -1
  111. package/dist-server/controllers/activity-instance/issue.js +105 -0
  112. package/dist-server/controllers/activity-instance/issue.js.map +1 -0
  113. package/dist-server/controllers/activity-instance/pick.js +1 -1
  114. package/dist-server/controllers/activity-instance/pick.js.map +1 -1
  115. package/dist-server/controllers/activity-instance/post.js +7 -7
  116. package/dist-server/controllers/activity-instance/post.js.map +1 -1
  117. package/dist-server/controllers/common.js +33 -9
  118. package/dist-server/controllers/common.js.map +1 -1
  119. package/dist-server/routes.js +2 -2
  120. package/dist-server/routes.js.map +1 -1
  121. package/dist-server/service/activity/activity-history.js +6 -2
  122. package/dist-server/service/activity/activity-history.js.map +1 -1
  123. package/dist-server/service/activity/activity-query.js +84 -1
  124. package/dist-server/service/activity/activity-query.js.map +1 -1
  125. package/dist-server/service/activity/activity-type.js +8 -0
  126. package/dist-server/service/activity/activity-type.js.map +1 -1
  127. package/dist-server/service/activity/activity.js +36 -3
  128. package/dist-server/service/activity/activity.js.map +1 -1
  129. package/dist-server/service/activity-approval/activity-approval-query.js +48 -0
  130. package/dist-server/service/activity-approval/activity-approval-query.js.map +1 -1
  131. package/dist-server/service/activity-instance/activity-instance-history.js +1 -1
  132. package/dist-server/service/activity-instance/activity-instance-history.js.map +1 -1
  133. package/dist-server/service/activity-instance/activity-instance-mutation.js +6 -6
  134. package/dist-server/service/activity-instance/activity-instance-mutation.js.map +1 -1
  135. package/dist-server/service/activity-instance/activity-instance-query.js +2 -2
  136. package/dist-server/service/activity-instance/activity-instance-query.js.map +1 -1
  137. package/dist-server/service/activity-instance/activity-instance-type.js +62 -50
  138. package/dist-server/service/activity-instance/activity-instance-type.js.map +1 -1
  139. package/dist-server/service/activity-instance/activity-instance.js +4 -23
  140. package/dist-server/service/activity-instance/activity-instance.js.map +1 -1
  141. package/dist-server/service/activity-stats/activity-stats-query.js +93 -0
  142. package/dist-server/service/activity-stats/activity-stats-query.js.map +1 -0
  143. package/dist-server/service/activity-stats/activity-stats-type.js +47 -0
  144. package/dist-server/service/activity-stats/activity-stats-type.js.map +1 -0
  145. package/dist-server/service/activity-stats/index.js +6 -0
  146. package/dist-server/service/activity-stats/index.js.map +1 -0
  147. package/dist-server/service/activity-summary/activity-summary-query.js +5 -23
  148. package/dist-server/service/activity-summary/activity-summary-query.js.map +1 -1
  149. package/dist-server/service/index.js +2 -0
  150. package/dist-server/service/index.js.map +1 -1
  151. package/dist-server/service/installable-activity/installable-activity.js +4 -0
  152. package/dist-server/service/installable-activity/installable-activity.js.map +1 -1
  153. package/dist-server/tsconfig.tsbuildinfo +1 -1
  154. package/helps/worklist/activity-bank.md +22 -0
  155. package/helps/worklist/{activity-approval.md → activity-stats.md} +1 -1
  156. package/helps/worklist/activity.md +91 -0
  157. package/helps/worklist/draft-list.md +19 -0
  158. package/helps/worklist/starter-list.md +34 -0
  159. package/helps/worklist/worklist-concept.md +11 -8
  160. package/package.json +3 -2
  161. package/server/controllers/activity-instance/assign.ts +1 -1
  162. package/server/controllers/activity-instance/draft.ts +33 -6
  163. package/server/controllers/activity-instance/index.ts +1 -1
  164. package/server/controllers/activity-instance/issue.ts +175 -0
  165. package/server/controllers/activity-instance/pick.ts +1 -1
  166. package/server/controllers/common.ts +43 -9
  167. package/server/routes.ts +2 -2
  168. package/server/service/activity/activity-history.ts +5 -2
  169. package/server/service/activity/activity-query.ts +85 -2
  170. package/server/service/activity/activity-type.ts +15 -2
  171. package/server/service/activity/activity.ts +28 -2
  172. package/server/service/activity-approval/activity-approval-query.ts +45 -1
  173. package/server/service/activity-instance/activity-instance-history.ts +1 -1
  174. package/server/service/activity-instance/activity-instance-mutation.ts +7 -7
  175. package/server/service/activity-instance/activity-instance-query.ts +3 -3
  176. package/server/service/activity-instance/activity-instance-type.ts +13 -4
  177. package/server/service/activity-instance/activity-instance.ts +4 -16
  178. package/server/service/activity-stats/activity-stats-query.ts +94 -0
  179. package/server/service/activity-stats/activity-stats-type.ts +34 -0
  180. package/server/service/activity-stats/index.ts +3 -0
  181. package/server/service/activity-summary/activity-summary-query.ts +5 -23
  182. package/server/service/index.ts +2 -0
  183. package/server/service/installable-activity/installable-activity.ts +4 -1
  184. package/things-factory.config.js +5 -2
  185. package/translations/en.json +23 -0
  186. package/translations/ko.json +29 -6
  187. package/translations/ms.json +23 -0
  188. package/translations/zh.json +23 -0
  189. package/client/pages/activity-instance/activity-instance-page.ts +0 -445
  190. package/server/controllers/activity-instance/post.ts +0 -140
@@ -243,7 +243,7 @@ export class TodoListPage extends connect(store)(localize(i18next)(PageView)) {
243
243
  {
244
244
  type: 'datetime',
245
245
  name: 'createdAt',
246
- header: i18next.t('field.posted-at'),
246
+ header: i18next.t('field.issued-at'),
247
247
  record: {
248
248
  editable: false
249
249
  },
package/client/route.ts CHANGED
@@ -8,6 +8,10 @@ export default function route(page: string) {
8
8
  import('./pages/dashboard/dashboard-home.js')
9
9
  return page
10
10
 
11
+ case 'done-list-calendar':
12
+ import('./pages/todo/done-list-calendar-page.js')
13
+ return page
14
+
11
15
  case 'todo-list':
12
16
  import('./pages/todo/todo-list-page.js')
13
17
  return page
@@ -20,6 +24,10 @@ export default function route(page: string) {
20
24
  import('./pages/todo/approval-pending-list-page.js')
21
25
  return page
22
26
 
27
+ case 'approval-done-list':
28
+ import('./pages/todo/approval-done-list-page.js')
29
+ return page
30
+
23
31
  case 'draft-list':
24
32
  import('./pages/todo/draft-list-page.js')
25
33
  return page
@@ -44,8 +52,8 @@ export default function route(page: string) {
44
52
  import('./pages/activity/activity-page.js')
45
53
  return page
46
54
 
47
- case 'activity-instance':
48
- import('./pages/activity-instance/activity-instance-page.js')
55
+ case 'activity-instance-start':
56
+ import('./pages/activity-instance/activity-instance-start-page.js')
49
57
  return page
50
58
 
51
59
  case 'activity-thread':
@@ -87,5 +95,9 @@ export default function route(page: string) {
87
95
  case 'installable-activity-list':
88
96
  import('./pages/installable-activity/installable-activity-list-page')
89
97
  return page
98
+
99
+ case 'activity-stats-list':
100
+ import('./pages/activity-stats/activity-stats-list-page')
101
+ return page
90
102
  }
91
103
  }
@@ -25,6 +25,10 @@ class ActivityApprovalContextTemplate extends connect(store)(LitElement) {
25
25
  padding: 5px;
26
26
  overflow: auto;
27
27
  }
28
+
29
+ img {
30
+ max-width: 200px;
31
+ }
28
32
  `
29
33
  ]
30
34
 
@@ -0,0 +1,171 @@
1
+ import '@material/mwc-icon'
2
+
3
+ import { html, css, LitElement } from 'lit'
4
+ import { customElement, state } from 'lit/decorators.js'
5
+
6
+ import { connect } from 'pwa-helpers/connect-mixin'
7
+
8
+ import { ContextToolbarOverlayStyle } from '@operato/context/ox-context-toolbar-overlay-style.js'
9
+ import { store } from '@operato/shell'
10
+ import { i18next } from '@operato/i18n'
11
+ import { openPopup } from '@operato/layout'
12
+
13
+ import '@things-factory/organization/dist-client/component/approval-line-view.js'
14
+
15
+ const formatter = new Intl.DateTimeFormat(navigator.language, { dateStyle: 'full', timeStyle: 'short' })
16
+
17
+ @customElement('activity-instance-context-template')
18
+ class ActivityInstanceContextTemplate extends connect(store)(LitElement) {
19
+ static styles = [
20
+ ContextToolbarOverlayStyle,
21
+ css`
22
+ :host {
23
+ background-color: white;
24
+
25
+ width: 100%;
26
+ padding: 5px;
27
+ overflow: auto;
28
+ }
29
+
30
+ img {
31
+ max-width: 200px;
32
+ }
33
+ `
34
+ ]
35
+
36
+ @state() private context
37
+
38
+ render() {
39
+ const activityInstance = this.context.activityInstance || {}
40
+ const {
41
+ name,
42
+ description,
43
+ state,
44
+ thumbnail,
45
+ assignees,
46
+ approvalLine,
47
+ assignedAt,
48
+ startedAt,
49
+ dueAt,
50
+ threadsMin,
51
+ threadsMax
52
+ } = activityInstance || {}
53
+
54
+ const editable = state == 'draft'
55
+
56
+ return html`
57
+ <div>
58
+ <div>name: ${name}</div>
59
+ <div>description: ${description}</div>
60
+ <div>state: ${state}</div>
61
+ <div>assigned at: ${assignedAt && formatter.format(new Date(assignedAt))}</div>
62
+ <div>due at: ${dueAt && formatter.format(new Date(dueAt))}</div>
63
+ <div>started at: ${startedAt && formatter.format(new Date(startedAt))}</div>
64
+ </div>
65
+
66
+ <div>
67
+ <div assignees>
68
+ <label>Assignees</label>
69
+ ${assignees
70
+ ? html`
71
+ <assignees-view
72
+ .value=${assignees}
73
+ @click=${() => this.onClickAssignees(activityInstance)}
74
+ @change=${e => (activityInstance.assignees = e.currentTarget.value)}
75
+ ></assignees-view>
76
+ `
77
+ : html`<mwc-icon-button
78
+ icon="group_add"
79
+ @click=${() => this.onClickAssignees(activityInstance)}
80
+ ></mwc-icon-button>`}
81
+ </div>
82
+
83
+ <div>
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>
98
+
99
+ <section>
100
+ <label for="threads-min">Threads Min</label>
101
+ <input
102
+ id="threadsMin"
103
+ type="number"
104
+ .value=${threadsMin || 0}
105
+ @change=${e => (activityInstance.threadsMin = e.currentTarget.valueAsNumber)}
106
+ />
107
+
108
+ <label for="threads-max">Threads Max</label>
109
+ <input
110
+ id="threads-max"
111
+ type="number"
112
+ .value=${threadsMax || 0}
113
+ @change=${e => (activityInstance.threadsMax = e.currentTarget.valueAsNumber)}
114
+ />
115
+ </section>
116
+
117
+ <img src=${thumbnail} />
118
+ </div>
119
+ `
120
+ }
121
+
122
+ stateChanged(state) {
123
+ this.context = state.route.context
124
+ }
125
+
126
+ onClickAssignees(activityInstance) {
127
+ const { assignees } = activityInstance || {}
128
+
129
+ const popup = openPopup(
130
+ html`
131
+ <assignees-editor-popup
132
+ .value=${assignees}
133
+ .confirmCallback=${value => {
134
+ activityInstance.assignees = value
135
+ this.requestUpdate()
136
+ }}
137
+ ></assignees-editor-popup>
138
+ `,
139
+ {
140
+ backdrop: true,
141
+ help: 'organization/assignees-editor',
142
+ size: 'large',
143
+ title: i18next.t('title.assignee list')
144
+ }
145
+ )
146
+ popup.onclosed = () => {}
147
+ }
148
+
149
+ onClickApprovalLine(activityInstance) {
150
+ const { approvalLine } = activityInstance || {}
151
+
152
+ const popup = openPopup(
153
+ html`
154
+ <approval-line-items-editor-popup
155
+ .value=${approvalLine}
156
+ .confirmCallback=${value => {
157
+ activityInstance.approvalLine = value
158
+ this.requestUpdate()
159
+ }}
160
+ ></approval-line-items-editor-popup>
161
+ `,
162
+ {
163
+ backdrop: true,
164
+ help: 'organization/approval-line-items-editor',
165
+ size: 'large',
166
+ title: i18next.t('title.approval-line item list')
167
+ }
168
+ )
169
+ popup.onclosed = () => {}
170
+ }
171
+ }
@@ -25,6 +25,10 @@ class ActivityThreadContextTemplate extends connect(store)(LitElement) {
25
25
  padding: 5px;
26
26
  overflow: auto;
27
27
  }
28
+
29
+ img {
30
+ max-width: 200px;
31
+ }
28
32
  `
29
33
  ]
30
34
 
@@ -0,0 +1,54 @@
1
+ body {
2
+ --ox-calendar-padding: var(--padding-default);
3
+
4
+ /* monthly common color */
5
+ --calendar-monthly-text-color: var(--secondary-color);
6
+ --calendar-monthly-border: 1px solid rgba(0, 0, 0, 0.1);
7
+ --calendar-monthly-border-width: 0 1px 1px 0px;
8
+
9
+ /* monthly layout */
10
+ --calendar-monthly-ol-margin: var(--margin-default) 0;
11
+ --calendar-monthly-ol-top-border: 2px solid rgba(var(--secondary-color-rgb), 0.7);
12
+ --calendar-current-monty-background-color: var(--theme-white-color);
13
+ --calendar-monthly-label-align: left;
14
+ --calendar-monthly-label-padding: var(--padding-narrow) 0;
15
+ --calendar-monthly-label-color: rgba(var(--secondary-color-rgb), 0.8);
16
+ --calendar-monthly-opacity: 0.5;
17
+ --calendar-monthly-date-label-background-color: var(--status-danger-color);
18
+ --calendar-monthly-date-label-margin: var(--margin-narrow);
19
+ --calendar-monthly-date-label-padding: 0px 6px;
20
+ --calendar-monthly-date-label-color: var(--theme-white-color);
21
+
22
+ --calendar-monthly-background-color: #f4f4f4;
23
+ --calendar-monthly-event-border-radius: var(--border-radius);
24
+ --calendar-monthly-event-margin: var(--padding-narrow) 0 0 0;
25
+ --calendar-monthly-event-padding: 2px var(--padding-default);
26
+ --calendar-monthly-event-border: 3px solid #ccc;
27
+ --calendar-monthly-event-border-width: 0 0 0 3px;
28
+
29
+ /* weekly layout */
30
+ --calendar-weekly-ol-margin: var(--margin-default) 0;
31
+ --calendar-weekly-ol-top-border: 2px solid rgba(var(--secondary-color-rgb), 0.7);
32
+ --calendar-current-week-background-color: var(--theme-white-color);
33
+ --calendar-weekly-label-align: center;
34
+ --calendar-weekly-label-padding: var(--padding-narrow) 0;
35
+ --calendar-weekly-label-color: rgba(var(--secondary-color-rgb), 0.8);
36
+ --calendar-weekly-opacity: 0.5;
37
+ --calendar-weekly-date-label-background-color: var(--status-danger-color);
38
+ --calendar-weekly-date-label-margin: var(--margin-narrow);
39
+ --calendar-weekly-date-label-padding: 0px 6px;
40
+ --calendar-weekly-date-label-color: var(--theme-white-color);
41
+
42
+ --calendar-weekly-background-color: #f4f4f4;
43
+ --calendar-weekly-event-border-radius: var(--border-radius);
44
+ --calendar-weekly-event-margin: var(--padding-narrow) 0 0 0;
45
+ --calendar-weekly-event-padding: 2px var(--padding-default);
46
+ --calendar-weekly-event-border: 3px solid #ccc;
47
+ --calendar-weekly-event-border-width: 0 0 0 3px;
48
+ }
49
+
50
+ @media only screen and (max-width: 460px) {
51
+ body {
52
+ --calendar-monthly-text-color: tomato;
53
+ }
54
+ }
@@ -4,7 +4,9 @@ import { ApprovalLineItem } from '@things-factory/organization'
4
4
  import { ActivityType, ActivityUIType } from './activity'
5
5
  import { AssigneeItem, ActivityInstance, ActivityInstanceStatus } from './activity-instance'
6
6
 
7
- export class NewActivityInstance {
7
+ export class ActivityInstanceDraft {
8
+ id?: string
9
+
8
10
  name?: string
9
11
 
10
12
  activityId?: string
@@ -42,7 +44,7 @@ export class NewActivityInstance {
42
44
  approvalLine?: ApprovalLineItem[]
43
45
  }
44
46
 
45
- export class ActivityInstancePost {
47
+ export class ActivityInstanceIssue {
46
48
  id?: string
47
49
 
48
50
  name?: string
@@ -6,7 +6,7 @@ import { Activity, ActivityType, ActivityUIType } from './activity'
6
6
 
7
7
  export enum ActivityInstanceStatus {
8
8
  Draft = 'draft',
9
- Posted = 'posted',
9
+ Issued = 'issued',
10
10
  PendingAssignment = 'pending-assignment',
11
11
  Assigned = 'assigned',
12
12
  Started = 'started',
@@ -114,7 +114,7 @@ export class ActivityInstance {
114
114
 
115
115
  isDelegatable(): boolean {
116
116
  switch (this.state) {
117
- case ActivityInstanceStatus.Posted:
117
+ case ActivityInstanceStatus.Issued:
118
118
  case ActivityInstanceStatus.Assigned:
119
119
  return true
120
120
  default:
@@ -32,6 +32,11 @@ export enum ActivityUIType {
32
32
  External = 'external'
33
33
  }
34
34
 
35
+ export enum ActivityStartingType {
36
+ post = 'post',
37
+ issue = 'issue'
38
+ }
39
+
35
40
  export class Activity {
36
41
  id?: string
37
42
 
@@ -55,6 +60,8 @@ export class Activity {
55
60
 
56
61
  startable?: boolean
57
62
 
63
+ startingType?: ActivityStartingType
64
+
58
65
  schedule?: string
59
66
 
60
67
  timzeone?: string
@@ -1,3 +1,5 @@
1
+ import { i18next } from '@operato/i18n'
2
+
1
3
  export const Priorities = [
2
4
  { display: '', value: '' },
3
5
  { display: 'Emergency', value: 3 },
@@ -29,3 +31,9 @@ export const ActivityTypes = [
29
31
  { display: 'Subprocess', value: 'sub-process' },
30
32
  { display: 'Call', value: 'call' }
31
33
  ]
34
+
35
+ export const ActivityStartingTypes = [
36
+ { display: '', value: '' },
37
+ { display: i18next.t('label.activity-starting-type-post'), value: 'post' },
38
+ { display: i18next.t('label.activity-starting-type-issue'), value: 'issue' }
39
+ ]
@@ -1,4 +1,5 @@
1
1
  import '@material/mwc-icon';
2
2
  import './templates/activity-approval-context-template.js';
3
3
  import './templates/activity-thread-context-template.js';
4
+ import './templates/activity-instance-context-template.js';
4
5
  export default function bootstrap(): void;
@@ -1,6 +1,7 @@
1
1
  import '@material/mwc-icon';
2
2
  import './templates/activity-approval-context-template.js';
3
3
  import './templates/activity-thread-context-template.js';
4
+ import './templates/activity-instance-context-template.js';
4
5
  import { html } from 'lit-html';
5
6
  import { store } from '@operato/shell';
6
7
  import { openOverlay, TOOL_POSITION } from '@operato/layout';
@@ -22,6 +23,10 @@ export default function bootstrap() {
22
23
  {
23
24
  template: html ` <activity-thread-context-template></activity-thread-context-template> `,
24
25
  context: 'activityThread'
26
+ },
27
+ {
28
+ template: html ` <activity-instance-context-template></activity-instance-context-template> `,
29
+ context: 'activityInstance'
25
30
  }
26
31
  ].forEach(({ template, context }) => {
27
32
  store.dispatch({
@@ -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;AAExD,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;AAC5D,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;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;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'\n\nimport { html } from 'lit-html'\nimport { store } from '@operato/shell'\nimport { openOverlay, TOOL_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 ;[\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 ].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"]}
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;AAC5D,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;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 { openOverlay, TOOL_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 ;[\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"]}
@@ -1,6 +1,6 @@
1
- import '@material/mwc-button';
2
1
  import '@material/mwc-icon-button';
3
2
  import '@operato/property-editor/ox-properties-dynamic-view.js';
3
+ import '@material/mwc-button';
4
4
  import '@things-factory/organization';
5
5
  import { LitElement } from 'lit';
6
6
  declare const ActivityStarterForm_base: (new (...args: any[]) => LitElement) & typeof LitElement;
@@ -13,9 +13,6 @@ export declare class ActivityStarterForm extends ActivityStarterForm_base {
13
13
  firstUpdated(): void;
14
14
  fetchActivity(id: any): Promise<void>;
15
15
  draftActivityInstance(): Promise<void>;
16
- updateActivityInstance(): Promise<void>;
17
- postActivityInstance(): Promise<void>;
18
- onClickAssignees(): void;
19
- onClickApprovalLine(): void;
16
+ openActivityInstanceStart(activityInstance: any): void;
20
17
  }
21
18
  export {};