@things-factory/biz-base 10.1.233 → 10.1.241
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-server/service/bizplace/bizplace-access.d.ts +4 -1
- package/dist-server/service/bizplace/bizplace-access.js +10 -7
- package/dist-server/service/bizplace/bizplace-access.js.map +1 -1
- package/dist-server/service/bizplace/bizplace-mutation.js +7 -7
- package/dist-server/service/bizplace/bizplace-mutation.js.map +1 -1
- package/dist-server/service/bizplace/bizplace-query.js +1 -1
- package/dist-server/service/bizplace/bizplace-query.js.map +1 -1
- package/dist-server/service/company/company-mutation.js +3 -0
- package/dist-server/service/company/company-mutation.js.map +1 -1
- package/dist-server/service/company/company.js +3 -2
- package/dist-server/service/company/company.js.map +1 -1
- package/dist-server/service/counterparty/counterparty-bank-account-service.js +3 -1
- package/dist-server/service/counterparty/counterparty-bank-account-service.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/tests/bizplace-access.test.cjs +6 -0
- package/tests/counterparty-bank-account.test.mjs +9 -1
- package/tests/our-company.test.mjs +9 -0
- package/translations/en.json +5 -1
- package/translations/es.json +5 -1
- package/translations/ja.json +5 -1
- package/translations/ko.json +5 -1
- package/translations/ms.json +5 -1
- package/translations/zh.json +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/biz-base",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.241",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"test": "npm run build && node --test tests/*.test.mjs tests/*.test.cjs"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@things-factory/attachment-base": "^10.1.
|
|
45
|
-
"@things-factory/auth-base": "^10.1.
|
|
44
|
+
"@things-factory/attachment-base": "^10.1.241",
|
|
45
|
+
"@things-factory/auth-base": "^10.1.241"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "d7fe2e1a1eb7c02cb21b897da26d385df014f908"
|
|
48
48
|
}
|
|
@@ -173,3 +173,9 @@ test('valid bulk update preserves creator and domain', async () => {
|
|
|
173
173
|
assert.equal(own.domain.id, 'A')
|
|
174
174
|
assert.equal(own.creator.id, 'u')
|
|
175
175
|
})
|
|
176
|
+
/* Inline help audit 2026-10-30: the refusal reached a Korean reader as 「Bizplace not found or access denied.」. */
|
|
177
|
+
test('★ the refusal is said in the reader’s words, still FORBIDDEN', async () => {
|
|
178
|
+
const ko = require('../translations/ko.json')
|
|
179
|
+
const t = (key, options) => ko[key] ?? options?.defaultValue
|
|
180
|
+
await assert.rejects(query.bizplace('b', { ...context, t }), e => e.extensions?.code === 'FORBIDDEN' && e.message === ko['error.bizplace-not-accessible'])
|
|
181
|
+
})
|
|
@@ -51,7 +51,15 @@ test('an account is registered with its bank, number and holder - the number kep
|
|
|
51
51
|
assert.equal(one.holderName, '(주)한빛')
|
|
52
52
|
assert.equal(one.counterpartyId, hanbit.id)
|
|
53
53
|
await assert.rejects(save([{ counterpartyId: hanbit.id, accountNumber: '-' }]), { code: 'counterparty-account-number-required' })
|
|
54
|
-
await assert.rejects(save([{ accountNumber: '1234' }]), { code: 'counterparty-
|
|
54
|
+
await assert.rejects(save([{ accountNumber: '1234' }]), { code: 'counterparty-account-counterparty-required' })
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
test('a number with letters or other marks is refused, naming it - nothing of it is dropped without a word', async () => {
|
|
58
|
+
for (const number of ['110-123-45678O', 'IBK 026-1234', '110.123.456789', '110/123'])
|
|
59
|
+
await assert.rejects(save([{ counterpartyId: hanbit.id, accountNumber: number }]), { code: 'counterparty-account-number-letters', params: { value: number } }, number)
|
|
60
|
+
const [spaced] = await save([{ counterpartyId: nuri.id, accountNumber: ' 301 2345 6789 ' }])
|
|
61
|
+
assert.equal(spaced.accountNumber, '30123456789', 'spaces and hyphens are how a bank prints it')
|
|
62
|
+
await save([{ id: spaced.id, cuFlag: '-' }])
|
|
55
63
|
})
|
|
56
64
|
|
|
57
65
|
test('a number is one counterparty account in the domain - the refusal names who holds it', async () => {
|
|
@@ -55,6 +55,15 @@ test('★ the first save makes the row, later saves change it - one row a domain
|
|
|
55
55
|
assert.equal(await biz.ourCompanyOf(other, db), null, "another domain's company is its own")
|
|
56
56
|
})
|
|
57
57
|
|
|
58
|
+
test('a trade name is unique in its domain, not across domains', async () => {
|
|
59
|
+
const name = (await biz.ourCompanyOf(domain, db)).name
|
|
60
|
+
assert.equal((await save({ name }, other)).name, name, 'another business may share the trade name')
|
|
61
|
+
const third = await db.getRepository(shell.Domain).save({ name: 'third', subdomain: 'our-three' })
|
|
62
|
+
await db.getRepository(biz.Company).save({ domain: third, name: '먼저 있던 회사', createdAt: new Date('2020-01-01') })
|
|
63
|
+
await db.getRepository(biz.Company).save({ domain: third, name: '나중 회사', createdAt: new Date('2021-01-01') })
|
|
64
|
+
await assert.rejects(save({ name: '나중 회사' }, third), { code: 'company-name-taken', params: { value: '나중 회사' } })
|
|
65
|
+
})
|
|
66
|
+
|
|
58
67
|
test('★ without a seal a print carries none; the seal opens by its path only for whoever keeps the company', async () => {
|
|
59
68
|
assert.equal((await biz.printedCompanyOf(domain, { seal: true, manager: db })).seal, undefined)
|
|
60
69
|
const asked = []
|
package/translations/en.json
CHANGED
|
@@ -23,5 +23,9 @@
|
|
|
23
23
|
"task.biz-base.company-keeping.name": "Keeping our company and sites",
|
|
24
24
|
"task.biz-base.company-keeping.description": "Reads and changes our company, its business sites and the business options.",
|
|
25
25
|
"error.company-not-found": "Save the company first",
|
|
26
|
-
"error.company-name-required": "A company needs a name"
|
|
26
|
+
"error.company-name-required": "A company needs a name",
|
|
27
|
+
"error.company-name-taken": "Trade name {value} is already another company's in this workspace.",
|
|
28
|
+
"error.counterparty-account-number-letters": "Account number '{value}' has characters other than digits and hyphens. Enter digits and hyphens only.",
|
|
29
|
+
"error.counterparty-account-counterparty-required": "Choose the account's counterparty.",
|
|
30
|
+
"error.bizplace-not-accessible": "The bizplace was not found, or it is not yours to see. Reload the list."
|
|
27
31
|
}
|
package/translations/es.json
CHANGED
|
@@ -23,5 +23,9 @@
|
|
|
23
23
|
"task.biz-base.company-keeping.name": "Mantener la empresa y sus sedes",
|
|
24
24
|
"task.biz-base.company-keeping.description": "Lee y modifica nuestra empresa, sus sedes y las opciones de negocio.",
|
|
25
25
|
"error.company-not-found": "Guarde primero la empresa",
|
|
26
|
-
"error.company-name-required": "La empresa necesita un nombre"
|
|
26
|
+
"error.company-name-required": "La empresa necesita un nombre",
|
|
27
|
+
"error.company-name-taken": "La razón social {value} ya la usa otra empresa de este espacio de trabajo.",
|
|
28
|
+
"error.counterparty-account-number-letters": "El número de cuenta '{value}' tiene caracteres que no son dígitos ni guiones. Introduzca solo dígitos y guiones.",
|
|
29
|
+
"error.counterparty-account-counterparty-required": "Elija la contraparte de la cuenta.",
|
|
30
|
+
"error.bizplace-not-accessible": "No se encontró el centro o no puede verlo. Vuelva a cargar la lista."
|
|
27
31
|
}
|
package/translations/ja.json
CHANGED
|
@@ -19,5 +19,9 @@
|
|
|
19
19
|
"task.biz-base.company-keeping.name": "会社・事業所の管理",
|
|
20
20
|
"task.biz-base.company-keeping.description": "自社・事業所・事業オプションを読み、変更する。",
|
|
21
21
|
"error.company-not-found": "先に会社情報を保存してください",
|
|
22
|
-
"error.company-name-required": "商号を入力してください"
|
|
22
|
+
"error.company-name-required": "商号を入力してください",
|
|
23
|
+
"error.company-name-taken": "商号 {value} はこのワークスペースの別の会社が使っています。",
|
|
24
|
+
"error.counterparty-account-number-letters": "口座番号 '{value}' に数字とハイフン(-)以外の文字があります。数字とハイフンだけで入力してください。",
|
|
25
|
+
"error.counterparty-account-counterparty-required": "口座の取引先を選んでください。",
|
|
26
|
+
"error.bizplace-not-accessible": "事業場が見つからないか、閲覧できない事業場です。一覧を再読み込みしてください。"
|
|
23
27
|
}
|
package/translations/ko.json
CHANGED
|
@@ -23,5 +23,9 @@
|
|
|
23
23
|
"task.biz-base.company-keeping.name": "회사·사업장 관리",
|
|
24
24
|
"task.biz-base.company-keeping.description": "우리 회사·사업장·사업 옵션을 읽고 바꾼다.",
|
|
25
25
|
"error.company-not-found": "회사 정보를 먼저 저장하세요",
|
|
26
|
-
"error.company-name-required": "상호를 적어 주세요"
|
|
26
|
+
"error.company-name-required": "상호를 적어 주세요",
|
|
27
|
+
"error.company-name-taken": "상호 {value}은(는) 이 사업장의 다른 회사가 쓰고 있습니다.",
|
|
28
|
+
"error.counterparty-account-number-letters": "계좌번호 '{value}'에 숫자와 하이픈(-) 아닌 글자가 있습니다. 숫자와 하이픈만 입력하세요.",
|
|
29
|
+
"error.counterparty-account-counterparty-required": "계좌의 거래처를 고르세요.",
|
|
30
|
+
"error.bizplace-not-accessible": "사업장을 찾을 수 없거나 볼 수 없는 사업장입니다. 목록을 새로 불러오세요."
|
|
27
31
|
}
|
package/translations/ms.json
CHANGED
|
@@ -19,5 +19,9 @@
|
|
|
19
19
|
"task.biz-base.company-keeping.name": "Menyelenggara syarikat dan tapak",
|
|
20
20
|
"task.biz-base.company-keeping.description": "Membaca dan mengubah syarikat kita, tapak perniagaannya dan pilihan perniagaan.",
|
|
21
21
|
"error.company-not-found": "Simpan syarikat dahulu",
|
|
22
|
-
"error.company-name-required": "Syarikat memerlukan nama"
|
|
22
|
+
"error.company-name-required": "Syarikat memerlukan nama",
|
|
23
|
+
"error.company-name-taken": "Nama syarikat {value} sudah digunakan oleh syarikat lain dalam ruang kerja ini.",
|
|
24
|
+
"error.counterparty-account-number-letters": "Nombor akaun '{value}' mengandungi aksara selain digit dan sempang. Masukkan digit dan sempang sahaja.",
|
|
25
|
+
"error.counterparty-account-counterparty-required": "Pilih pihak lawan bagi akaun ini.",
|
|
26
|
+
"error.bizplace-not-accessible": "Tapak perniagaan tidak ditemui, atau anda tidak boleh melihatnya. Muat semula senarai."
|
|
23
27
|
}
|
package/translations/zh.json
CHANGED
|
@@ -19,5 +19,9 @@
|
|
|
19
19
|
"task.biz-base.company-keeping.name": "管理公司与营业场所",
|
|
20
20
|
"task.biz-base.company-keeping.description": "读取并修改本公司、营业场所和业务选项。",
|
|
21
21
|
"error.company-not-found": "请先保存公司信息",
|
|
22
|
-
"error.company-name-required": "请填写公司名称"
|
|
22
|
+
"error.company-name-required": "请填写公司名称",
|
|
23
|
+
"error.company-name-taken": "公司名称 {value} 已被本工作区的其他公司使用。",
|
|
24
|
+
"error.counterparty-account-number-letters": "账号 '{value}' 含有数字和连字符(-)以外的字符。请只输入数字和连字符。",
|
|
25
|
+
"error.counterparty-account-counterparty-required": "请选择账户的往来单位。",
|
|
26
|
+
"error.bizplace-not-accessible": "找不到该营业场所,或您无权查看。请重新加载列表。"
|
|
23
27
|
}
|