完善内容类型与发布状态中文展示
This commit is contained in:
@@ -343,6 +343,19 @@ assertIncludes(
|
||||
"unknownValueLabel: '未知对账渠道'",
|
||||
'财务对账渠道必须使用中文枚举并保留未知值提示',
|
||||
);
|
||||
for (const contentContract of [
|
||||
"{ label: '公告', value: 'notice' }",
|
||||
"{ label: '协议', value: 'agreement' }",
|
||||
"{ label: '草稿', value: 'draft' }",
|
||||
"{ label: '已发布', value: 'published' }",
|
||||
"unknownValueLabel: '未知发布状态'",
|
||||
]) {
|
||||
assertIncludes(
|
||||
resources,
|
||||
contentContract,
|
||||
`内容管理缺少中文枚举契约:${contentContract}`,
|
||||
);
|
||||
}
|
||||
assertIncludes(
|
||||
detailPage,
|
||||
'!hasResourceFieldLabel(props.definition, actualKey)',
|
||||
|
||||
@@ -881,7 +881,27 @@ export const resources: ResourceUiDefinition[] = [
|
||||
}),
|
||||
f('bill_date'), f('difference_amount'),
|
||||
]),
|
||||
define('cms_content', '内容', 'writable', [f('content_type', { required: true }), f('title', { required: true }), f('body', { required: true }), f('version_no'), f('publish_status')]),
|
||||
define('cms_content', '内容', 'writable', [
|
||||
f('content_type', {
|
||||
required: true,
|
||||
type: 'select',
|
||||
options: [
|
||||
{ label: '公告', value: 'notice' },
|
||||
{ label: '协议', value: 'agreement' },
|
||||
],
|
||||
unknownValueLabel: '未知内容类型',
|
||||
}),
|
||||
f('title', { required: true }), f('body', { required: true }), f('version_no'),
|
||||
f('publish_status', {
|
||||
type: 'select',
|
||||
options: [
|
||||
{ label: '草稿', value: 'draft' },
|
||||
{ label: '已发布', value: 'published' },
|
||||
],
|
||||
defaultValue: 'draft',
|
||||
unknownValueLabel: '未知发布状态',
|
||||
}),
|
||||
]),
|
||||
define('cs_ticket', '客服工单', 'writable', [relation('user_account_identity', '/user_account', true), f('ticket_no', { required: true }), f('category', { required: true }), f('priority', { required: true })]),
|
||||
define('platform_account', '平台账户', 'writable', [f('username', { required: true }), f('password', { required: true }), f('display_name'), f('avatar'), f('platform_role_code', { required: true, unknownValueLabel: '未知角色' }), f('phone')]),
|
||||
define('platform_role', '平台角色', 'writable', [f('role_code', { required: true }), f('name', { required: true }), f('location_scope', { required: true, type: 'select', options: resourceSearchEnumOptions('platform_role', 'location_scope') })], 'list', [
|
||||
|
||||
Reference in New Issue
Block a user