feat: 同步管理端、用户端与后端业务,并接通线上 Web 接口
补齐平台订阅、外部登录、CRM 同步与用户端页面;Nginx 转发用户端接口,登录页使用 Google 与 Apple 标志。 Co-authored-by: Cursor <cursoragent@cursor.com>
这个提交包含在:
@@ -83,6 +83,7 @@ test('3. team/handover locale 必须包含 menu.team.handover 与中英文案',
|
||||
);
|
||||
assert.ok(content.includes("'en-US'"), '必须包含英文案');
|
||||
assert.ok(content.includes("'zh-CN'"), '必须包含中文案');
|
||||
assert.ok(content.includes("'ar-SA'"), '必须包含阿语文案');
|
||||
assert.ok(content.includes('teamHandover.form.cardId'), '必须包含 cardId 文案');
|
||||
assert.ok(content.includes('teamHandover.form.fromUserId'), '必须包含 fromUserId 文案');
|
||||
assert.ok(content.includes('teamHandover.form.toUserId'), '必须包含 toUserId 文案');
|
||||
@@ -99,3 +100,49 @@ test('3. team/handover locale 必须包含 menu.team.handover 与中英文案',
|
||||
assert.equal(defaultI18n['en-US']['menu.team.handover'], 'Handover');
|
||||
assert.equal(defaultI18n['zh-CN']['menu.team.handover'], '离职交接');
|
||||
});
|
||||
|
||||
test('4. 离职人/接替人必须用 Select(成员列表),提交字段仍是用户 ID', () => {
|
||||
const content = readPage();
|
||||
|
||||
assert.ok(content.includes('Select'), '必须使用 Arco Select');
|
||||
assert.ok(
|
||||
content.includes('admin/team/members/getMemberPage'),
|
||||
'离职人/接替人选项必须来自现有 getMemberPage 接口'
|
||||
);
|
||||
assert.ok(
|
||||
content.includes('field="fromUserId"'),
|
||||
'表单字段名仍必须是 fromUserId'
|
||||
);
|
||||
assert.ok(
|
||||
content.includes('field="toUserId"'),
|
||||
'表单字段名仍必须是 toUserId'
|
||||
);
|
||||
assert.ok(
|
||||
/fromUserId[\s\S]*toUserId/.test(content) &&
|
||||
content.includes('HandoverRequest'),
|
||||
'提交体必须仍按 HandoverRequest 携带 fromUserId / toUserId'
|
||||
);
|
||||
assert.ok(
|
||||
content.includes('body') || content.includes('HandoverRequest'),
|
||||
'必须构造交接请求体'
|
||||
);
|
||||
// 离职人、接替人表单项不得再用裸 Input 手填用户 ID
|
||||
const fromBlock = content.slice(
|
||||
content.indexOf('field="fromUserId"'),
|
||||
content.indexOf('field="toUserId"')
|
||||
);
|
||||
const toStart = content.indexOf('field="toUserId"');
|
||||
const toBlock = content.slice(
|
||||
toStart,
|
||||
content.indexOf('Form.Item', content.indexOf('</Form.Item>', toStart) + 1)
|
||||
);
|
||||
assert.ok(fromBlock.includes('<Select'), 'fromUserId 必须使用 Select');
|
||||
assert.ok(!/<Input[\s>]/.test(fromBlock), 'fromUserId 禁止裸 Input 手填用户 ID');
|
||||
assert.ok(toBlock.includes('<Select'), 'toUserId 必须使用 Select');
|
||||
assert.ok(!/<Input[\s>]/.test(toBlock), 'toUserId 禁止裸 Input 手填用户 ID');
|
||||
assert.ok(
|
||||
!content.includes('modules/team/service/handover') &&
|
||||
!content.includes('backend/src/modules'),
|
||||
'禁止改动或引用后端 handover service'
|
||||
);
|
||||
});
|
||||
|
||||
在新工单中引用
屏蔽一个用户