@things-factory/organization 7.0.72 → 7.0.73

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/organization",
3
- "version": "7.0.72",
3
+ "version": "7.0.73",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "things-factory": true,
@@ -35,8 +35,8 @@
35
35
  "@operato/shell": "^7.0.0",
36
36
  "@things-factory/auth-base": "^7.0.72",
37
37
  "@things-factory/code-ui": "^7.0.72",
38
- "@things-factory/contact": "^7.0.72",
38
+ "@things-factory/contact": "^7.0.73",
39
39
  "@things-factory/shell": "^7.0.72"
40
40
  },
41
- "gitHead": "6131a0f20fcc11bc8e9e9d839de8e9700a2b0ac0"
41
+ "gitHead": "5ce078745084f07a5df7d1ac9de56b2699a07a34"
42
42
  }
@@ -100,7 +100,7 @@ export class EmployeeMutation {
100
100
  where: { domain: { id: domain.id }, id }
101
101
  })
102
102
 
103
- onUpdateEmployeeAsSystemUser(patch, context)
103
+ await onUpdateEmployeeAsSystemUser(patch, context)
104
104
 
105
105
  const result = await repository.save({
106
106
  ...employee,
@@ -216,7 +216,7 @@ export class EmployeeMutation {
216
216
 
217
217
  const employee = await employeeRepo.findOneBy({ id: updateRecord.id })
218
218
 
219
- onUpdateEmployeeAsSystemUser(updateRecord, context)
219
+ await onUpdateEmployeeAsSystemUser(updateRecord, context)
220
220
 
221
221
  const result = await employeeRepo.save({
222
222
  ...employee,
@@ -258,7 +258,7 @@ export class EmployeeMutation {
258
258
  async deleteEmployee(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {
259
259
  const { domain, tx } = context.state
260
260
 
261
- onDeleteEmployeeAsSystemUser(id, context)
261
+ await onDeleteEmployeeAsSystemUser(id, context)
262
262
  await getRepository(Employee, tx).delete({ domain: { id: domain.id }, id })
263
263
  await deleteAttachmentsByRef(null, { refBys: [id] }, context)
264
264
 
@@ -278,7 +278,7 @@ export class EmployeeMutation {
278
278
  const { domain, tx } = context.state
279
279
 
280
280
  for (let id of ids) {
281
- onDeleteEmployeeAsSystemUser(id, context)
281
+ await await onDeleteEmployeeAsSystemUser(id, context)
282
282
  }
283
283
 
284
284
  await getRepository(Employee, tx).delete({
@@ -381,6 +381,6 @@ export class EmployeeMutation {
381
381
  @Arg('employeeId', { description: 'Employee Id' }) employeeId: string,
382
382
  @Ctx() context: ResolverContext
383
383
  ): Promise<boolean> {
384
- return !!registerEmployeeAsSystemUser(employeeId, context)
384
+ return !!(await registerEmployeeAsSystemUser(employeeId, context))
385
385
  }
386
386
  }
@@ -14,10 +14,10 @@ async function getContactItem(contactId: string, type: string, label: string, co
14
14
  const { items } = contact
15
15
 
16
16
  if (!items || !(items instanceof Array)) {
17
- return ''
17
+ return
18
18
  }
19
19
 
20
- return items?.find(item => item.type === type && item.label === label)?.value || ''
20
+ return items?.find(item => item.type === type && item.label === label)?.value
21
21
  }
22
22
 
23
23
  @Resolver(Employee)