@things-factory/worklist 6.1.58 → 6.1.59

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 (38) hide show
  1. package/client/pages/activity-instance/activity-instance-view.ts +116 -26
  2. package/client/types/activity-approval.ts +62 -0
  3. package/client/types/activity-thread.ts +3 -36
  4. package/dist-client/pages/activity-instance/activity-instance-view.d.ts +6 -2
  5. package/dist-client/pages/activity-instance/activity-instance-view.js +95 -24
  6. package/dist-client/pages/activity-instance/activity-instance-view.js.map +1 -1
  7. package/dist-client/tsconfig.tsbuildinfo +1 -1
  8. package/dist-client/types/activity-approval.d.ts +36 -0
  9. package/dist-client/types/activity-approval.js +17 -0
  10. package/dist-client/types/activity-approval.js.map +1 -0
  11. package/dist-client/types/activity-thread.d.ts +2 -0
  12. package/dist-client/types/activity-thread.js +0 -33
  13. package/dist-client/types/activity-thread.js.map +1 -1
  14. package/dist-server/controllers/activity-approval/abort.js +1 -1
  15. package/dist-server/controllers/activity-approval/abort.js.map +1 -1
  16. package/dist-server/controllers/activity-approval/approve.js +1 -1
  17. package/dist-server/controllers/activity-approval/approve.js.map +1 -1
  18. package/dist-server/controllers/activity-approval/delegate.js +1 -1
  19. package/dist-server/controllers/activity-approval/delegate.js.map +1 -1
  20. package/dist-server/controllers/activity-approval/reject.js +1 -1
  21. package/dist-server/controllers/activity-approval/reject.js.map +1 -1
  22. package/dist-server/service/activity-thread/activity-thread-query.js +14 -0
  23. package/dist-server/service/activity-thread/activity-thread-query.js.map +1 -1
  24. package/dist-server/service/activity-thread/activity-thread.js +6 -0
  25. package/dist-server/service/activity-thread/activity-thread.js.map +1 -1
  26. package/dist-server/tsconfig.tsbuildinfo +1 -1
  27. package/package.json +3 -3
  28. package/server/controllers/activity-approval/abort.ts +1 -1
  29. package/server/controllers/activity-approval/approve.ts +1 -1
  30. package/server/controllers/activity-approval/delegate.ts +1 -1
  31. package/server/controllers/activity-approval/reject.ts +1 -1
  32. package/server/service/activity-thread/activity-thread-query.ts +11 -0
  33. package/server/service/activity-thread/activity-thread.ts +5 -0
  34. package/translations/en.json +2 -0
  35. package/translations/ja.json +2 -0
  36. package/translations/ko.json +2 -0
  37. package/translations/ms.json +2 -0
  38. package/translations/zh.json +2 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/worklist",
3
- "version": "6.1.58",
3
+ "version": "6.1.59",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "things-factory": true,
@@ -33,10 +33,10 @@
33
33
  "@things-factory/auth-base": "^6.1.48",
34
34
  "@things-factory/board-service": "^6.1.55",
35
35
  "@things-factory/context-ui": "^6.1.48",
36
- "@things-factory/organization": "^6.1.57",
36
+ "@things-factory/organization": "^6.1.59",
37
37
  "@things-factory/scheduler-client": "^6.1.48",
38
38
  "@things-factory/shell": "^6.1.48",
39
39
  "moment-timezone": "^0.5.40"
40
40
  },
41
- "gitHead": "14638f64619902e1ebcc8ca81d76275d5453f9d4"
41
+ "gitHead": "5171439c6798421e40997498f5e1936f86af2671"
42
42
  }
@@ -25,7 +25,7 @@ export async function abort(
25
25
 
26
26
  /*
27
27
  Prerequisite of Abortion
28
- - Previous judgement should be 'pending'
28
+ - Previous judgment should be 'pending'
29
29
  */
30
30
  if (activityApproval.judgment !== ActivityApprovalJudgment.Pending) {
31
31
  throw new Error(
@@ -26,7 +26,7 @@ export async function approve(
26
26
 
27
27
  /*
28
28
  Prerequisite of Approval
29
- - Previous judgement should be 'pending'
29
+ - Previous judgment should be 'pending'
30
30
  */
31
31
  if (activityApproval.judgment !== ActivityApprovalJudgment.Pending) {
32
32
  throw new Error(
@@ -25,7 +25,7 @@ export async function delegate(
25
25
 
26
26
  /*
27
27
  Prerequisite of Delegation
28
- - Previous judgement should be 'pending'
28
+ - Previous judgment should be 'pending'
29
29
  */
30
30
  if (activityApproval.judgment !== ActivityApprovalJudgment.Pending) {
31
31
  throw new Error(
@@ -25,7 +25,7 @@ export async function reject(
25
25
 
26
26
  /*
27
27
  Prerequisite of Rejection
28
- - Previous judgement should be 'pending'
28
+ - Previous judgment should be 'pending'
29
29
  */
30
30
  if (activityApproval.judgment !== ActivityApprovalJudgment.Pending) {
31
31
  throw new Error(
@@ -5,6 +5,7 @@ import { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from
5
5
 
6
6
  import { ActivityInstance } from '../activity-instance/activity-instance'
7
7
  import { ActivityThread, ActivityThreadStatus } from './activity-thread'
8
+ import { ActivityApproval } from '../activity-approval/activity-approval'
8
9
  import { ActivityThreadList } from './activity-thread-type'
9
10
 
10
11
  @Resolver(ActivityThread)
@@ -104,6 +105,16 @@ export class ActivityThreadQuery {
104
105
  return await getRepository(ActivityInstance).findOneBy({ id: activityThread.activityInstanceId })
105
106
  }
106
107
 
108
+ @FieldResolver(type => [ActivityApproval])
109
+ async activityApprovals(
110
+ @Root() activityThread: ActivityThread,
111
+ @Ctx() context: ResolverContext
112
+ ): Promise<ActivityApproval[]> {
113
+ return await getRepository(ActivityApproval).findBy({
114
+ activityThread: { id: activityThread.id }
115
+ })
116
+ }
117
+
107
118
  @FieldResolver(type => Domain)
108
119
  async domain(@Root() activityThread: ActivityThread): Promise<Domain> {
109
120
  return await getRepository(Domain).findOneBy({ id: activityThread.domainId })
@@ -16,6 +16,7 @@ import { User } from '@things-factory/auth-base'
16
16
  import { Domain, ScalarObject } from '@things-factory/shell'
17
17
 
18
18
  import { ActivityInstance } from '../activity-instance/activity-instance'
19
+ import { ActivityApproval } from '../activity-approval/activity-approval'
19
20
 
20
21
  export enum ActivityThreadStatus {
21
22
  Assigned = 'assigned',
@@ -87,6 +88,10 @@ export class ActivityThread {
87
88
  @Field({ nullable: true })
88
89
  transaction?: string
89
90
 
91
+ @OneToMany(type => ActivityApproval, activityApproval => activityApproval.activityThread)
92
+ @Field(type => [ActivityApproval])
93
+ activityApprovals?: ActivityApproval[]
94
+
90
95
  @Column({ nullable: true })
91
96
  @Field({ nullable: true })
92
97
  dueAt?: Date
@@ -36,6 +36,8 @@
36
36
  "field.mandatory": "mandatory",
37
37
  "field.multiple": "multiple",
38
38
  "field.options": "options",
39
+ "field.order": "order",
40
+ "field.output": "output",
39
41
  "field.priority": "priority",
40
42
  "field.provider": "provider",
41
43
  "field.quantifier": "quantifier",
@@ -36,6 +36,8 @@
36
36
  "field.mandatory": "必須",
37
37
  "field.multiple": "多重インスタンス",
38
38
  "field.options": "選択オプション",
39
+ "field.order": "じゅんじょ",
40
+ "field.output": "しゅつりょく",
39
41
  "field.priority": "優先順位",
40
42
  "field.provider": "プロバイダー",
41
43
  "field.quantifier": "数量",
@@ -36,6 +36,8 @@
36
36
  "field.mandatory": "필수",
37
37
  "field.multiple": "다중인스턴스",
38
38
  "field.options": "선택옵션",
39
+ "field.order": "순서",
40
+ "field.output": "출력값",
39
41
  "field.priority": "우선순위",
40
42
  "field.provider": "공급자",
41
43
  "field.quantifier": "수량",
@@ -36,6 +36,8 @@
36
36
  "field.mandatory": "wajib",
37
37
  "field.multiple": "pelbagai",
38
38
  "field.options": "pilihan",
39
+ "field.order": "urutan",
40
+ "field.output": "output",
39
41
  "field.priority": "keutamaan",
40
42
  "field.provider": "penyedia",
41
43
  "field.quantifier": "pemboleh ubah",
@@ -37,6 +37,8 @@
37
37
  "field.mandatory": "必填",
38
38
  "field.multiple": "多项",
39
39
  "field.options": "选项",
40
+ "field.order": "顺序",
41
+ "field.output": "输出",
40
42
  "field.priority": "优先级",
41
43
  "field.quantifier": "定量器",
42
44
  "field.schedule": "日程",