@things-factory/work-shift 6.2.49 → 6.2.51

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/work-shift",
3
- "version": "6.2.49",
3
+ "version": "6.2.51",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -24,10 +24,10 @@
24
24
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
25
25
  },
26
26
  "dependencies": {
27
- "@things-factory/auth-base": "^6.2.49",
27
+ "@things-factory/auth-base": "^6.2.51",
28
28
  "@things-factory/env": "^6.2.33",
29
- "@things-factory/shell": "^6.2.48",
29
+ "@things-factory/shell": "^6.2.51",
30
30
  "moment-timezone": "^0.5.40"
31
31
  },
32
- "gitHead": "57266c96220301729f9c5cd633af1a4e2a651096"
32
+ "gitHead": "365e8ae6475eede1a4fd51460c24569d13de14b6"
33
33
  }
@@ -6,7 +6,7 @@ import { WorkShiftPatch } from './work-shift-type'
6
6
 
7
7
  @Resolver(WorkShift)
8
8
  export class WorkShiftMutation {
9
- @Directive('@privilege(category: "system", privilege: "mutation", domainOwnerGranted: true)')
9
+ @Directive('@privilege(category: "work-shift", privilege: "mutation", domainOwnerGranted: true)')
10
10
  @Directive('@transaction')
11
11
  @Mutation(returns => [WorkShift], { description: "To modify multiple WorkShifts' information" })
12
12
  async updateMultipleWorkShift(
@@ -18,7 +18,7 @@ export class WorkShiftMutation {
18
18
  let results = []
19
19
  const workShiftRepo = tx.getRepository(WorkShift)
20
20
 
21
- await workShiftRepo.delete({ domain })
21
+ await workShiftRepo.delete({ domain: { id: domain.id } })
22
22
 
23
23
  for (let i = 0; i < patches.length; i++) {
24
24
  const patch = patches[i]
@@ -36,7 +36,7 @@ export class WorkShiftMutation {
36
36
  return results
37
37
  }
38
38
 
39
- @Directive('@privilege(category: "system", privilege: "mutation", domainOwnerGranted: true)')
39
+ @Directive('@privilege(category: "work-shift", privilege: "mutation", domainOwnerGranted: true)')
40
40
  @Directive('@transaction')
41
41
  @Mutation(returns => Boolean, { description: 'To delete multiple workShifts' })
42
42
  async deleteWorkShifts(