@things-factory/organization 10.1.84 → 10.1.86

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": "10.1.84",
3
+ "version": "10.1.86",
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": "12df439ce09de2bc9aa87d4578766f46bfad48fd"
44
+ "gitHead": "8e56ed31b1c81934257f2938b9b1a51f1852773f"
45
45
  }
@@ -0,0 +1,32 @@
1
+ import { readFileSync } from 'fs'
2
+ import path from 'path'
3
+
4
+ /**
5
+ * The department picker's boxes are headed by the department code, and its popup says what is picked.
6
+ *
7
+ * ox-tree-vertical prints `id-property` as the header of every box. Set to the database id, the picker drew
8
+ * a UUID over each department (09-30, OA). Opened from a grid cell or a filter, the popup was titled
9
+ * "select item".
10
+ */
11
+ const read = (file: string) => readFileSync(path.resolve(__dirname, '..', file), 'utf-8')
12
+
13
+ describe('the department picker', () => {
14
+ it('heads each box with the department code', () => {
15
+ const source = read('client/component/department-selector.ts')
16
+ const tag = source.slice(source.indexOf('<ox-tree-vertical'), source.indexOf('</ox-tree-vertical>'))
17
+ expect(tag).toMatch(/\sid-property="controlNo"/)
18
+ })
19
+
20
+ it.each(['client/grist-editor/grist-editor-department-object.ts', 'client/filters-form/ox-filter-department-object.ts'])(
21
+ '%s titles the popup as picking a department',
22
+ file => {
23
+ const source = read(file)
24
+ expect(source.includes("i18next.t('title.select department')")).toBe(true)
25
+ expect(source.includes('title.select_item')).toBe(false)
26
+ }
27
+ )
28
+
29
+ it.each(['en', 'ko', 'ja', 'zh', 'ms'])('the title is translated in %s', lang => {
30
+ expect(JSON.parse(read(`translations/${lang}.json`))['title.select department']).toBeTruthy()
31
+ })
32
+ })
@@ -81,6 +81,7 @@
81
81
  "title.import employee": "import employees",
82
82
  "title.lookup system-user": "lookup system user",
83
83
  "title.my-approval-line template list": "my approval lines",
84
+ "title.select department": "select department",
84
85
  "title.organization": "organization",
85
86
  "title.recipients editor": "recipients editor",
86
87
  "title.person-membership": "membership",
@@ -81,6 +81,7 @@
81
81
  "title.import employee": "社員の取り込み",
82
82
  "title.lookup system-user": "システムユーザーを検索",
83
83
  "title.my-approval-line template list": "自分の決裁ライン",
84
+ "title.select department": "部署選択",
84
85
  "title.organization": "組織",
85
86
  "title.recipients editor": "受信者リストの編集",
86
87
  "title.person-membership": "所属",
@@ -81,6 +81,7 @@
81
81
  "title.import employee": "직원 가져오기",
82
82
  "title.lookup system-user": "시스템 사용자 검색",
83
83
  "title.my-approval-line template list": "내 결재선",
84
+ "title.select department": "부서 선택",
84
85
  "title.organization": "조직",
85
86
  "title.recipients editor": "수신자 목록 편집",
86
87
  "title.person-membership": "소속",
@@ -81,6 +81,7 @@
81
81
  "title.import employee": "import pekerja",
82
82
  "title.lookup system-user": "cari pengguna sistem",
83
83
  "title.my-approval-line template list": "talian kelulusan saya",
84
+ "title.select department": "pilih jabatan",
84
85
  "title.organization": "organisasi",
85
86
  "title.recipients editor": "penyunting penerima",
86
87
  "title.person-membership": "keanggotaan",
@@ -81,6 +81,7 @@
81
81
  "title.import employee": "导入员工",
82
82
  "title.lookup system-user": "查找系统用户",
83
83
  "title.my-approval-line template list": "我的审批线",
84
+ "title.select department": "选择部门",
84
85
  "title.organization": "组织",
85
86
  "title.recipients editor": "收件人列表编辑",
86
87
  "title.person-membership": "所属",