style(admin): unify dialog layouts and dense readonly presentation

This commit is contained in:
2026-10-20 10:11:31 +08:00
parent 7ff7c9914f
commit 3267679758
214 changed files with 10931 additions and 2654 deletions
@@ -0,0 +1,16 @@
import { describe, expect, it } from 'vitest'
import { customerDialogTitle } from './customerDialogTitle'
describe('customer operation titles', () => {
it('identifies the customer by its trimmed business code', () => {
expect(customerDialogTitle('编辑客户', { tenantCode: ' C0008 ', tenantName: '客户公司' })).toBe('编辑客户 · C0008')
})
it('uses the company name when a business code is unavailable', () => {
expect(customerDialogTitle('客户入驻审核', { tenantCode: ' ', tenantName: ' 客户公司 ' })).toBe('客户入驻审核 · 客户公司')
})
it('does not expose database IDs when both business identifiers are absent', () => {
const customer = { id: '987654321', tenantCode: null, tenantName: ' ' }
expect(customerDialogTitle('删除客户', customer)).toBe('删除客户')
expect(customerDialogTitle('新增客户')).toBe('新增客户')
})
})