@things-factory/organization 10.1.79 → 10.1.81
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/dist-client/bootstrap.js +2 -0
- package/dist-client/bootstrap.js.map +1 -1
- package/dist-client/entity360/department-360.d.ts +28 -0
- package/dist-client/entity360/department-360.js +111 -0
- package/dist-client/entity360/department-360.js.map +1 -0
- package/dist-client/entity360/person-membership-section.d.ts +2 -0
- package/dist-client/entity360/person-membership-section.js +10 -8
- package/dist-client/entity360/person-membership-section.js.map +1 -1
- package/dist-client/grist-editor/grist-renderer-department-object.js +2 -1
- package/dist-client/grist-editor/grist-renderer-department-object.js.map +1 -1
- package/dist-client/pages/employee/employee-list-page.js +1 -0
- package/dist-client/pages/employee/employee-list-page.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/tests/entity360.test.ts +36 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/organization",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.81",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "dist-client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"@things-factory/contact": "^10.1.79",
|
|
42
42
|
"@things-factory/shell": "^10.1.79"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "0c4f91d92c8214a9b2eca6690a7ed48bd2d828cc"
|
|
45
45
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { readFileSync } from 'fs'
|
|
2
|
+
import path from 'path'
|
|
3
|
+
|
|
4
|
+
const here = (file: string) =>
|
|
5
|
+
readFileSync(path.resolve(__dirname, '..', file), 'utf-8').replace(/\/\*[\s\S]*?\*\//g, '')
|
|
6
|
+
|
|
7
|
+
describe('the organization 360', () => {
|
|
8
|
+
it('★ registers Department before the membership section can draw it as a link', () => {
|
|
9
|
+
const bootstrap = here('client/bootstrap.ts')
|
|
10
|
+
expect(bootstrap).toMatch(/registerDepartmentKind\(\)\s*\n\s*registerPersonMembershipSection\(\)/)
|
|
11
|
+
|
|
12
|
+
const department = here('client/entity360/department-360.ts')
|
|
13
|
+
expect(department).toMatch(/kind: 'department',\s*typenames: \['Department'\]/)
|
|
14
|
+
expect(department).toMatch(/registerEntity360Section\('department', \{\s*name: 'overview'/)
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
it('★ opens a department from the membership instead of ending the organizational trail in plain text', () => {
|
|
18
|
+
const membership = here('client/entity360/person-membership-section.ts')
|
|
19
|
+
expect(membership).toMatch(/department \{\s*id\s+__typename\s+name/)
|
|
20
|
+
expect(membership).toMatch(/entity360Name\(one\.department, one\.department\.name \|\| none\)/)
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
it('★ the reusable department cell opens the same 360, with a typename supplied by its employee query', () => {
|
|
24
|
+
const renderer = here('client/grist-editor/grist-renderer-department-object.ts')
|
|
25
|
+
expect(renderer).toMatch(/entity360Name\(value, name \|\| ''\)/)
|
|
26
|
+
|
|
27
|
+
const employees = here('client/pages/employee/employee-list-page.ts')
|
|
28
|
+
expect(employees).toMatch(/department \{\s*id\s+__typename\s+controlNo/)
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
it('keeps the manager as an employee name until the server supplies the linked user identity', () => {
|
|
32
|
+
const department = here('client/entity360/department-360.ts')
|
|
33
|
+
expect(department).toMatch(/manager \{\s*name\s*\}/)
|
|
34
|
+
expect(department).toMatch(/department\.manager\?\.name \|\| none/)
|
|
35
|
+
})
|
|
36
|
+
})
|