@things-factory/dataset 6.0.113 → 6.0.115

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/dataset",
3
- "version": "6.0.113",
3
+ "version": "6.0.115",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "things-factory": true,
@@ -36,19 +36,19 @@
36
36
  "@operato/shell": "^1.0.1",
37
37
  "@operato/styles": "^1.0.0",
38
38
  "@operato/utils": "^1.0.1",
39
- "@things-factory/auth-base": "^6.0.113",
40
- "@things-factory/aws-base": "^6.0.113",
41
- "@things-factory/board-service": "^6.0.113",
39
+ "@things-factory/auth-base": "^6.0.115",
40
+ "@things-factory/aws-base": "^6.0.115",
41
+ "@things-factory/board-service": "^6.0.115",
42
42
  "@things-factory/env": "^6.0.101",
43
- "@things-factory/organization": "^6.0.113",
44
- "@things-factory/scheduler-client": "^6.0.113",
45
- "@things-factory/shell": "^6.0.113",
46
- "@things-factory/work-shift": "^6.0.113",
47
- "@things-factory/worklist": "^6.0.113",
43
+ "@things-factory/organization": "^6.0.115",
44
+ "@things-factory/scheduler-client": "^6.0.115",
45
+ "@things-factory/shell": "^6.0.115",
46
+ "@things-factory/work-shift": "^6.0.115",
47
+ "@things-factory/worklist": "^6.0.115",
48
48
  "cron-parser": "^4.3.0",
49
49
  "moment-timezone": "^0.5.40",
50
50
  "simple-statistics": "^7.8.3",
51
51
  "statistics": "^3.3.0"
52
52
  },
53
- "gitHead": "1f753c3122911f7e014edae7e469784cdfb8678e"
53
+ "gitHead": "4937b4fe2040f49d906a4df5cdfced17553b83ef"
54
54
  }
@@ -1,3 +1,5 @@
1
+ import { In } from 'typeorm'
2
+
1
3
  import { Activity, ActivityInstance, ActivityInstanceStatus } from '@things-factory/worklist'
2
4
  import { NewDataSample } from 'service/data-sample/data-sample-type'
3
5
  import { createDataSample } from '../controllers/create-data-sample'
@@ -8,7 +10,7 @@ async function callback(activityInstance: ActivityInstance, context: ResolverCon
8
10
 
9
11
  if (state == ActivityInstanceStatus.Ended) {
10
12
  const activity = (await tx.getRepository(Activity).findOneBy({
11
- domain: { id: domain.id },
13
+ domain: { id: In([domain.id, domain.parentId].filter(Boolean)) },
12
14
  name: 'Collect Data'
13
15
  })) as Activity
14
16
 
@@ -1,3 +1,4 @@
1
+ import { In } from 'typeorm'
1
2
  import { Arg, Args, Ctx, FieldResolver, Query, Resolver, Root } from 'type-graphql'
2
3
 
3
4
  import { Attachment } from '@things-factory/attachment-base'
@@ -14,7 +15,7 @@ export class DataKeySetQuery {
14
15
  const { domain } = context.state
15
16
 
16
17
  return await getRepository(DataKeySet).findOne({
17
- where: { domain: { id: domain.id }, id }
18
+ where: { domain: { id: In([domain.id, domain.parentId].filter(Boolean)) }, id }
18
19
  })
19
20
  }
20
21
 
@@ -1,3 +1,4 @@
1
+ import { In } from 'typeorm'
1
2
  import { Arg, Args, Ctx, Directive, FieldResolver, Query, Resolver, Root } from 'type-graphql'
2
3
 
3
4
  import { Attachment } from '@things-factory/attachment-base'
@@ -22,7 +23,7 @@ export class DataSetQuery {
22
23
  const { domain } = context.state
23
24
 
24
25
  return await getRepository(DataSet).findOne({
25
- where: { domain: { id: domain.id }, id }
26
+ where: { domain: { id: In([domain.id, domain.parentId].filter(Boolean)) }, id }
26
27
  })
27
28
  }
28
29
 
@@ -32,7 +33,7 @@ export class DataSetQuery {
32
33
  const { domain } = context.state
33
34
 
34
35
  return await getRepository(DataSet).findOne({
35
- where: { domain: { id: domain.id }, name }
36
+ where: { domain: { id: In([domain.id, domain.parentId].filter(Boolean)) }, name }
36
37
  })
37
38
  }
38
39